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

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

    <link href="../css/ForTextBox.css" rel="stylesheet" type="text/css" />
    <link href="../css/buttoncss.css" type="text/css" rel="Stylesheet"/>
    <link href="../css/Widthset.css" rel="stylesheet" type="text/css" />

<style type="text/css">
 .shadow_five444 
      		 {
        background-color: #FFF0DB;
        -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-right:10px;
        margin-left:3px;
        margin-bottom: 10px;
    }
</style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:HiddenField ID="hf_show_from" runat="server" /> 
<script type="text/javascript" src="../js/JScript.js"></script>

 <script type="text/javascript">
     $(function() {

         $("[id*=pnlAddNew]").hide();
         $("[id*=drowEC]").hide();
         $("[id*=IBRCal]").hide();
         $("[id*=unitrecipt]").hide();
         $("[id*=OA]").hide();
         $("[id*=installation]").hide();
         $("[id*=OAPIDraw]").hide();
         $("[id*=CFormRecive]").hide();
         $("[id*=CForm]").hide();
         $("[id*=manudraw]").hide();
         $("[id*=balpayment]").hide();
         $("[id*=preCommission]").hide();
         $("[id*=CommiAct]").hide();
         $("[id*=ECActivity]").hide();
       

         var show_all = $('input[id$=hf_show_from]').val();
         if (show_all == "showAll") {
             bind_princeName();
         }


     });
       </script>
       <script type="text/javascript">
       $().ready(function(){
       $("[id*=ddl_PrincipalName]").change(function(){
       var princeid = $(this).find("option:selected").val();
       //
       $('#<%=lbl_no_search.ClientID%>').html('');
       bind_princeName();
       $("[id*=Panel2]").hide();
       
//       
       });
   });


   function bind_princeName() {
       var Prince_id = $("[id$=ddl_PrincipalName]").val();
       var user_id = $('input[id$=hf_user_id]').val();

       $.ajax({
           type: "post",
           url: "AddCustomerPODetails.aspx/bind_principal_colunm",
           data: "{Prince_id:'" + Prince_id + "', user_id:'" + user_id + "'}",
           contentType: "application/json; charset=utf-8",
           dataType: "json",

           success: function(response) {

               var xmlDoc = $.parseXML(response.d);
               var xml = $(xmlDoc);
               var principal_Name = xml.find("Principal_Master");
               var flag1 = 0, flag2 = 0, flag3 = 0, flag4 = 0, flag5 = 0, flag6 = 0, flag7 = 0, flag8 = 0, flag9 = 0, flag10 = 0, flag11 = 0, flag12 = 0, flag13 = 0;
               $.each(principal_Name, function() {
                   var id = $(this).find("stages_id").text();
                   if (id == "10") {
                       $("[id*=OAPIDraw]").show();
                       flag1 = 1;
                   }
                   else {
                       if (flag1 == 0) {
                           $("[id*=OAPIDraw]").hide();
                       }
                   }
                   if (id == "14") {
                       $("[id*=balpayment]").show();
                       flag2 = 1;
                   }
                   else {
                       if (flag2 == 0) {
                           $("[id*=balpayment]").hide();
                       }
                   }
                   if (id == "15") {
                       $("[id*=unitrecipt]").show();
                       flag3 = 1;
                   }
                   else {
                       if (flag3 == 0) {
                           $("[id*=unitrecipt]").hide();
                       }
                   }
                   if (id == "16") {
                       $("[id*=installation]").show();
                       flag4 = 1;
                   }
                   else {
                       if (flag4 == 0) {

                           $("[id*=installation]").hide();
                       }
                   }
                   if (id == "17") {
                       $("[id*=CForm]").show();
                       flag5 = 1;
                   }
                   else {
                       if (flag5 == 0) {
                           $("[id*=CForm]").hide();
                       }
                   }
                   if (id == "18") {
                       $("[id*=CFormRecive]").show();
                       flag6 = 1;
                   }

                   else {
                       if (flag6 == 0) {
                           $("[id*=CFormRecive]").hide();
                       }
                   }
                   if (id == "20") {

                       $("[id*=manudraw]").show();
                       flag7 = 1;
                   }
                   else {
                       if (flag7 == 0) {
                           $("[id*=manudraw]").hide();
                       }
                   }
                   if (id == "21") {
                       $("[id*=CommiAct]").show();
                       flag8 = 1;
                   }
                   else {
                       if (flag8 == 0) {
                           $("[id*=CommiAct]").hide();
                       }
                   }
                   if (id == "22") {
                       $("[id*=preCommission]").show();
                       flag9 = 1;
                   }
                   else {
                       if (flag9 == 0) {
                           $("[id*=preCommission]").hide();
                       }
                   }
                   if (id == "23") {
                       $("[id*=ECActivity]").show();
                       flag10 = 1;
                   }
                   else {
                       if (flag10 == 0) {
                           $("[id*=ECActivity]").hide();
                       }
                   }
                   if (id == "24") {
                       $("[id*=drowEC]").show();
                       flag11 = 1;

                   }
                   else {
                       if (flag11 == 0) {
                           $("[id*=drowEC]").hide();
                       }
                   }
                   if (id == "25") {

                       $("[id*=IBRCal]").show();
                       flag12 = 1;
                   }
                   else {
                       if (flag12 == 0) {
                           $("[id*=IBRCal]").hide();
                       }
                   }
                   if (id == "26") {
                       $("[id*=OA]").show();
                       flag13 = 1;
                   }
                   else {
                       if (flag13 == 0) {
                           $("[id*=OA]").hide();
                       }
                   }
                   $("[id*=pnlAddNew]").show();
                  



               });


           },
           failure: function(response) {
               alert(response.d);
           }

       });
   }



       </script>
       
         <script type="text/javascript">
