<%@ Page Title="Plan Approve" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="plan_pc_label.aspx.cs" Inherits="edicenter.plan_pc_label" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <br /><br /><br /><br />
  <div class="container-fluid"> 
        <div class="row row-offcanvas row-offcanvas-right">

        <div class="col-xs-12 col-sm-12">
    <div class="row">

         <div class="panel panel-primary">
      <div class="panel-heading">&nbsp&nbsp Plan Approve - Purchasing Officer รายการแผนการผลิตและสั่งสินค้า(รอบการรับส่งสินค้า DateTime)&nbsp&nbsp&nbsp&nbsp&nbsp[<%= Session["ULogin"].ToString().Trim() %>]</div>
      <div class="panel-body">
        &nbsp&nbsp
        <asp:Label ID="lblCompany" runat="server" Text="" Font-Bold="true"></asp:Label>
               <br />
        &nbsp&nbsp
        <asp:Label ID="Label20" runat="server" Text="Purchasing Officer Name:" Font-Bold="true"></asp:Label>
        <asp:Label ID="lblMGName" runat="server" Text=""></asp:Label>&nbsp&nbsp 
        <asp:Label ID="Label8" runat="server" Text="Plant:" Font-Bold="true"></asp:Label>
        <asp:Label ID="lblPlant" runat="server" Text=""></asp:Label>&nbsp&nbsp
              <br />
        &nbsp&nbsp  
        <asp:Label ID="lblVenderID" runat="server" Text="Vender:" Font-Bold="true"></asp:Label>
        <asp:Label ID="lblVender" runat="server" Text=""></asp:Label>&nbsp&nbsp      
        <asp:Label ID="Label23" runat="server" Text="SANo." Font-Bold="true"></asp:Label>
        <asp:Label ID="lblSANo" runat="server" Text=""></asp:Label>&nbsp&nbsp   
        <asp:Label ID="lblEvent" runat="server" Text="" Font-Bold="true" ForeColor="blue"></asp:Label>&nbsp&nbsp&nbsp&nbsp&nbsp
        <asp:Label ID="lblDateFrm" runat="server" Text="" Font-Bold="true"></asp:Label>&nbsp
        <asp:Label ID="lblTo" runat="server" Text="To"></asp:Label>&nbsp
        <asp:Label ID="lblDateTo" runat="server" Text="" Font-Bold="true"></asp:Label>
        &nbsp&nbsp&nbsp&nbsp
               <br /><br />
        &nbsp&nbsp&nbsp<asp:Label ID="lblResultSearch" runat="server" Text=""></asp:Label>&nbsp
          <br />
        <asp:Button ID="btnDLAll" runat="server" Text="Download Format#C" Width="150px" OnClick="btnDLAll_Click" />&nbsp&nbsp&nbsp
        <asp:Button ID="btnDLSH" runat="server" Text="Download Shipping" Width="150px" Font-Bold="true" OnClick="btnDLSH_Click" />&nbsp&nbsp&nbsp
        <asp:Button ID="btnDLLB" runat="server" Text="Download Label" Width="150px" Font-Bold="true" OnClick="btnDLLB_Click" />&nbsp&nbsp&nbsp
        <asp:Button ID="btnDLCommon" runat="server" Text="Download Shipping&Label" Width="200px" Font-Bold="true" OnClick="btnDLCommon_Click" />&nbsp&nbsp&nbsp
          <br />
&nbsp;<asp:Repeater id="myRepeater" runat="server" >
	<HeaderTemplate>
