<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="SaleOrderReport.aspx.vb" Inherits="VS4WebApp.SaleOrderReport" %>
<%@ Register assembly="BasicFrame.WebControls.BasicDatePicker" namespace="BasicFrame.WebControls" tagprefix="BDP" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
 
</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:Label ID="lblSaleOrderMain" runat="server" Font-Bold="True" 
        Text="Sale Order Query"></asp:Label>
    <hr />
    &nbsp;&nbsp;<asp:Label ID="lblDateStart" runat="server" Text="จากวันที่"></asp:Label>
    <BDP:BDPLite ID="txtDateStart" runat="server" Width="120px" />
    <asp:Label ID="lblDateEnd" runat="server" Text=" ถึง"></asp:Label>
    <BDP:BDPLite ID="txtDateEnd" runat="server" Width="120px" />
    <asp:Label ID="lblSale" runat="server" Text="ผู้ดูแล "></asp:Label>
<asp:TextBox ID="txtSale" runat="server" Width="40px"></asp:TextBox>
    &nbsp;<asp:Label ID="lblSale0" runat="server" Text="Total Qty"></asp:Label>
&nbsp;<asp:TextBox ID="txtTotalBill" runat="server" Width="100px" BackColor="#FFFFCC" style="text-align:right" readonly="true"></asp:TextBox>
    <asp:Label ID="lblSale1" runat="server" Text="Total Sale"></asp:Label>
&nbsp;<asp:TextBox ID="txtTotalSale" runat="server" Width="150px" BackColor="#FFFFCC" style="text-align:right" readonly="true"></asp:TextBox>
    <br />
    <br />
                         <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>
                         &nbsp;รหัสหมวด
<asp:TextBox ID="txtTPS2Code" runat="server" Width="40px"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;<asp:DropDownList ID="DLSORT" runat="server"  >
        <asp:ListItem>เรียงตามวันที่</asp:ListItem>
        <asp:ListItem>เรียงตามสินค้า</asp:ListItem>
        <asp:ListItem>เรียงตามหมวด</asp:ListItem>
        <asp:ListItem>เรียงตามผู้ดูแล</asp:ListItem>
        <asp:ListItem>เรียงตามลูกค้า</asp:ListItem>
    </asp:DropDownList>
    &nbsp; <asp:Button ID="btnSearch" runat="server" Text="แสดง" />
       &nbsp;<%--<p>&nbsp;</p>
<div id="inlineDatepicker"></div>--%>&nbsp;
    <asp:GridView ID="GridSOMain" runat="server"  AutoGenerateColumns="False" 
        Width="780px"  >
     <HeaderStyle BackColor="#2D3E5B" ForeColor="White"></HeaderStyle>
     <AlternatingRowStyle BackColor="#F0F0F0" />
 <Columns>
	        <asp:TemplateField  HeaderText="เลขที่เอกสาร">
		        <ItemTemplate>
                    <asp:HyperLink ID="lblTSODNo" runat="server"></asp:HyperLink>
		        </ItemTemplate>
                <ItemStyle Width="100px" />
	        </asp:TemplateField>
	        <asp:TemplateField   HeaderText="วันที่">
		        <ItemTemplate>
			        <asp:Label id="lblTSODDate" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle Width="70px" />
	        </asp:TemplateField>
            <asp:TemplateField   HeaderText="รหัสลูกค้า">
		        <ItemTemplate>
			        <asp:Label id="lblTSODTARNCode" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle Width="90px" />
	        </asp:TemplateField>

            <asp:TemplateField   HeaderText="รหัสหมวด2">
		        <ItemTemplate>
			        <asp:Label id="lblTPdtTPS2Code" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle Width="90px" />
	        </asp:TemplateField>

            <asp:TemplateField   HeaderText="รหัสสินค้า">
		        <ItemTemplate>
			        <asp:Label id="lblTSOBTPOSCode" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle Width="90px" />
	        </asp:TemplateField>

	        <asp:TemplateField   HeaderText="ชื่อสินค้า" ControlStyle-Width="150px">
		        <ItemTemplate>			        
                    <asp:Label id="lblTSOBPOSName" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle />

<ControlStyle Width="150px"></ControlStyle>
	        </asp:TemplateField>

	        <asp:TemplateField   HeaderText="จำนวน" >
		        <ItemTemplate>
			        <asp:Label id="lblTSOBQuantity" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle Width="80px" HorizontalAlign="Right"/>
	        </asp:TemplateField>


	        <asp:TemplateField   HeaderText="หน่วย">
		        <ItemTemplate>			        
                    <asp:Label id="lblTSOBTUntCode" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle />
	        </asp:TemplateField>


	        <asp:TemplateField   HeaderText="ยอดขาย">
		        <ItemTemplate>
			        <asp:Label id="lblTSOBNetAmount" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle Width="80px" HorizontalAlign="Right"/>
	        </asp:TemplateField>


     	     <asp:TemplateField   HeaderText="VAT" Visible="False">
		        <ItemTemplate>
			        <asp:Label id="lblTSODVATType" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle Width="80px" HorizontalAlign="Right"/>
	        </asp:TemplateField>

          	<asp:TemplateField   HeaderText="VATRate" Visible="False">
		        <ItemTemplate>
			        <asp:Label id="lblTSODVATRate" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle Width="80px" HorizontalAlign="Right"/>
	        </asp:TemplateField>

            <asp:TemplateField   HeaderText="ผู้ดูแล">
		        <ItemTemplate>
			        <asp:Label id="lblTSODTEmpCode" runat="server"></asp:Label>
		        </ItemTemplate>
                <ItemStyle Width="70px" />
	        </asp:TemplateField>


	        </Columns>
    </asp:GridView>

 
</asp:Content>