//             var prm = Sys.WebForms.PageRequestManager.getInstance();
//             prm.add_endRequest(function() {
                 $(document).ready(function() {
                     $("span[id$='lblInsert']").delay(3000).fadeOut(3000, function() {
                         //                         $(this).innerHTML("");
                     });
                 });
             //});
           </script>    
       
      
 <asp:UpdateProgress ID="UpdateProgress2" 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>--%>
<asp:Panel ID="Panel1" runat="server" CssClass="shadow_five4444" align="Center"> 
    <table width="100%" style="align:Center;">
        <tr align="center">
            <td align="justify" valign="middle">
              <%--  <asp:Label ID="Label5" runat="server" Text=" Add PO Details" CssClass="Label" 
                    Height="50px" Width="100%" ForeColor="White" Font-Bold="True" 
                    Font-Size="X-Large"></asp:Label>--%>
                    
                    
                       <div class="p12" style="width:200px;"  align="center" >
      <p style="font-family:Verdana; font-size:14px; margin-top:0px;color:White;font-weight:bold;padding-top:5px;">
  Add PO Details
      </p>
           </div>
           
                  </td>
        </tr>
        <tr align="center">
        <td>
        <asp:Panel ID="Panel3" runat="server"  align="Center">
 <table>
             <tr>
             <td></td>
             <td align="right" class="style3"> <asp:Label ID="Label13" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Select Principal Name"></asp:Label></td>
             <td></td>
             <td> 
                 <asp:DropDownList ID="ddl_PrincipalName" runat="server"
                  
                     Width="180px" AppendDataBoundItems="True">
                </asp:DropDownList>
                       &nbsp;
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="ddl_PrincipalName" ErrorMessage="Please select Principal Name" 
                    ValidationGroup="1" InitialValue="-Select-"></asp:RequiredFieldValidator>
                &nbsp;
                <asp:Label ID="Label14" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label></td>
             <td></td>
            
             </tr>
               
             </table>
