<%@ Page Title="Goods Receipt Note" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="GRN.aspx.cs" Inherits="ZFJINV.Purchase.GRN" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="row">
        <div class="col-md-12 mySpace">

            <div class="caption">
                <span class="caption-subject font-blue sbold" style="font-size: 150%;">Goods Receipt Note </span>
                <div class="btn-group pull-right">

                    <img src="../assets/global/img/gridicons/addgrid.png" />
                    <asp:LinkButton ID="lblAdd" Text="Add" runat="server" class="imgCss" OnClick="Add"></asp:LinkButton>

                    <img src="../assets/global/img/gridicons/gridsearch.png" />
                    <asp:LinkButton ID="lblFind" Text="Find" runat="server" class="imgCss" OnClick="Find"></asp:LinkButton>

                    <%--                            <img src="../assets/global/img/gridicons/editgrid.png" />
                            <asp:LinkButton ID="lblEdit" Text="Edit" runat="server" class="imgCss" OnClick = "Edit"></asp:LinkButton>--%>

                    <img src="../assets/global/img/gridicons/first.png" />
                    <asp:LinkButton ID="lblFirst" Text="First" runat="server" class="imgCss" OnClick="First"></asp:LinkButton>

                    <img src="../assets/global/img/gridicons/next.png" />
                    <asp:LinkButton ID="lblNext" Text="Next" runat="server" class="imgCss" OnClick="Next"></asp:LinkButton>


                    <asp:LinkButton ID="lblPrevious" Text="Previous" runat="server" OnClick="Previous"></asp:LinkButton>
                    <img src="../assets/global/img/gridicons/previous.png" class="imgCss" />


                    <asp:LinkButton ID="lblLast" Text="Last" runat="server" OnClick="Last"></asp:LinkButton>
                    <img src="../assets/global/img/gridicons/last.png" class="imgCss" />

                </div>
                <%--<asp:LinkButton ID="lblShow" Text="Show" runat="server" class="imgCss" OnClick ="lblShow_Click"></asp:LinkButton>--%>
            </div>
            <asp:UpdatePanel runat="server">
                <ContentTemplate>
                    <div class="ui segment">
                        <div class="ui stackable form">

                            <div class="col-md-3">
                                <label class="lbStyle">GRN ID</label>
                                <asp:TextBox ID="txtGRNID" CssClass="myInput" runat="server" title="Goods Receipt Note ID" OnTextChanged="txtGRNID_OnTextChanged"></asp:TextBox>
                            </div>

                            <div class="col-md-3">
                                <label class="lbStyle">Date:</label>
                                <asp:TextBox ID="txtGRNDate" runat="server" class="date-picker myInput" title="Goods Receipt Note Date"></asp:TextBox>

                            </div>
                            <div class="col-md-3">

                                <label class="lbStyle">GRN Type:</label>
                                <asp:DropDownList ID="txtGRNType" AutoPostBack="True" OnTextChanged="txtGRNType_TextChanged" runat="server" class="select2 form-control ">
                                    <asp:ListItem>  </asp:ListItem>
                                    <asp:ListItem>PO</asp:ListItem>
                                    <asp:ListItem>Inventory</asp:ListItem>
                                </asp:DropDownList>

                            </div>
                            <div class="col-md-3">

                                <label class="lbStyle">Ref No:</label>
                                <asp:DropDownList ID="txtPORefNo" AutoPostBack="True" OnTextChanged="txtPORefNo_OnTextChanged" runat="server" class="select2 form-control "></asp:DropDownList>

                            </div>

                            <%--  <div class="col-md-3">
                                <label class="lbStyle">PO Ref No.:</label>
                                <asp:TextBox ID="txtPORefNo" runat="server" AutoPostBack="True" OnTextChanged="txtPORefNo_OnTextChanged" required="required" class="myInput" title="Purchase Order Reference No."></asp:TextBox>

                            </div>--%>

                           <%-- <div class="col-md-3">
                                <label class="lbStyle">Supplier:</label>
                                <asp:TextBox ID="txtSupplier" runat="server" class="myInput" Enabled="false"></asp:TextBox>

                            </div--%>
                            <%--<div class="col-md-3">

                                <label class="lbStyle">WareHouse:</label>
                                <asp:TextBox ID="txtWareHouse" runat="server" Enabled="false" class="myInput">
                                </asp:TextBox>

                            </div>--%>

                              <div class="col-md-3">

                                <label class="lbStyle">WareHouse:</label>
                                <asp:DropDownList ID="txtWareHouse" runat="server" class="select2 form-control " OnSelectedIndexChanged="txtWareHouse_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>

                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5"
                                    ControlToValidate="txtWareHouse"
                                    ValidationGroup="formValidation"
                                    ErrorMessage="Required Field" CssClass="message"
                                    runat="Server">
                                </asp:RequiredFieldValidator>
                            </div>

                            <%--  <div class="col-md-3">

                                <label class="lbStyle">POS:</label>
                                <asp:DropDownList ID="txtPOSID" Visible="false" runat="server" class="select2 form-control "></asp:DropDownList>

                            </div>--%>
                            <div class="col-md-3">
                                <label class="lbStyle">Remarks</label>
                                <asp:TextBox ID="txtRemarks" CssClass="myInput" runat="server" title="Goods Receipt Note ID"></asp:TextBox>
                            </div>

                            <div class="col-md-3">

                                <asp:TextBox ID="txtBaseDocDate" CssClass="myInput" runat="server" Visible="false"></asp:TextBox>
                            </div>
                            <div class="row">
                            </div>
                        </div>
                    </div>

                    <%-- <asp:ScriptManager runat="server">
            </asp:ScriptManager>--%>

                    <div class="rounded-corners">
                        <div style="width: 100%; overflow: auto;">



                            <asp:GridView ID="grd" ShowHeaderWhenEmpty="True"
                                GridLines="Horizontal" BorderColor="WhiteSmoke" RowStyle-Wrap="false"
                                HeaderStyle-Wrap="false" RowStyle-BorderColor="#e8e8ec"
                                CssClass="uimy ui table" runat="server" AutoGenerateColumns="False"
                                OnRowCommand="grd_OnRowCommand" AllowPaging="True"
                                OnPageIndexChanging="grd_OnPageIndexChanging"
                                OnRowEditing="grd_OnRowEditing"
                                OnRowUpdating="grd_OnRowUpdating"
                                OnRowCancelingEdit="grd_OnRowCancelingEdit"
                                OnRowDataBound="grd_OnRowDataBound"
                                PagerStyle="pagination-ys">

                                <Columns>

                                    <asp:TemplateField HeaderText="POID" InsertVisible="False" Visible="False" SortExpression="POID">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("POID") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("POID") %>'></asp:Label>
                                        </ItemTemplate>
                                        <%--  <FooterTemplate>
                                            <asp:TextBox ID="txtPOID" CssClass="myInput1" runat="server"></asp:TextBox>
                                        </FooterTemplate>--%>

                                    </asp:TemplateField>


                                    <asp:TemplateField HeaderText="Product Code" InsertVisible="False" SortExpression="ProductCode" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("ProductCode") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label4" runat="server" Text='<%# Bind("ProductCode") %>'></asp:Label>
                                        </ItemTemplate>
                                        <%-- <FooterTemplate>
                                            <asp:TextBox ID="txtCode" Enabled="False" required="required" CssClass="itemCode" runat="server"></asp:TextBox>
                                        </FooterTemplate>--%>
                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Name" InsertVisible="False" SortExpression="Name" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle2">
                                        <EditItemTemplate>
                                            <asp:Label ID="txtName" Text='<%# Eval("Name") %>' runat="server"></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label6" Text='<%# Eval("Name") %>' runat="server"></asp:Label>
                                        </ItemTemplate>
                                        <%--  <FooterTemplate>
                                            <asp:DropDownList ID="txtName" OnSelectedIndexChanged="txtName_OnSelectedIndexChanged" CssClass="select2 form-control gvModel" AutoPostBack="True" required="required" AppendDataBoundItems="true" runat="server"></asp:DropDownList>
                                        </FooterTemplate>--%>
                                        <FooterStyle CssClass="FooterStyle2" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Unit Price" InsertVisible="False" SortExpression="UnitPrice" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label7" runat="server" Text='<%# Eval("UnitPrice") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label8" runat="server" Text='<%# Bind("UnitPrice") %>'></asp:Label>
                                        </ItemTemplate>
                                        <%--  <FooterTemplate>
                                            <asp:TextBox ID="txtUnitPrice" Enabled="False" CssClass="UnitPrice" runat="server"></asp:TextBox>
                                        </FooterTemplate>--%>

                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />

                                    </asp:TemplateField>
                                    <%--  <asp:TemplateField HeaderText="Qty" InsertVisible="False" SortExpression="Qty" HeaderStyle-CssClass="gridViewModel" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtQty" AutoPostBack="True" Enabled ="true" Text='<%# Bind("Qty") %>' TextMode="Number" OnTextChanged="txtQty_OnTextChanged" CssClass="Quatntity" runat="server" required="required"></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label12" runat="server" Text='<%# Bind("Qty") %>'></asp:Label>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:TextBox ID="txtQty" AutoPostBack="True" TextMode="Number" OnTextChanged="txtQty_OnTextChanged" CssClass="Quatntity" runat="server" Enabled ="true"></asp:TextBox>

                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11"
                                                ControlToValidate="txtQty"
                                                ValidationGroup="gvValidation" CssClass="message1"
                                                ErrorMessage="Required Field."
                                                runat="Server">
                                            </asp:RequiredFieldValidator>
                                        </FooterTemplate>

                                    </asp:TemplateField>--%>

                                    <asp:TemplateField HeaderText="Qty" InsertVisible="False" SortExpression="Qty" HeaderStyle-CssClass="gridViewModel" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtQty" Text='<%# Bind("Qty") %>' TextMode="Number" OnTextChanged="txtQty_OnTextChanged" CssClass="Quatntity" runat="server" required="required"></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label12" runat="server" Text='<%# Bind("Qty") %>'></asp:Label>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:TextBox ID="txtQty" AutoPostBack="True" TextMode="Number" OnTextChanged="txtQty_OnTextChanged" CssClass="Quatntity" runat="server"></asp:TextBox>

                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11"
                                                ControlToValidate="txtQty"
                                                ValidationGroup="gvValidation" CssClass="message1"
                                                ErrorMessage="Required Field."
                                                runat="Server">
                                            </asp:RequiredFieldValidator>
                                        </FooterTemplate>

                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Batch No" InsertVisible="False" SortExpression="BatchNo" HeaderStyle-CssClass="gridViewModel" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle" Visible="false">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label13" runat="server" Text='<%# Eval("BatchNo") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label14" runat="server" Text='<%# Bind("BatchNo") %>'></asp:Label>
                                        </ItemTemplate>
                                        <%-- <FooterTemplate>
                                            <asp:TextBox ID="txtBatchNo" Enabled="False" CssClass="Amount" runat="server" required="required"></asp:TextBox>
                                        </FooterTemplate>--%>
                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridViewModel" />
                                        <ItemStyle CssClass="gridviewBody1" />
                                    </asp:TemplateField>
                                    
                                    <asp:TemplateField HeaderText="Brand" InsertVisible="False" SortExpression="Brand" HeaderStyle-CssClass="gridViewModel" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label15" runat="server" Text='<%# Eval("Brand") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label16" runat="server" Text='<%# Bind("Brand") %>'></asp:Label>
                                        </ItemTemplate>
                                        <%-- <FooterTemplate>
                                            <asp:TextBox ID="txtBrand" Enabled="False" CssClass="Tax" runat="server"></asp:TextBox>
                                        </FooterTemplate>--%>
                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridViewModel" />
                                        <ItemStyle CssClass="gridviewBody1" />
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Tax %" InsertVisible="False" SortExpression="Tax" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle" Visible="false">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label17" runat="server" Text='<%# Eval("Tax") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label18" runat="server" Text='<%# Bind("Tax") %>'></asp:Label>
                                        </ItemTemplate>
                                        <%-- <FooterTemplate>
                                            <asp:TextBox ID="txtTax" Enabled="False" CssClass="Tax" runat="server"></asp:TextBox>
                                        </FooterTemplate>--%>

                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />

                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Discount" InsertVisible="False" SortExpression="Discount" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle" Visible="false">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label19" runat="server" Text='<%# Eval("Discount") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label20" runat="server" Text='<%# Bind("Discount") %>'></asp:Label>
                                        </ItemTemplate>
                                        <%--     <FooterTemplate>
                                            <asp:TextBox ID="txtDiscount" Enabled="False" CssClass="Discount" runat="server"></asp:TextBox>
                                        </FooterTemplate>--%>

                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />

                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Amount" InsertVisible="False" SortExpression="Amount" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label21" runat="server" Text='<%# Eval("Amount") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label22" runat="server" Text='<%# Bind("Amount") %>'></asp:Label>
                                        </ItemTemplate>
                                        <%-- <FooterTemplate>
                                            <asp:TextBox ID="txtAmount" Enabled="False" CssClass="Amount" runat="server"></asp:TextBox>
                                        </FooterTemplate>--%>
                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Action" InsertVisible="False" SortExpression="Action" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lblEdit" Text="Edit" ToolTip="Edit" CommandArgument='<%# Eval("POID")  %>' formnovalidate="formnovalidate" ImageUrl="~/assets/global/img/edit.png" runat="server" CommandName="EditRow" />
                                            <%--      <asp:ImageButton ID="lblDelete" ToolTip="Delete" CommandArgument='<%# Eval("POID") %>' formnovalidate="formnovalidate" ImageUrl="~/assets/global/img/deletee.png" runat="server" CommandName="DeleteRow" />--%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:LinkButton ID="lblUpdate" ToolTip="Update" CommandArgument='<%# Eval("POID") %>' CommandName="UpdateRow" runat="server">Update</asp:LinkButton>
                                            <asp:LinkButton ID="lblCancel" ToolTip="Cancel" CommandArgument='<%# Eval("POID") %>' CommandName="CancelRow" runat="server">Cancel</asp:LinkButton>
                                        </EditItemTemplate>
                                        <%--    <FooterTemplate>
                                            <asp:Button ID="lblSave" CommandName="InsertRow" CssClass="small ui button blue" Text="Add" runat="server"></asp:Button>
                                        </FooterTemplate>--%>

                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />

                                    </asp:TemplateField>
                                </Columns>

                                <HeaderStyle Wrap="False" />
                                <RowStyle BorderColor="#E8E8EC" Wrap="False" />

                            </asp:GridView>

                            <%-- Inv Grid --%>
                            <asp:GridView ID="grdINV" ShowHeaderWhenEmpty="True"
                                GridLines="Horizontal" BorderColor="WhiteSmoke" RowStyle-Wrap="false"
                                HeaderStyle-Wrap="false" RowStyle-BorderColor="#e8e8ec"
                                CssClass="uimy ui table" runat="server" AutoGenerateColumns="False"
                                OnRowCommand="grd_OnRowCommand" AllowPaging="True"
                                OnPageIndexChanging="grd_OnPageIndexChanging"
                                OnRowEditing="grdINV_RowEditing"
                                OnRowUpdating="grdINV_RowUpdating"
                                OnRowCancelingEdit="grdINV_RowCancelingEdit"
                                OnRowDataBound="grdINV_RowDataBound"
                                PagerStyle="pagination-ys">

                                <Columns>

                                    <asp:TemplateField HeaderText="POID" InsertVisible="False" Visible="False" SortExpression="POID">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label31" runat="server" Text='<%# Eval("POID") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label32" runat="server" Text='<%# Bind("POID") %>'></asp:Label>
                                        </ItemTemplate>
                                        
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Product Code" InsertVisible="False" SortExpression="ProductCode" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label33" runat="server" Text='<%# Eval("ProductCode") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label34" runat="server" Text='<%# Bind("ProductCode") %>'></asp:Label>
                                        </ItemTemplate>

                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="WH Name" InsertVisible="False" SortExpression="WH Name" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label44" runat="server" Text='<%# Eval("WHName") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label45" runat="server" Text='<%# Bind("WHName") %>'></asp:Label>
                                        </ItemTemplate>
                                        
                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />

                                    </asp:TemplateField>
                                    
                                    <asp:TemplateField HeaderText="WHID" InsertVisible="False" Visible="False" SortExpression="WHID">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label46" runat="server" Text='<%# Eval("WHID") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label47" runat="server" Text='<%# Bind("WHID") %>'></asp:Label>
                                        </ItemTemplate>                                        
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Brand" InsertVisible="False" SortExpression="Brand" HeaderStyle-CssClass="gridViewModel" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label42" runat="server" Text='<%# Eval("Brand") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label43" runat="server" Text='<%# Bind("Brand") %>'></asp:Label>
                                        </ItemTemplate>

                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridViewModel" />
                                        <ItemStyle CssClass="gridviewBody1" />
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Name" InsertVisible="False" SortExpression="Name" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle2">
                                        <EditItemTemplate>
                                            <asp:Label ID="txtName" Text='<%# Eval("Name") %>' runat="server"></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label35" Text='<%# Eval("Name") %>' runat="server"></asp:Label>
                                        </ItemTemplate>

                                        <FooterStyle CssClass="FooterStyle2" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Unit Price" InsertVisible="False" SortExpression="UnitPrice" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label36" runat="server" Text='<%# Eval("UnitPrice") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label37" runat="server" Text='<%# Bind("UnitPrice") %>'></asp:Label>
                                        </ItemTemplate>

                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />

                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Balance Qty" InsertVisible="False" SortExpression="Qty" HeaderStyle-CssClass="gridViewModel" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtBalanceQty" Text='<%# Bind("BalanceQty") %>' TextMode="Number" OnTextChanged="txtBalanceQty_TextChanged" CssClass="Quatntity" runat="server" required="required"></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label38" runat="server" Text='<%# Bind("BalanceQty") %>'></asp:Label>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:TextBox ID="txtBalanceQty" AutoPostBack="True" TextMode="Number" OnTextChanged="txtBalanceQty_TextChanged" CssClass="Quatntity" runat="server"></asp:TextBox>

                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11"
                                                ControlToValidate="txtBalanceQty"
                                                ValidationGroup="gvValidation" CssClass="message1"
                                                ErrorMessage="Required Field."
                                                runat="Server">
                                            </asp:RequiredFieldValidator>
                                        </FooterTemplate>

                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Transfer Qty" InsertVisible="False" SortExpression="Qty" HeaderStyle-CssClass="gridViewModel" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="txtTransferQty" Text='<%# Bind("TransferQty") %>' TextMode="Number" OnTextChanged="txtTransferQty_TextChanged" CssClass="Quatntity" runat="server" required="required"></asp:TextBox>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label39" runat="server" Text='<%# Bind("TransferQty") %>'></asp:Label>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:TextBox ID="txtTransferQty" AutoPostBack="True" TextMode="Number" OnTextChanged="txtTransferQty_TextChanged" CssClass="Quatntity" runat="server"></asp:TextBox>

                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11"
                                                ControlToValidate="txtTransferQty"
                                                ValidationGroup="gvValidation" CssClass="message1"
                                                ErrorMessage="Required Field."
                                                runat="Server">
                                            </asp:RequiredFieldValidator>
                                        </FooterTemplate>

                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Batch No" InsertVisible="False" SortExpression="BatchNo" HeaderStyle-CssClass="gridViewModel" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <EditItemTemplate>
                                            <asp:Label ID="Label40" runat="server" Text='<%# Eval("BatchNo") %>'></asp:Label>
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label41" runat="server" Text='<%# Bind("BatchNo") %>'></asp:Label>
                                        </ItemTemplate>

                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridViewModel" />
                                        <ItemStyle CssClass="gridviewBody1" />
                                    </asp:TemplateField>                                                                       
                                                                        

                                    <%--                                    <asp:TemplateField HeaderText="Action" InsertVisible="False" SortExpression="Action" HeaderStyle-CssClass="gridView2" ItemStyle-CssClass="gridviewBody1" FooterStyle-CssClass="FooterStyle">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lblEdit" Text="Edit" ToolTip="Edit" CommandArgument='<%# Eval("POID")  %>' formnovalidate="formnovalidate" ImageUrl="~/assets/global/img/edit.png" runat="server" CommandName="EditRow" />
                                           
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:LinkButton ID="lblUpdate" ToolTip="Update" CommandArgument='<%# Eval("POID") %>' CommandName="UpdateRow" runat="server">Update</asp:LinkButton>
                                            <asp:LinkButton ID="lblCancel" ToolTip="Cancel" CommandArgument='<%# Eval("POID") %>' CommandName="CancelRow" runat="server">Cancel</asp:LinkButton>
                                        </EditItemTemplate>
                                       

                                        <FooterStyle CssClass="FooterStyle" />
                                        <HeaderStyle CssClass="gridView2" />
                                        <ItemStyle CssClass="gridviewBody1" />

                                    </asp:TemplateField>--%>
                                </Columns>

                                <HeaderStyle Wrap="False" />
                                <RowStyle BorderColor="#E8E8EC" Wrap="False" />

                            </asp:GridView>

                        </div>

                    </div>
                    <div class="ui segment col-md-5" style="border-color: #AAB7B8;">
                        <label style="font-size: 12px; color: #2E4053; font-weight: 700; padding-bottom: 3px;">Total Quantity to Receive:</label>
                        <asp:TextBox ID="txtTotalTax" type="text" disabled="disabled" runat="server" class=" form-control" />

                        <label style="font-size: 12px; color: #2E4053; font-weight: 700; padding-bottom: 3px; padding-top: 7px;">Received Quantity:</label>
                        <asp:TextBox ID="txtDiscount" type="text" disabled="disabled" class=" form-control" runat="server" /><br />

                        <label style="font-size: 12px; color: #2E4053; font-weight: 700; padding-bottom: 3px; padding-top: 7px;">Rest Quantity:</label>
                        <asp:TextBox ID="txtTotalAmount" type="text" disabled="disabled" class=" form-control" runat="server" />
                        
                        <asp:Button ID="btnAdd" runat="server" class="ui button green" formnovalidate="formnovalidate" OnClick="btnAdd_OnClick" Text="Save" /><tb />
                        <asp:Button ID="btnPrint" runat="server" class="ui button green" OnClick="lblShow_Click" Text="Print Preview" /><br />
                    </div>

                    <div class="col-md-6">
                        <div class="messagealert" id="alert_container">
                        </div>
                    </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="grd" />
                </Triggers>
            </asp:UpdatePanel>

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