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

<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 Release - MRP รายการแผนการผลิตและสั่งสินค้า(Item Number)&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="Label6" runat="server" Text="MRP:" Font-Bold="true"></asp:Label>
        <asp:Label ID="lblMRP" runat="server" Text=""></asp:Label>&nbsp&nbsp
        <asp:Label ID="Label3" runat="server" Text="Name:" Font-Bold="true"></asp:Label>
        <asp:Label ID="lblMRPName" 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
        <asp:Button ID="btnDLAll" runat="server" Text="Download Format#A-01" Width="170px" OnClick="btnDLAll_Click" />&nbsp&nbsp&nbsp
        <asp:Button ID="btnDLAll2" runat="server" Text="Download Format#A-02" Width="170px" OnClick="btnDLAll2_Click" />&nbsp&nbsp&nbsp
        <asp:Button ID="btnMailA1" runat="server" Text="Send Format#A-01" Width="170px" Font-Bold="true" OnClick="btnMailA1_Click" />&nbsp&nbsp&nbsp
        <asp:Button ID="btnMailA2" runat="server" Text="Send Format#A-02" Width="170px" Font-Bold="true" OnClick="btnMailA2_Click" />
          <br />
&nbsp;<asp:Repeater id="myRepeater" runat="server">
	<HeaderTemplate>
        <table class="table table-bordered">
                <tr style="background-color:#fa7b16; color:black; font-weight:bold;height:35px;" align="Left">
                <td>No.</td>
                <td>Item</td>
                <td>Locat.</td>
                <td>ArtNo.</td>
                <td>MatNo.</td>
                <td>Description</td>
                <td>Quantity</td>
                <td>Unit</td>
                <td>Status</td>              
                <td width="10%">Item</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+1].ToString().Trim() %>' ></asp:Label></td>   
             <td><asp:Label id="Label4" runat="server" Text='<%#  valueTB[cntTB+10].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="Label13" runat="server" Text='<%#  valueTB[cntTB+3].ToString().Trim() %>' ></asp:Label></td>   
             <td><asp:Label id="Label14" runat="server" Text='<%#  valueTB[cntTB+4].ToString().TrimEnd() %>' width="300px" ></asp:Label></td> 
             <td><asp:Label id="Label16" runat="server" Text='<%#  Text_Qty(valueTB[cntTB+5].ToString().Trim()) %>' ></asp:Label></td>   
             <td><asp:Label id="Label15" runat="server" Text='<%#  valueTB[cntTB+6].ToString().Trim() %>' ></asp:Label></td>   
             <td><asp:Label id="Label11" runat="server" Text='<%#  Text_Status(valueTB[cntTB+7].ToString().Trim(),valueTB[cntTB+8].ToString().Trim(),valueTB[cntTB+11].ToString().Trim(),valueTB[cntTB+12].ToString().Trim()) %>' width="100px"></asp:Label></td>  
             <td><input id="btnCF_<%# valueTB[cntTB].ToString() %>" type="button" value="Item" onclick="view_click(<%# Convert.ToInt32(valueTB[cntTB+1]) %>)" <%# cntTB+=13 %> 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+1].ToString().Trim() %>' ></asp:Label></td> 
             <td><asp:Label id="Label9" runat="server" Text='<%# valueTB[cntTB+10].ToString().Trim() %>' ></asp:Label></td>                     
             <td><asp:Label id="Label10" runat="server" Text='<%# valueTB[cntTB+2].ToString().Trim() %>' ></asp:Label></td>  
             <td><asp:Label id="Label18" runat="server" Text='<%# valueTB[cntTB+3].ToString().Trim() %>' ></asp:Label></td>                 
             <td><asp:Label id="Label19" runat="server" Text='<%# valueTB[cntTB+4].ToString().TrimEnd() %>' width="300px" ></asp:Label></td> 
             <td><asp:Label id="Label21" runat="server" Text='<%# Text_Qty(valueTB[cntTB+5].ToString().Trim())  %>' ></asp:Label></td>  
             <td><asp:Label id="Label20" runat="server" Text='<%# valueTB[cntTB+6].ToString().Trim() %>' ></asp:Label></td>     
             <td><asp:Label id="Label17" runat="server" Text='<%#  Text_Status(valueTB[cntTB+7].ToString().Trim(),valueTB[cntTB+8].ToString().Trim(),valueTB[cntTB+11].ToString().Trim(),valueTB[cntTB+12].ToString().Trim()) %>' width="100px"></asp:Label></td> 
             <td><input id="btnCF_<%# valueTB[cntTB].ToString() %>" type="button" value="Item" onclick="view_click(<%# Convert.ToInt32(valueTB[cntTB+1]) %>)" <%# cntTB+=13 %> 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_upload_seq.aspx?DC="+id,"_self"); 
           }
       </script>
    </div>
</div>
    </div>
</asp:Content>