</asp:Panel>

        </td>
        </tr>
      
        <tr align="center" >
        <td   >
         <asp:Panel ID="pnlAddNew" runat="server" CssClass="shadow_five2" Width="60%"> 
            
    <table class="style2" visible="false" style="line-height:5px;">
    <tr>
    <td><br /></td> <td></td> <td></td> <td></td> <td></td>
    </tr>
   
      
          
        <tr runat="server" id="custtxt">
            <td class="style26">
                &nbsp;</td>
            <td align="right" class="style3">
                <asp:Label ID="Label19" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Customer Name"></asp:Label>
            </td>
            <td class="style28">
                &nbsp;</td>
            <td align="left" class="style26">
                <asp:DropDownList ID="ddlCrName" runat="server" 
                    
               
                    AppendDataBoundItems="True" Width="180px">
                </asp:DropDownList>
               <%-- AutoPostBack="True"    onselectedindexchanged="ddlCrName_SelectedIndexChanged" --%>
                &nbsp;
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="ddlCrName" ErrorMessage="Please select Customer" 
                    ValidationGroup="1" InitialValue="-Select-"></asp:RequiredFieldValidator>
                &nbsp;
                <asp:Label ID="lblcustnm" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label>
            </td>
            <td class="style26">
                &nbsp;</td>
             
        </tr>
          
    
        <tr>
            <td class="style41">
            </td>
            <td align="right" class="style3">
                <asp:Label ID="Label8" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Address"></asp:Label>
            </td>
            <td class="style43">
            </td>
            <td align="left" class="style41">
                <asp:TextBox ID="txtAddress" runat="server" Height="20px" Width="266px" 
                    TextMode="MultiLine" ></asp:TextBox>
                </td>
            <td class="style41">
            </td>
           
        </tr>
        
  
          
        <tr>
            <td class="style44">
                </td>
            <td align="right" class="style3">
                <asp:Label ID="Label9" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Customer PO NO"></asp:Label>
            </td>
            <td class="style46">
                </td>
            <td align="left" class="style44">
              
                    <asp:TextBox ID="txtcustpo" runat="server" Height="20px" Width="150px" 
                   ></asp:TextBox>
            </td>
            <td class="style44">
                </td>
               
        </tr>
        
         <tr>
            <td class="style29">
            </td>
            <td align="right" class="style3">
                <asp:Label ID="Label3" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Date"></asp:Label>
            </td>
            <td class="style31">
              <a style="color:Red;">*</a>
            </td>
            <td align="left" class="style29">
                <asp:TextBox ID="txtdatecust" runat="server" Height="20px" Width="150px" 
                   ></asp:TextBox>
                       <cc1:CalendarExtender ID="txtDate_CalendarExtender" runat="server" 
                        Enabled="True" Format="dd-MMM-yyyy" TargetControlID="txtdatecust">
                    </cc1:CalendarExtender>
            </td>
            <td class="style29">
            </td>
           
        </tr>
          <tr>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="Label12" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Date Of order Placed"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtdateorder" runat="server" Height="20px" Width="150px"
                   ></asp:TextBox>  
                    <cc1:CalendarExtender ID="CalendarExtender1" runat="server" 
                        Enabled="True" Format="dd-MMM-yyyy" TargetControlID="txtdateorder">
                    </cc1:CalendarExtender>        
            </td>
            
          
        </tr>
        
        
 
        <tr>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblproduc" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Unit Details"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left" class="style68">
              <asp:TextBox ID="txtunitdetail" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>
            </td>
            <td class="style68">
            </td>
           
        </tr>
          <tr>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="Label1" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Qty"></asp:Label>
            </td>
            <td class="style70">
             
            </td>
            <td align="left"   >
                   <asp:TextBox ID="txtqty" runat="server" Height="20px" Width="100px" 
                   ></asp:TextBox>     
                            
            </td>
          
          
        </tr> 
           <tr>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="Label2" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Payment Terms"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtpayterm" runat="server" Height="20px" Width="266px"
                   ></asp:TextBox>          
            </td>
           
          
        </tr>
        
          <tr>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="Label4" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Advance Payment Details"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtadvpay" runat="server" Height="20px" Width="266px"
                   ></asp:TextBox>          
            </td>
           
          
        </tr>
        
          <tr>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="Label6" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Delivery Date"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtdiliverydate" runat="server" Height="20px" Width="150px" 
                   ></asp:TextBox>
                   <cc1:CalendarExtender ID="CalendarExtender2" runat="server" 
                        Enabled="True" Format="dd-MMM-yyyy" TargetControlID="txtdiliverydate">
                    </cc1:CalendarExtender>        
                             
            </td>
           
          
        </tr>
          <tr>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="Label7" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Balance Payment Details"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtbalpay" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
          <tr>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="Label11" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="PBG CG"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtpbg" runat="server" Height="20px" Width="266px"
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
          <tr>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="Label10" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Remark"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtremark" runat="server" Height="20px" Width="266px"
                   ></asp:TextBox>          
            </td>
         </tr>
         
         
              <tr id="drowEC">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lbldraw" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Drawings & E & C Allocation
