<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="SaleOrder.aspx.vb" Inherits="SaleOrder.SaleOrder" %>
<%@ Register assembly="BasicFrame.WebControls.BasicDatePicker" namespace="BasicFrame.WebControls" tagprefix="BDP" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">


    <style type="text/css">
        .style6
        {
            height: 24px;
            width: 122px;
        }
        .style10
        {            height: 25px;
        }
        .style15
        {
            width: 133px;
        }
        .style21
        {
            width: 356px;
        }
        .style22
        {
            width: 76px;
            height: 26px;
        }
        .style23
        {
            width: 394px;
            }
        .style25
        {
            width: 133px;
            height: 26px;
        }
        .style31
        {
            height: 26px;
            width: 383px;
        }
        .style33
        {
            width: 143px;
        }
        .style35
        {
            width: 187px;
        }
        .style36
        {
            height: 24px;
            width: 187px;
        }
        .style37
        {
        }
        .style38
        {
            width: 165px;
            height: 26px;
        }
        .style39
        {
            width: 165px;
        }
        .style40
        {
            width: 122px;
        }
        .style41
        {
            height: 26px;
            width: 356px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <asp:LinkButton ID="btnLogOn" runat="server" BorderStyle="None">Log Out</asp:LinkButton>
    &nbsp;&gt;&gt;
        
    <asp:LinkButton ID="btnMainMenu" runat="server" BorderStyle="None">Main Menu</asp:LinkButton>
    &nbsp;&gt;&gt;
    <asp:LinkButton ID="btnSOMain" runat="server" BorderStyle="None">Sale Order List</asp:LinkButton>
    &nbsp;&nbsp;&gt;&gt;
           <asp:Label ID="lblSaleOrder" runat="server" Font-Bold="True" 
               Text="Sale Order Detail"></asp:Label>
<hr />
<asp:ScriptManager ID="ScriptManager1" runat="server" />
       <asp:UpdatePanel ID="UpdatePanel1" runat="server">
           <ContentTemplate>

<asp:Panel ID="pAR" runat="server" Visible="False">
    <table width="100%">
        <tr>
            <td align="center" >
                สังกัดผู้ดูแล<asp:TextBox ID="txtSale" runat="server"></asp:TextBox>
                <asp:DropDownList ID="DLAR" runat="server">
                    <asp:ListItem>รหัสลูกค้า</asp:ListItem>
                    <asp:ListItem>ชื่อลูกค้า</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="DL" runat="server">
                    <asp:ListItem>ขึ้นต้นด้วย</asp:ListItem>
                    <asp:ListItem>มีคำว่า</asp:ListItem>
                    <asp:ListItem>เท่ากับ</asp:ListItem>
                    <asp:ListItem>ไม่เท่ากับ</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox ID="txtARSearch" runat="server"></asp:TextBox>
                <asp:Button ID="btnSearchAR" runat="server" Text="Search" />
            </td>
        </tr>
        <tr>
            <td align="center" >
                <asp:GridView ID="GridAR" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" DataKeyNames="TARNCode" 
                    OnPageIndexChanging="ShowPageCommand">
                    <HeaderStyle BackColor="#2D3E5B" ForeColor="White" />
                    <AlternatingRowStyle BackColor="#F0F0F0" />
                    <Columns>
                        <asp:TemplateField HeaderText="รหัสลูกค้า">
                            <ItemTemplate>
                                <asp:Label ID="lblTARNCode" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ชื่อลูกค้า">
                            <ItemTemplate>
                                <asp:Label ID="lblTARNName" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ช่องราคา" Visible="False">
                            <ItemTemplate>
                                <asp:Label ID="lblPriceChannel" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ส่วนลด">
                            <ItemTemplate>
                                <asp:Label ID="lblTARNDiscount" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ผู้ติดต่อ">
                            <ItemTemplate>
                                <asp:Label ID="lblTARNContactName" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Sale">
                            <ItemTemplate>
                                <asp:Label ID="lblAR2SaleCode" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="เครดิต">
                            <ItemTemplate>
                                <asp:Label ID="lblTARNCreditDay" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Button ID="btnCloseAR" runat="server" Text="ยกเลิก" />
            </td>
        </tr>
    </table>
        </asp:Panel>
        
<%--iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii--%>

<asp:Panel ID="pPdt" runat="server" Visible="False">        
             <table>
             
                 <tr>
                     <td align="left" >
                         <asp:DropDownList ID="DLPdt" runat="server">
                             <asp:ListItem>รหัสสินค้า</asp:ListItem>
                             <asp:ListItem>ชื่อสินค้า</asp:ListItem>
                         </asp:DropDownList>
                         <asp:DropDownList ID="DLProduct" runat="server">
                             <asp:ListItem>ขึ้นต้นด้วย</asp:ListItem>
                             <asp:ListItem>มีคำว่า</asp:ListItem>
                             <asp:ListItem>เท่ากับ</asp:ListItem>
                             <asp:ListItem>ไม่เท่ากับ</asp:ListItem>
                         </asp:DropDownList>
                         <asp:TextBox ID="txtPdtCode" runat="server"></asp:TextBox>
                         <asp:Button ID="btnSearchPdt" runat="server" Text="Search" />
                        </td>
                        <td>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="Button3" runat="server" Text="ตกลง" />
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnPdtClose" runat="server" Text="ยกเลิก" />
                        </td>
                     
                 </tr>
                 </TABLE>
                 <TABLE width="780px">
                    <tr>
                         <td class="style1" valign="top" width="400px">
                             <asp:GridView ID="GridPdt" runat="server" AllowPaging="True" 
                                 AutoGenerateColumns="False" DataKeyNames="TPLPTPOSCode" 
                                 OnPageIndexChanging="ShowPageCommandGridPdt" Width="386px">
                                 <HeaderStyle BackColor="#2D3E5B" ForeColor="White" />
                                 <AlternatingRowStyle BackColor="#F0F0F0" />
                                 <Columns>
                                     <asp:TemplateField HeaderText="รหัสสินค้า">
                                         <ItemTemplate>
                                             <asp:Label ID="lblSelect2" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="ชื่อสินค้า" ControlStyle-Width="160px">
                                         <ItemTemplate>
                                             <asp:Label ID="lblTPLPName" runat="server" Width="160px"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="หน่วย">
                                         <ItemTemplate>
                                             <asp:Label ID="lblTPLPTUntCode" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="ราคาขาย">
                                         <ItemTemplate>
                                             <asp:Label ID="lblPrice" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="ส่วนลด">
                                         <ItemTemplate>
                                             <asp:Label ID="lblDisc" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="Barcode" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="lblTPLPBarCode" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                 </Columns>
                             </asp:GridView>
                         </td>

                         <td valign="top" width="400px">
                             <asp:GridView ID="GridPdtSelect" runat="server" AllowPaging="True" 
                                 AutoGenerateColumns="False" OnPageIndexChanging="ShowPageCommandGridPdtSelect" 
                                 PageSize="20" Width="386px">
                                 <HeaderStyle BackColor="#2D3E5B" ForeColor="White" />
                                 <AlternatingRowStyle BackColor="#F0F0F0" />
                                 <Columns>
                                     <asp:TemplateField HeaderText="รหัสสินค้า">
                                         <ItemTemplate>
                                             <asp:Label ID="lblSelect2" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="ชื่อสินค้า">
                                         <ItemTemplate>
                                             <asp:Label ID="lblTPLPName" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="หน่วย">
                                         <ItemTemplate>
                                             <asp:Label ID="lblUM" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="ราคาขาย">
                                         <ItemTemplate>
                                             <asp:Label ID="lblPrice" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="ส่วนลด">
                                         <ItemTemplate>
                                             <asp:Label ID="lblDisc" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <%--//////////////////////////////////////////////////////--%>
                                     <asp:TemplateField HeaderText="TSOBLn" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="TSOBLn" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="TSOBQuantity" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="TSOBQuantity" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="TSOBIsPremium" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="TSOBIsPremium" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="lblPayTypeDP" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="lblPayTypeDP" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="TSOBFreeCode" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="TSOBFreeCode" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="lblCodeDP" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="lblCodeDP" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="lblPriceNotShow" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="lblPriceNotShow" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="TSOBFreeCode" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="lblDiscNumber" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="TSOBNetAmount" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="TSOBNetAmount" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="TSOBDiscountText" visible="False">
                                         <ItemTemplate>
                                             <asp:Label ID="TSOBDiscountText" runat="server"></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                 </Columns>
                             </asp:GridView>
                         </td>
                    
                 </tr>
             </table>

    
     </asp:Panel>

<%--iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii--%>
<asp:Panel id="panelSO" runat="server">
    <table width="780px">
        <tr>
            <td class="style37">Customer<asp:TextBox ID="txtARCode" runat="server" 
                    BorderStyle="None" Height="18px" style="margin-left: 6px" Width="76px"></asp:TextBox>
            </td>
            <td class="style41">
                <asp:TextBox ID="txtARName" runat="server" Width="268px" ReadOnly="True"></asp:TextBox>
                <asp:Button ID="btnAR" runat="server" Text="ค้นหา" />
            </td>
            <td class="style40" align="right">Sale Order No.</td>
            <td class="style35"><asp:TextBox ID="txtSaleNo" runat="server" BorderStyle="None"></asp:TextBox></td>            
        </tr>
        <tr>
            <td class="style33" align="right" rowspan="2" valign="top">
                <asp:TextBox ID="txtRunID" runat="server" Height="21px" Visible="False" 
                    Width="52px"></asp:TextBox>
                &nbsp;ที่อยู่</td>
            <td class="style21" rowspan="2" valign="top">
                <asp:TextBox ID="txtAddress" runat="server" BorderStyle="None" Height="48px" 
                    ReadOnly="True" style="text-align:left; margin-top: 0px;" TextMode="MultiLine" 
                    ViewStateMode="Enabled" Width="314px"></asp:TextBox>
            </td>
            <td class="style6" align="right">Order Date</td>
            <td class="style36"><asp:TextBox ID="txtSaleDate" runat="server" BorderStyle="None"></asp:TextBox></td>            
        </tr>
        <tr>
            <td class="style40" align="right" valign="top">Credit Term</td>
            <td class="style35" valign="top">
                <asp:TextBox ID="txtCredit" runat="server" ReadOnly="True" 
                    AutoCompleteType="Disabled" BorderStyle="None"></asp:TextBox></td>            
        </tr>
                <tr>
            <td class="style37" align="left" colspan="2">ส่วนลด :
                <asp:TextBox ID="txtgetDisc" runat="server" Height="21px" ReadOnly="True" 
                    ViewStateMode="Enabled" Width="52px"></asp:TextBox>
                &nbsp;ผู้ดูแล :&nbsp;
                <asp:TextBox ID="txtContactName" runat="server" BorderStyle="None" 
                    ReadOnly="True" Width="286px"></asp:TextBox>
                    </td>
            <td class="style40" align="right">Ref. No.</td>
            <td class="style35"><asp:TextBox ID="txtRefNo" runat="server" 
                    AutoCompleteType="Disabled"></asp:TextBox></td>            
        </tr>
                <tr>
            <td class="style37" align="right">วันส่งสินค้า :</td>
            <td class="style41"><BDP:BDPLite ID="txtDeliveryDate" runat="server"   Width="40px" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnAddProduct" runat="server" Text="เพิ่มสินค้า" />
                    </td>
            <td class="style40" align="right">Ref. Date</td>
            <td class="style35"><BDP:BDPLite ID="txtRefDate" runat="server" Width="40px" />
                    </td>            
        </tr>
    </table>
   

<asp:GridView ID="GridSO" runat="server"  AutoGenerateColumns="False" Width="780px">
 <HeaderStyle BackColor="#2D3E5B" ForeColor="White"></HeaderStyle>
     <AlternatingRowStyle BackColor="#F0F0F0" />
     <Columns>

	        <asp:TemplateField  visible="False"  HeaderText="Select">
		        <ItemTemplate>
			        <asp:label id="lblSelect2" runat="server"></asp:label>
		        </ItemTemplate>
                <ItemStyle  />
	        </asp:TemplateField>
	        <asp:TemplateField   HeaderText="รหัสสินค้า"  ControlStyle-Width="90px">
		        <ItemTemplate>
			        <asp:checkbox id="lblItemNumber" runat="server"></asp:checkbox>
		        </ItemTemplate>
                <ItemStyle />
	        </asp:TemplateField>
            <asp:TemplateField   HeaderText="ชื่อสินค้า" ControlStyle-Width="200px">
		        <ItemTemplate>
			        <asp:textbox id="lblDescription" runat="server" Width="250px" Wrap="False"></asp:textbox>
		        </ItemTemplate>
                <ItemStyle />
	        </asp:TemplateField>
	        <asp:TemplateField   HeaderText="จำนวน"  ControlStyle-Width="55px">
		        <ItemTemplate>
			        <asp:TextBox id="lblQTY" runat="server"></asp:TextBox>
		        </ItemTemplate>
                <ItemStyle  HorizontalAlign="Right"/>
	        </asp:TemplateField>
	        <asp:TemplateField   HeaderText="หน่วย">
		        <ItemTemplate>
			        <asp:Label id="lblUM" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle />
	        </asp:TemplateField>
	        <asp:TemplateField  visible = "False" HeaderText="PayType">
		        <ItemTemplate>
			        <asp:Label id="lblPayType" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle  />
	        </asp:TemplateField>
                         <asp:TemplateField  HeaderText="Pay Type">
		        <ItemTemplate>
			        <asp:DropDownList id="lblPayTypeDP" runat="server"></asp:DropDownList>
		        </ItemTemplate>
                <ItemStyle   />
	        </asp:TemplateField>
	        <asp:TemplateField  visible = "False"  HeaderText="Code">
		        <ItemTemplate>
			        <asp:Label id="lblCode" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle   />
	        </asp:TemplateField>
            <asp:TemplateField  visible = "False"  HeaderText="CodeNotShow">
		        <ItemTemplate>
			        <asp:Label id="lblCodeNotShow" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle   />
	        </asp:TemplateField>
             <asp:TemplateField  HeaderText="Code"   ControlStyle-Width="50px">
		        <ItemTemplate>
			        <asp:DropDownList id="lblCodeDP" runat="server"></asp:DropDownList>
		        </ItemTemplate>
                <ItemStyle  />
	        </asp:TemplateField>

	        <asp:TemplateField   HeaderText="ราคา"  ControlStyle-Width="70px">
		        <ItemTemplate>
			        <asp:Label id="lblPriceShow" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle HorizontalAlign="Right"/>
	        </asp:TemplateField>
               <asp:TemplateField  visible = "False" HeaderText="ราคา2">
		        <ItemTemplate>
			        <asp:label id="lblPriceNotShow" runat="server"></asp:label>le
		        </ItemTemplate>
                <ItemStyle  />
	        </asp:TemplateField>

	        <asp:TemplateField   HeaderText="ส่วนลด">
		        <ItemTemplate>
			        <asp:TextBox id="lblDisc" runat="server"></asp:TextBox>
		        </ItemTemplate>
                <ItemStyle />
	        </asp:TemplateField>
            <asp:TemplateField  visible = "False" HeaderText="lblDiscNotShow">
		        <ItemTemplate>
			        <asp:label id="lblDiscNotShow" runat="server"></asp:label>
		        </ItemTemplate>
                <ItemStyle   />
	        </asp:TemplateField>

            <asp:TemplateField visible = "False" HeaderText="ส่วนลดตัวเลข">
		        <ItemTemplate>
			        <asp:Label id="lblDiscNumber" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle  />
	        </asp:TemplateField>
	        <asp:TemplateField   HeaderText="รวมเงิน">
		        <ItemTemplate>
			        <asp:Label id="lblTotal" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle HorizontalAlign="Right"/>
	        </asp:TemplateField>
	        </Columns>
     </asp:GridView>
    <table width="780px">
    <tr>
    <td class="style22"></td>
    <td class="style23" rowspan="4" valign="top">หมายเหตุ<br />
        <asp:TextBox ID="TextBox8" runat="server" Height="80px" style="text-align:left; margin-top: 0px;" 
            TextMode="MultiLine" ViewStateMode="Enabled" Width="360px"></asp:TextBox>
        </td>
    <td align="right" class="style38">รวมเป็นเงิน </td>
    <td class="style25">
        <asp:TextBox ID="TextBox3" style="text-align:right" 
            runat="server" ReadOnly="True" AutoCompleteType="Disabled"></asp:TextBox><br/></td>
    </tr>
        <tr>
            <td align="right" class="style10">&nbsp;</td>
    <td align="right" class="style39">สวนลด (โปรโมชั่น)</td>
    <td class="style15">
        <asp:TextBox ID="TextBox4" style="text-align:right" 
            runat="server" ReadOnly="True" AutoCompleteType="Disabled"></asp:TextBox><br/></td>
    </tr>
        <tr>
            <td align="right" class="style22">&nbsp;</td>
    <td align="right" class="style38">ส่วนลดเงินสด </td>
    <td class="style25">
        <asp:TextBox ID="TextBox5" style="text-align:right" 
            runat="server" ViewStateMode="Enabled" 
            AutoPostBack="True"></asp:TextBox><br/></td>
    </tr>
        <tr>
            <td align="right" class="style10">&nbsp;</td>
    <td align="right" class="style39" valign="middle">VAT&nbsp;&nbsp;<asp:DropDownList ID="ddlVATType" 
            runat="server" AutoPostBack="True">
        <asp:ListItem>NT</asp:ListItem>
        <asp:ListItem>EX</asp:ListItem>
        <asp:ListItem>IN</asp:ListItem>
        </asp:DropDownList>
&nbsp;<asp:TextBox ID="txtVATRate" runat="server" AutoCompleteType="Disabled" 
            Enabled="False" ReadOnly="True" style="text-align:right" Width="44px" 
            AutoPostBack="True">7.0</asp:TextBox>
        &nbsp;% </td>
    <td class="style15">
        <asp:TextBox ID="TextBox6" style="text-align:right" 
            runat="server" ReadOnly="True" AutoCompleteType="Disabled"></asp:TextBox><br/></td>
    </tr>
        <tr valign="top">
            <td align="left" class="style10" colspan="2" height="50px">
    <asp:Button ID="btnUpdate" runat="server" Text="Save" />
    <asp:Button ID="btnUpdate3" runat="server" Text="Revise" Visible="False" />
    <asp:Button ID="btnUpdate5" runat="server" Text="Check" Visible="False" />
    <asp:Button ID="btnUpdate7" runat="server" Text="Approve" Visible="False" />
    <asp:Button ID="btnUpdate8" runat="server" Text="Cancel" Visible="False" />
    <asp:Button ID="btnUpdate6" runat="server" Text="Print" Visible="False"  />           
    <asp:Button ID="btnUpdate9" runat="server" Text="Close" />   

                <br />
            </td>
    <td align="right" class="style39" rowspan="2">รวมเป็นเงินทั้งสิ้น</td>
    <td class="style15" rowspan="2"  >
        <asp:TextBox ID="TextBox7"  style="text-align:right" 
            runat="server" ReadOnly="True" AutoCompleteType="Disabled"></asp:TextBox></td>
    </tr>
        <tr valign="top">
            <td align="left" class="style10" colspan="2" height="50px" style="height: 25px">
                <asp:Image ID="Image2" runat="server" ImageUrl="~/images/process.gif" 
                    Visible="False" />
                <asp:Label ID="lblMessage" runat="server" ViewStateMode="Enabled"></asp:Label>
            </td>
        </tr>
    </table>

    <asp:GridView ID="GridFreeCode" runat="server" Visible="False">
     <Columns>
	        <asp:TemplateField  HeaderText="Code">
		        <ItemTemplate>
			        <asp:label id="lblTFreCode" runat="server"></asp:label>
		        </ItemTemplate>
                <ItemStyle  />
	        </asp:TemplateField>
	        <asp:TemplateField  HeaderText="Name">
		        <ItemTemplate>
			        <asp:label id="lblTFreName" runat="server"></asp:label>
		        </ItemTemplate>
                <ItemStyle  />
	        </asp:TemplateField>
        </Columns> 
    </asp:GridView>
 </asp:Panel>
          </ContentTemplate>
        </asp:UpdatePanel>      

</asp:Content>