<table class="table table-bordered">
<tr style="background-color:#0000FF; color:white; font-weight:bold;height:35px;" align="Left">
                <td width="5%">No.</td>
                <td>Month</td>
                <td>Date</td>
                <td>Time</td>
                <td width="3%">Round</td>
                <td>Quantity</td>
                <td>Price</td>                         
                <td width="10%">Preview</td>                                                                                     
                <td width="10%">Detail</td>
                </tr>           	
   </HeaderTemplate>             
	<ItemTemplate>    
			 <tr style="background-color:#FFFFFF; color:black; height:35px;" align="left">
             <td><asp:Label id="Label5" runat="server" Text='<%# myRepeater.Items.Count + 1 %>' ></asp:Label></td>    
             <td><asp:Label id="Label2" runat="server" Text='<%#  valueTB[cntTB].ToString().Trim() %>' ></asp:Label></td>   
             <td><asp:Label id="Label4" runat="server" Text='<%#  valueTB[cntTB+1].ToString().Trim() %>' ></asp:Label></td>   
             <td><asp:Label id="Label12" runat="server" Text='<%#  valueTB[cntTB+2].ToString().Trim() %>' ></asp:Label></td> 
             <td><asp:Label id="Label9" runat="server" Text='<%#  valueTB[cntTB+3].ToString().Trim() %>' ></asp:Label></td> 
             <td><asp:Label id="Label14" runat="server" Text='<%#  Text_Qty(valueTB[cntTB+4].ToString().Trim()) %>' ></asp:Label></td>    
             <td><asp:Label id="Label3" runat="server" Text='<%#  Text_Qty(valueTB[cntTB+5].ToString().Trim()) %>' ></asp:Label></td>                     
             <td><input id="btnPDF_<%# myRepeater.Items.Count + 1  %>" type="button" value="PDF" onclick="viewPDF_click(<%# ConvertDate(valueTB[cntTB+1].ToString(),valueTB[cntTB+2].ToString(),valueTB[cntTB+3].ToString()) %>)" class="btn-block" /></td>                               
             <td><input id="btnVW_<%# myRepeater.Items.Count + 1  %>" type="button" value="Item" onclick="view_click(<%# ConvertDate(valueTB[cntTB+1].ToString(),valueTB[cntTB+2].ToString(),valueTB[cntTB+3].ToString()) %>)" <%# cntTB+=6 %> class="btn-block" /></td>              
             </tr>
   </ItemTemplate>
      
        <AlternatingItemTemplate>          
			 <tr style="background-color:#20B2AA; color:black; height:35px;" align="left">
             <td><asp:Label id="Label2" runat="server" Text='<%# myRepeater.Items.Count + 1 %>' ></asp:Label></td>
             <td><asp:Label id="Label7" runat="server" Text='<%# valueTB[cntTB].ToString().Trim() %>' ></asp:Label></td>
             <td><asp:Label id="Label10" runat="server" Text='<%# valueTB[cntTB+1].ToString().Trim() %>' ></asp:Label></td>
             <td><asp:Label id="Label13" runat="server" Text='<%# valueTB[cntTB+2].ToString().Trim() %>' ></asp:Label></td>
             <td><asp:Label id="Label11" runat="server" Text='<%# valueTB[cntTB+3].ToString().Trim() %>' ></asp:Label></td>
             <td><asp:Label id="Label15" runat="server" Text='<%# Text_Qty(valueTB[cntTB+4].ToString().Trim()) %>' ></asp:Label></td>
             <td><asp:Label id="Label14" runat="server" Text='<%#  Text_Qty(valueTB[cntTB+5].ToString().Trim()) %>' ></asp:Label></td>                     
             <td><input id="btnPDF_<%# myRepeater.Items.Count + 1  %>" type="button" value="PDF" onclick="viewPDF_click(<%# ConvertDate(valueTB[cntTB+1].ToString(),valueTB[cntTB+2].ToString(),valueTB[cntTB+3].ToString()) %>)" class="btn-block" style="color:black"/></td>                                                                                      
             <td><input id="btnVW_<%# myRepeater.Items.Count + 1  %>" type="button" value="Item" onclick="view_click(<%# ConvertDate(valueTB[cntTB+1].ToString(),valueTB[cntTB+2].ToString(),valueTB[cntTB+3].ToString()) %>)" <%# cntTB+=6 %> class="btn-block" style="color:black"/></td>                             
             </tr>		           
	</AlternatingItemTemplate> 

	</asp:Repeater> </table>
               <br />
        
      </div>
    </div>
                
      </div>
            </div>

         </div>

       <script src="css/js/jquery.min.js"></script>
       <script src="css/js/bootstrap.min.js"></script>
       <script type="text/javascript">
           function view_click(id)
           {
               window.open("plan_pc_label_seq.aspx?DC="+id,"_self"); 
           }
           function viewPDF_click(id)
           {
               window.open("plan_previewpdf_pc.aspx?DC="+id,"_new"); 
               //$.post("plan_previewpdf.aspx",{DC:id});
           }
       </script>
    </div>
</asp:Content>