"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtdraw" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
         <tr id="ECActivity">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblEC" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="E & C Activity"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtECActi" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
            <tr id="CommiAct">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblcommiss" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Commissioning Activity"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtcoommiss" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
         
          <tr id="preCommission">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblprecommi" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="PreCommissioning Activity Or Not"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtprecommiss" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
            <tr id=balpayment>
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblbalPayment" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Balance Payment Details 2"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtbalpayment2" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
         <tr id="manudraw">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblmanuDraw" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Manual / Drawings"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtmanuDraw" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
           <tr  id="CForm">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblcForm" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="C Form Date"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtcForm" runat="server" Height="20px" Width="150px" 
                   ></asp:TextBox>  
                    <cc1:CalendarExtender ID="CalendarExtender3" runat="server" 
                        Enabled="True" Format="dd-MMM-yyyy" TargetControlID="txtcForm">
                    </cc1:CalendarExtender>               
            </td>
          
          
        </tr>
            <tr id="CFormRecive">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblCFormReciv" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="C Form Recieved Or Not"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtCFormReciv" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
            <tr id="OAPIDraw">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblOADraw" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="OA & PI & Drawings"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtOADraw" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
         <tr id="installation">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblinstall" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Installation Activity"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtinstall" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
          <tr id="OA">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblOA" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="OA"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtOA" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
         <tr id="unitrecipt">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblunitrecip" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Unit Receipt Date"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtunitrecip" runat="server" Height="20px" Width="150px" 
                   ></asp:TextBox>   
                   <cc1:CalendarExtender ID="CalendarExtender4" runat="server" 
                        Enabled="True" Format="dd-MMM-yyyy" TargetControlID="txtunitrecip">
                    </cc1:CalendarExtender>        
            </td>
          
          
        </tr>
             <tr id="IBRCal">
            <td class="style68">
            </td>
            <td align="right" class="style69">
             <asp:Label ID="lblIBR" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="IBR Folder & Calculation"></asp:Label>
            </td>
            <td class="style70">
            </td>
            <td align="left"   >
                        
                  <asp:TextBox ID="txtIBR" runat="server" Height="20px" Width="266px" 
                   ></asp:TextBox>          
            </td>
          
          
        </tr>
         
        <tr>
            <td class="style65">
                </td>
         <%--   <td align="right" class="style66">
                </td>--%>
            <td  colspan="2" class="style67">
           
                </td>
            <td align="left" class="style65">
                <asp:Button ID="btnSubmit" runat="server" CssClass="myButton"
                    Text="Submit" ValidationGroup="1" 
                    Width="100px" OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                   UseSubmitBehavior="false"  onclick="btnSubmit_Click"/>
                       &nbsp;
                        <asp:Button ID="btnshow" runat="server" CssClass="myButton"
                    Text="Show All"  
                    Width="100px"
                    UseSubmitBehavior="false" onclick="btnshow_Click"/>
                    <br /><br /><br /><br />
                    
                <asp:Label ID="lblInsert" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label>
            
                    
                 
            </td>
            <td class="style65">
                </td>
               
        </tr>
        <tr style="height:20px;">
            <td  class="style65">
                &nbsp;</td>
           <%-- <td align="right" class="style24">
                &nbsp;</td>--%>
            <td colspan="2" class="style25">
             <b> <a style="color:Red;  padding-right:20px;">* Indicates Compulsory Fields</a></b>
                &nbsp;</td>
            <td align="left">
               
                  
               <asp:Label ID="lbl_no_search" runat="server" Text="" ForeColor="Green" Font-Bold="true" Font-Names="Verdana" Font-Size="14px"></asp:Label>
       
                    
                      <asp:Label ID="lblTest" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label>
                   
            </td>
            <td>
            
               
            
                    
                &nbsp;</td>
                <td></td>
        </tr>
        <tr>
        <td colspan="6"></td>
        </tr>
        </table>
        </asp:Panel>
        </td>
        </tr>
      
     
</table>
   <asp:HiddenField ID="hf_user_id" runat="server" /> 
   
      
       
