<%@ page title="" language="C#" masterpagefile="~/html/MasterPage.master" autoeventwireup="true" inherits="html_StockMaster, App_Web_susspz30" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="../css/buttoncss.css" type="text/css" rel="Stylesheet"/>

    <style type="text/css">
        .style2
        {
            width: 100%;
        }
         .style19 
    {
            height: 90px;
    }
        .style34
     {
         width: 117px;
         height: 30px;
     }
     .style35
     {
         width: 199px;
         height: 30px;
     }
     .style36
     {
         width: 285px;
         height: 30px;
     }
     .style37
     {
         height: 30px;
     }
     .style38
     {
         width: 117px;
         height: 39px;
     }
     .style39
     {
         width: 199px;
         height: 39px;
     }
     .style40
     {
         width: 285px;
         height: 39px;
     }
     .style41
     {
         height: 39px;
     }
     .style47
     {
         width: 21px;
         height: 30px;
     }
     .style48
     {
         width: 21px;
         height: 39px;
     }
        .style49
        {
            width: 117px;
            height: 55px;
        }
        .style50
        {
            width: 199px;
            height: 55px;
        }
        .style51
        {
            width: 21px;
            height: 55px;
        }
        .style52
        {
            width: 285px;
            height: 55px;
        }
        .style53
        {
            height: 55px;
        }
         .shadow_five {
        background-color: #FFECCE;
        -moz-border-radius: 10px;
        -webkit-border-radius: 10px;
        -o-border-radius: 10px;
        -ms-border-radius: 10px;
        border-radius: 10px;
        -moz-box-shadow: 3px 3px 5px #B1A59A;
        -webkit-box-shadow: 3px 3px 5px #B1A59A;
        -o-box-shadow: 3px 3px 5px #B1A59A;
        -ms-box-shadow: 3px 3px 5px #B1A59A;
        box-shadow: 3px 3px 5px #B1A59A;
        padding: 10px;
        margin-bottom:10px;
       
        
    }
    .griv_table
    {
        width:700px;
        
        }
        .griv_table td
        {
            width:150px;
            
         }
         
         .p1
        {
       background-image: linear-gradient(to bottom, #fcfcfc, #f7f7f7 3%, #ff9966 12%,#ff9966 90%, #bfbfbf);
-webkit-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
-moz-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white ;
box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
            height:35px;
            width:160px;
        }
        
         .p2
        {
       background-image: linear-gradient(to bottom, #fcfcfc, #f7f7f7 3%, #ff9966 12%,#ff9966 90%, #bfbfbf);
-webkit-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
-moz-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white ;
box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
            height:35px;
            width:160px;
        }
        
         .p3
        {
       background-image: linear-gradient(to bottom, #fcfcfc, #f7f7f7 3%, #ff9966 12%,#ff9966 90%, #bfbfbf);
-webkit-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
-moz-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white ;
box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
            height:35px;
            width:160px;
        }
    
    
         .cssLoadingTimer
        {        	
        	/* filter:alpha(opacity=90);       	
        	opacity:0.7; */        	
        	text-align:center; 
        	position:fixed; 
        	margin:5% 0% 0px 30%; 
        	background-color:White;
          
        	width:300px;
        	height:150PX;
        	 background-color:#ffebcc;
        	
        
        }  
        
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <asp:UpdateProgress ID="UpdateProgress1" runat="server"  
                           DynamicLayout="true"  >
                          <ProgressTemplate>
                          <div style="width:100%;">
                              <div class="cssLoadingTimer"  >
                              <p> Please wait...</p>
                                  <img id="Img1" alt="Loading..." src="../images/Regloader.gif" runat="server" style="margin-top:15px;" align="middle"  />
                                  </div>
                                  
                                  </div>
                          </ProgressTemplate>
                      </asp:UpdateProgress>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
     <div class="p12"  style="float:left;width:130px;" >
      <p style="font-family:Verdana; font-size:14px; margin-top:0px;font-weight:bold;padding-top:5px;">
     <b style="color:White;">&nbsp;&nbsp;&nbsp;&nbsp;Stock Details</b>
      </p>
           </div>
         
          <%--  <div id="pnl_msg_stock" runat="server"  class="p12" style="float:left; margin-left:20px;width:120px; color:White;"  >
      <p style="font-family:Verdana; font-size:14px; margin-top:0px;color:White;font-weight:bold;padding-top:5px;">
  
    <asp:Label runat="server" ID="lbl_stock_msg" Text=""></asp:Label>
      </p>
           </div>--%>
           
    
    <table style="width:100%">
    
  
 <tr>
 <td></td><td></td>
            <td  style="font-size: 20px; font-weight: bold; color: #FFFFFF" 
                align="left">
                 <asp:Button ID="btn_addstock" runat="server" Font-Size="12px"  
                     Text="Add Stock"
                     CssClass="myButton" Height="31px" Width="130px" onclick="btn_addstock_Click"  />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   <asp:Button ID="Button1" runat="server" Font-Size="12px"  
                     Text="Assign Stock"
                     CssClass="myButton" Height="31px" Width="107px" onclick="Button1_Click"  />
               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btn_showstock" runat="server" Font-Size="12px"  
                     Text="Show Assign Stock"
                     CssClass="myButton" Height="31px" Width="130px" onclick="btn_showstock_Click"  />
            </td>
       </tr>
    </table>
    <asp:Panel runat="server" ID="pnl_addstock">
        <table class="style2">
      
       <tr>
       <td></td>   <td></td>   <td></td>
       <td>
         <asp:Label ID="Label30" runat="server" Font-Bold="True" Font-Names="Calibri" 
                                 Font-Size="20px" ForeColor="#6600FF" Text="Add Stock"></asp:Label>
       </td>
       <td></td>
       </tr>
         <tr>
            <td class="style49">
                </td>
            <td class="style50" align="right"> 
                <asp:Label ID="lbl_itemname" runat="server" Font-Names="Verdana" Font-Size="12px" 
                    Text="Item Name" Font-Bold="true" ></asp:Label>
             </td>
             <td  class="style51">
             <b style="color:Red;">*</b>
                 </td>
            <td class="style52" align="justify">
            
              <asp:TextBox ID="txt_item_name" runat="server" Height="22px" Width="202px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txt_item_name" ErrorMessage="Enter name" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
              
             </td>
            <td class="style53">
                </td>
        </tr>

         <tr>
            <td >
                </td>
            <td align="right" >
                <asp:Label ID="lbl_supplier" runat="server" Font-Names="Verdana" Font-Size="12px" 
                    Text="Supplier Name" Font-Bold="true"></asp:Label>
            </td>
            <td >
                <b style="color:Red;">*</b>
            </td>
            <td >
               <asp:TextBox ID="txt_supplierName" runat="server" Height="22px" Width="202px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txt_supplierName" ErrorMessage="Enter name" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
                <td class="style34">
                </td>
        </tr>
        
              <tr>
                    <td class="style38">
                    </td>
                    <td align="right" class="style39">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        <asp:Label ID="Label2" runat="server" Font-Names="Verdana" Font-Size="12px" Font-Bold="true" 
                            Text="Select Stock Type"></asp:Label>
                    </td>
                    <td >
                     <b style="color:Red;">*</b>
                        </td>
                    <td align="justify" class="style40">
                       <asp:DropDownList runat="server" ID="ddl_selectStock_type" >
                       <asp:ListItem>-Select Stock Type-</asp:ListItem>
                       <asp:ListItem>Equipment Stock</asp:ListItem>     
                       <asp:ListItem>Consumable stock</asp:ListItem>
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator runat="server" ID="rfv_ddl_selectStock_type" InitialValue="-Select Stock Type-"
                             ControlToValidate="ddl_selectStock_type" ErrorMessage="Select Stock Type" ValidationGroup="1" ForeColor="Red" ></asp:RequiredFieldValidator>
                    </td>
                    <td class="style41">
                    </td>
        </tr>
        <tr>
            <td >
                &nbsp;</td>
            <td  align="right">
                <asp:Label ID="Label6" runat="server" Font-Names="Verdana" Font-Size="12px" 
                    Text=" Item Quantity" Font-Bold="true"></asp:Label>
            </td>
            <td >
              <b style="color:Red;">*</b>
            </td>
            <td>
               <asp:TextBox ID="txt_item_quantity" runat="server" Height="18px" Width="101px"></asp:TextBox> 
                <asp:DropDownList ID="ddl_item_unit" runat="server" Width="110px">
                <asp:ListItem>-Select Unit-</asp:ListItem>
                <asp:ListItem>Meter</asp:ListItem>
                <asp:ListItem>Liter</asp:ListItem>
                <asp:ListItem>Pieces</asp:ListItem>
                </asp:DropDownList>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" 
                    ControlToValidate="ddl_item_unit" InitialValue="-Select Unit-" ErrorMessage="Select Unit"
                     ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                
                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" FilterType="Numbers" 
                TargetControlID="txt_item_quantity">
                </cc1:FilteredTextBoxExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txt_item_quantity" ErrorMessage="Enter Quantity" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td class="style34">
                </td>
        </tr>
        
          <tr>
            <td >
                &nbsp;</td>
            <td  align="right">
                <asp:Label ID="Label14" runat="server" Font-Names="Verdana" Font-Size="12px" 
                    Text=" Item Price " Font-Bold="true"></asp:Label>
            </td>
            <td >
              <b style="color:Red;">*</b>
            </td>
            <td>
               <asp:TextBox ID="txt_price_item" runat="server" Height="22px" Width="201px"></asp:TextBox>
                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" FilterType="Numbers" TargetControlID="txt_price_item">
                </cc1:FilteredTextBoxExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                    ControlToValidate="txt_price_item" ErrorMessage="Enter Price" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td class="style34">
                </td>
        </tr>
        
        
        
         <tr>
                    <td class="style38">
                    </td>
                    <td align="right" class="style39">
                      
                    </td>
                    <td align="right" class="style48">
                        </td>
                    <td align="justify" class="style40">
                       <asp:Button ID="btnSave" runat="server" CssClass="myButton" Text="Submit" 
                    onclick="btnSave_Click" OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                     UseSubmitBehavior="false" ValidationGroup="1" /> &nbsp;&nbsp;&nbsp;&nbsp;
                      <asp:Button ID="btn_show_stock" runat="server" CssClass="myButton" Text="Show Stock" 
                         
                          UseSubmitBehavior="false" onclick="btn_show_stock_Click" />
                      <asp:Label ID="lblInsert" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label>
                    <b> <a style="color:Red;  padding-right:20px; float:right; ">* Indicates Compulsory Fields</a></b>
                    </td>
                    <td class="style41">
                    
                    </td>
        </tr>
      </table>
      <asp:GridView runat="server" ID="gv_stock_details" AutoGenerateColumns="false"  
            CssClass="griv_table" CellPadding="5"
            AllowPaging="true"
            onrowediting="gv_stock_details_RowEditing" 
            onrowcancelingedit="gv_stock_details_RowCancelingEdit" 
            onrowupdating="gv_stock_details_RowUpdating" 
            onrowdeleting="gv_stock_details_RowDeleting" Width="1243px">
      
      <Columns>
       <asp:TemplateField HeaderText="Item Name" ItemStyle-Width="150px">
                                    <ItemTemplate>
                                      <asp:Label runat="server" ID="lbl_item_id" Text='<%# Eval("item_id") %>' Visible="false"></asp:Label>
      <asp:Label runat="server" ID="lbl_item_name" Text='<%# Eval("item_name") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                     <asp:Label runat="server" ID="lbl_item_id" Text='<%# Eval("item_id") %>' Visible="false"></asp:Label>
      <asp:TextBox runat="server" ID="txt_item_name" Text='<%# Eval("item_name") %>' Width="145px"></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemStyle Width="150px" />
                                    </asp:TemplateField>
      <asp:TemplateField HeaderText=" Item Type" ItemStyle-Width="150px">
    <ItemTemplate>
      <asp:Label runat="server" ID="lbl_item_type" Text='<%# Eval("item_type") %>'></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
      <asp:TextBox runat="server" ID="txt_item_type" Text='<%# Eval("item_type") %>' Width="140px"></asp:TextBox>
    </EditItemTemplate> 
          <ItemStyle Width="150px" />
       </asp:TemplateField>
       <asp:TemplateField HeaderText=" Item Totoal Quantity" ItemStyle-Width="100px">
<ItemTemplate>
 <asp:Label runat="server" ID="lbl_item_qty" Text='<%# Eval("item_qty") %>'></asp:Label>
  <asp:Label runat="server" ID="lbl_unit_name" Text='<%# Eval("item_unit") %>'></asp:Label>

</ItemTemplate>
<EditItemTemplate>
  <asp:TextBox runat="server" ID="txt_item_qty" Text='<%# Eval("item_qty") %>' Width="100px"></asp:TextBox>
</EditItemTemplate>
           <ItemStyle Width="100px" />
</asp:TemplateField>
    <asp:TemplateField HeaderText="Item Balance" ItemStyle-Width="100px">   
    <ItemTemplate>
        <asp:Label runat="server" ID="lbl_item_balance" Text='<%# Eval("item_balance") %>'></asp:Label>
    </ItemTemplate>
  <EditItemTemplate>
      <asp:TextBox runat="server" ID="txt_item_balance" Text='<%# Eval("item_balance") %>' Width="100px"></asp:TextBox>

  </EditItemTemplate>
        <ItemStyle Width="100px" />
  </asp:TemplateField>
   <asp:TemplateField HeaderText="Item Price" ItemStyle-Width="100px">   
    <ItemTemplate>
        <asp:Label runat="server" ID="lbl_item_price" Text='<%# Eval("item_price") %>'></asp:Label>
    </ItemTemplate>
  <EditItemTemplate>
      <asp:TextBox runat="server" ID="txt_item_price" Text='<%# Eval("item_price") %>' Width="100px"></asp:TextBox>

  </EditItemTemplate>
        <ItemStyle Width="100px" />
  </asp:TemplateField>
    <asp:TemplateField HeaderText="Supplier name" ItemStyle-Width="150px">   
    <ItemTemplate>
      <asp:Label runat="server" ID="lbl_suppliername" Text='<%# Eval("supplier_name") %>'></asp:Label>
    </ItemTemplate>
  <EditItemTemplate>
         <asp:TextBox runat="server" ID="txt_suppliername" Text='<%# Eval("supplier_name") %>' Width="145px"></asp:TextBox>

     </EditItemTemplate>
        <ItemStyle Width="150px" />
  </asp:TemplateField>
<asp:TemplateField HeaderText="Item Added Date" ItemStyle-Width="200px">      
      <ItemTemplate>
       <asp:Label runat="server" ID="Label1" Text='<%# Eval("Add_date") %>'></asp:Label>
      </ItemTemplate>
      <EditItemTemplate >
        
       <asp:TextBox runat="server" ID="txt_itemaddeddate" Text='<%# Eval("item_adddate") %>' Width="100px"></asp:TextBox>
        <cc1:CalendarExtender ID="CalendarExtender1" runat="server" 
                          Enabled="True" TargetControlID="txt_itemaddeddate">
                         </cc1:CalendarExtender>
             
      </EditItemTemplate>
      
      <ItemStyle Width="200px" />
      
      </asp:TemplateField>
      <asp:TemplateField>
      <ItemTemplate>
        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Edit" Text="Edit"></asp:LinkButton>
        <asp:LinkButton ID="DeleteButton" runat="server" CommandName="Delete" OnClientClick="return confirm('Are you sure want to Delete?');" 
                                Text="Delete" />
        
      </ItemTemplate>
      <EditItemTemplate>
      
        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                            CommandName="Update" Text="Update"></asp:LinkButton><br /><br />
                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                            CommandName="Cancel" Text="Cancel"></asp:LinkButton>
      </EditItemTemplate>
      </asp:TemplateField>
      </Columns>
     
      <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
      </asp:GridView>
      </asp:Panel>
      
      <asp:Panel runat="server" ID="pnl_assignstock">
              <table class="style2">
    
       <tr>
       <td></td>
       <td></td>
       <td></td>
       <td>
        <asp:Label ID="Label15" runat="server" Font-Bold="True" Font-Names="Calibri" 
                                 Font-Size="20px" ForeColor="#6600FF" Text="Assign Stock"></asp:Label>
       </td>
       </tr>
         <tr>
            <td class="style49">
                </td>
            <td class="style50" align="right"> 
                <asp:Label ID="Label3" runat="server" Font-Names="Verdana" Font-Size="12px" Font-Bold="true" 
                    Text="Project Name"></asp:Label>
             </td>
             <td  class="style51">
                 <b style="color:Red;">*</b></td>
            <td class="style52" align="justify">
            
             <asp:DropDownList ID="ddl_projectclientwise" runat="server" 
                    DataTextField="PName" DataValueField="PrID"                    
                    AutoPostBack="True" AppendDataBoundItems="True" 
                    onselectedindexchanged="ddl_projectclientwise_SelectedIndexChanged">
                </asp:DropDownList>
 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" InitialValue="-Select-" ControlToValidate="ddl_projectclientwise"
  ErrorMessage="Select Project Name" ValidationGroup="2" ForeColor="Red" ></asp:RequiredFieldValidator>

                
              
             </td>
            <td class="style53">
                </td>
        </tr>

         <tr>
            <td >
                </td>
            <td align="right" >
                <asp:Label ID="Label4" runat="server" Font-Names="Verdana" Font-Size="12px" Font-Bold="true" 
                    Text="Project main stage"></asp:Label>
            </td>
            <td >
               <b style="color:Red;">*</b>
            </td>
            <td >
             <asp:DropDownList ID="ddl_projectmain_stage" runat="server" 
                    DataTextField="Mainstage_name" DataValueField="Mainstage_ID"                    
                    AutoPostBack="True" AppendDataBoundItems="True" 
                    onselectedindexchanged="ddl_projectmain_stage_SelectedIndexChanged">
                </asp:DropDownList>
                
                 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" InitialValue="-Select-" ControlToValidate="ddl_projectmain_stage" ErrorMessage="Select Project main stage" ValidationGroup="2" ForeColor="Red" ></asp:RequiredFieldValidator>

                         </td>
                <td class="style34">
                </td>
        </tr>
        
        <tr>
            <td >
                </td>
            <td align="right" >
                <asp:Label ID="Label12" runat="server" Font-Names="Verdana" Font-Size="12px" 
                    Text="Project Sub stage" Font-Bold="true"></asp:Label>
            </td>
            <td >
               <b style="color:Red;">*</b>
            </td>
            <td >
             <asp:DropDownList ID="ddl_sub_stages" runat="server" 
                    DataTextField="sub_stage_desc" DataValueField="substage_id"                    
                    AutoPostBack="True" AppendDataBoundItems="True">
                </asp:DropDownList>
 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator6" InitialValue="- select -" ControlToValidate="ddl_sub_stages"
  ErrorMessage="Select Project Sub stage" ValidationGroup="2" ForeColor="Red" ></asp:RequiredFieldValidator>

                </td>
                <td class="style34">
                </td>
        </tr>
        
            
        <tr>
            <td >
                &nbsp;</td>
            <td  align="right">
                <asp:Label ID="Label7" runat="server" Font-Names="Verdana" Font-Size="12px" 
                    Text="Project Manager" Font-Bold="true"></asp:Label>
            </td>
            <td >
             <b style="color:Red;">*</b>
            </td>
            <td>
                   <asp:DropDownList runat="server" ID="ddl_selectProjectManager" DataTextField="EName" DataValueField="EID" AppendDataBoundItems="true" ></asp:DropDownList> 
                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator7" InitialValue="- Select Project Manager -" 
                    ControlToValidate="ddl_selectProjectManager" ErrorMessage="Select Project Manager" ValidationGroup="2" ForeColor="Red" ></asp:RequiredFieldValidator>
 
            </td>
            <td class="style34">
                </td>
        </tr>
        
          <tr>
                    <td class="style38">
                    </td>
                    <td align="right" class="style39">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        <asp:Label ID="Label8" runat="server" Font-Names="Verdana" Font-Size="12px" 
                            Text="Employee Name" Font-Bold="true"></asp:Label>
                    </td>
                    <td >
                    <b style="color:Red;">*</b>
                        </td>
                    <td align="justify" class="style40">
       <asp:DropDownList runat="server" ID="ddl_employee" DataTextField="EName" DataValueField="EID" AppendDataBoundItems="true" ></asp:DropDownList>  
                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator8" InitialValue="- Select -"
                     ControlToValidate="ddl_employee" ErrorMessage="Select Employee Name" ValidationGroup="2" ForeColor="Red" ></asp:RequiredFieldValidator>

                    </td>
                    <td class="style41">
                    </td>
        </tr>
        
          <tr>
                    <td class="style38">
                    </td>
                    <td align="right" class="style39">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        <asp:Label ID="Label5" runat="server" Font-Names="Verdana" Font-Size="12px" Font-Bold="true" 
                            Text="Stock Type"></asp:Label>
                    </td>
                    <td >
                       <b style="color:Red;">*</b> </td>
                    <td align="justify" class="style40">
                       <asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="True" 
                            onselectedindexchanged="DropDownList1_SelectedIndexChanged" >
                       <asp:ListItem>-Select Stock Type-</asp:ListItem>
                       <asp:ListItem>Equipment Stock</asp:ListItem>     
                       <asp:ListItem>Consumable stock</asp:ListItem>
                            </asp:DropDownList>
            <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator9" InitialValue="-Select Stock Type-" ControlToValidate="DropDownList1"
             ErrorMessage="Select Stock Type" ValidationGroup="2" ForeColor="Red"></asp:RequiredFieldValidator>
                                                                    </td>
                    <td class="style41">
                    </td>
        </tr>

 <tr>
                    <td class="style38">
                    </td>
                    <td align="right" class="style39">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        <asp:Label ID="Label10" runat="server" Font-Names="Verdana" Font-Size="12px" 
                            Text="Item Name" Font-Bold="true"></asp:Label>
                    </td>
                    <td  class="style48">
                        <b style="color:Red;">*</b></td>
                    <td align="justify" class="style40">
                         <asp:TextBox ID="TextBox_itemname" runat="server" Height="18px" Width="101px"></asp:TextBox> 
       <asp:DropDownList runat="server" ID="ddl_itemlist" DataTextField="item_name"  Visible="true"
                            DataValueField="item_id" AppendDataBoundItems="true" AutoPostBack="True" 
                            onselectedindexchanged="ddl_itemlist_SelectedIndexChanged" ></asp:DropDownList>  
 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator10" InitialValue="- Select -" ControlToValidate="TextBox_itemname"
  ErrorMessage="Enter item name" ValidationGroup="2" ForeColor="Red" ></asp:RequiredFieldValidator>


                    </td>
                    <td class="style41">
                    </td>
        </tr>
        
 <tr>
            <td >
                &nbsp;</td>
            <td  align="right">
                <asp:Label ID="Label16" runat="server" Font-Names="Verdana" Font-Size="12px" 
                    Text=" Item Quantity" Font-Bold="true"></asp:Label>
            </td>
            <td >
              <b style="color:Red;">*</b>
            </td>
            <td>
               <asp:TextBox ID="TextBox1" runat="server" Height="18px" Width="101px"></asp:TextBox> 
                <asp:DropDownList ID="DropDownList2" runat="server" Width="110px">
                <asp:ListItem>-Select Unit-</asp:ListItem>
                <asp:ListItem>Meter</asp:ListItem>
                <asp:ListItem>Liter</asp:ListItem>
                <asp:ListItem>Pieces</asp:ListItem>
                </asp:DropDownList>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" 
                    ControlToValidate="ddl_item_unit" InitialValue="-Select Unit-" ErrorMessage="Select Unit"
                     ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                
                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" FilterType="Numbers" 
                TargetControlID="txt_item_quantity">
                </cc1:FilteredTextBoxExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" 
                    ControlToValidate="txt_item_quantity" ErrorMessage="Enter Quantity" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td class="style34">
                </td>
        </tr>
        
          <tr>
            <td >
                &nbsp;</td>
            <td  align="right">
                <asp:Label ID="Label17" runat="server" Font-Names="Verdana" Font-Size="12px" 
                    Text=" Item Price " Font-Bold="true"></asp:Label>
            </td>
            <td >
              <b style="color:Red;">*</b>
            </td>
            <td>
               <asp:TextBox ID="TextBox2" runat="server" Height="22px" Width="201px"></asp:TextBox>
                <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" FilterType="Numbers" TargetControlID="txt_price_item">
                </cc1:FilteredTextBoxExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" 
                    ControlToValidate="txt_price_item" ErrorMessage="Enter Price" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
            <td class="style34">
                </td>
        </tr>


         
        
       
        
        <tr>
                    <td class="style38">
                    </td>
                    <td align="right" class="style39">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        <asp:Label ID="Label11" runat="server" Font-Names="Verdana" Font-Size="12px" 
                            Text="Enter required quantity" Font-Bold="true"></asp:Label>
                    </td>
                    <td >
                        <b style="color:Red;">*</b></td>
                    <td align="justify" class="style40">
        <asp:TextBox ID="txt_noof_items" runat="server"  
                    Height="22px" Width="201px"   
                           ></asp:TextBox> 
                            <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers" TargetControlID="txt_noof_items">
                </cc1:FilteredTextBoxExtender>
                           
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator11" ControlToValidate="txt_noof_items" 
ErrorMessage="Enter required quantity" ValidationGroup="2" ForeColor="Red" ></asp:RequiredFieldValidator>
   

                    </td>
                    <td class="style41">
                    </td>
        </tr>
        
      
         <tr>
                    <td class="style38">
                    </td>
                    <td align="right" class="style39">
                      
                    </td>
                    <td align="right" class="style48">
                        </td>
                    <td align="justify" class="style40">
                       <asp:Button ID="btn_assign_stock" runat="server" CssClass="myButton" Text="Assign Stock" 
                     ValidationGroup="2" OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                     UseSubmitBehavior="false" onclick="btn_assign_stock_Click" />
                      <asp:Label ID="Label9" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label>
                    <br />
                    <b> <a style="color:Red;  padding-right:20px; float:right; ">* Indicates Compulsory Fields</a></b>
                    </td>
                    <td class="style41">
                    
                    </td>
        </tr>
      </table>
      </asp:Panel>

          <asp:Panel runat="server" ID="Panel1">
        <table class="style2">
      
       <tr>
       <td></td>   <td></td>   <td></td>
       <td>
         <asp:Label ID="Label13" runat="server" Font-Bold="True" Font-Names="Calibri" 
                                 Font-Size="20px" ForeColor="#6600FF" Text="Show Assign Stock"></asp:Label>
       </td>
       <td></td>
       </tr>
         

     
      </table>
      <asp:GridView runat="server" ID="GridView1" AutoGenerateColumns="true"  
            CssClass="griv_table" CellPadding="5"
            AllowPaging="true" Width="1243px">
      
      <Columns>
          <asp:TemplateField HeaderText="Project Name" ItemStyle-Width="150px">
                                    <ItemTemplate>
                                      <asp:Label runat="server" ID="lbl_name"  Text='<%# Eval("PName")%>' ></asp:Label>
      <asp:Label runat="server" ID="lbl_item_name"> </asp:Label>
                                    </ItemTemplate>
                                   
                                    <ItemStyle Width="150px" />
      </asp:TemplateField>
       <asp:TemplateField HeaderText="Main Stage" ItemStyle-Width="150px">
                                    <ItemTemplate>
                                      <asp:Label runat="server" ID="lbl_cst"  Text='<%# Eval("Mainstage_name")%>' ></asp:Label>
      <asp:Label runat="server" ID="lbl_item_cost"> </asp:Label>
                                    </ItemTemplate>
                                   
                                    <ItemStyle Width="150px" />
      </asp:TemplateField>
      <asp:TemplateField HeaderText="Description" ItemStyle-Width="150px">
    <ItemTemplate>
      <asp:Label runat="server" ID="lbl_item_mtrl_cost" Text='<%# Eval("sub_stage_desc")%>' ></asp:Label>
    </ItemTemplate>
   
          <ItemStyle Width="150px" />
       </asp:TemplateField>
       <asp:TemplateField HeaderText="Manager Name" ItemStyle-Width="100px">
<ItemTemplate>
 <asp:Label runat="server" ID="lbl_expenses" Text='<%# Eval("EName")%>' ></asp:Label>
  
</ItemTemplate>

         <%--  <ItemStyle Width="100px" />
</asp:TemplateField>
    <asp:TemplateField HeaderText="Total" ItemStyle-Width="100px">   
    <ItemTemplate>
        <asp:Label runat="server" ID="lbl_item_total" ></asp:Label>
    </ItemTemplate>
 
        <ItemStyle Width="100px" />--%>
  </asp:TemplateField>
  
      </Columns>
     
      <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
      </asp:GridView>
      </asp:Panel>
  
    </ContentTemplate>
    </asp:UpdatePanel>
    </asp:Content>

