<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="UOM_Conversion.aspx.cs" Inherits="HRMS.UOM_Conversion" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="main-panel">
        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                    <header class="panel-heading">
                        Unit Of Measure Conversions
                        <div class="pull-right">
                            <asp:Button Text="Back" CssClass="btn btn-info" ID="btn_cancel" runat="server" OnClick="btn_cancel_Click" />
                        </div>
                    </header>

                    <div class="panel-body">
                        <div class="span6">
                            <div id="divmessage" runat="server" visible="false"
                                class="alert alert-info alert-dismissable">
                                <asp:Label Text="" ID="lbl_msg" CssClass="msg" runat="server"></asp:Label>
                            </div>
                        </div>

                        <div class="span6">
                            <div id="diverrmessage" runat="server" visible="false"
                                class="alert alert-info alert-dismissable">
                                <asp:Label Text="" ID="lbl_err_msg" CssClass="msg" runat="server"></asp:Label>
                            </div>
                        </div>

                        <div class="row">
                            <asp:HiddenField ID="hid_cls" runat="server" />
                            <asp:GridView ID="GridView1" Visible="true" runat="server" AutoGenerateColumns="False"
                                CssClass="table table-striped table-bordered table-hover" CellPadding="0" Width="100%" OnRowCommand="GridView1_RowCommand">
                                <Columns>
                                    <asp:TemplateField HeaderText="UOM" HeaderStyle-Width="20%">
                                        <ItemTemplate>
                                            <asp:HiddenField ID="hid_uom_conv" runat="server" Value='<%# Bind("uom_conversion_id")%>' />
                                            <asp:TextBox ID="txt_uom_name" Enabled="false" Text='<%# Bind("UNIT_OF_MEASURE_TL") %>' runat="server" CssClass="form-control"></asp:TextBox>
                                            <%--<asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="reqtxt_uom_name" ControlToValidate="txt_uom_name" ErrorMessage="Receive Date is Required!" />--%>
                                        </ItemTemplate>
                                    </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Class" HeaderStyle-Width="20%">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_class" Enabled="false" Text='<%# Bind("UOM_CLASS_TL") %>' runat="server" CssClass="form-control"></asp:TextBox>
                                            <%--<asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="reqtxt_uom" ControlToValidate="txt_uom" ErrorMessage="Receive Date is Required!" />--%>
                                        </ItemTemplate>
                                    </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Conversion" HeaderStyle-Width="20%">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_conver" Text='<%# Bind("conversion_rate") %>' runat="server" CssClass="form-control"></asp:TextBox>
                                            <%--<asp:RequiredFieldValidator SetFocusOnError="true" runat="server" ID="reqtxt_desc" ControlToValidate="txt_desc" ErrorMessage="Receive Date is Required!" />--%>
                                        </ItemTemplate>
                                    </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Base Unit" HeaderStyle-Width="20px">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_baseunit" Enabled="false" Text='<%# Bind("ATTRIBUTE_CATEGORY") %>' runat="server" CssClass="form-control"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Inactive On" HeaderStyle-Width="20%">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_inactive_dt" Text='<%# Bind("disable_date") %>' runat="server" CssClass="form-control datetime"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Action" ItemStyle-Width="6%">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnk_add" runat="server" CommandName="gadd"><i class="fa fa-plus" style="font-size:20px !important;"></i></asp:LinkButton>
                                            <asp:LinkButton ID="linkdlt" Visible="false" CausesValidation="false" CommandName="gDelete" runat="server" OnClientClick="return confirm('Are you sure to delete?')"><i class="fa fa-trash" style="font-size:20px !important"></i></asp:LinkButton>
                                        </ItemTemplate>
                                        <ItemStyle Width="6%"></ItemStyle>
                                    </asp:TemplateField>

                                </Columns>
                                <%--<FooterStyle CssClass="footerStyle" />
                                    <HeaderStyle CssClass="headerStyle" />
                                    <RowStyle CssClass="rowStyle" />--%>
                            </asp:GridView>
                        </div>



                    </div>
                </section>
            </div>
        </div>
    </div>
</asp:Content>