</asp:Panel>

 <asp:Panel ID="Panel2" runat="server"  align="Center" ScrollBars="Both" Width="1400px">
 <br />
      <div  style="width:100%;height:auto; overflow:auto;"  visible="false">
      
     
   <asp:GridView ID="Gr_PO_Details" runat="server" AutoGenerateColumns="False" 
                            GridLines="Both"  Width="100%"
                           AllowPaging="true" PageSize="30"
                            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"
                    CellPadding="2" Font-Names="Book Antiqua" Font-Size="11pt" ForeColor="Black" 
                           PagerStyle-CssClass="paging" CssClass="Type_css" >
 
                            <Columns>
                             
                         
                                <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <center>
                                            <asp:Label ID="lblprince" runat="server" Text='<%# Eval("Prince_id")%>' Width="5%"></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                 
                                </asp:TemplateField>
                               
                                <asp:TemplateField HeaderText="Principal Name" HeaderStyle-Font-Size="16px">
                                    <ItemTemplate>
                                     
                                            <asp:Label ID="lblprName" runat="server" Text='<%# Eval("Principal_Name")%>' 
                                                Width="250px"></asp:Label>
                                      
                                    </ItemTemplate>
                                   
                                                         
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Principal Name" HeaderStyle-Font-Size="16px">
                                    <ItemTemplate>
                                     
                                            <asp:Label ID="lblCrName" runat="server" Text='<%# Eval("CrName")%>' 
                                                Width="250px"></asp:Label>
                                      
                                    </ItemTemplate>
                                   
                                                         
                                </asp:TemplateField>
                                                                                            
                                  <asp:TemplateField HeaderText="Customer Address">
                                  <ItemTemplate>
                            
                                            <asp:Label ID="lblprAddress" runat="server" Width="250px"
                                                Text='<%# Eval("Address")%>'></asp:Label>
                                      </ItemTemplate>
                                
                               
                                </asp:TemplateField>
                                
                                   <asp:TemplateField HeaderText="Order No">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoorder" runat="server" Width="150px"
                                                Text='<%# Eval("Cust_PO_No")%>'></asp:Label>
                                      </ItemTemplate>
                           
                                    
                                </asp:TemplateField>
                                
                                 <asp:TemplateField HeaderText="Date">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoDate" runat="server" Width="90px"
                                                Text='<%# Eval("showdate")%>'></asp:Label>
                                      </ItemTemplate>
                                  
                                  
                                </asp:TemplateField>
                                
                                
                                
                                
                                   <asp:TemplateField HeaderText="Date Of order ">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoDateofOrder" runat="server" Width="90px"
                                                Text='<%# Eval("Date_Of_Place_Order")%>'></asp:Label>
                                      </ItemTemplate>
                           
                                  
                                </asp:TemplateField>
                                
                                
                                  <asp:TemplateField HeaderText="Unit Details">
                                     <ItemTemplate>
                            
                                            <asp:Label ID="lblpounitdetails" runat="server" Width="200px" 
                                                Text='<%# Eval("unit_Details")%>'></asp:Label>
                                      </ItemTemplate>
                                
                                   
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Qty" >
                               <ItemTemplate>
                            
                                            <asp:Label ID="lblpoQty" runat="server" Width="100px"
                                                Text='<%# Eval("Qty")%>'></asp:Label>
                                      </ItemTemplate>
                                </asp:TemplateField>
                                
                                
                                 <asp:TemplateField HeaderText="Payment Term">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpopaymentTerm" runat="server" Width="200px"
                                                Text='<%# Eval("payment_Terms")%>'></asp:Label>
                                      </ItemTemplate>
                                
                                  
                                    </asp:TemplateField>
                                    
                                    
                                 <asp:TemplateField HeaderText="Advance Payment Details" >
                                     <ItemTemplate>
                            
                                            <asp:Label ID="lblpoadvancePay" runat="server" Width="200px"
                                                Text='<%# Eval("Advance_Payment")%>'></asp:Label>
                                      </ItemTemplate>
                                
                                  
                                    </asp:TemplateField>
                                    
                                      <asp:TemplateField HeaderText="Delivery Date" >
                                   <ItemTemplate>
                            
                                            <asp:Label ID="lblpodilivery_date" runat="server" Width="90px"
                                                Text='<%# Eval("Delivery_Date")%>'></asp:Label>
                                      </ItemTemplate>
                                
                                  
                                    </asp:TemplateField>
                                    
                                          
                                      <asp:TemplateField HeaderText="PBG CG" >
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoPBG_CG" runat="server" Width="200px"
                                                Text='<%# Eval("PBG_CG")%>'></asp:Label>
                                      </ItemTemplate>
                                  
                                  
                                    </asp:TemplateField> 
                                           <asp:TemplateField HeaderText="Balance Payment Details"> 
                                             
                                   <ItemTemplate>
                            
                                            <asp:Label ID="lblpobal_pay_detail" runat="server" Width="200px"
                                                Text='<%# Eval("Balance_Payment")%>'></asp:Label>
                                      </ItemTemplate>
                                
                                    </asp:TemplateField>
                                    
                                           
                                    
                                        <asp:TemplateField HeaderText="E & C Activity" Visible="false">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoECActiv" runat="server" Width="200px"
                                                Text='<%# Eval("EC_Activity")%>'></asp:Label>
                                      </ItemTemplate>
                              
                                  
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Commissi. Activity" Visible="false">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoCommission" runat="server" Width="200px"
                                                Text='<%# Eval("Comimssionin_Activity")%>'></asp:Label>
                                      </ItemTemplate>
                                
                                    </asp:TemplateField>
                                      <asp:TemplateField HeaderText="PreCommiss. Activity Or Not" Visible="false">
                                     
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoPreCommision" runat="server" Width="200px"
                                                Text='<%# Eval("Pre_Commissioning_Act")%>'></asp:Label>
                                      </ItemTemplate>
                            
                                  
                                    </asp:TemplateField>
                                     <asp:TemplateField HeaderText="Balance Payment Details 2" Visible="false">
                                     <ItemTemplate>
                            
                                            <asp:Label ID="lblpoBal_Pay2" runat="server" Width="200px"
                                                Text='<%# Eval("Balance_Payment2")%>'></asp:Label>
                                      </ItemTemplate>
                           
                                  
                                    </asp:TemplateField>
                                    
                                     <asp:TemplateField HeaderText="Manual / Drawings" Visible="false">
                                     <ItemTemplate>
                            
                                            <asp:Label ID="lblpoManu_draw" runat="server" Width="200px"
                                                Text='<%# Eval("Manual_Drawings")%>'></asp:Label>
                                      </ItemTemplate>
                              
                                  
                                    </asp:TemplateField>
                                        <asp:TemplateField HeaderText="C Form Date" Visible="false">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoCFORM" runat="server" Width="90px"
                                                Text='<%# Eval("CForm_Date")%>'></asp:Label>
                                      </ItemTemplate>
                          
                                  
                                    </asp:TemplateField>
                                         <asp:TemplateField HeaderText="C Form Recieved Or Not" Visible="false">
                                     <ItemTemplate>
                            
                                            <asp:Label ID="lblpoCFORM_Not" runat="server" Width="200px"
                                                Text='<%# Eval("CForm_Recieved")%>'></asp:Label>
                                      </ItemTemplate>
                                 
                                  
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="OA & PI & Drawings" Visible="false">
                                   <ItemTemplate>
                            
                                            <asp:Label ID="lblpoOAPI_Draw" runat="server" Width="200px"
                                                Text='<%# Eval("OA_PI")%>'></asp:Label>
                                      </ItemTemplate>
                             
                                  
                                    </asp:TemplateField>
                                     <asp:TemplateField HeaderText="Installation Activity" Visible="false">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoinstallation_Activ" runat="server" Width="200px"
                                                Text='<%# Eval("Installation_Act")%>'></asp:Label>
                                      </ItemTemplate>
                                
                                  
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="IBR Folder & Calculation" Visible="false">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoIBRFolder" runat="server" Width="200px"
                                                Text='<%# Eval("IBR_Folder_Calculation")%>'></asp:Label>
                                      </ItemTemplate>
                          
                                  
                                    </asp:TemplateField>
                                    
                                     <asp:TemplateField HeaderText="OA" Visible="false">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoOA" runat="server" Width="200px"
                                                Text='<%# Eval("OA")%>'></asp:Label>
                                      </ItemTemplate>
                          
                                  
                                    </asp:TemplateField>
                                    
                                     <asp:TemplateField HeaderText="Unit Receipt Date" Visible="false">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoUnitRecipt" runat="server" Width="90px"
                                                Text='<%# Eval("unit_Receipt_Date")%>'></asp:Label>
                                      </ItemTemplate>
                             
                                  
                                    </asp:TemplateField> 
                                    
                                         <asp:TemplateField HeaderText="  Drawings & E & C Allocation" Visible="false">
                                     <ItemTemplate>
                            
                                            <asp:Label ID="lblDrawEC_Allo" runat="server" Width="200px"
                                                Text='<%# Eval("Drawings_EC")%>'></asp:Label>
                                      </ItemTemplate>
                             
                                  
                                    </asp:TemplateField> 
                                   
                                         <asp:TemplateField HeaderText="Remark">
                                    <ItemTemplate>
                            
                                            <asp:Label ID="lblpoRemark" runat="server" Width="200px"
                                                Text='<%# Eval("Remark")%>'></asp:Label>
                                      </ItemTemplate>
                                 
                                  
                                    </asp:TemplateField> 
                                      <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <center>
                                            <asp:Label ID="lblprincerow" runat="server" Text='<%# Eval("PO_id")%>' Width="5%"></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                 
                                </asp:TemplateField>
                                    
                                     <asp:TemplateField>
                                       <ItemTemplate>
                                        <asp:LinkButton ID="Linkcloseevent" runat="server"  
                Text="Close"  Font-Underline="false" OnClick="lnkclose_Click" CommandArgument='<%# Eval("PO_id") %>'></asp:LinkButton>  
                                       </ItemTemplate>
                                 </asp:TemplateField> 
                                        <asp:TemplateField>
                                    <ItemTemplate>
                                                             
                                    
                                      <asp:LinkButton ID="Edit" runat="server"  
                             CommandArgument='<%# Eval("PO_id") %>' Text="Edit"  OnClick="edit_Click"></asp:LinkButton> 
<ItemStyle ForeColor="Blue"></ItemStyle>
</ItemTemplate>
</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" />
                                <RowStyle BackColor="#ffc9bb" ForeColor="#333333" />
                        </asp:GridView> 
</div>

<br />
   <asp:Button ID="btn_leave_addvisit" runat="server" style="display:none" />
<cc1:modalpopupextender ID="ModalPopupExtende11" runat="server" 
          TargetControlID="btn_leave_addvisit" PopupControlID="pnl_leave_addvisit"
 BackgroundCssClass="modelbackground">
</cc1:modalpopupextender>

<asp:Panel ID="pnl_leave_addvisit" runat="server" BackColor="White" Height="160px" Width="500px" CssClass="categorypanel">
<table width="100%" style="border:Solid 2px #D46900; width:100%; height:100%" cellpadding="0" cellspacing="0">
<tr style="background-image:url(../Images/header.gif)">
<td style="height:10%; color:White; font-weight:bold;padding:3px; font-size:larger; font-family:Calibri" align="left">
Confirm Box</td><td style=" color:White; font-weight:bold;padding:3px; font-size:larger" align="right">  
<asp:LinkButton ID="lnk_colse_box" runat="server" > <img src="../Images/Close.gif" alt="Close" style="border :0px" align="right"/></asp:LinkButton>

  </td>
</tr>
<tr>
<td colspan="2" align="left" style="padding:5px; font-family:Calibri"> 
<asp:Label ID="lbl_no_tour_msg" runat="server" ForeColor="Red" Font-Bold="true"/>
</td>
</tr>
<tr style="background-color:White;">
<td align="right"  style="background-color:White;">Enter Reason:</td><td  style="background-color:White;">
   <%-- <asp:HiddenField ID="HiddenField_enq_id" runat="server" />--%>
    <asp:HiddenField ID="HiddenField_close" runat="server" />
    <%--<asp:HiddenField ID="hf_enq_or_quo" runat="server" />--%>
    
    <asp:DropDownList ID="ddl_delete_close_reason" runat="server" AppendDataBoundItems="true">
    </asp:DropDownList>
  
    
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
     ControlToValidate="ddl_delete_close_reason" InitialValue="-Select-" ErrorMessage="select reason." ValidationGroup="s" ></asp:RequiredFieldValidator></td></tr><tr>
<td align="right" style="padding-right:15px; background-color:White;" >
<asp:Button ID="btn_yes_delete_close"  runat="server" Text="Yes" Width="70" 
        Height="35" CssClass="myButton2" ValidationGroup="s" 
        onclick="btn_yes_delete_close_Click"   />   
</td>
<td align="center" style="padding-right:15px; background-color:White;" >

       
        
<asp:Button ID="btn_no_delete_close"  runat="server" Text="No" Width="70" 
        Height="35" CssClass="myButton2" onclick="btn_no_delete_close_Click"  />

             
  

</td>
</tr>
<tr>
<td>

</td>
<td>
&nbsp;&nbsp;
<asp:Label ID="lbldeb1" runat="server" Font-Bold="true" Font-Names="Verdana" 
            Font-Size="14px" ForeColor="#cc0000"></asp:Label>
</td>
</tr>

</table>

</asp:Panel>
</asp:Panel>
 <asp:HiddenField ID="hf_edit" runat="server" />
        

</asp:Content>

