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



<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="../CSS/style.css" type="text/css" rel="Stylesheet" />
<%--    <link href="../CSS/ForButton.css" type="text/css" rel="Stylesheet" />
    <link href="../CSS/ForButton1.css" type="text/css" rel="Stylesheet" />--%>

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

    
   
    <link href="../CSS/Widthset.css" rel="stylesheet" type="text/css" />
       <script type="text/javascript" src="../js/JScript.js"></script>
     
    <style type="text/css">
         .shadow_five222 {
            border-style: solid;
            border-color: #FF9900;
            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: 0px 0px 0px #B1A59A;
            -webkit-box-shadow: 0px 0px 0px #B1A59A;
            -o-box-shadow: 0px 0px 0px #B1A59A;
            -ms-box-shadow: 0px 0px 0px #B1A59A;
            box-shadow: 0px 0px 0px #B1A59A;
            width: 100%;
            
        }
        
    .pnl1
    {
     background-color: #FFC56C;
         -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;
         margin-bottom: 10px;
    }
    .Quotation_grid_css
    {
        padding:0px 0px 0px 0px;
        margin:0px 0pxp 0px 0px;
        
        }
       .modelbackground
        {
        	background-color:Gray;
	        filter:alpha(opacity=70);
	        opacity:0.7;
        }
        .categorypanel
        {
        	background-color:#b3ebf4;
        	border:2px solid black;
        	
        		}
       .style2
       {
            width: 93%;
         
      }
     .class_gv_leads
     {
       
         }
    
      		 .shadow_five 
      		 {
        background-color: #B3EBF4;
        -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: 0px;
        margin-right:0px;
        margin-left:0px;
        margin-bottom: 10px;
    }
        .shadow_five1 {
            background-color: #F2FFC6;
            -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;
        }
        .lb
    {
            clear: left;
            margin: 5px 2px 0 0;
            text-align: right;
            font-size: 14px;
            color: #660033;
            text-transform: capitalize;
            text-shadow: 0px 0.5px 0px #444;
            font-weight:normal;
            font-family:Eurostile LT;
        }
    .Label
    {
 /* IE10 Consumer Preview */ 
background-image: -ms-linear-gradient(bottom, #FFCE47 0%, #F2813F 100%);

/* Mozilla Firefox */ 
background-image: -moz-linear-gradient(bottom, #FFCE47 0%, #F2813F 100%);

/* Opera */ 
background-image: -o-linear-gradient(bottom, #FFCE47 0%, #F2813F 100%);

/* Webkit (Safari/Chrome 10) */ 
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #FFCE47), color-stop(1, #F2813F));

/* Webkit (Chrome 11+) */ 
background-image: -webkit-linear-gradient(bottom, #FFCE47 0%, #F2813F 100%);

/* W3C Markup, IE10 Release Preview */ 
background-image: linear-gradient(to top, #FFCE47 0%, #F2813F 100%);
}
     
          .contactpanelcss
        {
        	width:80%;
        	margin:0px;
        	background-color:White;
        	border:10px solid ActiveBorder;
        	padding:10px;
        	margin-top:50px;
        	     	   	
        }   
     .shadow_five2 {
            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: 0px 0px 0px #B1A59A;
            -webkit-box-shadow: 0px 0px 0px #B1A59A;
            -o-box-shadow: 0px 0px 0px #B1A59A;
            -ms-box-shadow: 0px 0px 0px #B1A59A;
            box-shadow: 0px 0px 0px #B1A59A;
            padding: 10px;
            width: 780px;
          
        }
        
         .shadow_five2_lead {
            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: 0px 0px 0px #B1A59A;
            -webkit-box-shadow: 0px 0px 0px #B1A59A;
            -o-box-shadow: 0px 0px 0px #B1A59A;
            -ms-box-shadow: 0px 0px 0px #B1A59A;
            box-shadow: 0px 0px 0px #B1A59A;
            padding: 10px;
            width: 80%;
            height:auto;
          
        }
        
        .shadow_five2_search
        {
         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: 0px 0px 0px #B1A59A;
            -webkit-box-shadow: 0px 0px 0px #B1A59A;
            -o-box-shadow: 0px 0px 0px #B1A59A;
            -ms-box-shadow: 0px 0px 0px #B1A59A;
            box-shadow: 0px 0px 0px #B1A59A;
            padding: 10px;
            width: 80%;   
            }
        .style3
        {
        }
     
        .style4
        {
            width: 29px;
        }
     
        .style6
        {
            width: 333px;
            height: 37px;
        }
        .style9
        {
            height: 28px;
        }
             
        .style17
        {
        }
     
        .style19
        {
            width: 500px;
        }
     .font
{
	font-size:12px;
	font-family:Verdana;
	}
        .style22
        {
            height: 41px;
        }
        .myButton1 {
        
        -moz-box-shadow: 0px 1px 0px 0px #fff6af;
        -webkit-box-shadow: 0px 1px 0px 0px #fff6af;
        box-shadow: 0px 1px 0px 0px #fff6af;
        
        background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffec64), color-stop(1, #ffab23));
        background:-moz-linear-gradient(top, #ffec64 5%, #ffab23 100%);
        background:-webkit-linear-gradient(top, #ffec64 5%, #ffab23 100%);
        background:-o-linear-gradient(top, #ffec64 5%, #ffab23 100%);
        background:-ms-linear-gradient(top, #ffec64 5%, #ffab23 100%);
        background:linear-gradient(to bottom, #ffec64 5%, #ffab23 100%);
        filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffec64', endColorstr='#ffab23',GradientType=0);
        
        background-color:#ffec64;
        
        -moz-border-radius:6px;
        -webkit-border-radius:6px;
        border-radius:6px;
        
        border:1px solid #ffaa22;
        
        display:inline-block;
        color:#333333;
        font-family:arial;
        font-size:15px;
        font-weight:bold;
        padding:6px 24px;
        text-decoration:none;
        
        text-shadow:0px 1px 0px #ffee66;
        cursor:pointer;
    }
    .myButton1:hover {
        
        background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffab23), color-stop(1, #ffec64));
        background:-moz-linear-gradient(top, #ffab23 5%, #ffec64 100%);
        background:-webkit-linear-gradient(top, #ffab23 5%, #ffec64 100%);
        background:-o-linear-gradient(top, #ffab23 5%, #ffec64 100%);
        background:-ms-linear-gradient(top, #ffab23 5%, #ffec64 100%);
        background:linear-gradient(to bottom, #ffab23 5%, #ffec64 100%);
        filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffab23', endColorstr='#ffec64',GradientType=0);
        
        background-color:#ffab23;
    }
    .myButton1:active {
        position:relative;
        top:1px;
    }
    .pnl {
            background-color: #FFF0DB;      
         
           

        }
        .style26
        {
            
        }
        .style29
        {
            width: 180px;
        }
        .style30
        {
            width: 216px;
        }
        .style33
        {
            width: 333px;
        }
        .style34
        {
            width: 43px;
        }
        .style36
        {
            width: 250px;
            height: 37px;
        }
        .style37
        {
            height: 28px;
            width: 387px;
        }
        .style38
        {
            width: 300px;
        }
        .style39
        {
            width: 387px;
        }
        .style41
        {
            width: 331px;
            height: 37px;
        }
        .style44
        {
            width: 349px;
        }
        .style45
        {
            width: 203px;
        }
        .style49
        {
            width: 41px;
        }
        .style50
        {
            width: 12px;
        }
        .style51
        {
            width: 12px;
            height: 37px;
        }
        .style52
        {
            width: 250px;
        }
        .style53
        {
            width: 20px;
        }
        
       .watermarkcss
       {
           color:#808080;
           }
           
           
             .cpHeader
        {
            
            background-color: #b3ebf4;           
            cursor: pointer;
            
           
                   
        }
           
        .style54
        {
            width: 5px;
        }
        .style55
        {
            width: 504px;
        }
        .style56
        {
            height: 28px;
            width: 33px;
        }
        .style57
        {
            width: 378px;
        }
        .style58
        {
            width: 430px;
        }
        .style59
        {
            width: 248px;
        }
           
        </style>
     
     
     
     
     
           <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
          
           
              <script type="text/javascript">

           $().ready(function() {
               var valdata = $("input[id$=hf_load_postback_eq_quot_check]").val();
               if (valdata == "Load") {

                   $("#div_ddl_dist_city_enq_quotation_search").hide();
                   $("#div_ddl_state_enq_quotation_search").hide();
                   $("#div_ddl_search_grade").hide();
           
                   $("#div_txt_search").show();
                   $("#div_ddl_all_data").hide();
                   $("#<%=lbl_dropdown_name.ClientID %>").html("");
                   $("#div_model_name").hide();
                   $("#div_ddl_employee_wise_search").hide();                 
                   $("#div_ddl_AreaName_list").hide();
                   //+  $("[id$=hf_load_postback_check]").val("");
                   $("[id*=txtperNm]").hide();
                   $("[id*=divbtn1]").hide();
                   
                   
                   document.getElementById('<%= RequiredFieldValidator1.ClientID %>').enabled = false;
//                   document.getElementById('<%= RequiredFieldValidator_Person_Name.ClientID %>').enabled = false;
                   
               }
               else {

                   show_controls_search_wise(valdata);
               }

           });
           
           </script>
           
           
           
           
              <script type="text/javascript">
                  $().ready(function() {
                      $("[id*=ddl_all_data]").change(function() {

                          var PID = $("[id*=ddl_all_data]").find("option:selected").val();
                          var search_text = $("[id*=ddl_search_value]").find("option:selected").text();

                          if (search_text == "Product Name") {
                              $("#div_model_name").hide();
                          }
                          else {
                              $("#div_model_name").show();

                              $.ajax({
                                  type: "POST",
                                  url: "EnquiryMaster.aspx/bind_Product_model_name_list",
                                  data: "{PID:'" + PID + "'}",
                                  contentType: "application/json; charset=utf-8",
                                  dataType: "json",
                                  success: function(response) {

                                      $("[id*=ddl_model_name]").empty();

                                      //                                     var xmlDoc = $.parseXML(response.d);
                                      //                                     var xml = $(xmlDoc);
                                      //                                     var customers = xml.find("Product_name");

                                      $("<option value='-1'>-Select Model-</option>").appendTo("[id*=ddl_model_name]");

                                      $.each(response.d, function() {

                                          $("[id*=ddl_model_name]").append($("<option></option>").val(this['PID']).html(this['ModelName']));
                                          //                                         $("[id*=ddl_model_name]").append($("<option></option>").val($(this).find("PID").text()).html($(this).find("model_name").text()));

                                      });
                                  }
                              });


                          }

                      });

                      $("[id*=ddl_search_value]").change(function() {
                          var searchval = $("[id*=ddl_search_value]").val();
                          var search_text = $("[id*=ddl_search_value]").find("option:selected").text();
                          $("#txt_enq_quot_from_date_search").val('');
                          $("#txt_enq_quot_to_date_search").val('');

                          if (searchval == "1") {
                              $("#div_search_enq_quot").show();

                          } else if (searchval == "2") {
                              //  Session["AutoCID"] = 0;
                              $("#div_search_enq_quot").show();
                              $find("<%= AutoCompleteExtender3.ClientID %>")._cache = [];
                          }
                          else {
                              $find("<%= AutoCompleteExtender3.ClientID %>")._cache = [];

                              $("#div_search_enq_quot").hide();
                          }
                          show_controls_search_wise(search_text);

                      });
                  });

//Enquirylist Quotationlist Search
                  function show_controls_search_wise(search_text) {

                      if (search_text == "Area/Region") {
                          $("[id*=txt_search]").val('');
                          $("#div_ddl_dist_city_enq_quotation_search").hide();
                          $("#div_ddl_state_enq_quotation_search").hide();
                          $("#div_ddl_search_grade").hide();
                      
                          $("#div_txt_search").hide();
                          $("#div_ddl_AreaName_list").show();
                          $("#div_ddl_all_data").hide();
                          $("#div_model_name").hide();
                          $("#<%=lbl_dropdown_name.ClientID %>").html("Select Area/Region:");
                          $("#<%=lbl_model_name_dropdown.ClientID %>").html("");
                          $("#div_ddl_employee_wise_search").hide();
                          $("[id$=hf_load_postback_eq_quot_check]").val("Area/Region");

                          $("[id*=txtperNm]").hide();
                          $("[id*=divbtn1]").hide();


                      }
                      else
                          if (search_text == "Product Name") {
                          $("[id*=txt_search]").val('');
                          $("#div_ddl_AreaName_list").hide();
                          $("#div_ddl_dist_city_enq_quotation_search").hide();
                          $("#div_ddl_state_enq_quotation_search").hide();
                          $("#div_ddl_search_grade").hide();
                         
                          $("#div_txt_search").hide();
                          $("#div_ddl_all_data").show();
                          $("#<%=lbl_dropdown_name.ClientID %>").html("Select Product:");
                          $("#<%=lbl_model_name_dropdown.ClientID %>").html("");
                          $("#div_model_name").hide();
                          $("#div_ddl_employee_wise_search").hide();
                          $("[id$=hf_load_postback_eq_quot_check]").val("Product Name");
                          $("[id*=txtperNm]").hide();
                          $("[id*=divbtn1]").hide();
                      }
                      else
                          if (search_text == "Model Name") {
                          $("[id*=txt_search]").val('');
                          $("#div_ddl_AreaName_list").hide();
                          $("#div_ddl_dist_city_enq_quotation_search").hide();
                          $("#div_ddl_state_enq_quotation_search").hide();
                          $("#div_ddl_search_grade").hide();
                     
                          $("#div_txt_search").hide();
                          $("#div_ddl_all_data").show();
                          $("#<%=lbl_dropdown_name.ClientID %>").html("Select Product:");
                          $("#<%=lbl_model_name_dropdown.ClientID %>").html("Select Model:");
                          $("#div_model_name").show();
                          $("#div_ddl_employee_wise_search").hide();
                          $("[id$=hf_load_postback_eq_quot_check]").val("Model Name");
                          $("[id*=txtperNm]").hide();
                          $("[id*=divbtn1]").hide();
                      }
                      else
                          if (search_text == "Employee Wise") {
                          $("[id*=txt_search]").val('');
                          $("#div_ddl_AreaName_list").hide();
                          $("#div_ddl_dist_city_enq_quotation_search").hide();
                          $("#div_ddl_state_enq_quotation_search").hide();
                          $("#div_ddl_search_grade").hide();
                        
                          $("#div_txt_search").hide();
                          $("#div_ddl_all_data").hide();
                          $("#<%=lbl_dropdown_name.ClientID %>").html("Select Employee:");
                          $("#<%=lbl_model_name_dropdown.ClientID %>").html("");
                          $("#div_model_name").hide();
                          $("#div_ddl_employee_wise_search").show();
                          $("[id$=hf_load_postback_eq_quot_check]").val("Employee Wise");
                          $("[id*=txtperNm]").hide();
                          $("[id*=divbtn1]").hide();
                      }
                      else
                          if (search_text == "Grade") {
                          $("[id*=txt_search]").val('');
                          $("#div_ddl_AreaName_list").hide();
                          $("#div_ddl_dist_city_enq_quotation_search").hide();
                          $("#div_ddl_state_enq_quotation_search").hide();
                          $("#div_ddl_search_grade").show();
                      
                          $("#div_txt_search").hide();
                          $("#div_ddl_all_data").hide();
                          $("#<%=lbl_dropdown_name.ClientID %>").html("Select Grade:");
                          $("#<%=lbl_model_name_dropdown.ClientID %>").html("");
                          $("#div_model_name").hide();
                          $("#div_ddl_employee_wise_search").hide();
                          $("[id$=hf_load_postback_eq_quot_check]").val("Grade");
                          $("[id*=txtperNm]").hide();
                          $("[id*=divbtn1]").hide();

                      }
                      else
                          if (search_text == "District/City") {
                          $("[id*=txt_search]").val('');
                          $("#div_ddl_AreaName_list").hide();
                          $("#div_ddl_dist_city_enq_quotation_search").show();
                          $("#div_ddl_state_enq_quotation_search").hide();
                          $("#div_ddl_search_grade").hide();
                        
                          $("#div_txt_search").hide();
                          $("#div_ddl_all_data").hide();
                          $("#<%=lbl_dropdown_name.ClientID %>").html("Select District/City:");
                          $("#<%=lbl_model_name_dropdown.ClientID %>").html("");
                          $("#div_model_name").hide();
                          $("#div_ddl_employee_wise_search").hide();
                          $("[id$=hf_load_postback_eq_quot_check]").val("District/City");
                          $("[id*=txtperNm]").hide();
                          $("[id*=divbtn1]").hide();
                      }
                      else
                          if (search_text == "State") {
                          $("[id*=txt_search]").val('');
                          $("#div_ddl_AreaName_list").hide();
                          $("#div_ddl_dist_city_enq_quotation_search").hide();
                          $("#div_ddl_state_enq_quotation_search").show();
                          $("#div_ddl_search_grade").hide();
                       
                          $("#div_txt_search").hide();
                          $("#div_ddl_all_data").hide();
                          $("#<%=lbl_dropdown_name.ClientID %>").html("Select State:");
                          $("#<%=lbl_model_name_dropdown.ClientID %>").html("");
                          $("#div_model_name").hide();
                          $("#div_ddl_employee_wise_search").hide();
                          $("[id$=hf_load_postback_eq_quot_check]").val("State");
                          $("[id*=txtperNm]").hide();
                          $("[id*=divbtn1]").hide();
                      }
                     
                      else {
                          $("[id*=txt_search]").val('');
                          $("#div_ddl_AreaName_list").hide();
                          $("#div_ddl_dist_city_enq_quotation_search").hide();
                          $("#div_ddl_state_enq_quotation_search").hide();
                          $("#div_ddl_search_grade").hide();
                       
                          $("#div_txt_search").show();
                          $("#div_ddl_all_data").hide();
                          $("#<%=lbl_model_name_dropdown.ClientID %>").html("");
                          $("#<%=lbl_dropdown_name.ClientID %>").html("");
                          $("#div_model_name").hide();
                          $("#div_ddl_employee_wise_search").hide();
                          $("[id$=hf_load_postback_eq_quot_check]").val("");
                          $("[id*=txtperNm]").hide();
                          $("[id*=divbtn1]").hide();
                      }


                  }
                     </script>
                     
                     
                     
                      <script type="text/javascript">
                          $(function() {
                              bind_emplyee_list();
                              var show_pennding = $('input[id$=hf_show_report]').val();
                              var ENQ_Quot = $('input[id$=hf_Enq_quo_Type]').val();
                              var convertLead = $('input[id$=hf_show_lead_panel_for_convert_to_enq_quot]').val();
                              if (convertLead == "ConvertLead") {
                                  $("#div_Add_lead_from").show();
                                  $("#div_add_enq_quot_from").hide();

                              } else
                              if (show_pennding == "Report") {

                                  $("#div_search_panle_enq_quot").hide();
                                  $("#div_Add_lead_from").hide();
                               //   $("#div_add_enq_quot_from").hide();
                                  var enq_to_quot = $("input[id$=hf_show_pending_convert_enq_to_quot]").val();
                                  if (enq_to_quot == "ConvertEnqToQuot") {
                                      $("#div_add_enq_quot_from").show();
                                      $("#show_enq_btn").hide();
                                  } else {
                                      $("#div_add_enq_quot_from").hide();
                                  }
                                  
                                  $("#show_enquiry_list_grid").hide();
                                  $("#show_quotation_list_grid").hide();
                                  $("#div_show_search_enq_quot").hide();
                                  $("#div_lead_show_grid").hide();
                                  if (ENQ_Quot == "Quot") {
                                      $("#show_quotation_list_grid").show();
                                      $("#div_show_search_enq_quot").show();
                                      $("#div_search_panle_enq_quot").show();
                                      $("#tremark").hide();
                                      $("#lbldivtxt_remark").hide();
                                      $("#trremarklbl").hide();
                                  }
                                  if (ENQ_Quot == "enq") {

                                      $("#div_search_panle_enq_quot").show();
                                      $("#div_show_search_enq_quot").show();
                                      $("#show_enquiry_list_grid").show();
                                  }
                                  if (ENQ_Quot == "Lead") {
                                  
                                      $("#show_quotation_list_grid").hide();
                                      $("#div_show_grid_enquiry").hide();
                                      $("#div_search_panle_enq_quot").hide();

                                      $("#div_lead_show_grid").show();
                                      $("#div_ddl_state_lead_search").hide();
                                      $("#div_ddl_district_lead_search").hide();
                                      $("#div_ddl_lead_search_grade").hide();
                                      $("#div_txt_search_lead").show();
                                      $("#<%=Label59.ClientID %>").html("Search value");
                                      $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                                      $("#txt_search_lead").val('');
                                      $("#div_ddl_employee_wise_leads_search").hide();
                                      $("#div_add_enq_quot_from").hide();
                                      $("#show_enquiry_list_grid").hide();
                                      $("#show_quotation_list_grid").hide();
                                      $("#div_show_search_enq_quot").hide();


                                  }

                              } else
                                  if (show_pennding == "Lead_Search") {
                                  $("#div_Add_lead_from").hide();
                                  $("#div_add_enq_quot_from").hide();
                                  $("#show_enquiry_list_grid").hide();
                                  $("#show_quotation_list_grid").hide();
                                  $("#div_show_search_enq_quot").hide();
                                  $("#div_lead_show_grid").show();

                                  $("#show_quotation_list_grid").hide();
                                  $("#div_show_grid_enquiry").hide();
                                  $("#div_search_panle_enq_quot").hide();

                              }
                              else
                                  if (show_pennding == "Enq_Search") {
                                  $("#div_Add_lead_from").hide();
                                  $("#div_add_enq_quot_from").hide();
                                  $("#show_enquiry_list_grid").show();
                                  $("#show_quotation_list_grid").hide();
                                  $("#div_show_search_enq_quot").show();
                                  $("#div_search_panle_enq_quot").show();
                                  $("#div_lead_show_grid").hide();
                              }
                              else
                                  if (show_pennding == "Quot_Search") {
                                  $("#div_Add_lead_from").hide();
                                  $("#div_add_enq_quot_from").hide();
                                  $("#show_enquiry_list_grid").hide();
                                  $("#show_quotation_list_grid").show();
                                  $("#div_show_search_enq_quot").show();
                                  $("#div_search_panle_enq_quot").show();
                                  $("#div_lead_show_grid").hide();

                              }
                              else
                                  if (show_pennding == "ExcelSheet") {
                                  if (ENQ_Quot == "excelLead") {
                                      $("#div_Add_lead_from").hide();
                                      $("#div_add_enq_quot_from").hide();
                                      $("#show_enquiry_list_grid").hide();
                                      $("#show_quotation_list_grid").hide();
                                      $("#div_show_search_enq_quot").hide();
                                      $("#div_lead_show_grid").show();

                                      $("#show_quotation_list_grid").hide();
                                      $("#div_show_grid_enquiry").hide();
                                      $("#div_search_panle_enq_quot").hide();

                                  }
                                  else
                                      if (ENQ_Quot == "excelEnq") {

                                      $("#div_Add_lead_from").hide();
                                      $("#div_add_enq_quot_from").hide();
                                      $("#show_enquiry_list_grid").show();
                                      $("#show_quotation_list_grid").hide();
                                      $("#div_show_search_enq_quot").hide();
                                      $("#div_lead_show_grid").hide();
                                  }
                                  else
                                      if (ENQ_Quot == "excelQuot") {
                                      $("#div_Add_lead_from").hide();
                                      $("#div_add_enq_quot_from").hide();
                                      $("#show_enquiry_list_grid").hide();
                                      $("#show_quotation_list_grid").show();
                                      $("#div_show_search_enq_quot").hide();
                                      $("#div_lead_show_grid").hide();
                                  }
                                  else {

                                      $("#div_Add_lead_from").hide();
                                      $("#div_add_enq_quot_from").hide();
                                      $("#show_enquiry_list_grid").hide();
                                      $("#show_quotation_list_grid").hide();
                                      $("#div_show_search_enq_quot").hide();
                                      $("#div_lead_show_grid").hide();
                                  }

                              }
                              else {

                                  if (ENQ_Quot == 'enq' || ENQ_Quot == 'Quot') {

                                      var ss = $('input[id$=hf_ennq_quot_check]').val();
                                      if (ss == "qt") {
                                          document.getElementById('<%= rblQuo.ClientID %>').checked = true;
                                          document.getElementById('<%= rblEnq.ClientID %>').checked = false;
                                          document.getElementById('<%= rblLead.ClientID %>').checked = false;
                                          $("#Quot_heading").show();
                                          $("#Quot_heading_date").show();
                                          $("#show_quot_btn").show();
                                          $("#show_enq_btn").hide();
                                          $("[id*=hf_ennq_quot_check]").val("qt");
                                          $("#div_Add_lead_from").hide();
                                          $("#div_lead_show_grid").hide();
                                          $("#div_add_enq_quot_from").show();
                                          $("#lable_enq_heading").hide();
                                          $("#lbldivtxt_remark").hide();
                                          $("#trremarklbl").hide();
                                          

                                          



                                      } else if (ss == "en") {

                                          document.getElementById('<%= rblQuo.ClientID %>').checked = false;
                                          document.getElementById('<%= rblEnq.ClientID %>').checked = true;
                                          $("#Quot_heading").hide();
                                          $("#Quot_heading_date").hide();

                                          $("#show_quot_btn").hide();
                                          $("#show_enq_btn").show();
                                          $("[id*=hf_ennq_quot_check]").val("en");
                                          $("#div_Add_lead_from").hide();
                                          $("#div_lead_show_grid").hide();
                                          $("#div_add_enq_quot_from").show();

                                          document.getElementById('<%= rfv_quotation_date.ClientID %>').enabled = false;

                                          $("#Quot_heading").show();
                                          $("#Quot_heading_date").show();
                                          $("#lable_quot_heading").hide();
                                          $("#lable_enq_heading").show();
                                          $("#quotatio_enq_date").hide();
                                          $("#quotatio_enq_no").hide();

                                      }
                                      else
                                          if (ss == "lead") {
                                          $("#div_Add_lead_from").show();
                                          $("#div_lead_show_grid").show();
                                          $("#div_add_enq_quot_from").hide();
                                          $("#div_add_enq_quot_from").hide();
                                          $("#show_enquiry_list_grid").hide();
                                          $("#show_quotation_list_grid").hide();
                                          $("#div_show_search_enq_quot").hide();



                                      }

                                  }
                                  else {

                                      document.getElementById('<%= rblQuo.ClientID %>').checked = false;
                                      document.getElementById('<%= rblEnq.ClientID %>').checked = false;
                                      $("#Quot_heading").show();
                                      $("#Quot_heading_date").show();
                                      $("#show_quot_btn").show();
                                      $("#show_enq_btn").hide();
                                      $("#div_Add_lead_from").show();
                                      $("#div_lead_show_grid").show();
                                      $("#div_add_enq_quot_from").hide();
                                      $("#show_enquiry_list_grid").hide();
                                      $("#show_quotation_list_grid").hide();
                                      $("#div_show_search_enq_quot").hide();

                                      $("#show_quotation_list_grid").hide();
                                      $("#div_show_grid_enquiry").hide();
                                      $("#tremark").hide();
                                      $("#lbldivtxt_remark").hide();
                                      $("#trremarklbl").hide();
                                      $("#div_search_panle_enq_quot").hide();





                                  }
                              }

                          });

</script>
    
   <%-- Lead Search--%>
    
    <script type="text/javascript">
        $().ready(function() {

            bind_lead_search();

        });

        function bind_lead_search() {
            var valdata = $("input[id$=hf_load_postback_check]").val();
            if (valdata == "Load") {
                $("#div_ddl_state_lead_search").hide();
                $("#div_ddl_district_lead_search").hide();
                $("#div_ddl_lead_search_grade").hide();
                $("#div_txt_search_lead").show();
                $("#<%=Label59.ClientID %>").html("Search value");
                $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                $("#txt_search_lead").val('');
                $("#div_ddl_employee_wise_leads_search").hide();


            }
            else
                if (valdata == "3") {
                $("#div_ddl_state_lead_search").hide();
                $("#div_ddl_district_lead_search").show();
                $("#div_ddl_lead_search_grade").hide();
                $("#div_txt_search_lead").hide();
                $("#<%=Label59.ClientID %>").html("Select City");

                $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                $("#txt_search_lead").val('');
                $("#div_ddl_employee_wise_leads_search").hide();
                $("[id$=hf_load_postback_check]").val("3");


            }
            else
                if (valdata == "4") {
                $("#div_ddl_state_lead_search").show();
                $("#div_ddl_district_lead_search").hide();
                $("#div_ddl_lead_search_grade").hide();
                $("#div_txt_search_lead").hide();
                $("#<%=Label59.ClientID %>").html("Select State");

                $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                $("#txt_search_lead").val('');
                $("#div_ddl_employee_wise_leads_search").hide();
                $("[id$=hf_load_postback_check]").val("4");


            }
            else
                if (valdata == "5") {
                $("#div_ddl_state_lead_search").hide();
                $("#div_ddl_district_lead_search").hide();
                $("#div_ddl_lead_search_grade").show();
                $("#div_txt_search_lead").hide();
                $("#<%=Label59.ClientID %>").html("Select Grade");

                $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                $("#txt_search_lead").val('');
                $("#div_ddl_employee_wise_leads_search").hide();
                $("[id$=hf_load_postback_check]").val("5");

            }
            else
                if (valdata == "6") {
                $("#div_ddl_state_lead_search").hide();
                $("#div_ddl_district_lead_search").hide();
                $("#div_ddl_lead_search_grade").hide();
                $("#div_txt_search_lead").hide();
                $("#<%=Label59.ClientID %>").html("Select Employee");
                $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                $("#txt_search_lead").val('');
                $("#div_ddl_employee_wise_leads_search").show();
                $("[id$=hf_load_postback_check]").val("6");

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

                $("[id*=ddl_search_lead]").change(function() {
                    var searchval = $("[id*=ddl_search_lead]").val();
                    var search_text = $("[id*=ddl_search_lead]").find("option:selected").text();
                    if (searchval == "1") {
                        $("#div_lead_serch").show();
                    } else {
                        $("#div_lead_serch").hide();
                    }
                   
                   
                    if (search_text == "Employee Wise") {
                        $("[id$=hf_load_postback_check]").val("6");
                        $("#txt_search_lead").val('');
                        $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                        $("#<%=Label59.ClientID %>").html("Select Employee");
                        $("#div_txt_search_lead").hide();
                        $("#div_ddl_lead_search_grade").hide();
                        $("#div_ddl_employee_wise_leads_search").show();
                         $("#div_ddl_state_lead_search").hide();
                        $("#div_ddl_district_lead_search").hide();
                     

                    }
                    else
                        if (search_text == "Grade") {
                        $("[id$=hf_load_postback_check]").val("5");
                        $("#txt_search_lead").val('');
                        $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                        $("#<%=Label59.ClientID %>").html("Select Grade");
                        $("#div_txt_search_lead").hide();
                        $("#div_ddl_lead_search_grade").show();
                        $("#div_ddl_employee_wise_leads_search").hide();                    
                        $("#div_ddl_state_lead_search").hide();
                        $("#div_ddl_district_lead_search").hide();
                     

                    }
                    else
                        if (search_text == "City") {
                        $("[id$=hf_load_postback_check]").val("3");
                        $("#txt_search_lead").val('');
                        $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                        $("#<%=Label59.ClientID %>").html("Select City");
                        $("#div_txt_search_lead").hide();
                        $("#div_ddl_lead_search_grade").hide();
                        $("#div_ddl_employee_wise_leads_search").hide();                    
                        $("#div_ddl_state_lead_search").hide();
                        $("#div_ddl_district_lead_search").show();
                     

                    }
                    else
                        if (search_text == "State") {
                        $("[id$=hf_load_postback_check]").val("4");
                        $("#txt_search_lead").val('');
                        $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                        $("#<%=Label59.ClientID %>").html("Select State");
                        $("#div_txt_search_lead").hide();
                        $("#div_ddl_lead_search_grade").hide();
                        $("#div_ddl_employee_wise_leads_search").hide();                      
                        $("#div_ddl_state_lead_search").show();
                        $("#div_ddl_district_lead_search").hide();
                     

                    }
                  
                    else {
                        $("[id$=hf_load_postback_check]").val("Load");
                        $("#div_ddl_state_lead_search").hide();
                        $("#div_ddl_district_lead_search").hide();
                        $("#div_ddl_lead_search_grade").hide();
                        $("#div_txt_search_lead").show();
                        $("#<%=Label59.ClientID %>").html("Search value");
                        $("#<%= lbl_delete_up_lead_msg.ClientID %>").html("");
                        $("#txt_search_lead").val('');
                        $("#div_ddl_employee_wise_leads_search").hide();
                      
                       
                    }
                });
            });
                     
                     </script>
    
    
    
    
    



<script type="text/javascript">

    $().ready(function() {


        $("[id*=lnk_enquiry]").click(function() {
            document.getElementById('<%= rblQuo.ClientID %>').checked = false;
            document.getElementById('<%= rblLead.ClientID %>').checked = false;
            //    $("#enq_heading").show();

            //    document.getElementById('<%= rfv_quotation_date.ClientID %>').enabled = false;

            document.getElementById('<%= rfv_quotation_date.ClientID %>').enabled = false;

            $("#Quot_heading").show();
            $("#Quot_heading_date").show();
            $("#lable_quot_heading").hide();
            $("#lable_enq_heading").show();
            $("#quotatio_enq_date").hide();
            $("#quotatio_enq_no").hide();
            $("#show_quot_btn").hide();
            $("#show_enq_btn").show();
            $('[id$=hf_Enq_quo_Type]').val("enq");
            $("[id*=hf_ennq_quot_check]").val("en");
            $("#div_Add_lead_from").hide();
            $("#div_lead_show_grid").hide();
            $("#div_add_enq_quot_from").show();
            $("#show_enquiry_list_grid").hide();
            $("#show_quotation_list_grid").hide();
            $("#div_show_search_enq_quot").hide();
            //            $("[id*=trRemark]").show();
            $("#trRemark").show();
            $("#lbldivtxt_remark").show();
            $("#trremarklbl").show();





        });

        $("[id*=rbl_leads_click]").click(function() {

            document.getElementById('<%= rblQuo.ClientID %>').checked = false;
            document.getElementById('<%= rblLead.ClientID %>').checked = true;
            document.getElementById('<%= rblEnq.ClientID %>').checked = false;

            $("[id*=hf_ennq_quot_check]").val("lead");
            $('[id$=hf_Enq_quo_Type]').val("Lead");
            $('[id$=hf_load_postback_check]').val("Load");


            $("#div_Add_lead_from").show();
            $("#div_lead_show_grid").show();
            $("#div_add_enq_quot_from").hide();
            $("#show_enquiry_list_grid").hide();
            $("#show_quotation_list_grid").hide();
            $("#div_show_search_enq_quot").hide();

            $("#show_quotation_list_grid").hide();
            $("#div_show_grid_enquiry").hide();
            $("#tremark").hide();
            $("#lbldivtxt_remark").hide();
            $("#trremarklbl").hide();
            $("#div_search_panle_enq_quot").hide();








        });

        $("[id*=lnk_quotation]").click(function() {
            document.getElementById('<%= rblEnq.ClientID %>').checked = false;
            document.getElementById('<%= rblLead.ClientID %>').checked = false;
            // $("#enq_heading").hide();
            $("#Quot_heading").show();
            $("#Quot_heading_date").show();
            //    document.getElementById('<%= rfv_quotation_date.ClientID %>').enabled = true;
            $("#show_quot_btn").show();
            $("#show_enq_btn").hide();
            $('[id$=hf_Enq_quo_Type]').val("Quot");
            $("[id*=hf_ennq_quot_check]").val("qt");
            $("#div_Add_lead_from").hide();
            $("#div_lead_show_grid").hide();
            $("#div_add_enq_quot_from").show();
            $("#quotatio_enq_date").show();
            $("#quotatio_enq_no").show();
            $("#lable_quot_heading").show();
            $("#lable_enq_heading").hide();
            $("#show_enquiry_list_grid").hide();
            $("#show_quotation_list_grid").hide();
            $("#div_show_search_enq_quot").hide();
            $("#div_show_grid_enquiry").hide();
            $("#tremark").hide();
            $("#lbldivtxt_remark").hide();
            $("#trremarklbl").hide();
            // $("#trRemark").hide();


        });

        //enquiry more details show

        $("[id*=lnkCustomer_Name_enquiry]").click(function() {

            $("#div_Budgetary_Offer").hide();
            var enqid = $(this).closest('tr').find("input[id*=hf_enq_Row_id]").val();
            $('[id*=enq_quot_id_more_details]').val(enqid);
            bind_person_phoneno(enqid);
            var custname = $(this).closest('tr').find('span[id*="lblCrName"]').text();
            var custPersonName = $(this).closest('tr').find('span[id*="lblQuoteSendToPName"]').text();
            var enq_No = $(this).closest('tr').find('span[id*="lbl_enquiry_no"]').text();
            var Enq_date = $(this).closest('tr').find('span[id*="lblSendingDate"]').text();

            $('#<%=lbl_enq_quotation_no_date_heading.ClientID%>').html("Details of Enquiry No:" + enq_No + "  &nbsp;&nbsp;         Date : " + Enq_date);
            $('#<%=lbl_customer_name_val.ClientID%>').html(custname);
            $('#<%=lbl_person_name_val.ClientID%>').html(custPersonName);

            $('#div_remark_new').hide();
            //Bind Enquiry products list
            bindProductListGrid(enqid,"Enquiry");
            bindLeadFollowUpListGrid(enqid);
            bindEnquiryFollowUpListGrid(enqid);
            //  bindQuotationFollowUpListGrid(enq_quot_id);
            $("#div_Quotation_followup").hide();
            $('#<%=lbl_followup_msg.ClientID%>').html("");

            var Type = $('input[id$=hf_type_value]').val();
            if (Type == "A") {
                $("#div_show_next_followup_heading").hide();
                $("#div_star").hide();
                $("#div_followup_date_textbox").hide();
                document.getElementById('<%= rfq_next_followup_date.ClientID %>').enabled = false;


            }
            else {
                $("#div_show_next_followup_heading").show();
                $("#div_star").show();
                $("#div_followup_date_textbox").show();
                document.getElementById('<%= rfq_next_followup_date.ClientID %>').enabled = true;

            }
            $find("enq_quot_popup").show();


        });



        $("[id*=lnk_lead_followup_details]").click(function() {

            $("#div_Budgetary_Offer").hide();
            var enqid = $(this).closest('tr').find("input[id*=hf_lead_rowid]").val();

            $('[id*=enq_quot_id_more_details]').val(enqid);

            bind_show_remark(enqid);
            bind_person_phoneno(enqid);

            var custname = $(this).closest('tr').find('span[id*="lbl_cname_lead"]').text();
            var mobile = $(this).closest('tr').find('span[id*="lbl_mobile_lead"]').text();
            //  var enq_No = $(this).closest('tr').find('span[id*="lbl_enquiry_no"]').text();
            //   var Enq_date = $(this).closest('tr').find('span[id*="lblSendingDate"]').text();

            $('[id$=hf_Enq_quo_Type]').val("Lead");
            //   $('#<%=lbl_enq_quotation_no_date_heading.ClientID%>').html("Details of Enquiry No:" + enq_No + "  &nbsp;&nbsp;         Date : " + Enq_date);
            $('#<%=lbl_customer_name_val.ClientID%>').html(custname);
            $('#<%=lbl_Pone_No.ClientID%>').html(mobile);

            $('#<%=Label84.ClientID%>').html("");
            bindLeadFollowUpListGrid_only_leads(enqid);
            $("#div_enq_quot_product_show").hide();
            $("#div_enquiry_foollowup").hide();

            $("#div_Quotation_followup").hide();




            //  bindEnquiryFollowUpListGrid(enqid);
            //  bindQuotationFollowUpListGrid(enq_quot_id);
            $("#div_Quotation_followup").hide();
            $('#<%=lbl_followup_msg.ClientID%>').html("");

            var Type = $('input[id$=hf_type_value]').val();
            if (Type == "A") {
                $("#div_show_next_followup_heading").hide();
                $("#div_star").hide();
                $("#div_followup_date_textbox").hide();
                document.getElementById('<%= rfq_next_followup_date.ClientID %>').enabled = false;


            }
            else {
                $("#div_show_next_followup_heading").hide();
                $("#div_star").hide();
                $("#div_followup_date_textbox").hide();
                document.getElementById('<%= rfq_next_followup_date.ClientID %>').enabled = false;

            }
            $find("enq_quot_popup").show();


        });





    });

</script>


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



        $("[id*=ddlCrName]").change(function() {

            var CID = $("[id*=ddlCrName]").val();
            $("[id*=hf_person_name]").val("");

            //  alert(CID);
            $("[id*=hf_customer_id]").val(CID);

            $("#ddlPersonName").html("");
            var userid = $('input[id$=hf_user_id]').val();
            $.ajax({

                type: "POST",
                url: "EnquiryMaster.aspx/bind_customer_person_list",
                data: "{_CID_val:'" + CID + "',userid:" + userid + "}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function(customers_persons) {
                    BindPerson_list(customers_persons.d)
                }

            });

            document.getElementById('<%= RequiredFieldValidator_Person_Name.ClientID %>').enabled = true;

        });

        $("[id*=btn_Submit_follwuo_update]").click(function() {

            if (Page_ClientValidate(11)) {

                var enq_quot_id = $('input[id$=enq_quot_id_more_details]').val();

                var empid = $('input[id$=hf_employee_id]').val();
                var person_name = $.trim($("[id*=txt_person_name_discussion]").val());
                var Disccusspoints = $.trim($("[id*=txt_outcome_visit_call]").val());
                // var visit_perpose = $.trim($("[id*=txtvisit]").val());

                var FollowupDate = $.trim($("[id*=txtDate11]").val());
                if (FollowupDate == "") {
                    FollowupDate = "0";
                }
                var userid = $('input[id$=hf_user_id]').val();


                $.ajax({
                    type: "POST",
                    url: "EnquiryMaster.aspx/Add_Follow_up_updates",
                    data: "{Disccusspoints:'" + Disccusspoints + "',Person_name:'" + person_name + "', enq_quot_id:'" + enq_quot_id + "',EID:'" + empid + "',FollowupDate:'" + FollowupDate + "',userid:" + userid + "}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function(r) {


                        var ss = $('input[id$=hf_Enq_quo_Type]').val();
                        if (ss == "Lead") {
                            bindLeadFollowUpListGrid_only_leads(enq_quot_id);
                            $("[id*=txt_person_name_discussion]").val('');
                            $("[id*=txt_outcome_visit_call]").val('');
                            $("[id*=txtDate11]").val('');

                        } else
                            if (ss == "Quot") {
                            $('#<%=lbl_followup_msg.ClientID%>').html("Follow up details added successfully.");
                            $("[id*=txt_person_name_discussion]").val('');
                            $("[id*=txt_outcome_visit_call]").val('');
                            $("[id*=txtDate11]").val('');
                            bindQuotationFollowUpListGrid(enq_quot_id);
                            bindEnquiry_convert_quot_FollowUpListGrid(enq_quot_id);

                            $("#tremark").hide();
                            $("#lbldivtxt_remark").hide();
                            $("#trremarklbl").hide();
                        }
                        else {
                            $('#<%=lbl_followup_msg.ClientID%>').html("Follow up details added successfully.");
                            $("[id*=txt_person_name_discussion]").val('');
                            $("[id*=txt_outcome_visit_call]").val('');
                            $("[id*=txtDate11]").val('');
                            bindLeadFollowUpListGrid(enq_quot_id);
                            bindEnquiryFollowUpListGrid(enq_quot_id);

                        }
                    },
                    error: function(r) {
                        alert(r);
                    }
                });

            }
            else {

            }

        });



        $("[id*=ddlPersonName]").change(function() {
            var person_id = $('[id*=ddlPersonName]').val();
            var person_name = $('[id*=ddlPersonName]').find("option:selected").text();
            $("[id*=hf_person_id]").val(person_id);
            $("[id*=hf_person_name]").val(person_name);

            //            var CID = $('[id*=ddlPersonName]').val();
            //                       $("[id*=hf_person_id11]").val(CID);
            var userid = $('input[id$=hf_user_id]').val();

            //                       $('#<%=lblInsert.ClientID%>').html("");
            $.ajax({

                type: "POST",
                url: "EnquiryMaster.aspx/bind_person_list",
                data: "{_CID_val:'" + person_id + "', userid:'" + userid + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function(msg) {
                    $.each(msg.d, function() {
                    $("[id*=txtmob]").val(this['mobile_No']);
                    $("[id*=txtemailidp]").val(this['Email_id']);

                    });
                }

            });
        });





        $("[id*=btn_popup_close]").click(function() {
            $find("enq_quot_popup").hide();
        });


        $("[id*=ImageButton1]").click(function() {
            $find("enq_quot_popup").hide();
        });


        $("[id*=upadate_assign_employee_quotation]").click(function() {

            var quotid = $(this).closest('tr').find("input[id*=hf_enq_quot_Row_id]").val();
            $('[id*=enq_quot_id_more_details]').val(quotid);
            var emp_name = $(this).closest('tr').find("span[id*=lbl_emp_name]").text();

            var CHK = document.getElementById("<%=chk_quotation_employee_update.ClientID%>");
            var checkbox = CHK.getElementsByTagName("input");
            var label = CHK.getElementsByTagName("label");
            //Unchecked list
            for (var j = 0; j < checkbox.length; j++) {
                checkbox[j].checked = false;
            }

            for (var i = 0; i < checkbox.length; i++) {
                var name = label[i].innerHTML;
                var strIndex = emp_name.indexOf(name);
                if (strIndex == -1) {

                } else {

                    checkbox[i].checked = true;
                }

            }

            $find("Quotation_assign_emp_update").show();

        });

        $("[id*=update_assign_employee_quotation]").click(function() {
            var quotid = $('input[id$=enq_quot_id_more_details]').val();
            alert(quotid);
            //  var quotid = $(this).closest('tr').find("input[id*=hf_enq_quot_Row_id]").val();
            var ecode = 0;
            var selected_item = "";
            $("[id*=chk_quotation_employee_update] input:checked").each(function() {
                selected_item += $(this).val() + ',';
            });

            var userid = $('input[id$=hf_user_id]').val();
            $.ajax({
                type: "post",
                url: "EnquiryMaster.aspx/update_quotation_assign_employee_list",
                data: "{enq_quot_id:'" + quotid + "',_EmpCode:'" + selected_item + "',userid:" + userid + "}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function(r) {

                }

            });

            $find("Quotation_assign_emp_update").hide();
        });






        $("[id*=close_popup_edit]").click(function() {
            $find("Quotation_assign_emp_update").hide();
        });

        $("[id*=btn_popup_close_edit]").click(function() {
            $find("Quotation_assign_emp_update").hide();
        });


        $("[id*=popup_close_edit]").click(function() {
            $find("Quotation_assign_emp_update").hide();
        });

        //Quotation more details show

        $("[id*=lnkCustomer_Name_Quotation]").click(function() {
            var quotid = $(this).closest('tr').find("input[id*=hf_enq_quot_Row_id]").val();


            bind_person_phoneno(quotid);
            $('[id*=enq_quot_id_more_details]').val(quotid);
            var custname = $(this).closest('tr').find('span[id*="lbl_cust_name_quot"]').text();
            var custPersonName = $(this).closest('tr').find('span[id*="lblQuoteSendToPName6"]').text();
            var enq_No = $(this).closest('tr').find('span[id*="lbl_quotation_no"]').text();
            var Enq_date = $(this).closest('tr').find('span[id*="lbl_quotation_date"]').text();
            $('#<%=lbl_enq_quotation_no_date_heading.ClientID%>').html("Details of Enquiry No:" + enq_No + "  &nbsp;&nbsp;         Date : " + Enq_date);
            $('#<%=lbl_customer_name_val.ClientID%>').html(custname);
            $('#<%=lbl_person_name_val.ClientID%>').html(custPersonName);
            bindProductListGrid(quotid,"Quotation");
            bindProductListGridBudgetary_Offer(quotid);
            $("#div_lead_followup").hide();
            bindEnquiry_convert_quot_FollowUpListGrid(quotid);
            bindQuotationFollowUpListGrid(quotid);
            $('#<%=lbl_followup_msg.ClientID%>').html("");

            var Type = $('input[id$=hf_type_value]').val();
            if (Type == "A") {
                $("#div_show_next_followup_heading").hide();
                $("#div_star").hide();
                $("#div_followup_date_textbox").hide();
                document.getElementById('<%= rfq_next_followup_date.ClientID %>').enabled = false;
            }
            else {
                $("#div_show_next_followup_heading").show();
                $("#div_star").show();
                $("#div_followup_date_textbox").show();
                document.getElementById('<%= rfq_next_followup_date.ClientID %>').enabled = true;

            }
            $find("enq_quot_popup").show();
        });

    });




    function bind_emplyee_list() {


 var userid = $('input[id$=hf_user_id]').val();

       $.ajax({
            type: "POST",
            url: "EnquiryMaster.aspx/Getmployeelist",
            data: "{userid:" + userid + "}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(response) {
                var xmlDoc = $.parseXML(response.d);
                var xml = $(xmlDoc);
                var customers = xml.find("employeeList");
                var row = $("[id*=chk_quotation_employee_update] tr:last-child").clone(true);
                $("#chk_quotation_employee_update").find("tr:gt(0)").remove();

                $.each(customers, function() {

                    var customer = $(this);
                    $("input", row).val($(this).find("ECode").text());
                    $("label", row).html($(this).find("EName").text());
                    $("[id*=chk_quotation_employee_update] tbody").append(row);
                    row = $("[id*=chk_quotation_employee_update] tr:last-child").clone(true);
                });
                var $rows = $("[id*=chk_quotation_employee_update] tr");
                $rows.eq(0).hide();

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


    //Bind lead follow only in lead selection up List 
    function bindLeadFollowUpListGrid_only_leads(enq_quot_id_val) {

        $.ajax({
            type: "post",
            url: "EnquiryMaster.aspx/bind_Lead_follow_up_list_val",
            data: "{enq_quot_lead:'" + enq_quot_id_val + "'}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(response) {



                $("#Leadlist").empty();
                var xmlDoc = $.parseXML(response.d);
                var xml = $(xmlDoc);
                var customers = xml.find("LeadFollowup");

                $.each(customers, function() {

                    var customer = $(this);
                    $("#Leadlist").append("<tr><td>" + $(this).find("ReportDate").text() + "</td><td>" + $(this).find("EName").text() + "</td><td>" + $(this).find("Cust_person_name").text() + "</td><td>" + $(this).find("disccuss_points").text() + "</td> </tr>");

                });

                var rowCount1 = $('#lead_follow_table >tbody >tr').length;

                if (rowCount1 == 1) {
                    $("#div_lead_followup").hide();
                } else {
                    $("#div_lead_followup").show();
                }
            },
            failure: function(response) {
                alert(response.d);
            }

        });
    }
    
function  bind_show_remark(enq_quot_id_val) {
    var userid = $('input[id$=hf_user_id]').val();
//    var enqid = $(this).closest('tr').find("input[id*=hf_lead_rowid]").val();
    $.ajax({
        type: "post",
        url: "EnquiryMaster.aspx/Show_Remark",

        data: "{Rowid:'" + enq_quot_id_val + "',user_id:" + userid + "}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(response) {

            $("#leadremarklist").empty();
            var xmlDoc = $.parseXML(response.d);
            var xml = $(xmlDoc);
            var customers = xml.find("leadsremark");
            var rowCount1 = 0;

            $.each(customers, function() {
                rowCount1 = 1;

                var customer = $(this);
                $("#leadremarklist").append("<tr><td>" + $(this).find("Remarks").text() + "</td></tr>");

            });


            if (rowCount1 == 0) {
                $("#div_remark_new").hide();
                $("#lbl_remarks").hide();
                $("#tb_remarks_new").hide();
            } else {
                $("#div_remark_new").show();
            }
        },
        failure: function(response) {
            alert(response.d);
        }

    });
    }

    
    

    //Bind lead follow up List 
    function bindLeadFollowUpListGrid(enq_quot_id_val) {
 var userid = $('input[id$=hf_user_id]').val();
        $.ajax({
            type: "post",
            url: "EnquiryMaster.aspx/bind_Lead_follow_up",
            data: "{enq_quot_lead:'" + enq_quot_id_val + "',userid:" + userid + "}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(response) {



                $("#Leadlist").empty();
                var xmlDoc = $.parseXML(response.d);
                var xml = $(xmlDoc);
                var customers = xml.find("LeadFollowup");

                $.each(customers, function() {

                    var customer = $(this);
                    $("#Leadlist").append("<tr><td>" + $(this).find("ReportDate").text() + "</td><td>" + $(this).find("EName").text() + "</td><td>" + $(this).find("Cust_person_name").text() + "</td><td>" + $(this).find("disccuss_points").text() + "</td></tr>");

                });

                var rowCount1 = $('#lead_follow_table >tbody >tr').length;

                if (rowCount1 == 1) {
                    $("#div_lead_followup").hide();
                } else {
                    $("#div_lead_followup").show();
                }
            },
            failure: function(response) {
                alert(response.d);
            }

        });
    }

    function bind_person_phoneno(CID) {

        var userid = $('input[id$=hf_user_id]').val();
        $.ajax({
            type: "post",
            url: "EnquiryMaster.aspx/find_person_mobile_no",
            data: "{CID:'" + CID + "',user_id:"+userid+"}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(response) {
                var xmlDoc = $.parseXML(response.d);
                var xml = $(xmlDoc);
                var customers = xml.find("PersonMobile");

                $.each(customers, function() {

                    var customer = $(this);
                    var sss = $(this).find("CrPMob").text();
                    if (sss == "") {

                    }
                    else {
                        $('#<%=lbl_Pone_No.ClientID%>').html(sss);
                    }


                });

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

        });
    }




    function bindProductListGridBudgetary_Offer(enq_quot_id_val) {



        $.ajax({
            type: "post",
            url: "EnquiryMaster.aspx/bind_enq_quot_product_detailsBudgetary_Offer",
            data: "{enq_quot_id:'" + enq_quot_id_val + "'}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(responseaa) {

                $("#Budgetary_Offer_items").empty();
                var xmlDoc = $.parseXML(responseaa.d);
                var xml = $(xmlDoc);
                var customers = xml.find("productsBudgetary");

                $.each(customers, function() {

                    var customer = $(this);
                    $("#Budgetary_Offer_items").append("<tr><td>" + $(this).find("Product_Name1").text() + "</td><td>" + $(this).find("pgn1").text() + "</td><td>" + $(this).find("mn1").text() + "</td><td>" + $(this).find("product_desc_mul1").text() + "</td> <td>" + $(this).find("Qty1").text() + "</td> <td>" + $(this).find("Price1").text() + "</td> <td>" + $(this).find("Qty2").text() + "</td> <td>" + $(this).find("Price2").text() + "</td> <td>" + $(this).find("Qty3").text() + "</td> <td>" + $(this).find("Price3").text() + "</td><td>" + $(this).find("Tax").text() + "</td> </tr>");

                });

                var rowCount1 = $('#table_Budgetary_Offer_items >tbody >tr').length;
                if (rowCount1 == 1) {
                    $("#div_Budgetary_Offer").hide();
                } else {
                    $("#div_Budgetary_Offer").show();
                }

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

        });
    }



    function bindProductListGrid(enq_quot_id_val,Type_enq_quot) {
        var userid = $('input[id$=hf_user_id]').val();


        $.ajax({
            type: "post",
            url: "EnquiryMaster.aspx/bind_enq_quot_product_details",
            data: "{enq_quot_id:'" + enq_quot_id_val + "',userid:" + userid + "}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(response) {
        $("#Regular_quotation_products").empty();
        var xmlDoc = $.parseXML(response.d);
        var xml = $(xmlDoc);
        var customers = xml.find("products");

        $.each(customers, function() {

            var customer = $(this);
            $("#Regular_quotation_products").append("<tr><td>" + $(this).find("Product_Name").text() + "</td><td>" + $(this).find("pgn").text() + "</td><td>" + $(this).find("mn").text() + "</td><td>" + $(this).find("product_desc_mul").text() + "</td> <td>" + $(this).find("qty").text() + "</td> <td>" + $(this).find("price").text() + "</td> <td>" + $(this).find("discount").text() + "</td> <td>" + $(this).find("total").text() + "</td> <td id='td_rema_rk'>" + $(this).find("Remarks").text() + "</td> </tr>");

        });

        var rowCount1 = $('#tableRegular_quotation_products >tbody >tr').length;
        if (rowCount1 == 1) {
            $("#div_Regular_quotation_products").hide();

        } else {
            $("#div_Regular_quotation_products").show();
            if (Type_enq_quot == "Quotation") {
                $("#th_re_mark").hide();
                $("#td_rema_rk").hide();
            }
        }
       

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

        });
    }


   

    function bindEnquiry_convert_quot_FollowUpListGrid(enq_quot_id_val) {
 var userid = $('input[id$=hf_user_id]').val();


        $.ajax({
            type: "post",
            url: "EnquiryMaster.aspx/bind_Enquiry_convert_follow_up",
            data: "{enq_quot_lead:'" + enq_quot_id_val + "',userid:" + userid + "}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(response) {

                $("#Enquirylist").empty();
                var xmlDoc = $.parseXML(response.d);
                var xml = $(xmlDoc);
                var customers = xml.find("EnquiryFollowup");

                $.each(customers, function() {

                    var customer = $(this);
                    $("#Enquirylist").append("<tr><td>" + $(this).find("ReportDate").text() + "</td><td>" + $(this).find("EName").text() + "</td><td>" + $(this).find("Cust_person_name").text() + "</td><td>" + $(this).find("disccuss_points").text() + "</td> </tr>");

                });

                var rowCount1 = $('#enq_followup_table >tbody >tr').length;
                if (rowCount1 == 1) {
                    $("#div_enquiry_foollowup").hide();
                    $("#div_remark_new").hide();
                } else {
                $("#div_enquiry_foollowup").show();
                $("#div_remark_new").show();
                }

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

        });
    }



    //Bind Enquiry follow up List 
    function bindEnquiryFollowUpListGrid(enq_quot_id_val) {

        $.ajax({
            type: "post",
            url: "EnquiryMaster.aspx/bind_Enquiry_follow_up",
            data: "{enq_quot_lead:'" + enq_quot_id_val + "'}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(response) {

                $("#Enquirylist").empty();
                var xmlDoc = $.parseXML(response.d);
                var xml = $(xmlDoc);
                var customers = xml.find("EnquiryFollowup");

                $.each(customers, function() {

                    var customer = $(this);
                    $("#Enquirylist").append("<tr><td>" + $(this).find("ReportDate").text() + "</td><td>" + $(this).find("EName").text() + "</td><td>" + $(this).find("Cust_person_name").text() + "</td><td>" + $(this).find("disccuss_points").text() + "</td><td>" + $(this).find("Remarks").text() + "</td> </tr>");

                });

                var rowCount1 = $('#enq_followup_table >tbody >tr').length;
                if (rowCount1 == 1) {
                    $("#div_enquiry_foollowup").hide();
                } else {
                    $("#div_enquiry_foollowup").show();
                }

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

        });
    }


    //Bind Quotation follow up List 
    function bindQuotationFollowUpListGrid(enq_quot_id_val) {

        $.ajax({
            type: "post",
            url: "EnquiryMaster.aspx/bind_Quotation_follow_up",
            data: "{enq_quot_lead:'" + enq_quot_id_val + "'}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function(response) {
                $("#Quotationlist").empty();
                var xmlDoc = $.parseXML(response.d);
                var xml = $(xmlDoc);
                var customers = xml.find("QuotationFollowup");

                $.each(customers, function() {

                    var customer = $(this);
                    $("#Quotationlist").append("<tr><td>" + $(this).find("ReportDate").text() + "</td><td>" + $(this).find("EName").text() + "</td><td>" + $(this).find("Cust_person_name").text() + "</td><td>" + $(this).find("disccuss_points").text() + "</td></tr>");

                });

                var rowCount1 = $('#quotation_follow_table >tbody >tr').length;
                if (rowCount1 == 1) {
                    $("#div_Quotation_followup").hide();
                } else {
                    $("#div_Quotation_followup").show();
                }


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

        });
    }



    function BindPerson_list(customers_persons) {


        $("[id*=ddlPersonName]").empty();
        $("<option value='-Select-'>-Select Person-</option>").appendTo("[id*=ddlPersonName]");

        $.each(customers_persons, function() {

            if (this['Person_id'] == 0) {
            }
            else {
                $("[id*=ddlPersonName]").append($("<option></option>").val(this['Person_id']).html(this['Person_Name']));
            }
            $("[id*=txt_cust_area_name]").val(this['_CrArea']);
            $("[id*=txt_state_customer]").val(this['_CrState']);
            $("[id*=txt_customer_city]").val(this['_CrCity']);

        });
    }




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

            $("[id$=hf_addnewperson]").val("1");
            $("[id*=lnk_per_so_n]").click(function() {
            //                 $("[id*=lnk_Person_exist]").show();
            $("[id*=hf_new_person_existing]").val("NewPerson");
            $("[id*=divbtn]").hide();
            $("[id*=divbtn1]").show();

          
                $("[id*=ddlPersonName]").hide();
                $("[id*=txtperNm]").show();
                document.getElementById('<%= RequiredFieldValidator1.ClientID %>').enabled = true;
                document.getElementById('<%= RequiredFieldValidator_Person_Name.ClientID %>').enabled = false;

                
              
               
            });
        });

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

                $("[id*=lnk_Person_exist]").click(function() {
                    $("[id*=divbtn]").show();
                    $("[id*=divbtn1]").hide();
                    $("[id*=ddlPersonName]").show();
                    $("[id*=hf_new_person_existing]").val("ExistingPerson");
                    $("[id*=txtperNm]").hide();
                    document.getElementById('<%= RequiredFieldValidator1.ClientID %>').enabled = false;
                    document.getElementById('<%= RequiredFieldValidator_Person_Name.ClientID %>').enabled = true;


                });
            });
        </script>
    
  <%--  <script type="text/javascript">
        $().ready(function() {


        $("[id*=ddlPersonName]").change(function() {

               

            });

        });
</script>--%>
    

     <script type="text/javascript">
         $().ready(function() {
             var valdata = $("input[id$=hf_excelsheet_upload]").val();
             var tVal = $("input[id$=hf_excelTypeval]").val();
             if (valdata == "ExcelSheet") {
                 if (tVal == "Lead") {
                     $("#div_lead_show_grid").show();
                     $("#show_quotation_list_grid").hide();
                     $("#show_quotation_list_grid").hide();
                     $("#div_show_grid_enquiry").hide();
                     $("#tremark").hide();
                     $("#lbldivtxt_remark").hide();
                     $("#trremarklbl").hide();
                     $("#div_search_panle_enq_quot").hide();
                     
                 }
                 else
                     if (tVal == "Quotation") {
                     $("#div_lead_show_grid").hide();
                     $("#show_quotation_list_grid").show();
                     $("#tremark").hide();
                     $("#lbldivtxt_remark").hide();
                     $("#trremarklbl").hide();

                 }
                 else
                     if (tVal == "Enquiry") {
                         $("#div_show_grid_enquiry").show();
                         $("#div_lead_show_grid").hide();
                         $("#show_quotation_list_grid").hide();
                     }

             }
         });
           </script>  
     
        
     
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <asp:HiddenField ID="hf_show_pending_convert_enq_to_quot" runat="server"/>
     <asp:HiddenField ID="hf_show_lead_panel_for_convert_to_enq_quot" runat="server"/>    
    <asp:HiddenField ID="enq_quot_id_more_details" runat="server"/>
 <asp:HiddenField ID="hf_Enq_quo_Type" runat="server"/>
   <asp:HiddenField ID="hf_type_value" runat="server" />
   <asp:HiddenField ID="hf_customer_id" runat="server"/>
    <asp:HiddenField ID="hf_ennq_quot_check" runat="server"/>
     <asp:HiddenField ID="hf_person_name" runat="server"/>
     <asp:HiddenField ID="hf_person_id" runat="server"/>
     <asp:HiddenField ID="hf_show_report" runat="server"/>
      <asp:HiddenField ID="hf_employee_id" runat="server"/>
      <asp:HiddenField ID="hf_user_id" runat="server"/>
        <asp:HiddenField ID="hf_load_postback_check" runat="server" />
          <asp:HiddenField ID="hf_load_postback_eq_quot_check" runat="server" />
              <asp:HiddenField ID="hf_excelsheet_upload" runat="server" />
               <asp:HiddenField ID="hf_excelTypeval" runat="server" />
                <asp:HiddenField ID="hf_addnewperson" runat="server" />
                  <asp:HiddenField ID="hf_person11_id" runat="server" />
                  <asp:HiddenField ID="hf_lead_convert_enq_quot" runat="server"/>
               <asp:HiddenField ID="hf_lead_to_enq_quot_city" runat="server" />
               <asp:HiddenField ID="hf_lead_to_enq_quot_state" runat="server" />
               
                 <asp:HiddenField ID="hf_new_person_existing" 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>
  
  
  <%--  <div style="float:right;">
    
        <div id="inner-block" class="help_div">
       <div id="leads_enq_quo_master" runat="server"  style="font-family:Verdana;font-size:12px;">
                     
                  <p  > 
                 Help -Leads / Enquiries / Quotations Master
                     </p>
                   
                 <ul  >                            
                    <li style="">        
                  You can add Leads, Enquiries and Quotations here, either through Excel Sheet or manually one by one.
                     </li>
                      <li>
                  For uploading through Excel sheet, please refer to the format provided in ‘Download file’.  You can upload enquiries/quotations for customers, who are not in customer master and such names will be shown in different colour shade.  Please see the error message if your excel file does not upload.  After clearing errors, you can upload again.
                      </li>
                     <li>
                 
While adding enquiry/quotation manually, you can also add a new customer or a new product, if it’s not in the master already. 
 You can enter Customer’s reference number and your Quotation Number, also for easy referencing.
                     </li>
                     
                       </ul> 
                      </div>
        
           <div id="show_pending" runat="server"  style="font-family:Verdana;font-size:12px;">
                     
                  <p  > 
                 Help -Leads / Enquiries / Quotations Master
                     </p>
                   
                 <ul  >                            
                    <li style="">        
             
                   
                     You can see all pending leads/enquiries/quotations here.  You can use the filters as required and it would show records for the current month.  You can use ‘Previous’ or ‘Next’ to change the month, or use calendar to see records for another period.  Employee’s feedbacks/remarks for Enquiries/Quotations can be seen here.  You can close the enquiries/quotations for any reason, and all such enquiries/quotations can be seen in a separate location here
                    </li>
                       </ul> 
                      </div>
           
        </div> 
</div>    --%>
  
        
<asp:Panel ID="Panel1" runat="server" Width="100%" CssClass="shadow_five">  
    <table class="style2">
        <tr>
            <td align="justify" valign="middle">
                <asp:Label ID="lbl_heading_top_msg" runat="server" Text="" CssClass="Label" 
                    Height="50px" Width="100%" ForeColor="White" Font-Bold="True" 
                    Font-Size="X-Large"></asp:Label>
                  
                  </td>
        </tr>
        
 
        <tr>
            <td align="center">
            
            
              <asp:RadioButton ID="rdbdoestic" runat="server" Font-Bold="True" Checked="true"
                    ForeColor="#990033" GroupName="1" Text="Domestic" AutoPostBack="True" 
                   oncheckedchanged="rdbdoestic_CheckedChanged" />
                &nbsp;
                <asp:RadioButton ID="rdbinternatinal" runat="server" Font-Bold="True" 
                    ForeColor="#990033" GroupName="1" Text="International" 
                   AutoPostBack="True" oncheckedchanged="rdbinternatinal_CheckedChanged" />
                          
                            &nbsp;<asp:Label ID="lblarea_check" runat="server" Font-Bold="True" 
                   Font-Names="Verdana" Font-Size="13px" ForeColor="Red"></asp:Label>
                &nbsp;</td>
        </tr> 
        <tr id="Btns" runat="server">
            <td align="center">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnExcel" runat="server" CssClass="myButton" 
                   Text="Excel Sheet Uploading " Width="214px" onclick="btnExcel_Click"   />
                &nbsp;&nbsp;
              <asp:Button ID="btnManualEntry" runat="server" CssClass="myButton" 
                   Text="Manual Entry" Width="214px" onclick="btnManualEntry_Click"   />
                
            </td>
       </tr>
        </table>
  
        <div style="width:100%">
        <div align="center">
        
   

    
   
        
     <%--   <asp:UpdatePanel ID="UpdatePanel2" runat="server">
    <ContentTemplate>--%>
    <br />
         <asp:Panel ID="pnlManual" runat="server" Visible="false" CssClass="shadow_five2">
            
                <a id="rbl_leads_click" style="cursor:pointer;font-size:14px;font-family:Verdana;">
            <asp:RadioButton ID="rblLead" runat="server" Text="Lead" ValidationGroup="a1"  GroupName="q"
               Font-Bold="true" Checked="true" />
               </a>
               
                  &nbsp;&nbsp;&nbsp;&nbsp;
                      <a id="lnk_enquiry" style="cursor:pointer;font-size:14px;font-family:Verdana;">
              <asp:RadioButton ID="rblEnq" runat="server"  Text="Enquiry"  GroupName="q"
                ValidationGroup="a1"    Font-Bold="true" />
                </a>
                
                  &nbsp;&nbsp;&nbsp;&nbsp;
                       <a id="lnk_quotation" style="cursor:pointer;font-size:14px;font-family:Verdana;">
                <asp:RadioButton ID="rblQuo" runat="server"  Text="Quotation" 
                ValidationGroup="a1"    Font-Bold="true" />
                </a>
           <%-- <asp:RadioButton ID="rblLead" runat="server" Text="Lead" ValidationGroup="a1"  GroupName="q"
                 AutoPostBack="true"  Font-Bold="true" Checked="true" 
                    oncheckedchanged="rblLead_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;
              <asp:RadioButton ID="rblEnq" runat="server"  Text="Enquiry"  GroupName="q"
                ValidationGroup="a1"  AutoPostBack="true"  Font-Bold="true" 
                    oncheckedchanged="rblEnq_CheckedChanged" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:RadioButton ID="rblQuo" runat="server"  Text="Quotation" 
                ValidationGroup="a1"  AutoPostBack="true"  Font-Bold="true" 
                    oncheckedchanged="rblQuo_CheckedChanged" />--%></asp:Panel>
  <%--  </ContentTemplate>
    </asp:UpdatePanel>--%>
      
      
             <asp:Panel ID="pnlImport" runat="server" CssClass="shadow_five2" Visible="false" >             
    <table class="style2">     
        
        <tr>
        <td colspan="5">
        
            <asp:Label ID="Label70" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Select Type"></asp:Label>
 
       <a style="color:Red;">*</a>
               
            &nbsp;&nbsp;&nbsp;&nbsp;<asp:RadioButton ID="rb_leads" runat="server" Text="Lead" ValidationGroup="a1"  GroupName="q"
                oncheckedchanged="rb_leads_CheckedChanged" AutoPostBack="true"  Font-Bold="true" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <asp:RadioButton ID="rb_enquiry" runat="server"  Text="Enquiry"  GroupName="q"
                ValidationGroup="a1" oncheckedchanged="rb_enquiry_CheckedChanged" AutoPostBack="true"  Font-Bold="true" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:RadioButton ID="rb_Quotation" runat="server"  Text="Quotation" 
                ValidationGroup="a1" oncheckedchanged="rb_Quotation_CheckedChanged" AutoPostBack="true"  Font-Bold="true" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <asp:RadioButton ID="rb_EnquiryQuotation" runat="server"   GroupName="q"
                Text="Enquiry & Quotation" ValidationGroup="a1"  Visible="false"
                oncheckedchanged="rb_EnquiryQuotation_CheckedChanged" AutoPostBack="true"  Font-Bold="true"  />
            
        </td>
      
        </tr>
     
        <tr>
            <td colspan="5">
                &nbsp;&nbsp;
              &nbsp;&nbsp;&nbsp;&nbsp;
                    <br /> 
                     <asp:HyperLink ID="hl_leads" runat="server"  CssClass="myButton" Width="130px"
                    NavigateUrl="~/ExcelFiles/leads.xls" Target="_blank" 
                    Text="DownLoad File" Visible="false" ></asp:HyperLink>
                    &nbsp;&nbsp;&nbsp;
                <asp:HyperLink ID="hl_Enquiry" runat="server"  CssClass="myButton" Width="130px"
                    NavigateUrl="~/ExcelFiles/Enquiry.xls" Target="_blank" 
                    Text="DownLoad File" Visible="false"></asp:HyperLink>
                    
                        <asp:HyperLink ID="hl_Quotation" runat="server"  CssClass="myButton" Width="130px"
                    NavigateUrl="~/ExcelFiles/Quotation.xls" Target="_blank" 
                    Text="DownLoad File" Visible="false"></asp:HyperLink>
                    
                        <asp:HyperLink ID="hl_Enquiry_quotation" runat="server"  CssClass="myButton" Width="130px"
                    NavigateUrl="~/ExcelFiles/EnquiryQuotation.xls" Target="_blank" 
                    Text="DownLoad File" Visible="false"></asp:HyperLink>
                  
                </td>
        </tr>
     
        <tr>
            <td colspan="5">
             <asp:Label ID="Label35" runat="server" Font-Names="Verdana" Font-Size="13px" 
                ForeColor="#007500" 
                Text="1. Please fill your data as per format in the excel file in <b>Download file</b> tab."></asp:Label><br />
             <asp:Label ID="lbl_compulsory_enq_quo" runat="server" Font-Names="Verdana" Font-Size="13px" 
                ForeColor="#007500" 
                Text="2. Following fields are compulsory in attached excel file - <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Customer Name,State,Person Name,Mobile No,Email id,Model Name,Quantity,Employee Code</b>."></asp:Label>

 <asp:Label ID="lbl_compulsory" runat="server" Font-Names="Verdana" Font-Size="13px" 
                ForeColor="#007500" Visible="false"
                Text="2. Following fields are compulsory in attached excel file - <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Customer Name,District,State,Subject,Employee Code</b>."></asp:Label>

                &nbsp;</td>
        </tr>
     
        <tr>
            <td class="style26" style="width:100px;">
             <asp:Label ID="Label38" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Select File"></asp:Label><a style="color:Red;">*</a>
            </td>
            <td>
               <asp:FileUpload ID="FileUpload1" runat="server" EnableViewState="true" BackColor="#fff0db" style="margin-top: 0px" Width="200px"/>
               &nbsp;&nbsp;
                <asp:Button ID="btnUpload_excel" runat="server" CssClass="myButton"
                    Text="Upload" ValidationGroup="2"  
                    Width="100px" onclick="btnUpload_excel_Click"  /> 
                         &nbsp;&nbsp;<asp:Button ID="btn_cancel" runat="server" Text="Cancel" CssClass="myButton" 
                    Width="100px" onclick="btn_cancel_Click" />
                        <br />
              
                   
              
                   
            </td>
            <td >
                <asp:Button ID="btn_show_Add_data" runat="server" Text="Show All" 
                    CssClass="myButton"  ValidationGroup="2"  
                    Width="100px" onclick="btn_show_Add_data_Click" /> 
            </td>
            <td colspan="2">

                &nbsp;</td>
            
        </tr>
              <tr><td align="center" colspan="2">  <b> <a style="color:Red;  padding-right:20px;">* Indicates Compulsory Fields</a> </b>
                
              </td>
              <td colspan="3">
               <asp:Label ID="lbl_norecordes_found" runat="server" Text="" ForeColor="Red"></asp:Label>
              </td>
              </tr>

        <tr>
            <td class="style26">
                &nbsp;</td>
            <td>
                <asp:Label ID="lblExcelError" runat="server" ForeColor="Red" Font-Size="15px" 
                    Font-Names="Calibri"></asp:Label>
                     <asp:RegularExpressionValidator ID="FileUpLoadValidator" runat="server" 
                    ControlToValidate="FileUpload1" ErrorMessage="Upload Excel only." Font-Size="15px" 
                    ValidationExpression="^.*\.xls[xm]?$" ValidationGroup="2" 
                    Font-Names="Calibri"></asp:RegularExpressionValidator>
                    <br />
                  <asp:Label ID="lblDeletedCompulasory" runat="server" ForeColor="Red" 
                    Font-Size="15px" Font-Names="Calibri"></asp:Label>
                        <br />
                       
                     <asp:Label ID="lbl_product_delete" runat="server" ForeColor="Red" 
                    Font-Size="15px" Font-Names="Calibri"></asp:Label>
                     <br />
                     <asp:Label ID="lbl_insert_count" runat="server" ForeColor="Blue" Font-Size="15px" 
                    Font-Names="Calibri"></asp:Label>
                     <br />
                     <asp:Label ID="lblCustDeleted" runat="server" ForeColor="Red" 
                    Font-Size="15px" Font-Names="Calibri"></asp:Label>
                     <br />
                  
             
                </td>
            <td class="style22">
                &nbsp;</td>
            <td align="left" class="style26">
                &nbsp;</td>
            <td class="style26">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style26">
                &nbsp;</td>
            <td>
                <%--<asp:Button ID="btnShow0" runat="server" CssClass="myButton" Font-Size="Medium" 
                    onclick="btnShow_Click" Text="Show &amp; Edit All" Width="150px" />--%>
                     <asp:Label ID="lbl_count_date_format_wrong" runat="server" Text="" ForeColor="Red" Font-Size="14px" Font-Names="Verdana" ></asp:Label><br />
                <asp:Label ID="lbl_duplicate_msg" runat="server" Text="" ForeColor="Red" Font-Size="14px" Font-Names="Verdana" ></asp:Label><br />
                <asp:Label ID="lblTest0" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label></td><td class="style22">
                &nbsp;</td><td align="left" class="style26">
                &nbsp;</td><td class="style26">
                &nbsp;</td></tr></table>
     
     </asp:Panel>
            </div>
            </div>  
            <br />
          <%--    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>--%>
    
     <div align="center">
    <asp:Panel ID="pln_show_Enq_Quo_reoprt" runat="server" CssClass="shadow_five21" Width="40%" >
        <table width="480px">
          <tr>
            <td >
            </td>
            <td align="right" >
                <asp:Label ID="Label63" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Select Type"></asp:Label>
            </td>
            <td> <a style="color:Red;">*</a>
            </td>
            <td align="center" >
                <asp:RadioButton ID="rb_leads_report" runat="server"  Text="Leads" 
                    oncheckedchanged="rb_leads_report_CheckedChanged" Font-Bold="true" AutoPostBack="true" GroupName="a1" />
                    &nbsp;&nbsp;&nbsp;
                  <asp:RadioButton ID="rb_Enquiry_reoprt" runat="server" Text="Enquiries" 
                    oncheckedchanged="rb_Enquiry_reoprt_CheckedChanged" Font-Bold="true"  AutoPostBack="true" GroupName="a1" />
                      &nbsp;&nbsp;&nbsp;
                    <asp:RadioButton ID="rb_Quotation_report" runat="server" Text="Quotations" Font-Bold="true" 
                    oncheckedchanged="rb_Quotation_report_CheckedChanged"  AutoPostBack="true"  GroupName="a1"/>
            
  <asp:CustomValidator id="CustomValidator1111" runat="server" Display="Dynamic" ValidationGroup="1" ErrorMessage="Please Select Type." ClientValidationFunction="CustomValidator1_ClientValidate"></asp:CustomValidator>
  <br />
              </td>
            <td >
            </td>
        </tr>
        
           
        
        
        </table>
        </asp:Panel>
     </div>
    
    <div id="div_Add_lead_from" align="center" >
          <asp:Panel ID="pnlLeads" runat="server"  CssClass="shadow_five2" 
              Width="95%">
        <table style="width:80%;margin-left:5%">  
         <tr>
            <td class="style52">
                &nbsp;</td><td class="style37">
            </td></tr> 
            
            <tr>
            <td colspan="3">
              <asp:Panel ID="PnlNewleadcust" runat="server" Visible="false" CssClass="" Width="95%">
  
        <table style="width:80%;margin-right:25%; margin-left:0%">       
        <tr>
            <td align="right" class="style6">
                    <asp:Label ID="Label44" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Customer Name "></asp:Label></td><td class="style34" ><a style="color:Red;">*</a>
            </td>
            <td align="left" class="style26">
                     <asp:TextBox ID="txtLCustNm" runat="server" Height="15px" Width="266px" 
                    ></asp:TextBox>
                <%--     AutoPostBack="True" ontextchanged="txtCName_TextChanged"--%>
                     
                <div id="divwidth1">
                      </div>
                       <cc1:AutoCompleteExtender ID="autotest" runat="server" TargetControlID="txtLCustNm" ServiceMethod="GetCompletionList"
                        ServicePath="~/Admin/AutoComplete_Customer_list.asmx" MinimumPrefixLength="1"
    EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000"  
    CompletionListElementID="divwidth1"
     CompletionListCssClass="AutoExtender"
      CompletionListItemCssClass="AutoExtenderList"
    CompletionListHighlightedItemCssClass="AutoExtenderHighlight" > </cc1:AutoCompleteExtender> 
                     
                     
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" 
                    ControlToValidate="txtLCustNm" ErrorMessage="Enter Name" ValidationGroup="15"> </asp:RequiredFieldValidator></td><td align="right">
                     
                     <asp:LinkButton ID="btnCloseLeadNew" runat="server" 
                         OnClick="btnCloseLeadNew_Click"> <img src="../Images/close_box_red.png" height="29" 
                id="img2"/></asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td align="right" class="style6">
                <asp:Label ID="Label69" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Region / Area Name"></asp:Label>
                    
                    </td><td class="style34">
            </td>
            <td align="left" class="style38">
                     <asp:TextBox ID="txtLArea" runat="server" Height="15px" 
                       Width="266px" Enabled="False" Visible="false"></asp:TextBox>
                        <asp:DropDownList ID="ddlArea_lead" runat="server" Visible="false" 
                                AppendDataBoundItems="True" AutoPostBack="True" 
                                onselectedindexchanged="ddlArea_lead_SelectedIndexChanged">
                            </asp:DropDownList>
              
             </td>
             <td class="style38">
            </td>
        </tr>
             
              <tr >
            <td align="right" class="style33" valign="top">
                <asp:Label ID="Label21" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="State"></asp:Label>
             </td>
             <td class="style34">
                &nbsp;</td>
              <td align="left" class="style30" valign="top" colspan="2">
              <%--  <asp:DropDownList ID="ddlLSubRegion" runat="server" AppendDataBoundItems="True" 
                     Width="250px" AutoPostBack="True" onselectedindexchanged="ddlLSubRegion_SelectedIndexChanged" 
                    >
                </asp:DropDownList>--%>
                
                <asp:DropDownList ID="ddlState_lead" runat="server" AppendDataBoundItems="True" 
                     Width="250px" AutoPostBack="True" 
                    onselectedindexchanged="ddlState_lead_SelectedIndexChanged" 
                    >
                </asp:DropDownList>
               <%-- &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:TextBox ID="txtLSubStates" runat="server" TextMode="MultiLine" Width="450px" 
                      Height="15px" Visible="false"></asp:TextBox></td><td>
                &nbsp;--%>
              </td>
         </tr>
         <tr >
            <td align="right" class="style33" valign="top">
                <%--<asp:Label ID="Label72" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Sub-SubRegion "></asp:Label>--%>
                      <asp:Label ID="Label24" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="District"></asp:Label>
                    
                    </td>
                    <td class="style34">
                &nbsp;</td>
                <td align="left" class="style30" valign="top" colspan="2">
                
                 <asp:DropDownList ID="ddlDistrict_lead" runat="server" AppendDataBoundItems="True" 
                     Width="250px" AutoPostBack="True" 
                    onselectedindexchanged="ddlDistrict_lead_SelectedIndexChanged">
                </asp:DropDownList>
                
               <%-- <asp:DropDownList ID="ddlLSubSubArea" runat="server" AppendDataBoundItems="True" 
                     Width="250px" AutoPostBack="True" onselectedindexchanged="ddlLSubSubArea_SelectedIndexChanged" 
                    >
                </asp:DropDownList>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:TextBox ID="txtSubSubStates1" runat="server" Height="15px" 
                    TextMode="MultiLine" Visible="false" Width="450px"></asp:TextBox>--%></td><td>
                &nbsp;
                </td>
                </tr>
                
                <tr>
                <td align="right"> 
                 <asp:Label ID="Label65" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="City"></asp:Label>
                </td>
                <td></td>
                <td align="left">
                 <asp:DropDownList ID="ddl_city_lead" runat="server" AppendDataBoundItems="True" 
                    onselectedindexchanged="ddl_city_lead_SelectedIndexChanged" AutoPostBack="true">
                </asp:DropDownList>
              
                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                    ControlToValidate="ddl_city_lead" ErrorMessage="Select State" 
                    InitialValue="-Select-" ValidationGroup="1"></asp:RequiredFieldValidator>     
                    <asp:Label ID="Label75" runat="server" Font-Bold="True" Font-Names="Verdana" 
                    Font-Size="14px" ForeColor="Red"></asp:Label>           
                </td>
                <td></td>
                </tr>
                
                <tr>
            <td align="right" class="style6">
                <asp:Label ID="Label73" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Address"></asp:Label></td><td class="style34" ><a style="color:Red;">*</a>
            </td>
            <td align="left" class="style41">
                <asp:TextBox ID="txtLaddrees" runat="server" Height="35px"  Width="266px"
                   TextMode="MultiLine" ></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator44" runat="server" 
                    ControlToValidate="txtLaddrees" ErrorMessage="Enter Address" ValidationGroup="15"></asp:RequiredFieldValidator></td><td align="left">
                &nbsp;</td></tr>
                
              
    
                
                <tr>
                <td align="right" class="style6">
                    <asp:Label ID="Label77" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Pincode"></asp:Label></td><td class="style34">
                    &nbsp;</td><td align="left" class="style29">
                    <asp:TextBox ID="txtLPincode" runat="server"  Width="126px" 
                   ></asp:TextBox>
                      <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" 
                        FilterType="Numbers" TargetControlID="txtLPincode" >
                    </cc1:FilteredTextBoxExtender>
                    </td><td align="left">
                    &nbsp;</td></tr><tr>
            <td align="right" class="style6">
                <asp:Label ID="Label78" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Country"></asp:Label></td><td class="style34" ><a style="color:Red;">*</a>
            </td>
            <td align="left" class="style29">
                <asp:TextBox ID="txtLcontry" runat="server" Height="15px" Width="266px" 
                   ></asp:TextBox>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator47" runat="server" 
                    ControlToValidate="txtLcontry" ErrorMessage="Enter Country" ValidationGroup="15"></asp:RequiredFieldValidator></td><td align="left">
                  &nbsp;</td></tr><tr>
                   <td align="right" class="style6">
                       <asp:Label ID="Label79" runat="server" CssClass="lb" Font-Names="Verdana" 
                           Font-Size="14px" Text="Email Id"></asp:Label></td><td class="style34">
                       &nbsp;</td><td align="left" class="style29">
                       <asp:TextBox ID="txtLemail" runat="server" Height="15px" Width="266px"></asp:TextBox></td><td align="left">
                       &nbsp;</td></tr><tr>
                <td align="right" class="style6">
                    <asp:Label ID="Label80" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Telephone No."></asp:Label></td><td class="style34">
                    &nbsp;</td><td align="left" class="style29">
                    <asp:TextBox ID="txtLTelephoneNo" runat="server" Height="10px" Width="170px" 
                        ></asp:TextBox>
                     <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender13" runat="server" 
                        FilterType="Numbers" TargetControlID="txtLTelephoneNo" >
                    </cc1:FilteredTextBoxExtender>
                    
                    </td><td align="left">
                    &nbsp;</td></tr><tr>
            <td align="right" class="style6">
                <asp:Label ID="Label81" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="WebSite"></asp:Label></td><td class="style34">
            </td>
            <td align="left" class="style29">
                <asp:TextBox ID="txtLwebsite" runat="server" Height="15px" Width="266px" 
                   ></asp:TextBox></td><td class="style29">
            </td>
        </tr>
        
        
         <tr>
           
            <td align="right" class="style6">
                <asp:Label ID="lbl_segment_val_leads" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Segment"></asp:Label>
            </td>
            <td class="style46"> <a style="color:Red;">*</a>
                &nbsp;</td>
            <td align="left" class="style44">
               
                <asp:DropDownList ID="ddl_segment_leads" runat="server" AppendDataBoundItems="True" 
                     DataTextField="segment_desc">
                </asp:DropDownList><%--DataSourceID="SqlDataSource3_leads"--%>
                <asp:Label ID="Label34_leads" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
             <%--   <asp:SqlDataSource ID="SqlDataSource3_leads" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:enefinde_membConnectionString %>" 
                    SelectCommand="SELECT distinct [segment_desc] FROM [segmentMaster] where ([user_id] = @user_id) order by segment_desc">
                    <SelectParameters > <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                        SessionField="User_id" Type="Int32" />
</SelectParameters>
                    </asp:SqlDataSource>--%>
                
                <asp:RequiredFieldValidator ID="RequiredFieldValidator22_leads" runat="server" 
                    ControlToValidate="ddl_segment_leads" ErrorMessage="Select segment" 
                    InitialValue="-Select-" ValidationGroup="1"></asp:RequiredFieldValidator>
                
               </td>
            <td align="left">

                &nbsp;</td>
        </tr>
        
        
        <tr>
            <td align="right" class="style6">
                <asp:Label ID="Label82" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Customer Type"></asp:Label></td>
                    
                    <td class="style34"><a style="color:Red;">*</a>

                </td>
            <td align="left" class="style44">
             
                    
                    <asp:DropDownList ID="ddlLcustomerType" runat="server" AppendDataBoundItems="True" 
                    DataTextField="Type">
                    
                    
                    </asp:DropDownList><%-- DataSourceID="SqlDataSource11"--%>
                    <asp:Label ID="LblLType" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
                  <%--  <asp:SqlDataSource ID="SqlDataSource11" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:enefinde_membConnectionString %>" 
                    SelectCommand="SELECT distinct [Type] FROM [TypeMaster] where ([user_id] = @user_id) order by Type">
                    <SelectParameters > <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                        SessionField="User_id" Type="Int32" />
</SelectParameters>
                    </asp:SqlDataSource>--%>
                
                <asp:RequiredFieldValidator ID="RequiredFieldValidator48" runat="server" 
                    ControlToValidate="ddlLcustomerType" ErrorMessage="Select Type" InitialValue="-Select-" 
                    ValidationGroup="15"></asp:RequiredFieldValidator></td><td align="left">
                    &nbsp;</td>
                    
                    </tr>
                    
                    
                    <tr>
            <td align="right" class="style6">
                <asp:Label ID="Label83" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Customer Activity"></asp:Label></td><td class="style34"><a style="color:Red;">*</a>
                &nbsp;</td><td align="left" class="style44">
               
                <asp:DropDownList ID="ddlLactivity" runat="server" AppendDataBoundItems="True" 
                    DataTextField="Activity">
                </asp:DropDownList><%-- DataSourceID="SqlDataSource12"--%>
                <asp:Label ID="lblLactivity" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="#FF3300"></asp:Label>
                   <%-- <asp:SqlDataSource ID="SqlDataSource12" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:enefinde_membConnectionString %>" 
                    SelectCommand="SELECT distinct [Activity] FROM [ActivityMaster] where ([user_id] = @user_id) order by Activity">
                    <SelectParameters > <asp:SessionParameter DefaultValue="User_id" Name="user_id" 
                        SessionField="User_id" Type="Int32" />
</SelectParameters>
                    </asp:SqlDataSource>--%>
                
                <asp:RequiredFieldValidator ID="RequiredFieldValidator491" runat="server" 
                    ControlToValidate="ddlLactivity" ErrorMessage="Select Activity" 
                    InitialValue="-Select-" ValidationGroup="1"></asp:RequiredFieldValidator></td><td align="left">

                &nbsp;</td></tr>
                <tr>
        <td align="right" class="style33">  
        <asp:Label ID="lblLPnm" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Person Name"></asp:Label></td><td class="style34"><a style="color:Red;">*</a></td><td>
     
        <asp:DropDownList ID="ddl_title_lead" runat="server" CssClass="txtarea">
                              <asp:ListItem>Mr.</asp:ListItem>
                             <asp:ListItem>Ms.</asp:ListItem>
                             <asp:ListItem>Dr.</asp:ListItem>
                            <%-- <asp:ListItem></asp:ListItem>--%>
                         </asp:DropDownList>
        <asp:TextBox ID="txtLpersonNm" runat="server" Height="20px" Width="266px" 
                    AutoPostBack="True" ></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator61" runat="server" 
                    ControlToValidate="txtLpersonNm" ErrorMessage="Enter Person Name" ValidationGroup="1"></asp:RequiredFieldValidator></td><td></td>
        </tr>
        <tr>
        <td align="right" class="style33">
         <asp:Label ID="lbl_designation1" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Designation"></asp:Label></td><td class="style34"></td>
        <td>
         <asp:TextBox ID="txtLdesignation" runat="server" Height="20px" Width="266px"
                    ></asp:TextBox></td><td></td>
        </tr>
        <tr>
        <td align="right" class="style33">
          <asp:Label ID="Label221" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Department"></asp:Label></td><td class="style34"> 
      
                   </td>
        <td>
          <asp:TextBox ID="txtLdept" runat="server" Height="20px" Width="266px"
                   ></asp:TextBox></td><td></td>
        </tr>
        <tr>
        <td align="right" class="style33">
         <asp:Label ID="Label361" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Email ID"></asp:Label></td><td class="style34"></td>
        <td>
        <asp:TextBox ID="txtLPemail" runat="server" Height="20px" Width="266px" 
                    ></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidator111" runat="server" 
                    ErrorMessage="Enter proper email ID." ControlToValidate="txtLPemail" 
                    ValidationGroup="1" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></td><td></td>
        </tr>
        <tr>
        <td align="right" class="style33">
         <asp:Label ID="Label371" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Mobile Number"></asp:Label></td><td class="style34"><a style="color:Red;">*</a>
        </td>
        <td>
          <asp:TextBox ID="txtMo" runat="server" Height="20px" Width="266px" MaxLength="10"
                    ></asp:TextBox><cc1:FilteredTextBoxExtender ID="Ft21" runat="server" FilterType="Numbers" TargetControlID="txtMo"></cc1:FilteredTextBoxExtender>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator71" runat="server" 
                    ControlToValidate="txtMo" ErrorMessage="Enter Mobile number" 
                    ValidationGroup="1"></asp:RequiredFieldValidator>
                     <asp:Label ID="lblEmail" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Mobile Number" Visible="false"></asp:Label> 
                    <asp:Label ID="lblMoNo1" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Mobile Number" Visible="false" ></asp:Label>
                    </td></tr>
         </table></asp:Panel>      
            </td>
            </tr>
                  <asp:Panel runat="server" ID="pnlCust"> 
                    <tr><td colspan="3"> <div style="float:right;">
                 <asp:Button ID="btnLead" runat="server" CssClass="myButton" 
                   Font-Names="Verdana" Font-Size="12px"  Text="Lead by New Customer" 
                     Width="209px" onclick="btnLead_Click" Visible="false">
                   </asp:Button></div></td></tr>
                   
        <tr>
            <td align="right" class="style36" valign="middle">
            
            
            
                <asp:Label ID="Label1" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Customer Name "></asp:Label>&nbsp;&nbsp;<%-- <a style="color:Red;">*</a>--%>
            </td>
           
            
            
            <td align="left" class="style39" valign="middle">
                <asp:TextBox ID="txtCustNm" runat="server" Height="15px" Width="266px" 
                  ></asp:TextBox>
                   <%--   AutoPostBack="True" ontextchanged="txtCName_TextChanged"--%>
                   <div id="div1_lead">
                      </div>
                       <cc1:AutoCompleteExtender ID="AutoCompleteExtender3" runat="server" TargetControlID="txtCustNm" ServiceMethod="GetCompletionList"
                        ServicePath="~/Admin/AutoComplete_Customer_list.asmx" MinimumPrefixLength="1"
    EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000"  
    CompletionListElementID="div1_lead"
     CompletionListCssClass="AutoExtender"
      CompletionListItemCssClass="AutoExtenderList"
    CompletionListHighlightedItemCssClass="AutoExtenderHighlight" > </cc1:AutoCompleteExtender> 
                    
                    
                    
                  <%--  <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="txtCustNm" ErrorMessage="Enter Name" ValidationGroup="15"></asp:RequiredFieldValidator>--%>
                    </td></tr>
                    
                    
                           <tr runat="server" id="lead_person_name">
            <td align="right" class="style36" valign="middle">
                <asp:Label ID="Label57" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Person Name"></asp:Label><%--&nbsp;&nbsp;<a style="color:Red;">*</a>--%>
            </td>
           
            <td align="left" class="style39" valign="middle">
               <asp:TextBox ID="txt_lead_person_name" runat="server"  Height="15px" Width="150px"></asp:TextBox>
               
               <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator34" runat="server" 
                    ControlToValidate="txt_lead_person_name" ErrorMessage="Enter Person Name" ValidationGroup="15"></asp:RequiredFieldValidator>--%></td><td align="left">
                &nbsp;</td></tr> 
                <tr  runat="server" id="lead_email_id" >
                <td align="right" class="style36" valign="middle">
                    <asp:Label ID="Label6" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Email Id"></asp:Label>&nbsp;&nbsp;
                </td>
              
                <td align="left" class="style39" valign="middle">
                    <asp:TextBox ID="txtEmailId1" runat="server"  Height="15px" Width="266px"></asp:TextBox>&nbsp;<%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator21" runat="server" 
                    ControlToValidate="txtEmailId1" ErrorMessage="Enter Subject" ValidationGroup="5"></asp:RequiredFieldValidator>--%></td><td align="left">
                    &nbsp;</td></tr>
                    
                    <tr runat="server" id="lead_mobileno" >
                <td align="right" class="style36" valign="middle">
                    <asp:Label ID="Label7" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Mobile No."></asp:Label>&nbsp;&nbsp;
                </td>
              
                <td align="left" class="style39" valign="middle">
                    <asp:TextBox ID="txtMoNo1" runat="server"  Height="15px" MaxLength="10" Width="106px"></asp:TextBox>
                       <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" 
                        FilterType="Numbers" TargetControlID="txtMoNo1">
                    </cc1:FilteredTextBoxExtender>
                    
                    <%--   <asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" 
                    ControlToValidate="txtMoNo1" ErrorMessage="Enter Subject" ValidationGroup="5"></asp:RequiredFieldValidator>--%>
                </td>
                <td align="left">
                    &nbsp;</td></tr>
                    
                    
                    
                    
                    <tr>
            <td align="right" class="style36" valign="middle">
                <asp:Label ID="Label48" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="City"></asp:Label>&nbsp;&nbsp;<a style="color:Red;">*</a>
            </td>
           
            <td align="left" class="style39" valign="middle">
               <asp:TextBox ID="txt_Dist" runat="server"  Height="15px" Width="150px"></asp:TextBox>
                <div id="div_dist_lead">
                      </div>
                       <cc1:AutoCompleteExtender ID="AutoCompleteExtender4" runat="server" TargetControlID="txt_Dist" ServiceMethod="GetCityList"
                        ServicePath="~/Admin/Auto_complete_CityNameList.asmx" MinimumPrefixLength="1"
    EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000"  
    CompletionListElementID="div_dist_lead"
     CompletionListCssClass="AutoExtender"
      CompletionListItemCssClass="AutoExtenderList"
    CompletionListHighlightedItemCssClass="AutoExtenderHighlight" > </cc1:AutoCompleteExtender>
               
               <asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" 
                    ControlToValidate="txt_Dist" ErrorMessage="Enter District" ValidationGroup="15"></asp:RequiredFieldValidator></td><td align="left">
                &nbsp;</td></tr>
                
                
                <tr>
            <td align="right" class="style36" valign="middle">
                <asp:Label ID="Label12" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="State"></asp:Label>&nbsp;&nbsp;<a style="color:Red;">*</a>
            </td>
           
            <td align="left" class="style39" valign="middle">
            
            <%--   <asp:TextBox ID="txt_St" runat="server"  Height="15px" Width="150px"></asp:TextBox>--%>
                <asp:DropDownList ID="ddl_state_list_lead" runat="server" AppendDataBoundItems="true">
                
                </asp:DropDownList>
               
               <asp:RequiredFieldValidator ID="RequiredFieldValidator21" runat="server" 
                    ControlToValidate="ddl_state_list_lead" ErrorMessage="select State" InitialValue="-Select-" ValidationGroup="15"></asp:RequiredFieldValidator></td><td align="left">
                &nbsp;</td></tr>
                
                </asp:Panel>
                
                <tr  runat="server" id="lead_subject" >
                <td align="right" class="style36" valign="middle">
                    <asp:Label ID="Label49" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Subject"></asp:Label>&nbsp;&nbsp;<a style="color:Red;">*</a>
                </td>
              
                <td align="left" class="style39" valign="middle">
                    <asp:TextBox ID="txtSub" runat="server"  Height="15px" Width="266px"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator20" runat="server" 
                    ControlToValidate="txtSub" ErrorMessage="Enter Subject" ValidationGroup="15"></asp:RequiredFieldValidator></td><td align="left">
                    &nbsp;</td></tr>
                    
                    
                       
                    
                    <tr>
                    <td align="right">
                    <asp:Label ID="Label62" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Grade"></asp:Label><a style="color:Red;">*</a>
                        
                    
                    </td>
                    <td align="left">
                    
                    <asp:DropDownList ID="ddl_lead_grade" runat="server">
                <asp:ListItem Value="-Select Grade-">-Select Grade-</asp:ListItem>
                <asp:ListItem>A</asp:ListItem>
                <asp:ListItem>B</asp:ListItem>
                 <asp:ListItem>C</asp:ListItem>
                  <asp:ListItem>D</asp:ListItem>
                </asp:DropDownList> 
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="Select Grade" ControlToValidate="ddl_lead_grade" ValidationGroup="15" InitialValue="-Select Grade-"></asp:RequiredFieldValidator>
                    </td>
                    <td></td>
                    </tr>
                    
                     <tr>
                <td align="right" class="style36" valign="middle">
                
                   <asp:Label ID="Label60" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Assign Employee"></asp:Label><a style="color:Red;">*</a>
                 <%--   <asp:Label ID="Label60" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Mobile No."></asp:Label>&nbsp;&nbsp;--%>
                </td>
              
                <td align="left" class="style39" valign="middle">
                  <%--  <asp:TextBox ID="TextBox1" runat="server"  Height="15px" MaxLength="10" Width="106px"></asp:TextBox>
                       <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender11" runat="server" 
                        FilterType="Numbers" TargetControlID="txtMoNo1">
                    </cc1:FilteredTextBoxExtender>--%>
                    
                      <asp:CheckBoxList ID="ddl_employee_lead" runat="server" CssClass="regular-checkboxnew" Width="250px">
                    
                   </asp:CheckBoxList>  
               <%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator39" runat="server" InitialValue="-Select Employee-" ControlToValidate="ddl_employee_lead" 
                ValidationGroup="15" ErrorMessage="Select Employee"></asp:RequiredFieldValidator>  --%>         

                    
                
                </td>
                <td align="left">
                    &nbsp;</td></tr> 
                
                    <tr>
                    <td align="right">
                     <asp:Label ID="lblremarks" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Remaks"></asp:Label>
                    </td>
                    <td align="left">
                     <asp:TextBox ID="txt_remarks" runat="server" Height="35px"  Width="266px" 
                   TextMode="MultiLine" ></asp:TextBox>
                    </td> 
                    <td></td>
                    
                    </tr>
                 
                    
                      
               

                    
                    <tr>
                    <td colspan="3" style="margin-right:45%">
                    
                    <asp:Panel runat="server" ID="pnl_update_leads_qty_val"> 
                     <table style="width:80%;margin-right:25%;">
                     
                     <tr>
                     <td></td>
                      <td></td>
                       <td colspan="3" align="left">
                           <asp:RadioButton ID="rb_convert_enquiry" runat="server" Text="Enquiry" AutoPostBack="true" 
                               oncheckedchanged="rb_convert_enquiry_CheckedChanged" />
                           &nbsp;&nbsp;&nbsp;
                            <asp:RadioButton ID="rb_convert_quotation" runat="server" Text="Quotation" AutoPostBack="true"
                               oncheckedchanged="rb_convert_quotation_CheckedChanged"/>
                               <br />
                                 <asp:Label ID="Label66" runat="server" Font-Names="Verdana" 
                    Font-Size="11px" Font-Bold="true"
                               ForeColor="#009933" Text="[Please select Lead conversion to Enquiry or Quotation.]"></asp:Label> 
                       </td>
                        <%--<td></td>
                         <td></td>--%>
                     </tr>
                      <tr>
           
                <td align="right">
               <asp:Label ID="Label56" runat="server" CssClass="lb" Font-Names="Verdana" 
                      Font-Size="14px" Text="Enquiry No" Width="200px"></asp:Label> 
                &nbsp;</td>
                
                <td ><a style="color:Red;">*</a>
                &nbsp;</td>
                <td  align="left" >
                    <asp:TextBox ID="txt_lead_enquiry_no" runat="server" Width="100px"></asp:TextBox> 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator33" runat="server" ErrorMessage="Enter Enquiry No"
                     ControlToValidate="txt_lead_enquiry_no" ValidationGroup="15" ></asp:RequiredFieldValidator>
           </td>
           
           <td>
               <asp:HiddenField ID="hf_lead_update_rowid" runat="server" />
                &nbsp;</td>
                
                   <td>
                &nbsp;</td>
                  <td style="width:400px;">
                &nbsp;</td>
                </tr>

         
        <tr>
            
                <td align="right">
               <asp:Label ID="Label55" runat="server" CssClass="lb" Font-Names="Verdana" 
                      Font-Size="14px" Text="Enquiry Date" Width="200px"></asp:Label> 
                &nbsp;</td>
                
                <td ><a style="color:Red;">*</a>
                &nbsp;</td>
                <td  align="left" >
                    <asp:TextBox ID="txt_lead_enquirydate" runat="server" Width="100px"></asp:TextBox> 
                      <cc1:CalendarExtender ID="CalendarExtender2" runat="server"
                    Enabled="True" TargetControlID="txt_lead_enquirydate" Format="dd-MMM-yyyy">
                </cc1:CalendarExtender>
                    
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator32" runat="server" ErrorMessage="Enter Enquiry Date" 
                    ControlToValidate="txt_lead_enquirydate" ValidationGroup="15" ></asp:RequiredFieldValidator>
           </td>
           
          <td>
                &nbsp;</td>
                  <td>
                &nbsp;</td>
                  <td>
                &nbsp;</td>
                
                </tr>
                  <tr>
                 
                   
                    <td colspan="6">
                     <asp:GridView ID="grid_conver_enq_qu" runat="server" 
                                AutoGenerateColumns="false" Font-Names="Verdana" Font-Size="12px" 
                                ForeColor="Black" GridLines="Both" ShowFooter="true" >
                                <Columns>
                                    <asp:TemplateField HeaderText="Product Name">
                                        <ItemTemplate>
                                            <%-- <asp:TextBox ID="txt_quantity_gv" runat="server" Width="150px"></asp:TextBox>--%>
                                            <asp:DropDownList ID="ddl_product_name_gv_mullead" runat="server" 
                                                AppendDataBoundItems="true" AutoPostBack="true" 
                                                OnSelectedIndexChanged="ddl_product_name_gv_mullead_SelectedIndexChanged" 
                                                Width="200px">
                                                <%--onselectedindexchanged="ddl_product_name_gv_mul_SelectedIndexChanged"--%>
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator_product_name_gv_mullead" 
                                                runat="server" ControlToValidate="ddl_product_name_gv_mullead" 
                                                ErrorMessage="Select Product name" InitialValue="-Select-" ValidationGroup="m1"></asp:RequiredFieldValidator>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:Button ID="ButtonAddlead11" runat="server" CssClass="myButton" 
                                                onclick="ButtonAddlead11_Click" Text="Submit Item" ValidationGroup="m1" 
                                                Width="150px" />
                                            <%--onclick="ButtonAdd_Click"--%>
                                        </FooterTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Model Name" ItemStyle-Width="250px">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_pid_gv11" runat="server" Text="" Visible="false"></asp:Label>
                                            <%--<div style="float:left;">--%>
                                            <asp:DropDownList ID="ddl_product_model_namelead" runat="server" 
                                                AppendDataBoundItems="true" AutoPostBack="true" 
                                                OnSelectedIndexChanged="ddl_product_model_namelead_SelectedIndexChanged" 
                                                Width="150px">
                                            </asp:DropDownList>
                                            <%--onselectedindexchanged="ddl_product_model_name_SelectedIndexChanged"--%>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" 
                                                ControlToValidate="ddl_product_model_namelead" ErrorMessage="Select Model name" 
                                                InitialValue="-Select-" ValidationGroup="m1"></asp:RequiredFieldValidator>
                                        </ItemTemplate>
                                        <ItemStyle Width="250px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Product Description">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_product_desc_gridviewlead" runat="server" Height="40px" 
                                                TextMode="MultiLine" Width="200px"></asp:TextBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Quantity">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_quantity_gvlead" runat="server" Width="50px"></asp:TextBox>
                                            <cc1:FilteredTextBoxExtender ID="txt_qty_gv_11" runat="server" 
                                                FilterType="Numbers" TargetControlID="txt_quantity_gvlead">
                                            </cc1:FilteredTextBoxExtender>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Price">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_Price_gvlead1" runat="server" Width="70px"></asp:TextBox>
                                            <cc1:FilteredTextBoxExtender ID="txt_Price_gv_11" runat="server" 
                                                FilterType="Numbers,Custom" TargetControlID="txt_Price_gvlead1" ValidChars=".">
                                            </cc1:FilteredTextBoxExtender>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderStyle-Width="100px" HeaderText="Discount(%)">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txt_mul_pro_discountlead" runat="server" Width="50px"></asp:TextBox>
                                            <cc1:FilteredTextBoxExtender ID="txt_discount_gv_11" runat="server" 
                                                FilterType="Numbers,Custom" TargetControlID="txt_mul_pro_discountlead" 
                                                ValidChars=".">
                                            </cc1:FilteredTextBoxExtender>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:Label ID="lbl_all_quo_totallead11" runat="server" Font-Bold="true" 
                                                Text="Total Amount:" Width="100px"></asp:Label>
                                        </FooterTemplate>
                                        <HeaderStyle Width="100px" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Total">
                                        <ItemTemplate>
                                            <div align="right">
                                                <asp:Label ID="txt_total_gvlead" runat="server" Enabled="false" Width="150px"></asp:Label>
                                            </div>
                                        </ItemTemplate>
                                        <FooterStyle HorizontalAlign="Right" />
                                        <FooterTemplate>
                                            <asp:Label ID="lbl_all_quo_totallead" runat="server" Enabled="false" 
                                                Font-Bold="true"></asp:Label>
                                        </FooterTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderStyle-Width="70px">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chk_delete11" runat="server" Width="70px" />
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:Button ID="btn_delete_itemlead" runat="server" CssClass="myButton" 
                                                Text="Delete" Width="65px"   onclick="btn_delete_itemlead_Click"/>
                                            <%-- onclick="btn_delete_item_Click"--%>
                                        </FooterTemplate>
                                        <HeaderStyle Width="70px" />
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="#A0A012" Font-Bold="True" />
                            </asp:GridView>
                      
                   
                     
                            <asp:Label ID="Label8" runat="server" Text="[After any item above is added or edited, please click “Submit Item” before “Update”.]"
                      ForeColor="Green" Font-Names="Verdana" Font-Size="12px"></asp:Label>
                      
                    </td> 
                    
                  
                    </tr>
                
                
             <%--   <tr>
            
              <td align="right" colspan="2" >
                  <asp:Label ID="Label47" runat="server" CssClass="lb" Font-Names="Verdana" 
                      Font-Size="14px" Text="Product Group Name " Width="200px"></asp:Label></td>
                    <td class="style53"> <a style="color:Red;">*</a>
                  &nbsp;</td><td align="left">
                  <asp:DropDownList ID="ddl_lead_group_name" runat="server" AppendDataBoundItems="True" 
                      AutoPostBack="True" 
                      DataTextField="p_group_name" DataValueField="p_group_name" 
                      onselectedindexchanged="ddl_lead_group_name_SelectedIndexChanged" Width="250px">
                      <asp:ListItem Value="-Select-">-Select-</asp:ListItem></asp:DropDownList>
                      
                      <asp:RequiredFieldValidator ID="RequiredFieldValidator27" runat="server" ControlToValidate="ddl_lead_group_name"
                       ErrorMessage="Select Product Group Name" InitialValue="-Select-" ValidationGroup="15"></asp:RequiredFieldValidator>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              
                  &nbsp;
              </td>
              <td>
                  &nbsp;</td></tr>
                 <tr>
            <td class="style51">
                </td>
            <td align="right">
                <asp:Label ID="Label50" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Product Name "></asp:Label></td><td class="style53"> <a style="color:Red;">*</a>
                </td>
            <td align="left">
                <asp:DropDownList ID="ddl_lead_product_name" runat="server" 
                    AppendDataBoundItems="True" AutoPostBack="True" 
                    onselectedindexchanged="ddl_lead_product_name_SelectedIndexChanged" Width="250px">
                    <asp:ListItem Value="-Select-">-Select-</asp:ListItem></asp:DropDownList>
                    
          <asp:RequiredFieldValidator ID="RequiredFieldValidator28" runat="server" ControlToValidate="ddl_lead_product_name" 
          ErrorMessage="Select Product Name" InitialValue="-Select-" ValidationGroup="15"></asp:RequiredFieldValidator>

                    
                    </td><td class="style10">
                </td>
        </tr>
        
        <tr>
            <td class="style50">
                &nbsp;</td><td align="right" >
                <asp:Label ID="Label52" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Model Name "></asp:Label></td>
            <td class="style53"> <a style="color:Red;">*</a>
                &nbsp;</td><td align="left">
                <asp:DropDownList ID="ddl_lead_modelname" runat="server" 
                    AppendDataBoundItems="True" Width="250px">
                    <asp:ListItem Value="-Select-">-Select-</asp:ListItem></asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator29" runat="server" 
                    ControlToValidate="ddl_lead_modelname" ErrorMessage="Select ModelName" 
                    InitialValue="-Select-" ValidationGroup="15"></asp:RequiredFieldValidator></td><td>
                &nbsp;</td></tr>
         <tr>
                <td class="style50">
                    &nbsp;</td><td align="right" >
                    <asp:Label ID="Label53" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Quantity "></asp:Label></td><td class="style53"><a style="color:Red;">*</a>
                    &nbsp;</td><td class="style9" align="left">
                    <asp:TextBox ID="txt_lead_qty" runat="server" Width="140px"></asp:TextBox>
                    
                 
                    
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator30" runat="server"
                         ControlToValidate="txt_lead_qty" ValidationGroup="15" ErrorMessage="Enter Quantity"></asp:RequiredFieldValidator>
                    <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender9" runat="server" 
                        FilterType="Numbers" TargetControlID="txt_lead_qty">
                    </cc1:FilteredTextBoxExtender>
                </td>
                <td>
                    &nbsp;</td></tr>
                    <tr>
                <td class="style50">
                    &nbsp;</td>
                    <td align="right" >
                    <asp:Label ID="Label54" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Amount"></asp:Label></td>
                        <td class="style53"><a style="color:Red;">*</a>
                    &nbsp;</td>
                    <td class="style9" align="left">
                    <asp:TextBox ID="txt_lead_amount" runat="server"  Width="140px"></asp:TextBox>
  <asp:RequiredFieldValidator ID="RequiredFieldValidator31" runat="server" ControlToValidate="txt_lead_amount"
   ErrorMessage="Enter Amount" ValidationGroup="15"></asp:RequiredFieldValidator>

                    
                    <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender10" runat="server" FilterType="Numbers" TargetControlID="txt_lead_amount"></cc1:FilteredTextBoxExtender>

                </td>
                <td>
                    &nbsp;</td></tr>--%>
                    
             
                                      
                    
                    </table>
                    </asp:Panel>
                    </td>
                    </tr>
                    <tr>
            <td class="style52">
                &nbsp;</td><td class="style37">
                <asp:Button ID="btnSubmit1" runat="server" CssClass="myButton" 
                     Text="Submit" ValidationGroup="15" Width="100px" 
                    onclick="btnSubmit1_Click" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                       <asp:Button ID="btn_show_leads" runat="server" Text="Show Leads List" 
                    CssClass="myButton"  ValidationGroup="2"  
                    Width="150px" onclick="btn_show_leads_Click"  /> 
                    &nbsp;
                    <br />  <br />
                    <asp:Label ID="lblInsert1" runat="server" Font-Names="Verdana" 
                    Font-Size="14px" ForeColor="Red"></asp:Label></td><td>
                    </td>
                    </tr>
                    <tr>
                    <td class="style52"></td>
                    <td><b> <a style="color:Red; float:left; padding-right:20px;">* Indicates Compulsory Fields</a></b>
                    <br /> <br />
                    </td>
                    <td></td>
                    </tr>
        </table>
             
        
        </asp:Panel>
        </div>
        
        <div align="center" id="div_lead_show_grid">
        <br />
            <asp:HiddenField ID="hf_leads_count_records" runat="server" />
        <asp:Panel runat="server" ID="pnl_show_leads_grid" CssClass="shadow_five2_lead" Width="90%">
            <asp:Panel ID="Panel2" runat="server"   >
           
             <div style="width:100%;" align="right">
                 <asp:Label ID="lbl_delete_up_lead_msg" runat="server" Text="" ForeColor="Red" Font-Bold="true"></asp:Label>
             </div>
        
             <div style="width:100%;height:60px;">
             <div style="float:left;width:45%;" align="left">
                 <asp:Label ID="lbl_month_name_year" runat="server" Text="" Font-Bold="true" Font-Size="16px" Font-Names="Verdana" ForeColor="#cc0000"></asp:Label>
             </div>
             <div style="float:right;width:54%;" align="right">
                 <asp:Label ID="lbl_leads_date_msg" runat="server" Text="To Search for other period, please select dates here." Font-Bold="true"></asp:Label>
                 <br />
                 <asp:TextBox ID="txt_lead_from_date_search" runat="server" 
                Width="90px" Font-Size="12px"></asp:TextBox>
                <cc1:TextBoxWatermarkExtender ID="lead_date_from" runat="server" TargetControlID="txt_lead_from_date_search" WatermarkText="From date" WatermarkCssClass="watermarkcss" ></cc1:TextBoxWatermarkExtender>
                 <cc1:CalendarExtender ID="CalendarExtender6" runat="server"
                    Enabled="True" TargetControlID="txt_lead_from_date_search" Format="dd-MM-yyyy">
                </cc1:CalendarExtender>
                 <asp:TextBox ID="txt_lead_to_date_search" runat="server" AutoPostBack="true" 
                Width="90px" Font-Size="12px" 
                     ontextchanged="txt_lead_to_date_search_TextChanged"></asp:TextBox>
                <cc1:TextBoxWatermarkExtender ID="to_date_search" runat="server"  TargetControlID="txt_lead_to_date_search" WatermarkText="To Date" WatermarkCssClass="watermarkcss"></cc1:TextBoxWatermarkExtender>
                 <cc1:CalendarExtender ID="CalendarExtender7" runat="server"
                    Enabled="True" TargetControlID="txt_lead_to_date_search" Format="dd-MM-yyyy">
                </cc1:CalendarExtender>
             </div>             
           
            
  </div> 
              <div style="width:100%; float:left;" >
          <div style="float:left;width:100%;">
          <div align="right" style="float:left;width:32%;">
          
        <b>Select Search Type:</b> 
           <asp:DropDownList ID="ddl_search_lead" runat="server"  Font-Bold="true" 
                Height="25px" ><%--onselectedindexchanged="ddl_search_lead_SelectedIndexChanged"AutoPostBack="True"--%>
           <asp:ListItem Value="-Select-">-Select-</asp:ListItem>
           <asp:ListItem Value="1">Customer Name</asp:ListItem>
           <asp:ListItem Value="2">Subject</asp:ListItem>
         <%--  <asp:ListItem Value="3">District</asp:ListItem>--%>
            <asp:ListItem Value="3">City</asp:ListItem>
           <asp:ListItem Value="4">State</asp:ListItem>
             
               <asp:ListItem Value="5">Grade</asp:ListItem>   
                   <asp:ListItem Value="6">Employee Wise</asp:ListItem>   
                   
                   </asp:DropDownList>
                  
          
                    &nbsp;&nbsp;
       <asp:Label ID="Label59" runat="server" Text="Search value" Visible="true" Font-Bold="true"></asp:Label>
         </div>
         
        <div align="left" style="float:right;width:65%;">
    
       <div align="left" style="float:left;">
       <div id="div_ddl_district_lead_search">
    <asp:DropDownList ID="ddl_district_lead_search" runat="server" AppendDataBoundItems="true"
        Height="25px"  Width="150px" 
               onselectedindexchanged="ddl_district_lead_search_SelectedIndexChanged"  AutoPostBack="true">
       </asp:DropDownList>
       </div>
        <div id="div_ddl_state_lead_search">

           <asp:DropDownList ID="ddl_state_lead_search" runat="server" AppendDataBoundItems="true"
        Height="25px"  Width="150px" 
                onselectedindexchanged="ddl_state_lead_search_SelectedIndexChanged" AutoPostBack="true">
       </asp:DropDownList>
  </div>
              <div id="div_ddl_employee_wise_leads_search">
                  <asp:DropDownList ID="ddl_employee_wise_leads_search" runat="server" AppendDataBoundItems="true"
        Height="25px"  Width="150px" 
                      onselectedindexchanged="ddl_employee_wise_leads_search_SelectedIndexChanged" AutoPostBack="true" >
       </asp:DropDownList>
        </div>
       <div id="div_ddl_lead_search_grade">
       <asp:DropDownList ID="ddl_lead_search_grade" runat="server" 
               onselectedindexchanged="ddl_lead_search_grade_SelectedIndexChanged" AutoPostBack="true">
                <asp:ListItem>-Select Grade-</asp:ListItem>
                <asp:ListItem>A</asp:ListItem>
                <asp:ListItem>B</asp:ListItem>
                 <asp:ListItem>C</asp:ListItem>
                  <asp:ListItem>D</asp:ListItem>
                </asp:DropDownList> 
                 </div>
                
                <div id="div_txt_search_lead">
                   <asp:TextBox ID="txt_search_lead" runat="server" 
                Width="181px" Font-Size="12px" ontextchanged="txt_search_lead_TextChanged" AutoPostBack="true"></asp:TextBox>
             
                 </div>
                 </div>
                 <div align="left" style="float:right;width:70%">
                 &nbsp;&nbsp;
                <asp:Button ID="btn_search_lead" runat="server" Text="Search" 
               CssClass="myButton" Height="28px" Width="90px" ValidationGroup="l5"  Visible="false"
                 /><%--onclick="btn_search_lead_Click" --%>
                 &nbsp;&nbsp;<asp:Button ID="btn_export" runat="server"  CssClass="myButton" Width="182px"
                     Text="Export To Excel" onclick="btn_export_Click" Visible="false"/>
                 
                 <asp:HiddenField ID="hf_search_click" runat="server" />
     &nbsp;&nbsp;&nbsp; 
          <asp:Label ID="lbl_search_lead_msg" runat="server" Text="" ForeColor="Green" Font-Bold="true" Font-Names="Verdana" Font-Size="14px"></asp:Label>
        
          <br />
         &nbsp;
               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 

            <asp:RequiredFieldValidator ID="RequiredFieldValidator23" runat="server" ControlToValidate="ddl_search_lead" InitialValue="-Select-"  ErrorMessage="Select Type" ValidationGroup="l5"> </asp:RequiredFieldValidator>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                 <%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator35" runat="server" ControlToValidate="txt_search_lead" 
                   ErrorMessage="Enter Search value" ValidationGroup="l5"> </asp:RequiredFieldValidator>--%>




  <div id="div_lead_auto" runat="server">
            <div id="div_search_lead">
                      </div>
                      </div> 
                 <cc1:AutoCompleteExtender ID="AutoCompleteExtender5" runat="server" TargetControlID="txt_search_lead" ServiceMethod="GetCompletionListlead"
                        ServicePath="~/Admin/Auto_Cumplete_CustomerLead.asmx" MinimumPrefixLength="1"
    EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000"  
    CompletionListElementID="div_search_lead"
     CompletionListCssClass="AutoExtender"
      CompletionListItemCssClass="AutoExtenderList"
    CompletionListHighlightedItemCssClass="AutoExtenderHighlight" > </cc1:AutoCompleteExtender> 
    
    </div>
    
    </div>
</div>
</div>

  </asp:Panel>
             
    
        <div  align="left">
     <asp:Label ID="lbl_heading_sales_performance_lead" runat="server" Text="" ForeColor="Black" Font-Bold="true" Font-Names="Verdana" Font-Size="16px"></asp:Label>
     <asp:Label ID="lbl_summary_reoprt_lead" runat="server" Text="" ForeColor="Blue" Font-Bold="true" Font-Names="Verdana" Font-Size="16px"></asp:Label>
     <br />
     <asp:Label ID="lbl_headning_lead" runat="server" Text="" ForeColor="Red" Font-Bold="true" Font-Names="Verdana" Font-Size="15px"></asp:Label>
   <asp:Label ID="lbl_Overall_lead" runat="server" Text="" ForeColor="Blue" Font-Bold="true" Font-Names="Verdana" Font-Size="15px"></asp:Label>
      </div>
   
    <asp:GridView ID="gv_leads_list" runat="server" AutoGenerateColumns="false"   
                  GridLines="Both"  Width="100%" CssClass="class_gv_leads"
                            BackColor="LightGoldenrodYellow" BorderColor="Tan" 
              BorderWidth="1px"  AllowPaging="true" PageSize="30"
                    CellPadding="2" Font-Names="vani" Font-Size="13px" ForeColor="Black" 
              PagerStyle-CssClass="paging" 
                  onrowcancelingedit="gv_leads_list_RowCancelingEdit" 
                  onrowediting="gv_leads_list_RowEditing" 
                  onpageindexchanging="gv_leads_list_PageIndexChanging" 
                  onrowupdating="gv_leads_list_RowUpdating" 
                
                  ><%--onrowdatabound="gv_leads_list_RowDataBound"--%>
               <RowStyle BorderWidth="1px" />
                           <Columns>
                                 <asp:TemplateField HeaderText="Lead Date" ItemStyle-Width="100px">
                            <ItemTemplate>
                             
                             <asp:Label ID="lbl_EnquiredDate_lead" runat="server" Text='<% # Eval("EnquiredDate") %>' Width="100px"></asp:Label></ItemTemplate>
                             </asp:TemplateField>
                            <asp:TemplateField HeaderText="Customer Name">
                            <ItemTemplate>
                                <asp:Label ID="lbl_cname_lead" runat="server" Text='<% # Eval("CName") %>'></asp:Label>
                                    <asp:Label ID="lbl_lead_rowid1" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label></ItemTemplate>
                                <EditItemTemplate>
                                 
                                <asp:TextBox ID="txt_lead_cust_name" runat="server" Text='<%# Eval("CName") %>' Width="150px"></asp:TextBox>
                                <asp:Label ID="lbl_lead_rowid" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label></EditItemTemplate>
                                </asp:TemplateField>
                             <asp:TemplateField HeaderText="Person Name" ItemStyle-Width="90px" >
                            <ItemTemplate>
                                <asp:Label ID="lbl_pname_lead" runat="server" Text='<% # Eval("PName") %>'></asp:Label>
                                    <asp:Label ID="lbl_lead_rowid11" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label></ItemTemplate>
                                <EditItemTemplate>
                                <asp:TextBox ID="txt_lead_person_name" runat="server" Text='<%# Eval("PName") %>' Width="150px"></asp:TextBox>
                                <asp:Label ID="lbl_lead_rowidrr" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label></EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="City" ItemStyle-Width="80px">
                            <ItemTemplate>
                             <asp:Label ID="lbl_district_lead" runat="server" Text='<% # Eval("district") %>' ></asp:Label></ItemTemplate>
                             <EditItemTemplate>
                            <%--    <asp:TextBox ID="txt_lead_district" runat="server" Text='<%# Eval("district") %>' Width="90px"></asp:TextBox>--%>
                                
                                 <asp:DropDownList ID="ddldistrict_lead" runat="server" Width="150px"
                                  AutoPostBack="true" >
                                 </asp:DropDownList>
                                  <asp:Label ID="lbllead_city_edit" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("district")%>'  Visible="false" ></asp:Label>
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddldistrict_lead" InitialValue="-Select-" ErrorMessage="select District"></asp:RequiredFieldValidator>
                              
                                 
                               
                                </EditItemTemplate>
                                
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="State"> 
                            <ItemTemplate >
                             <asp:Label ID="lbl_CrState_lead" runat="server" Text='<% # Eval("CrState") %>'></asp:Label></ItemTemplate>
                             <EditItemTemplate>
                             <%--   <asp:TextBox ID="txt_lead_CrState" runat="server" Text='<%# Eval("CrState") %>' Width="90px"></asp:TextBox>--%>
                                 <asp:DropDownList ID="ddl_lead_state" runat="server" Width="150px">
                                 </asp:DropDownList>
                                <asp:Label ID="lblstate_lead" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("CrState")%>'  Visible="false" ></asp:Label>
                                        
                                
                                </EditItemTemplate>
                                
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="Subject" ItemStyle-Width="200px">
                            <ItemTemplate>
                             <asp:Label ID="lbl_sub_lead" runat="server" Text='<% # Eval("sub") %>' Width="200px"></asp:Label></ItemTemplate>
                             <EditItemTemplate>
                                <asp:TextBox ID="txt_lead_sub" runat="server" Text='<%# Eval("sub") %>' Width="180px"></asp:TextBox></EditItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="Email Id">
                            <ItemTemplate>
                             <asp:Label ID="lbl_email_lead" runat="server" Text='<% # Eval("email") %>'></asp:Label></ItemTemplate><EditItemTemplate>
                                <asp:TextBox ID="txt_lead_email" runat="server" Text='<%# Eval("email") %>' Width="100px"></asp:TextBox></EditItemTemplate></asp:TemplateField>
                                <asp:TemplateField HeaderText="Mobile No.">
                            <ItemTemplate>
                             <asp:Label ID="lbl_mobile_lead" runat="server" Text='<% # Eval("mobile") %>' ></asp:Label></ItemTemplate><EditItemTemplate>
                                <asp:TextBox ID="txt_lead_mobile" runat="server" Text='<%# Eval("mobile") %>' Width="80px"></asp:TextBox></EditItemTemplate></asp:TemplateField>
                          
                             
                             
                             <asp:TemplateField HeaderText="Employee Name<br/> Grade" >
                            <ItemTemplate>
                           
                             
                             <div align="left"> 
                              <asp:Label ID="lbl_Employee_lead" runat="server" Text='<% # Eval("EmpName") %>' ></asp:Label>
                                     
                              </div>
                                  <div align="right"  style="width:10px;float:right;">                                       
                                       <asp:Label runat="server" ID="lbl_Quotation_grade" Text='<%# Eval("enq_grade") %>' ForeColor="Red" ></asp:Label>
                                      </div>                            
                             </ItemTemplate>
                             <EditItemTemplate>
                             <asp:Label ID="lbl_employee_code_val_lead" runat="server" Text='<%# Eval("EMP_code") %>' Visible="false" ></asp:Label>
                                     
                                          <asp:CheckBoxList ID="ddl_lead_employee_update" runat="server" CssClass="regular-checkboxnew">
                    
                                       </asp:CheckBoxList> 
                                        <%--<br />
                                           <asp:Label runat="server" ID="lbl_enquiry_grade_edit" Text='<%# Eval("enq_grade") %>' ForeColor="Red" ></asp:Label>--%>
                             </EditItemTemplate>
                             </asp:TemplateField>
                             
                              <asp:TemplateField HeaderText="Follow up updates" HeaderStyle-Width="130px"><%--Follow up<br/> Remarks--%>
                                    <ItemTemplate>                                              
                                                 <asp:HyperLink Text="Update" Font-Size="12px"  runat="server" ID="hl_show_links_leads"  style="cursor:pointer; color:Blue;"></asp:HyperLink>
                                                                          
                                                <cc1:CollapsiblePanelExtender  ID="collextend_leads"
                                                    runat="server"
                                                    CollapseControlID="hl_show_links_leads"
                                                    Collapsed="true"
                                                    ExpandControlID="hl_show_links_leads" ExpandDirection="Vertical"
                                                    TargetControlID="pnlSubCategories_leads">                                                          
                                                            </cc1:CollapsiblePanelExtender>
                                                            
                                                              <asp:Panel ID="pnlSubCategories_leads" runat="server" CssClass="cpHeader">
                                              
                                                   <div align="left" style="margin-left:10px;">
                                                   <div>
                                                     <asp:LinkButton ID="lnk_convert_to_enquiry" runat="server"  
                Text="Convert to Enq/Quot" onclick="lnk_convert_to_enquiry_Click" CommandArgument='<%# Eval("Rowid") %>'
                 OnClientClick="return confirm('Are you sure to convert lead to enquiry / quotation? ')"  Font-Underline="false" Width="130px" ></asp:LinkButton>
                 </div>
<%--<div>
       <asp:LinkButton ID="lnkDelete" runat="server"  CommandArgument='<%# Eval("Rowid") %>'   Text="Delete" onclick="lnkDelete_lead_Click" Font-Underline="false"  OnClientClick="return confirm('Do you want to delete?')"
                ></asp:LinkButton>
                </div>--%>
                      
                      <div>                             
                                                       <asp:LinkButton ID="lnk_create_proforma_invoice_lead" runat="server"  
                Text="Create PI" onclick="lnk_create_proforma_invoice_Click" Font-Underline="false" CommandArgument='<%# Eval("Rowid") %>'
                 OnClientClick="return confirm('Are you sure to create lead to Proforma Invoice? ')" Font-Size="12px" ToolTip="Create Proforma Invoice" ></asp:LinkButton>
                 </div>
              <div>
                                                   
                                                       <asp:LinkButton ID="lnk_convert_lead_to_order" runat="server"  
                Text="Convert To Order" onclick="lnk_convert_lead_to_order_Click" Font-Underline="false" CommandArgument='<%# Eval("Rowid") %>'
                 OnClientClick="return confirm('Are you sure to convert lead to order? ')" Font-Size="12px" ></asp:LinkButton>
                 </div>
                 <div>
                 
                   <asp:HiddenField ID="hf_lead_rowid" runat="server" Value='<% # Eval("Rowid") %>' />
                   <a id="lnk_lead_followup_details" style="color:Blue;cursor:pointer;font-size:13px;font-family:Verdana;" >
                                                   More Details</a>
                                                   
                                                   <br />
                                                    <asp:LinkButton ID="lnkEditlead" runat="server" CausesValidation="false" CommandName="Edit" Text="Edit" Font-Underline="false"></asp:LinkButton><br />
                                                     <asp:LinkButton ID="lnkleadclose" runat="server"  Text="Close"   CommandArgument='<%# Eval("Rowid") %>' 
                onclick="lnkleadclose1_Click1" Font-Underline="false" ></asp:LinkButton>
                                                   
                  <%--  <asp:LinkButton ID="img_btn_add_follwup_details" runat="server" 
                                                CommandArgument='<%# Eval("Rowid") %>'  
                                                 Font-Size="12px"  OnClick="img_btn_add_follwup_details_Click" CommandName="Lead" Font-Underline="false"
                                                Text="Follow up Updates" Width="100%"></asp:LinkButton>--%>
                                                
                                                      </div>
                                                 <%--     <div>                             
                                                 <asp:LinkButton ID="lnkCustomer_enquiry_updates" runat="server" 
                                                CommandArgument='<%# Eval("Rowid") %>'  
                                                Font-Size="12px" OnClick="lnkCustomer_enquiry_updates_Click" Font-Underline="false"
                                                Text="Follow up Updates" Width="100%"></asp:LinkButton>
                                                </div>--%>
                                           
                                                </div>
                                                </asp:Panel>
                                                
                                                <asp:Label ID="lbl_enq_quo_id_lead_followup" runat="server" Text='<% # Eval("Enq_quo_lead_id") %>' Visible="false"> </asp:Label>
                                                </ItemTemplate>
                                            <EditItemTemplate>
                                              <asp:LinkButton ID="lnkUpdate1lead" runat="server" CausesValidation="true" CommandName="Update" Text="Update" ValidationGroup="upe1"></asp:LinkButton><br />
        <asp:LinkButton ID="lnkcancel1lead" runat="server" CausesValidation="true" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                            </EditItemTemplate>
                                                </asp:TemplateField>
                                                  <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="chk_lead" runat="server" type="submit" oncheckedchanged="chk_CheckedChangedlead" onclick = "Click(this)"/>
               
                           <%--<input type="checkbox" id="chk_lead" />--%>
                  
                        </ItemTemplate>
                           
                        <HeaderTemplate>
                            Select All
                            <br />
                           <asp:CheckBox  Text="" ID="selectAll_lead" runat="server" AutoPostBack="True" align="Center"
                                oncheckedchanged="selectAll_CheckedChangedlead"  />
                        </HeaderTemplate>
<ItemStyle CssClass="rowstyle" HorizontalAlign="Center" Width="5%" />
                   </asp:TemplateField>
                             
                          <%--   <asp:TemplateField HeaderStyle-Width="60px">
        <ItemTemplate> --%>
   <%--     
  <asp:LinkButton ID="lnk_convert_to_enquiry" runat="server"  
                Text="Update" onclick="lnk_convert_to_enquiry_Click" CommandArgument='<%# Eval("Rowid") %>'
                 OnClientClick="return confirm('Are you sure to convert lead to enquiry / quotation? ')"  ></asp:LinkButton>
                 <br />

        <asp:LinkButton ID="lnkDelete" runat="server"  CommandArgument='<%# Eval("Rowid") %>'   Text="Delete" onclick="lnkDelete_lead_Click"  OnClientClick="return confirm('Do you want to delete?')"
                ></asp:LinkButton>--%>
                
              <%--  </ItemTemplate>
                <EditItemTemplate>
          <asp:LinkButton ID="lnkUpdate" runat="server" CausesValidation="true" CommandName="Update" Text="Update"></asp:LinkButton><br />
        <asp:LinkButton ID="lnkcancel" runat="server" CausesValidation="true" CommandName="Cancel" Text="Cancel"></asp:LinkButton></EditItemTemplate><HeaderStyle Width="60px" />
        </asp:TemplateField>--%>
                            </Columns>
              
               <FooterStyle BackColor="LightGoldenrodYellow" />
                    <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                    <HeaderStyle BackColor="#A0A012" Font-Bold="True" />
                    <AlternatingRowStyle BackColor="#F8F4DA" />
              </asp:GridView>
  
     
     </div>
    <div style="width:100%;float:right;margin-bottom:0px" visible="false" align="right">
                                <asp:Button ID="close_lead" runat="server" CssClass="myButton"
                   type="button" Text="Close Lead"  Width="120px" onclick="close_lead_Click"
                  /> 
                  <br /><br />
                   <asp:Label ID="lbl_chklead" runat="server" Text="" ForeColor="Red" Visible="false"></asp:Label> 
                   <asp:Label ID="lbl_lea" runat="server" Text="" ForeColor="Red" Visible="false"></asp:Label> 
            
           </div> 
         <br />
          <div style="width:100%;" runat="server" id="div_lead_previ_next" >
          <div style="width:45%;float:left;">
           <asp:HiddenField ID="hf_from_date" runat="server" />
         <asp:HiddenField ID="hf_todate" runat="server" />
        
        <asp:HiddenField ID="hf_date" runat="server" />
          <asp:HiddenField ID="hf_month_no" runat="server" />
            <asp:HiddenField ID="hf_year_no" runat="server" />
            
            <asp:Button ID="btn_Previous_week" runat="server" CssClass="myButton" 
                    Text="Previous Month" ValidationGroup="1" Width="150px" onclick="btn_Previous_week_Click" 
           /><%--onclick="btn_Previous_week_Click"--%>
          </div>
           <div style="width:45%;float:right;">
              <asp:Button ID="btnNextWeek" runat="server" CssClass="myButton" 
                    Text="Next Month" ValidationGroup="1" Width="100px" 
                   onclick="btnNextWeek_Click" /> <%--onclick="btnNextWeek_Click"--%>
           </div>
           </div>
         
          <br /><br /><br />
        </asp:Panel>
         <br /><br /><br />
        </div>
         <div id="div_add_enq_quot_from">  
    <asp:Panel ID="pnlall" runat="server" CssClass="pnl">
        <table class="style2">
        <tr><td colspan="5">
        <asp:Panel ID="pnlcustDDL" runat="server">
        <table width="100%">
          <tr>
           <td class="style3">
               &nbsp;</td><td align="right" class="style19">
               
                   <asp:HiddenField ID="hf_add_new_product" runat="server" />
                    <asp:HiddenField ID="hf_new_product" runat="server" />
               &nbsp;</td><td class="style4">
               &nbsp;</td><td class="style9">
               
               
               
               
               
         &nbsp;
                   
                   <div style="margin-left:420px; width: 210px; margin-top:-20px;">    
                   <asp:LinkButton ID="lnkNewCust" runat="server" CssClass="myButton" 
                   Font-Names="Verdana" Font-Size="12px" Text="" Width="139px" PostBackUrl=""> Add New Customer</asp:LinkButton></div></td>
                <%--    onclick="lnkNewCust_Click"--%>
                   <td>
               &nbsp;</td></tr></table>
               <asp:Panel ID="pnl_addrecord" runat="server" >
                   <table>
                   
                           <tr>
                <td class="style3">
                    &nbsp;</td><td align="right" class="style19">
                    <asp:Label ID="Label2" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Customer Name"></asp:Label></td><td class="style4"><a style="color:Red;">*</a>
                    &nbsp;</td><td class="style9">
                    <asp:DropDownList ID="ddlCrName" runat="server" AppendDataBoundItems="True" 
                        DataTextField="CrName" 
                        DataValueField="CID"
                        Width="250px">
                    </asp:DropDownList>
                     
               <%--   onselectedindexchanged="ddlCrName_SelectedIndexChanged"  AutoPostBack="True"  --%>
                    
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" 
                        ControlToValidate="ddlCrName" ErrorMessage="Select Customer" InitialValue="-Select-" 
                        ValidationGroup="1"></asp:RequiredFieldValidator>
                        
                        </td><td>
                    &nbsp;</td></tr>
                   
                   
                   
            <tr>
                <td class="style3">
                    &nbsp;</td><td align="right" class="style19">
                    <asp:Label ID="Label20" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Area"></asp:Label></td><td class="style4"><a style="color:Red;">*</a>
                    &nbsp;</td><td class="style9">
                    
                        <asp:TextBox ID="txt_cust_area_name" runat="server" ReadOnly="true" Width="200px"></asp:TextBox>
          
                        
                        
                        </td><td>
                    &nbsp;</td></tr><tr>
                <td>
                </td>
                <td align="right" class="style19">
                </td>
                <td class="style4">
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    &nbsp;</td><td align="right" class="style19">
                   <%-- <asp:Label ID="Label23" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Sub-Region"></asp:Label>--%>
                         <asp:Label ID="Label23" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="State"></asp:Label>
                        </td><td class="style4"><a style="color:Red;">*</a>
                    &nbsp;</td><td class="style9">
                    
                        <asp:TextBox ID="txt_state_customer" runat="server" Width="200px" ReadOnly="true"></asp:TextBox>
                  <%--  <asp:DropDownList ID="ddlsubarea" runat="server" Height="22px" Width="156px" 
                        AppendDataBoundItems="True" AutoPostBack="True" 
                        onselectedindexchanged="ddlsubarea_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" 
                        ControlToValidate="ddlsubarea" ErrorMessage="Select Sub area" InitialValue="-Select-" 
                        ValidationGroup="1"></asp:RequiredFieldValidator>--%>
                        
                        </td><td>
                    &nbsp;</td></tr>
                    
                    <tr>
                <td>
                </td>
                <td align="right" class="style19">
                </td>
                <td class="style4">
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>
          <%--  <tr runat="server" id="tr_subsubregion" visible="false">
                <td>
                    &nbsp;</td><td align="right" class="style19">
                    <asp:Label ID="Label44" runat="server" CssClass="lb" Font-Names="Verdana" 
                        Font-Size="14px" Text="Sub-SubRegion"></asp:Label></td><td class="style4">
                    &nbsp;</td><td>
                    <asp:DropDownList ID="ddlsub_subregion" runat="server" AppendDataBoundItems="True" 
                        AutoPostBack="True" Height="22px" 
                         Width="156px" 
                        onselectedindexchanged="ddlsub_subregion_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;</td></tr>--%>
             
             <tr>
                <td>
                    &nbsp;</td><td align="right" class="style19">
                    &nbsp;</td><td class="style4">
                    &nbsp;</td><td>
                    &nbsp;</td><td>
                    &nbsp;</td></tr>
                    <tr>
                           <td>
                               &nbsp;</td><td align="right" class="style19">
                               <asp:Label ID="Label18" runat="server" CssClass="lb" Font-Names="Verdana" 
                                   Font-Size="14px" Text="City"></asp:Label></td><td class="style4">
                               &nbsp;</td><td>
                               
                                   <asp:TextBox ID="txt_customer_city" runat="server" Width="200px" ReadOnly="true"></asp:TextBox>
                             <%--  <asp:DropDownList ID="ddlstate1" runat="server" AutoPostBack="true" AppendDataBoundItems="true"
                                   onselectedindexchanged="ddlstate1_SelectedIndexChanged">
                               </asp:DropDownList>State/District--%>
                           </td>
                           <td>
                               &nbsp;</td></tr>
                               
                               <tr>
                           <td>
                               &nbsp;</td><td align="right" class="style19">
                               &nbsp;</td><td class="style4">
                               &nbsp;</td><td>
                               &nbsp;</td><td>
                               &nbsp;</td></tr>
                               
                       
                    
                    
                    <tr id="trperson" runat="server">
            <td class="style3">
                &nbsp;</td><td align="right" class="style19">
                <asp:Label ID="Label14" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Person Name"></asp:Label></td><td class="style4"><a style="color:Red;">*</a>
                &nbsp;</td><td class="style9">
                <asp:DropDownList ID="ddlPersonName" runat="server" AppendDataBoundItems="True" Width="250px">
               </asp:DropDownList>
                <asp:TextBox ID="txtperNm" runat="server" Width="200px" ></asp:TextBox>
                      <br />
                       <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Enter Person Name" 
                     ControlToValidate="txtperNm" ValidationGroup="1" ></asp:RequiredFieldValidator>
                  &nbsp;
               
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator_Person_Name" runat="server" 
                        ControlToValidate="ddlPersonName" ErrorMessage="Select Person Name" InitialValue="-Select-" 
                        ValidationGroup="1"></asp:RequiredFieldValidator>
               
            </td>
            <td>
                &nbsp;<div  id="divbtn" runat="server" style="margin-left:50px; width:200px; margin-top:-20px;">    
                 
                            <input type="button" value="Add New Person" id="lnk_per_so_n"  class="myButton"  style="width:150px; font-size:12px;font-family:Verdana" />
                             
                      </div>
                     
                      <div  id="divbtn1" runat="server" style="margin-left:50px; width:200px; margin-top:-20px;">    
                 
                          <%--  <input type="button" value="Add New Person" id="Button1"  class="myButton"  style="width:150px; font-size:12px;font-family:Verdana" />--%>
                             <input type="button" value="Add Existing Person" id="lnk_Person_exist"  class="myButton"  style="width:150px; font-size:12px;font-family:Verdana" />
                      </div>
                      
                      </td></tr>  
                      
                      <tr>
                      <td></td>
                   <td align="right" class="style55">
                      <asp:Label ID="lbmob" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Mobile No"></asp:Label>
                      </td>
                       <td class="style56"><a style="color:Red;">*</a></td>
                      <td class="style57">
                       <asp:TextBox ID="txtMob" runat="server" Width="100px" MaxLength="10" ></asp:TextBox>
                       <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers" TargetControlID="txtMob"></cc1:FilteredTextBoxExtender>
                       <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Enter Mobile Number"
                     ControlToValidate="txtMob" ValidationGroup="1" ></asp:RequiredFieldValidator>
                      </td>
                      <td class="style59"></td>
                      </tr>
                        <tr>
                      <td></td>
                       <td align="right" class="style55">
                       <asp:Label ID="lbemailid" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Email Id"></asp:Label>
                      </td>
                      <td class="style56"><a style="color:Red;">*</a></td>
                      <td class="style57"> <asp:TextBox ID="txtemailidp" runat="server" Width="200px"></asp:TextBox>
                       <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ErrorMessage="Enter proper email ID." ControlToValidate="txtemailidp" 
                    ValidationGroup="1" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                      
                     <%--  <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="Enter Email Id"
                     ControlToValidate="txtemailidp" ValidationGroup="1" ></asp:RequiredFieldValidator>--%></td>
                      <td class="style59"></td>
                  
                      </tr>
                      
             
              <tr id="quotatio_enq_no" >
        <td  class="style3" > 
                    </td>
        <td class="style19" align="right">
     <asp:Label ID="lbl_quo_ene_no" runat="server" Text="Enquiry No" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" ></asp:Label></td><td  class="style4" >
             &nbsp;         
        </td>
        <td class="style9" >
           
         <asp:TextBox ID="txt_quotation_Enquiry_no" runat="server" Width="170px"></asp:TextBox></td>
         
         <td ></td>
      
        </tr>
                    <tr id="quotatio_enq_date" >
            <td  class="style3" >
                &nbsp;</td><td align="right" class="style19" >
             <asp:Label ID="Label51" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Enquiry Date "></asp:Label></td><td   class="style4" >
              
               <a style="color:Red;">*</a>
            </td>
            <td class="style9" >
            <span style="color:Green;">[dd MMM yyyy]</span> 
            <br />
             <asp:TextBox ID="txt_quotation_enquiry_date" runat="server"  Width="170px"></asp:TextBox>
             
             <cc1:CalendarExtender ID="CalendarExtender1" runat="server"
                    Enabled="True" TargetControlID="txt_quotation_enquiry_date" Format="dd MMM yyyy">
                </cc1:CalendarExtender>
              
              
              <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txt_quotation_enquiry_date"              
            ValidationExpression="^(([0-9])|([0-2][0-9])|([3][0-1]))\ (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\ \d{4}$"            
    ErrorMessage="Invalid date format." ValidationGroup="1"  />
     <%--     <asp:RequiredFieldValidator ID="RequiredFieldValidator_quo_en_no" runat="server" 
          ErrorMessage="Select Enquiry Date" ControlToValidate="txt_quotation_enquiry_date" 
          ValidationGroup="1"></asp:RequiredFieldValidator>
          --%>
          </td><td>
                &nbsp;</td></tr>
                    
                    <tr id="Quot_heading" >
        <td  class="style3" > 
                    </td>
        <td class="style19" align="right">
        
          <div id="lable_quot_heading">
        <asp:Label ID="lbl_quotation_heading" runat="server" Text="Quotation No" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" ></asp:Label>
             </div>
             <div id="lable_enq_heading">       
                    <asp:Label ID="lbl_enquiry_heading" runat="server" Text="Enquiry No" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px"></asp:Label>
                     </div>
                                       
             &nbsp;         
        </td>
        <td>
        
        </td>
        <td class="style9" >
           
         <asp:TextBox ID="txt_enq_quot_no" runat="server" Width="170px"></asp:TextBox></td><td ></td>
      
        </tr>
                    <tr  id="Quot_heading_date">
            <td  class="style3" >
                &nbsp;</td><td align="right" class="style19" >
             <asp:Label ID="Label42" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Date "></asp:Label></td>
                    <td   class="style4" >
              
               <a style="color:Red;">*</a>
            </td>
            <td class="style9" >
            <span style="color:Green;">[dd MMM yyyy]</span> 
            <br />
             <asp:TextBox ID="txtDate" runat="server"  Width="100px"></asp:TextBox>
             
             <cc1:CalendarExtender ID="txtDate_CalendarExtender" runat="server"
                    Enabled="True" TargetControlID="txtDate" Format="dd MMM yyyy">
                </cc1:CalendarExtender>
              &nbsp;&nbsp;  
          <asp:RequiredFieldValidator ID="rfv_quotation_date" runat="server" ErrorMessage="Enter Date" ControlToValidate="txtDate" ValidationGroup="1"></asp:RequiredFieldValidator>
          
             <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtDate"              
            ValidationExpression="^(([0-9])|([0-2][0-9])|([3][0-1]))\ (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\ \d{4}$"            
    ErrorMessage="Invalid date format." ValidationGroup="1"  />
          
          </td>
          
       
          <td>
                &nbsp;</td></tr>
                
                
                    <tr>
            <td  class="style3" >
                &nbsp;</td><td align="right"   class="style19">
             <asp:Label ID="Label43" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Customer Reference No"></asp:Label></td><td class="style4" >
             &nbsp;     
            </td>
            <td  class="style9">
                <asp:TextBox ID="txtref" runat="server"  Width="170px"></asp:TextBox></td><td>
                &nbsp;</td></tr>
                
                
                    <tr>
            <td  class="style3" >
                &nbsp;</td><td align="right"   class="style19">
             <asp:Label ID="lbl_grade" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Grade"></asp:Label></td><td class="style4" >
             &nbsp;     
            </td>
            <td  class="style9">
                <asp:DropDownList ID="ddl_enq_quot_grade" runat="server">
                <asp:ListItem>-Select Grade-</asp:ListItem>
                <asp:ListItem>A</asp:ListItem>
                <asp:ListItem>B</asp:ListItem>
                 <asp:ListItem>C</asp:ListItem>
                  <asp:ListItem>D</asp:ListItem>
                </asp:DropDownList>                
                
                </td><td>
                &nbsp;</td></tr>
                
                
                    <tr>
            <td  class="style3" >
                &nbsp;</td><td align="right"   class="style19">
             <asp:Label ID="Label58" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Assign Employee"></asp:Label>
                    </td>
                    <td class="style4" >  <a style="color:Red;">*</a>
             &nbsp;     
            </td>
            <td  class="style9">
              <%--  <asp:DropDownList ID="ddl_emplyee_list" runat="server" AppendDataBoundItems="true" Width="150px">               
               
                </asp:DropDownList>--%>   
               <asp:CheckBoxList ID="ddl_emplyee_list" runat="server" CssClass="regular-checkboxnew" Width="250px">
                    
                 </asp:CheckBoxList>   
                <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator38" runat="server" InitialValue="-Select Employee-" ControlToValidate="ddl_emplyee_list" ValidationGroup="1" ErrorMessage="Select Employee"></asp:RequiredFieldValidator>           --%>
                
                </td><td>
                &nbsp;</td></tr>
                
                    <tr>
                     <td></td><td align="right"> 
                     <asp:Label ID="lbl_datefollowup" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Select Follow Up Date"></asp:Label>
                    </td>
                    <td align="left">
                     <a style="color:Red;">*</a>
                    </td>
                      <td align="left">
                        <span style="color:Green;">[dd MMM yyyy]</span>  <br />
                          <asp:TextBox ID="txt_followup_date" runat="server" Width="100px"></asp:TextBox>
                           <cc1:CalendarExtender ID="CalendarExtender5" runat="server"
                    Enabled="True" TargetControlID="txt_followup_date"  Format="dd MMM yyyy">
                </cc1:CalendarExtender>                
                          <asp:RequiredFieldValidator ID="RequiredFieldValidator43" runat="server" ControlToValidate="txt_followup_date" ErrorMessage="Select Follow up date." ValidationGroup="1"></asp:RequiredFieldValidator>
                         <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txt_followup_date"              
            ValidationExpression="^(([0-9])|([0-2][0-9])|([3][0-1]))\ (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\ \d{4}$"            
    ErrorMessage="Invalid date format." ValidationGroup="1"  />
                         
                          </td>
                        <td></td>
                    </tr> 
                 
                    <tr id="trRemark" >
                    <td></td>
               
                    <td align="right">
                    <div id="trremarklbl">
                     <asp:Label ID="lbl_rmarkenq" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Remaks"></asp:Label>
                        </div>
                    </td>
                    
                     <td></td>
                    <td align="left">
                    <div id="lbldivtxt_remark">
                     <asp:TextBox ID="txt_remark_enq" runat="server" Height="35px"  Width="266px" 
                   TextMode="MultiLine" ></asp:TextBox>
                   </div>
                    </td> 
                    
                    <td></td>
                    </tr>
       
                    <tr>
            <td colspan="5">
          
           <div align="Right" style="margin-right:15%; margin-bottom:10px;">
                  <%--    <asp:LinkButton ID="lnknewproduct" runat="server" CssClass="myButton" 
                   Font-Names="Verdana" Font-Size="12px" 
                   Text="Add New Product" Width="133px" align="Right" onclick="lnknewproduct_Click"></asp:LinkButton>--%>
                    <asp:LinkButton ID="lnknewproduct" runat="server" CssClass="myButton" 
                   Font-Names="Verdana" Font-Size="12px" 
                   Text="Add New Product" Width="133px" align="Right" PostBackUrl="~/Admin/ProductMaster.aspx" ></asp:LinkButton>
                   </div>
          
             <%--  <asp:Panel ID="pnlmultipal" runat="server" Visible="false">--%>
                 <div align="center">
                     <asp:UpdatePanel runat="server" ID="mulProdct">
                 <ContentTemplate>
                 
      <asp:gridview ID="gv_add_multiple_product" runat="server" ShowFooter="true" 
            AutoGenerateColumns="false" Width="700px"  Font-Names="Verdana" Font-Size="12px" 
                    ForeColor="Black" GridLines="Both"  >
            <Columns>
          <%--  <asp:BoundField DataField="RowNumber" HeaderText="Model Name" />--%>
            <asp:TemplateField HeaderText="Product Name" >
                <ItemTemplate>
                   <%-- <asp:TextBox ID="txt_quantity_gv" runat="server" Width="150px"></asp:TextBox>--%>
                    <asp:DropDownList ID="ddl_product_name_gv_mul" runat="server" 
                        AppendDataBoundItems="true" AutoPostBack="true" Width="200px"
                        onselectedindexchanged="ddl_product_name_gv_mul_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator_product_name_gv_mul" runat="server" ErrorMessage="Select Product name" 
                    ControlToValidate="ddl_product_name_gv_mul" InitialValue="-Select-" ValidationGroup="m"></asp:RequiredFieldValidator></ItemTemplate>
                    <FooterTemplate>
                 <asp:Button ID="ButtonAdd" runat="server" Text="Submit Item" 
                        onclick="ButtonAdd_Click"  CssClass="myButton" Width="150px"  ValidationGroup="m"/>
                </FooterTemplate>
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="Model Name" ItemStyle-Width="250px">
                <ItemTemplate>
                    <asp:Label ID="lbl_pid_gv" runat="server" Text="" Visible="false"></asp:Label>
                 <%--<div style="float:left;">--%>
                    <asp:DropDownList ID="ddl_product_model_name" runat="server" AppendDataBoundItems="true" Width="150px"
                    onselectedindexchanged="ddl_product_model_name_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList> 
                  <%--  <asp:TextBox ID="txt_model_new_add_grid" runat="server" Width="150px" Visible="false"></asp:TextBox>
                    </div>
                    <div style="float:right;">
                    <asp:LinkButton ID="lnk_add_new_model_multiple_grid" runat="server" Text="Add New"></asp:LinkButton>
                    </div>--%>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" ErrorMessage="Select Model name" ControlToValidate="ddl_product_model_name" 
                    InitialValue="-Select-" ValidationGroup="m"></asp:RequiredFieldValidator>
                    </ItemTemplate></asp:TemplateField>
                    
                      <asp:TemplateField HeaderText="Product Description">
                <ItemTemplate>
                    <asp:TextBox ID="txt_product_desc_gridview" runat="server" Width="200px" TextMode="MultiLine" Height="40px"></asp:TextBox>
                    
                </ItemTemplate>
            </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="Quantity">
                <ItemTemplate>
                    <asp:TextBox ID="txt_quantity_gv" runat="server" Width="50px"></asp:TextBox><cc1:FilteredTextBoxExtender ID="txt_qty_gv_1" runat="server" FilterType="Numbers" TargetControlID="txt_quantity_gv"></cc1:FilteredTextBoxExtender>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Price">
                <ItemTemplate>
                    <asp:TextBox ID="txt_Price_gv" runat="server" Width="70px"></asp:TextBox>
                    <cc1:FilteredTextBoxExtender ID="txt_Price_gv_1" runat="server"  FilterType="Numbers,Custom" ValidChars="." TargetControlID="txt_Price_gv"></cc1:FilteredTextBoxExtender>

                </ItemTemplate>
                
            </asp:TemplateField>
            
               <asp:TemplateField HeaderText="Discount(%)" HeaderStyle-Width="100px">
                <ItemTemplate>
                    <asp:TextBox ID="txt_mul_pro_discount" runat="server" Width="50px"></asp:TextBox>
                    <cc1:FilteredTextBoxExtender ID="txt_discount_gv_1" runat="server" FilterType="Numbers,Custom" ValidChars="." TargetControlID="txt_mul_pro_discount">
                    </cc1:FilteredTextBoxExtender>

                </ItemTemplate>
                
                  <FooterTemplate>
                    <asp:Label ID="lbl_all_quo_total222" runat="server" Text="Total Amount:" Font-Bold="true"  Width="100px"></asp:Label>
                
                        </FooterTemplate>
                
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="Total" >
                <ItemTemplate >
                <div align="right">
                     <asp:Label ID="txt_total_gv" runat="server"  Width="150px" Enabled="false"></asp:Label></div></ItemTemplate>
                     <FooterStyle HorizontalAlign="Right" />
                <FooterTemplate>
                    <asp:Label ID="lbl_all_quo_total" runat="server" Enabled="false" Font-Bold="true" ></asp:Label>
                
                        </FooterTemplate>
                        
                        </asp:TemplateField>
                        <asp:TemplateField HeaderStyle-Width="70px">
                        <ItemTemplate>
                            <asp:CheckBox ID="chk_delete" runat="server" Width="70px" />
                        </ItemTemplate>
                        
                          <FooterTemplate>
                                     
                      <asp:Button ID="btn_delete_item" runat="server" Text="Delete" 
                        onclick="btn_delete_item_Click"  CssClass="myButton" Width="65px"  />
                
                        </FooterTemplate>
                        </asp:TemplateField>
                        </Columns><HeaderStyle BackColor="#A0A012" Font-Bold="True" />
        </asp:gridview>
<%--        <asp:Button ID="Button1" runat="server" Text="Save" onclick="Button1_Click"  CssClass="myButton" Width="100px" />
--%> 

    </ContentTemplate>
    </asp:UpdatePanel>

 <div style="" align="left">
                  
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     <asp:Label ID="Label5" runat="server" Text="[After any item above is added or edited, please click “Submit Item” before “Submit”.]"
                      ForeColor="Green" Font-Names="Verdana" Font-Size="12px"></asp:Label>
                      </div>  
                      
                       </div>

  
 <%--   </asp:Panel>--%>
            </td>
            </tr>
                    <tr runat="server" visible ="false" id="enqref">
            <td class="style3">
                &nbsp;</td><td align="right" class="style45">
                <asp:Label ID="Label33" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text="Enquiry Reference" Visible="false" ></asp:Label></td><td class="style49">
                &nbsp;</td><td class="style9">
                <asp:DropDownList ID="ddlref" runat="server" Height="23px" Width="138px" 
                    AppendDataBoundItems="True" Visible="false">
                </asp:DropDownList>
                &nbsp;<asp:TextBox ID="txtotherref" runat="server" Width="170px" Visible="false"></asp:TextBox><cc1:FilteredTextBoxExtender ID="txtotherref_FilteredTextBoxExtender" 
                    runat="server" FilterType="Numbers" TargetControlID="txtotherref">
                </cc1:FilteredTextBoxExtender>
            </td>
            <td>
                &nbsp;</td></tr>
             
             
             
                    </table>
                    </asp:Panel>
                    </asp:Panel>
                    
                    </td></tr>
              


<%--<asp:Panel ID="pnl_show_customer_form" runat="server">

                   
         
                </asp:Panel>--%>
                <tr>
            <td class="style3">
                &nbsp;</td><td align="right" class="style45">
                &nbsp;</td><td class="style49">
                &nbsp;</td><td class="style9">
            <br /><br />
             <div style="width:100%;">
              <div style="float:left;width:150px;">
                <asp:Button ID="btnSubmit" runat="server" CssClass="myButton" 
                    onclick="btnSubmit_Click" Text="Submit" ValidationGroup="1" Width="100px" />
                    </div>
                    &nbsp;
                      <asp:HiddenField ID="hidden_cid" runat="server" />
                     <asp:HiddenField ID="hf_customer_add_extrnal" runat="server" />
                    
                     <asp:HiddenField ID="hf_external_cust_enq_quot_id" runat="server" />
                       <div id="show_enq_btn" style="float:left;">
                <asp:Button ID="btnShow" runat="server" CssClass="myButton" 
                    onclick="btnShow_Click" Text="Show Enquiries List" Width="175px" />     
                    </div>
                &nbsp;
                    <div id="show_quot_btn"  style="float:left;">
                <asp:Button ID="btnShowqut" runat="server" CssClass="myButton"
                    Text="Show Quotations List" Width="185px" OnClick="btnShowqut_Click"/>
                    </div>
                   
                    <asp:HiddenField ID="hf_show_en_quo" runat="server" />
                    <br />   <br />
                     <asp:Label ID="lblInsert0" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red"></asp:Label>
                    <br />
                    <br />
                    <b> <a style="color:Red;  padding-right:20px;">* Indicates Compulsory Fields</a></b>
</div>
                  <%--  <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
                           DynamicLayout="true">
                          <ProgressTemplate>
                              <div>
                                  <img id="Img1" alt="Loading..." src="../images/Regloader.gif" runat="server" />
                                  </div>
                          </ProgressTemplate>
                      </asp:UpdateProgress>--%>
         
               </td><td>
                &nbsp;</td></tr>
                
                </table>
                
                <table class="style2">
            <tr>
                <td class="style3">
                    &nbsp;</td><td align="right" class="style17">
                    &nbsp;</td><td class="style4">
                    &nbsp;</td><td class="style9" align="center">
              
                                         
                                         
                                         &nbsp;</td><td>
                    &nbsp;</td></tr></table>

 
 </asp:Panel>
 </div>
 <div align="center" id="div_search_panle_enq_quot">
 <br />
   <asp:Panel ID="pnl_search_cust" runat="server"  CssClass="shadow_five2_search">
  <div style="width:100%;height:60px;">
    <div align="left" style="width:45%;float:left;">
                 <asp:Label ID="lbl_show_enq_quotation_month_name" runat="server" Text="" Font-Bold="true" Font-Size="16px" Font-Names="Verdana" ForeColor="#cc0000"></asp:Label>
             </div>
             <div  style="width:52%;float:right;" align="right">
             
                              <asp:Label ID="lbl_enq_quo_date_msg" runat="server" Text="To Search for other period, please select dates here." Font-Bold="true"></asp:Label>
                              <br />

                 <asp:TextBox ID="txt_enq_quot_from_date_search" runat="server" 
                Width="90px" Font-Size="12px"></asp:TextBox>
  <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" TargetControlID="txt_enq_quot_from_date_search" WatermarkText="From date" WatermarkCssClass="watermarkcss" ></cc1:TextBoxWatermarkExtender>

                 <cc1:CalendarExtender ID="CalendarExtender8" runat="server"
                    Enabled="True" TargetControlID="txt_enq_quot_from_date_search" Format="dd-MM-yyyy">
                </cc1:CalendarExtender>
                 <asp:TextBox ID="txt_enq_quot_to_date_search" runat="server" AutoPostBack="true" 
                Width="90px" Font-Size="12px" 
           ontextchanged="txt_enq_quot_to_date_search_TextChanged"></asp:TextBox>
 <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="txt_enq_quot_to_date_search" WatermarkText="To date" WatermarkCssClass="watermarkcss" ></cc1:TextBoxWatermarkExtender>

                 <cc1:CalendarExtender ID="CalendarExtender9" runat="server"
                    Enabled="True" TargetControlID="txt_enq_quot_to_date_search" Format="dd-MM-yyyy">
                </cc1:CalendarExtender>
             </div>
             </div>
             <div style="width:100%;height:auto; ">
              <table>
            <tr>
            <td>  
            
        <b>Select Search Type:</b> 
         </td>
            <td>  
                     <asp:Label ID="lbl_dropdown_name" runat="server" Text=""  Font-Bold="true"></asp:Label>
                     </td>
            <td> 
            
                  <asp:Label ID="lbl_model_name_dropdown" runat="server" Text="" Font-Bold="true"></asp:Label>          
            </td>
            <td></td>
            </tr>
            <tr>
            <td valign="top" style="width:160px;">     
            
           <asp:DropDownList ID="ddl_search_value" runat="server"  Font-Bold="true" 
              Height="25px"> <%-- onselectedindexchanged="ddl_search_value_SelectedIndexChanged" AutoPostBack="True"--%>
           <asp:ListItem Value="-Select-">-Select-</asp:ListItem>
           <asp:ListItem Value="1">Customer Name</asp:ListItem>
           <asp:ListItem Value="2">Person Name</asp:ListItem>
           <asp:ListItem Value="3">Product Name</asp:ListItem>
           <asp:ListItem Value="4">Model Name</asp:ListItem>
           <asp:ListItem Value="5">Area/Region</asp:ListItem>
             <asp:ListItem Value="6">State</asp:ListItem>
           <asp:ListItem Value="7">District/City</asp:ListItem>
            <asp:ListItem Value="8">Grade</asp:ListItem>
            <asp:ListItem Value="9">Employee Wise</asp:ListItem>
                   </asp:DropDownList><br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="ddl_search_value" InitialValue="-Select-"
              ErrorMessage="Select Type" ValidationGroup="5"> </asp:RequiredFieldValidator>
                   
                </td>
      
             <td style="width:200px;">
             <div style="float:left;width:40%;">
             <div style="float:left;">
             
               <div style="float:left;" id="div_ddl_dist_city_enq_quotation_search">            
             <asp:DropDownList ID="ddl_dist_city_enq_quotation_search" runat="server" AppendDataBoundItems="true"
        Height="25px"  Width="150px" 
                       onselectedindexchanged="ddl_dist_city_enq_quotation_search_SelectedIndexChanged" AutoPostBack="true">
       </asp:DropDownList>
        </div>
       <div id="div_ddl_state_enq_quotation_search">
       
           <asp:DropDownList ID="ddl_state_enq_quotation_search" runat="server" AppendDataBoundItems="true"
        Height="25px"  Width="150px" AutoPostBack="true" 
               onselectedindexchanged="ddl_state_enq_quotation_search_SelectedIndexChanged" >
       </asp:DropDownList>
               </div>
                <div id="div_ddl_employee_wise_search">
       <asp:DropDownList ID="ddl_employee_wise_search" runat="server" AppendDataBoundItems="true"
        Height="25px"  Width="150px" 
                        onselectedindexchanged="ddl_employee_wise_search_SelectedIndexChanged" AutoPostBack="true">   </asp:DropDownList>
           </div>       
        <div id="div_ddl_AreaName_list">
        
      <%--  AutoPostBack="true" Visible="false"  onselectedindexchanged="ddl_employee_wise_search_SelectedIndexChanged"--%>
    
            
            <asp:DropDownList ID="ddl_AreaName_list" runat="server" Height="25px"  
                Width="150px" AppendDataBoundItems="true" 
                onselectedindexchanged="ddl_AreaName_list_SelectedIndexChanged" AutoPostBack="true" >            
            </asp:DropDownList>
             </div>
            
             <div style="float:left;" id="div_ddl_all_data">
  <asp:DropDownList ID="ddl_all_data" runat="server" Height="25px"  Width="150px" AppendDataBoundItems="true" 
  onselectedindexchanged="ddl_all_data_SelectedIndexChanged" AutoPostBack="true">
             </asp:DropDownList>
             <%--  --%>
             </div>
               <div id="div_ddl_search_grade">
             <asp:DropDownList ID="ddl_search_grade" runat="server" 
                       onselectedindexchanged="ddl_search_grade_SelectedIndexChanged" AutoPostBack="true" >
                <asp:ListItem>-Select Grade-</asp:ListItem>
                <asp:ListItem>A</asp:ListItem>
                <asp:ListItem>B</asp:ListItem>
                 <asp:ListItem>C</asp:ListItem>
                  <asp:ListItem>D</asp:ListItem>
                </asp:DropDownList> 
                   </div>
                    
            
               <div id="div_txt_search">
                   <asp:TextBox ID="txt_search" runat="server" 
                Width="181px" Font-Size="12px" ontextchanged="txt_search_TextChanged" AutoPostBack="true"></asp:TextBox>
                
                
                <div id="div_search_auto_cust" runat="server">
<div id="divwidth_enq_search"   >
                      </div>
                      </div>
                 <cc1:AutoCompleteExtender ID="AutoCompleteExtender2_enq_quo" runat="server" TargetControlID="txt_search" ServiceMethod="GetCompletionList"
                        ServicePath="~/Admin/AutoComplete_Customer_list.asmx" MinimumPrefixLength="1"
    EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000"  
    CompletionListElementID="divwidth_enq_search"
     CompletionListCssClass="AutoExtender"
      CompletionListItemCssClass="AutoExtenderList"
    CompletionListHighlightedItemCssClass="AutoExtenderHighlight" > </cc1:AutoCompleteExtender> 
    
                </div>
                
                
           
<div align="center" >
  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  
           
   &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;  
                <%--  <asp:RequiredFieldValidator ID="RequiredFieldValidator25" runat="server" ControlToValidate="txt_search" 
                   ErrorMessage="Enter Search value" ValidationGroup="5"> </asp:RequiredFieldValidator>--%>
</div>

</div>
</div>


   </td>
             <td valign="top">
              <div align="left" style="float:left;" id="div_model_name">
                <asp:DropDownList ID="ddl_model_name" runat="server" Height="25px" Width="150px" 
                      AppendDataBoundItems="true" onselectedindexchanged="ddl_model_name_SelectedIndexChanged" AutoPostBack="true"
                >            
            </asp:DropDownList>
                </div>
             </td>
             <td valign="top" style="width:500px;">
             
             
             
<div style="float:right;width:100%;">
     <asp:Button ID="btn_search_quotation" runat="server" Text="Search" 
               CssClass="myButton" Height="28px" Width="90px" ValidationGroup="5" 
               Visible="false" /> <%-- onclick="btn_search_quotation_Click"--%>          
       &nbsp;&nbsp;&nbsp;          
       &nbsp;&nbsp;&nbsp;          
       &nbsp;&nbsp;&nbsp;          
      
                  &nbsp;&nbsp;<asp:Button ID="btn_exp1" runat="server"  CssClass="myButton" Width="182px"
                     Text="Export To Excel" onclick="btn_exp1_Click"/>
                
       &nbsp;&nbsp;&nbsp;    <asp:Label ID="lbl_no_search" runat="server" Text="" ForeColor="Green" Font-Bold="true" Font-Names="Verdana" Font-Size="14px"></asp:Label>
       <br />
      </div>
         </td>             
            </tr>
            </table> 

 
</div>

       </asp:Panel>
    <br />
    
    <div align="left">
     <asp:Label ID="lbl_heading_sales_performance_enq_quo" runat="server" Text="" ForeColor="Black" Font-Bold="true" Font-Names="Verdana" Font-Size="16px"></asp:Label>
     <asp:Label ID="lbl_heading_enq_quo" runat="server" Text="" ForeColor="Blue" Font-Bold="true" Font-Names="Verdana" Font-Size="16px"></asp:Label>
<br />

<asp:Label ID="lbl_headning_enq_quo" runat="server" Text="" ForeColor="Red" Font-Bold="true" Font-Names="Verdana" Font-Size="15px"></asp:Label>
   <asp:Label ID="lbl_Overall_enq_quo" runat="server" Text="" ForeColor="Blue" Font-Bold="true" Font-Names="Verdana" Font-Size="15px"></asp:Label>

    </div>
 </div>
 
 <div id="div_show_grid_enquiry">
 <asp:Panel ID="pnlshowmodel" runat="server" >
    <asp:HiddenField ID="hf_enq_quo_records_count" runat="server" />
 <div align="right" style="margin-right:200px;">
     <asp:Label ID="lbl_delete_up_enq_mag" runat="server" Text="" Font-Bold="true" ForeColor="Red"></asp:Label>
 </div>
     <asp:HiddenField ID="hf_value_edit" runat="server" />
     <asp:HiddenField ID="hf_record_found_count" runat="server" />
         <asp:GridView ID="gvShowModelDetails" runat="server" 
                    AutoGenerateColumns="False" BackColor="LightGoldenrodYellow" BorderColor="Tan" 
                    BorderWidth="1px" CellPadding="2" Font-Names="vani" Font-Size="13px"  CssClass="Quotation_grid_css"
                    ForeColor="Black" GridLines="Both"  PageSize="30" AllowPaging="true"   PagerStyle-CssClass="paging" 
                     Width="100%" onrowdatabound="gvShowModelDetails_RowDataBound" 
              onpageindexchanging="gvShowModelDetails_PageIndexChanging" 
              onrowediting="gvShowModelDetails_RowEditing" 
              onrowcancelingedit="gvShowModelDetails_RowCancelingEdit" 
              onrowupdating="gvShowModelDetails_RowUpdating">
                    <Columns>
                       
                        <asp:TemplateField HeaderText="Enquiry No<br/>Enquiry Date">
                            <ItemTemplate>
                               <asp:Label runat="server" ID="lbl_enquiry_no" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("enq_quo_no")%>' 
                                        Width="90px" ></asp:Label><br />
                                    <asp:Label ID="lblSendingDate" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("EnquiredDate11", "{0:dd-MM-yyyy}")%>' 
                                        Width="90px"></asp:Label></ItemTemplate></asp:TemplateField>
                                        
                                        <asp:TemplateField HeaderText="Customer<br/> Reference No" >
                            <ItemTemplate>
                             
                                    <asp:Label ID="lblCust_ref_no" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("reference")%>' Width="100px"></asp:Label></ItemTemplate>
                                        
                            </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Customer Name<br/>Person Name" >
                            <ItemTemplate>
                             <asp:Label ID="lbl_cust_cid_itemtemp" runat="server" Text='<%# Eval("CID")%>' Visible="false"></asp:Label>
                                    <asp:Label ID="lblCrName" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("CName")%>' ></asp:Label>
                                      <br />    <asp:Label ID="lblstatus" runat="server" Visible="false" 
                                        ReadOnly="true" Text='<%# Eval("leads")%>' ></asp:Label>
                                      
                                         <asp:Label ID="lblQuoteSendToPName" runat="server" CssClass="font"  
                                        ReadOnly="true" Text='<%# Eval("PName")%>' ></asp:Label>
                                           <asp:Label ID="lbl_enq_rowid1" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                       
                                <asp:Label ID="lbl_enq_rowid" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label>
                                
                                            <asp:Label ID="lbl_cust_cid" runat="server" Text='<%# Eval("CID")%>' Visible="false"></asp:Label>
                                        <asp:Label ID="lbl_cust_name_enquiry" runat="server"  Text='<%# Eval("CName")%>'></asp:Label>
                                
                                     <asp:DropDownList ID="ddl_update_customer_to_Enquiry" runat="server" DataTextField="NameAndCity" DataValueField="CID" Width="150px">
                                                    </asp:DropDownList>
                                                    <br />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorddl_update_customer_to_Enquiry" runat="server" ControlToValidate="ddl_update_customer_to_Enquiry" 
                                                    ErrorMessage="Select Customer Name" InitialValue="-Select-" ValidationGroup="upe1"></asp:RequiredFieldValidator>
                                                    
                                                    
                            <%--    <asp:TextBox ID="txt_CName_enq" runat="server" Text='<%# Eval("CName")%>'  Width="180px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator23" runat="server" ControlToValidate="txt_CName_enq"
                                             ErrorMessage="Enter Customer Name" ValidationGroup="upe1"></asp:RequiredFieldValidator>--%>
                                <br />
                                <asp:TextBox ID="txt_PName_enq" runat="server" Text='<%# Eval("PName")%>'  Width="180px"></asp:TextBox>
                                 <asp:RequiredFieldValidator ID="Requiredlidatortxt_PName_enq" runat="server" ControlToValidate="txt_PName_enq"
                                             ErrorMessage="Enter Person Name" ValidationGroup="upe1"></asp:RequiredFieldValidator>
                                
                                </EditItemTemplate>
                                
                                </asp:TemplateField> 
                              
                              
                              
                                  <asp:TemplateField HeaderText="Email Id <br>Mobile No" >
                            <ItemTemplate>
                      
                                    <asp:Label ID="lblPrEmail11" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("PEmail_id")%>' ></asp:Label>
                                        <br />
                                        <asp:Label ID="lblPrMobile" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("PMobile_No")%>' ></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                       
                               
                                <asp:TextBox ID="txt_PrEmail_id" runat="server" Text='<%# Eval("PEmail_id")%>'  Width="180px"></asp:TextBox>
                                 <asp:RequiredFieldValidator ID="Requiredlidatortxt_PName_enq111" runat="server" ControlToValidate="txt_PrEmail_id"
                                             ErrorMessage="Enter Email Id" ValidationGroup="upe1"></asp:RequiredFieldValidator>
                                             <br />
                                               <asp:TextBox ID="txt_PrMobile_No" runat="server" Text='<%# Eval("PMobile_No")%>'  Width="180px" MaxLength="12"></asp:TextBox>
                                               <cc1:FilteredTextBoxExtender runat="server" ID="ddd_txt_mobile" TargetControlID="txt_PrMobile_No" FilterType="Numbers" ></cc1:FilteredTextBoxExtender>
                                 <asp:RequiredFieldValidator ID="Requiredlidatortxt_PName_enq_mob" runat="server" ControlToValidate="txt_PrMobile_No"
                                             ErrorMessage="Enter  Mobile No" ValidationGroup="upe1"></asp:RequiredFieldValidator>
                                
                                </EditItemTemplate>
                                
                                </asp:TemplateField>
                                                              
                                     <%--   <asp:TemplateField HeaderText="Mobile No" >
                            <ItemTemplate>
                      
                                    <asp:Label ID="lblPrMobile" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("PMobile_No")%>' ></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                       
                               
                                <asp:TextBox ID="txt_PrMobile_No" runat="server" Text='<%# Eval("PMobile_No")%>'  Width="180px"></asp:TextBox>
                                 <asp:RequiredFieldValidator ID="Requiredlidatortxt_PName_enq_mob" runat="server" ControlToValidate="txt_PrMobile_No"
                                             ErrorMessage="Enter  Mobile No" ValidationGroup="upe1"></asp:RequiredFieldValidator>
                                
                                </EditItemTemplate>
                                
                                </asp:TemplateField>--%>
                                                            
                                
                                 <asp:TemplateField HeaderText="District/City <br/>State" >
                            <ItemTemplate>
                               
                                <asp:Label ID="lbldistrict" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("district")%>' Width="100px"></asp:Label><br />
                                    <asp:Label ID="lblCrState" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("CrState")%>' Width="100px"></asp:Label></ItemTemplate>
                                        
                                        
                                        <EditItemTemplate>
                               <%-- <asp:TextBox ID="txt_district_enq" runat="server" Text='<%# Eval("district")%>' Width="100px"></asp:TextBox>
                                 <asp:RequiredFieldValidator ID="Requiredlidatortxt_district_enq" runat="server" ControlToValidate="txt_district_enq"
                                             ErrorMessage="Enter District/City" ValidationGroup="upe1"></asp:RequiredFieldValidator>
                                <br />
                                <asp:TextBox ID="txt_CrState_enq" runat="server" Text='<%# Eval("CrState")%>' Width="100px"></asp:TextBox>
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidatortxt_CrState_enq" runat="server" ControlToValidate="txt_CrState_enq"
                                             ErrorMessage="Enter State" ValidationGroup="upe1"></asp:RequiredFieldValidator>--%>
                                            


                            <asp:DropDownList ID="ddldistrict_enquiry" runat="server" Width="150px"
                                  AutoPostBack="true" >
                                 </asp:DropDownList>
                                  <asp:Label ID="lbllead_city_edit_enqu" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("district")%>'  Visible="false" ></asp:Label>
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2_enq" runat="server" ControlToValidate="ddldistrict_enquiry" InitialValue="-Select-" ErrorMessage="select District"></asp:RequiredFieldValidator> 

                                <br />
                                <asp:DropDownList ID="ddl_enquiry_state" runat="server" Width="150px">
                                 </asp:DropDownList>
                                <asp:Label ID="lblstate_enqu" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("CrState")%>'  Visible="false" ></asp:Label>
                                             
                                </EditItemTemplate>
                                </asp:TemplateField>
                                
                                
                        <asp:TemplateField HeaderText="Product Name<br/>Model Name">
                            <ItemTemplate>
                                
                                    <asp:Label ID="lblPrName" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("PrName")%>' ></asp:Label><br />
                                         <asp:Label ID="lblMName1" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("ModelName")%>'  ></asp:Label></ItemTemplate>
                                        <EditItemTemplate>
                                 <asp:DropDownList ID="ddlProduct_name" runat="server" Width="150px"
                                  AutoPostBack="true" onselectedindexchanged="ddlProduct_name_SelectedIndexChanged">
                                 </asp:DropDownList>
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlProduct_name" InitialValue="-Select-" ErrorMessage="select product"></asp:RequiredFieldValidator><br />
                                  <asp:DropDownList ID="ddl_modelName" runat="server" Width="150px">
                                 </asp:DropDownList>
                                 
                                 <asp:Label ID="lblPrName_edit" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("PrName")%>'  Visible="false" ></asp:Label><br />
                                         <asp:Label ID="lblMName1_edit" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("ModelName")%>'  Visible="false" ></asp:Label>
                                 
                            </EditItemTemplate>
                        </asp:TemplateField>
                        
                          <asp:TemplateField HeaderText="Product Description">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_enq_Pdescription" runat="server" Text='<%# Eval("Product_Desc")%>'
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:Label></ItemTemplate></asp:TemplateField>
                        
                
                                
                                 <asp:TemplateField HeaderText="Employee Name<br/>Enquiry Grade"><%--Follow up<br/> Remarks--%>
                                    <ItemTemplate>
                                   
                                       <div align="left">
                                        <asp:Label ID="lbl_emp_name" runat="server" Text='<%# Eval("EmpName") %>'></asp:Label>
                                        </div>
                                         <div align="right"  style="width:10px;float:right;">
                                    <asp:Label runat="server" ID="lbl_Quotation_grade" Text='<%# Eval("enq_grade") %>' ForeColor="Red" ></asp:Label>
                                        
                                                </div>

                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lbl_employee_code_val" runat="server" Text='<%# Eval("EMP_code") %>' Visible="false" ></asp:Label>
                                       <%-- <asp:DropDownList ID="ddl_enquiry_employee_update" runat="server">
                                        </asp:DropDownList>--%>
                                          <asp:CheckBoxList ID="ddl_enquiry_employee_update" runat="server" CssClass="regular-checkboxnew">
                    
                                       </asp:CheckBoxList> 
                                        <br />
                                           <asp:Label runat="server" ID="lbl_enquiry_grade_edit" Text='<%# Eval("enq_grade") %>' ForeColor="Red" ></asp:Label>
                                    </EditItemTemplate>
                                    </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="" HeaderStyle-Width="135px"><%-- Follow up <br/>UpdatesFollow up<br/> Remarks--%>
                                    <ItemTemplate>
                                
                                   <asp:HyperLink Text="Update" Font-Size="12px"  runat="server" ID="hl_show_links_enquiry" style="cursor:pointer; color:Blue;"></asp:HyperLink>
                                                                           
                                                <cc1:CollapsiblePanelExtender  ID="collextend_enquiry"
                                                    runat="server"
                                                    CollapseControlID="hl_show_links_enquiry"
                                                    Collapsed="true"
                                                    ExpandControlID="hl_show_links_enquiry" ExpandDirection="Vertical"
                                                    TargetControlID="pnlSubCategories_enquiry">
                                                          
                                                            </cc1:CollapsiblePanelExtender>
                                                            
                                                              <asp:Panel ID="pnlSubCategories_enquiry" runat="server"   CssClass="cpHeader">
                                                           
                                              
                                                   <div align="left" style="padding:0px 0px 0px 0px;margin:0px 0px 0px 0px;" >
                                                    
                                                       <asp:Label ID="lbl_rowid_enquiry" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label>
                                                       <div>
                                                         <asp:LinkButton ID="lnk_convert_enquiry_to_quotation" runat="server"  
                Text="Convert To Quotation" onclick="lnk_convert_enquiry_to_quotation_Click" Font-Underline="false" CommandArgument='<%# Eval("Rowid") %>'
                 OnClientClick="return confirm('Are you sure to convert enquiry to quotation? ')" Font-Size="12px"  ></asp:LinkButton>
                 </div>
                 <div>
                     <asp:LinkButton ID="lnk_create_proforma_invoice_enquiry" runat="server"  
                Text="Create PI" onclick="lnk_create_proforma_invoice_Click" Font-Underline="false" CommandArgument='<%# Eval("Rowid") %>'
                 OnClientClick="return confirm('Are you sure to create enquiry to Proforma Invoice? ')"  Font-Size="12px"  ToolTip="Create Proforma Invoice" ></asp:LinkButton>
                 </div>
                 <div>
                        <asp:LinkButton ID="lnk_convert_Enquiry_to_order" runat="server"  
                Text="Convert To Order" onclick="lnk_convert_Enquiry_to_order_Click" Font-Underline="false" CommandArgument='<%# Eval("Rowid") %>'
                 OnClientClick="return confirm('Are you sure to convert enquiry to order? ')"  Font-Size="12px" ></asp:LinkButton>
                 </div>                                                 
                                 <div>      
                                    <a id="lnkCustomer_Name_enquiry" style="color:Blue;cursor:pointer;font-size:13px;font-family:Verdana;" >
                                                   More Details</a>
                                                      <asp:HiddenField ID="hf_enq_Row_id" runat="server" Value='<%# Eval("Rowid") %>' />
                                                                      
                                                          <%--  <asp:LinkButton ID="lnkCustomer_Name_enquiry" runat="server" 
                                                CommandArgument='<%# Eval("Rowid") %>' CommandName="Enquiry"
                                                Font-Size="11pt" OnClick="lnkCustomer_Name_enquiry_Click" Font-Underline="false"
                                                Text="More Details" Width="100%"></asp:LinkButton>--%>
                                                </div>
                                                
                                             <%--  <div>
                                                   <asp:LinkButton ID="lnk_add_customer_master" runat="server" 
                                                CommandArgument='<%# Eval("Rowid") %>' CommandName="Enquiry"
                                                Font-Size="11pt" OnClick="lnk_add_customer_master_Click" Font-Underline="false"
                                                Text="Add to customer" Width="100%" class="scroll"></asp:LinkButton>
                                                </div>--%>
                                             
                                                
                                                </div>
                                                
                                                
                                                  <asp:LinkButton ID="lnkEdit1" runat="server" CausesValidation="false" CommandName="Edit" Text="Edit" Font-Underline="false"></asp:LinkButton>
            
                <br />
        <asp:LinkButton ID="lnkclose1" runat="server"  Text="Close"   CommandArgument='<%# Eval("Rowid") %>' 
                onclick="lnkclose1_Click" Font-Underline="false" ></asp:LinkButton>
                                                
                                                   </asp:Panel>
                                                <asp:Label ID="lbl_enq_quo_id" runat="server" Text='<% # Eval("enq_quot_id") %>' Visible="false"> </asp:Label>
                                                </ItemTemplate>
                                            <EditItemTemplate>
                                            

         
          <asp:LinkButton ID="lnkUpdate1" runat="server" CausesValidation="true" CommandName="Update" Text="Update" ValidationGroup="upe1"></asp:LinkButton><br />
        <asp:LinkButton ID="lnkcancel1" runat="server" CausesValidation="true" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
    
                                            </EditItemTemplate>
                                                </asp:TemplateField>
                                
             <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="chk" runat="server" oncheckedchanged="chk_CheckedChanged" onclick = "Check(this)"/>
                        </ItemTemplate>
                        <HeaderTemplate >
                        Select All<br />
                            <asp:CheckBox Text="" ID="selectAll" runat="server" AutoPostBack="True" 
                                oncheckedchanged="selectAll_CheckedChanged"  align="Center"  />
                        </HeaderTemplate>
<ItemStyle CssClass="rowstyle" HorizontalAlign="Center" Width="5%" />
                   </asp:TemplateField>
        </Columns><FooterStyle BackColor="LightGoldenrodYellow" />
                    <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                    <HeaderStyle BackColor="#A0A012" Font-Bold="True" />
                    <AlternatingRowStyle BackColor="#F8F4DA" />
                </asp:GridView>
                
                 <div id="div_btn_close" style="width:100%;float:right;margin-bottom:0px"  align="right">
              <asp:Button ID="closedenq" runat="server" CssClass="myButton"  
                    Text="Close Enquiry"  Width="130px" onclick="close_Click"  Visible="false" 
                  /> 
                   <br /><br />
                   <asp:Label ID="lbl_chkenq" runat="server" Text="" ForeColor="Red" Visible="false"></asp:Label>
                    <asp:Label ID="selectrec" runat="server" Text="" ForeColor="Red" Visible="false"></asp:Label> 
             
           </div> 
          <br />
              <div style="width:100%;" id="div_enquiry_pre_next" runat="server" >
          <div style="width:45%;float:left;margin-top:-40px;" align="center">
           <asp:HiddenField ID="hf_from_date_enquiry" runat="server" />
         <asp:HiddenField ID="hf_todate_enquiry" runat="server" />
        
        <asp:HiddenField ID="hf_date_enquiry" runat="server" />
          <asp:HiddenField ID="hf_month_no_enquiry" runat="server" />
            <asp:HiddenField ID="hf_year_no_enquiry" runat="server" />
            
            <asp:Button ID="btn_enquiry_previous_month" runat="server" CssClass="myButton" 
                    Text="Previous Month" ValidationGroup="1" Width="150px" onclick="btn_enquiry_previous_month_Click" 
           /><%--onclick="btn_Previous_week_Click"--%>
          </div>
           <div style="width:45%;float:right;margin-top:-40px;">
              <asp:Button ID="btn_Enquiry_next" runat="server" CssClass="myButton" 
                    Text="Next Month" ValidationGroup="1" Width="100px" 
                   onclick="btn_Enquiry_next_Click" /> <%--onclick="btnNextWeek_Click"--%>
           </div>
          </div>
          
            </asp:Panel>
 </div>

<div id="show_quotation_list_grid">
                    
                    <asp:Panel ID="pnlgvemp" runat="server" >
    
       
        <div align="right" style="margin-right:200px;">
     <asp:Label ID="lbl_quotation_up_dele_msg" runat="server" Text="" Font-Bold="true" ForeColor="Red"></asp:Label>
 </div>
       
   <asp:GridView ID="gvEmp" runat="server" AutoGenerateColumns="False" 
                            GridLines="Both"  Width="100%"
                            BackColor="LightGoldenrodYellow" BorderColor="Tan" 
              BorderWidth="1px"  AllowPaging="true" PageSize="30"
                    CellPadding="2" Font-Names="vani" Font-Size="13px" ForeColor="Black" 
              PagerStyle-CssClass="paging" onpageindexchanging="gvEmp_PageIndexChanging" CssClass="Quotation_grid_css"
               onrowediting="gvEmp_RowEditing" 
        onrowcancelingedit="gvEmp_RowCancelingEdit" 
        onrowupdating="gvEmp_RowUpdating"
        RowStyle-BorderWidth="1px"  onrowdatabound="gvEmp_RowDataBound" >
                            
                            <RowStyle BorderWidth="1px" Height="20px" />
                            
                            <Columns>
                            
                        
                                  <asp:TemplateField HeaderText="Enquiry No <br/> Enquiry Date">
                                    <ItemTemplate>  
                                  <asp:Label ID="lbl_pdf" runat="server" Text='<%# Eval("pdf_url")%>' Width="50px" Visible="false" ></asp:Label>
                                                                   
                                      <asp:Label ID="lbl_cid_zero_check" runat="server" Text='<%# Eval("cid") %>' Visible="false"></asp:Label>
                                                <asp:Label ID="lblEnquiry_no" runat="server" Text='<%# Eval("quotation_enquiry_no")%>'
                                                ReadOnly="true" Width="90px"></asp:Label>
                                                <br />
                                                 <asp:Label ID="lblSendingDate1" runat="server" Text='<%# Eval("EnquiredDate11")%>'
                                               ReadOnly="true" Width="90px"></asp:Label>
                                                          <asp:Label ID="lbl_quo_rowid" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label>                                       
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                <asp:Label ID="lbl_quo_rowid1" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label>
                                                  <asp:Label ID="lblEnquiry_no_edit" runat="server" Text='<%# Eval("quotation_enquiry_no")%>'
                                                Width="100%" ReadOnly="true" ></asp:Label>
                                                <br />
                                                 <asp:Label ID="lblSendingDate1_edit" runat="server" Text='<%# Eval("EnquiredDate11")%>'
                                                Width="100%" ReadOnly="true" ></asp:Label>
                                                
                                    <asp:TextBox ID="txt_Reference" runat="server" Text='<%# Eval("reference")%>'  Width="80px" Visible="false" ></asp:TextBox>
                                    
                                    </EditItemTemplate>
                                    
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Quotation No <br/>Quotation Date" >
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_quotation_no" runat="server" Text='<% # Eval("enq_quo_no") %>'></asp:Label>
                                        
                                        <asp:Label ID="lblRowid_quotation" runat="server" Text='<%# Eval("Rowid")%>' Width="6%" Visible="false"></asp:Label><br />   
                                        <asp:Label ID="lbl_quotation_date" runat="server" Text='<% # Eval("enq_quo_date", "{0:dd-MM-yyyy}")%>'></asp:Label>
                                      
                                        </ItemTemplate></asp:TemplateField>
                                        <asp:TemplateField HeaderText="Customer<br/> Reference No" >
                            <ItemTemplate>
                             
                                    <asp:Label ID="lblCust_ref_no_quo" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("reference")%>' Width="100px"></asp:Label></ItemTemplate>
                                        </asp:TemplateField>
                            
                            <asp:TemplateField HeaderText="Customer Name <br/>Person Name">
                                    <ItemTemplate>
                                                 
                                        <asp:Label ID="lbl_cust_name_quot" runat="server"  Text='<%# Eval("CName") %>'></asp:Label>                                   
                                              
                                                <br /> <asp:Label ID="lblQuoteSendToPName6" runat="server" Text='<%# Eval("PName")%>'
                                                Width="100%" ReadOnly="true" CssClass="font"></asp:Label></ItemTemplate>
                                                
                                                <EditItemTemplate>
                                                  <asp:Label ID="llbl_cust_name" runat="server" Text='<% # Eval("CName") %>' ></asp:Label><br />
                                                    <asp:Label ID="lbl_cid" runat="server" Text='<%# Eval("cid") %>' Visible="false"></asp:Label>
                                                    <asp:DropDownList ID="ddl_update_customer_to_quotation" runat="server" DataTextField="NameAndCity" DataValueField="CID" Width="150px">
                                                    </asp:DropDownList>
                                                    <br />
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator24" runat="server" ControlToValidate="ddl_update_customer_to_quotation" 
                                                    ErrorMessage="Select Customer Name" InitialValue="-Select-" ValidationGroup="quoU1"></asp:RequiredFieldValidator>
                                                                                              
                                                  
                                                  <br />
                                        <asp:TextBox ID="txt_person_name" runat="server" Text='<%# Eval("PName")%>' Width="130px"> </asp:TextBox>
                                        <br />
                                         <asp:RequiredFieldValidator ID="RequiredFieldValidatortxt_person_name" runat="server" ControlToValidate="txt_person_name" 
                                                    ErrorMessage="Enter Person Name"  ValidationGroup="quoU1"></asp:RequiredFieldValidator>
                                        
                                    </EditItemTemplate>
                                                
                                                </asp:TemplateField>
                             
                               <asp:TemplateField HeaderText="Email Id <br> Mobile No" >
                            <ItemTemplate>
                      
                                    <asp:Label ID="lblPrEmail11_quo" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("PEmail_id")%>' ></asp:Label>
                                        <br />
                                          <asp:Label ID="lblPrMobilequo" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("PMobile_No")%>' ></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                       
                               
                                <asp:TextBox ID="txt_PrEmail_id_quo" runat="server" Text='<%# Eval("PEmail_id")%>'  Width="180px"></asp:TextBox>
                                 <asp:RequiredFieldValidator ID="Requiredlidatortxt_PName_enq_quo" runat="server" ControlToValidate="txt_PrEmail_id_quo"
                                             ErrorMessage="Enter Email Id" ValidationGroup="upe1"></asp:RequiredFieldValidator>
                                             <br />
                                                 <asp:TextBox ID="txt_PrMobile_No_quo" runat="server" Text='<%# Eval("PMobile_No")%>'  Width="180px" MaxLength="12"></asp:TextBox>
                                                 <cc1:FilteredTextBoxExtender runat="server" ID="ftbe_textbox" TargetControlID="txt_PrMobile_No_quo" FilterType="Numbers" ></cc1:FilteredTextBoxExtender>
                                 <asp:RequiredFieldValidator ID="Requiredlidatortxt_PName_enq_mob_quo" runat="server" ControlToValidate="txt_PrMobile_No_quo"
                                             ErrorMessage="Enter  Mobile No" ValidationGroup="upe1"></asp:RequiredFieldValidator>
                                
                                </EditItemTemplate>
                                
                                </asp:TemplateField>
                               
                               <%--
                                        <asp:TemplateField HeaderText="Mobile No" >
                            <ItemTemplate>
                      
                                    <asp:Label ID="lblPrMobilequo" runat="server" CssClass="font" 
                                        ReadOnly="true" Text='<%# Eval("PMobile_No")%>' ></asp:Label>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                       
                               
                                <asp:TextBox ID="txt_PrMobile_No_quo" runat="server" Text='<%# Eval("PMobile_No")%>'  Width="180px"></asp:TextBox>
                                 <asp:RequiredFieldValidator ID="Requiredlidatortxt_PName_enq_mob_quo" runat="server" ControlToValidate="txt_PrMobile_No_quo"
                                             ErrorMessage="Enter  Mobile No" ValidationGroup="upe1"></asp:RequiredFieldValidator>
                                
                                </EditItemTemplate>
                                
                                </asp:TemplateField>
                             --%>
                                                

                                   
                                   <asp:TemplateField HeaderText="District/City <br/>State">
                                   <ItemTemplate>
                                   <asp:Label ID="lbldistrict" runat="server" Text='<%# Eval("district")%>'
                                                Width="100%" ReadOnly="true" CssClass="font"></asp:Label><br />
                                                 <asp:Label ID="lblQuoteSendToPName5" runat="server" Text='<%# Eval("CrState")%>'
                                                Width="100%" ReadOnly="true" CssClass="font"></asp:Label></ItemTemplate>
                                                
                                                <EditItemTemplate>
                                                
                                                  <asp:DropDownList ID="ddldistrict_quotation" runat="server" Width="150px">
                                 </asp:DropDownList>
                                  <asp:Label ID="lbllead_city_edit_quottion" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("district")%>'  Visible="false" ></asp:Label>
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2_quo" runat="server" ControlToValidate="ddldistrict_quotation" 
                                 InitialValue="-Select-" ErrorMessage="select District"></asp:RequiredFieldValidator> 

                                <br />
                                <asp:DropDownList ID="ddl_quotation_state" runat="server" Width="150px">
                                 </asp:DropDownList>
                                <asp:Label ID="lblstate_quotation" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("CrState")%>'  Visible="false" ></asp:Label>
                                                
                                                </EditItemTemplate>
                                                </asp:TemplateField>
                                            
                                   
                                                <asp:TemplateField HeaderText="Product Name <br/>Model Name">
                                    <ItemTemplate>
                                     
                                         <asp:Label ID="lblPGroupName2" runat="server" Text='<%# Eval("[PrName]")%>'
                                                Width="100%" ReadOnly="true" CssClass="font"></asp:Label><br /><asp:Label ID="lblMName3" runat="server" Text='<%# Eval("[ModelName]")%>'
                                                Width="100%" ReadOnly="true" CssClass="font"></asp:Label></ItemTemplate>
                                                
                                                <EditItemTemplate>
                                                <asp:DropDownList ID="ddlProduct_name_quotation" runat="server" Width="150px"
                                  AutoPostBack="true" onselectedindexchanged="ddlProduct_name_quotation_SelectedIndexChanged">
                                 </asp:DropDownList>
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2_quotation" runat="server" ControlToValidate="ddlProduct_name_quotation" InitialValue="-Select-" ErrorMessage="select product"></asp:RequiredFieldValidator><br />
                                  <asp:DropDownList ID="ddl_modelName_quotation" runat="server" Width="150px">
                                 </asp:DropDownList>
                                 
                                 <asp:Label ID="lblPrName_edit_quotation" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("PrName")%>'  Visible="false" ></asp:Label><br />
                                         <asp:Label ID="lblMName1_edit_quotation" runat="server" CssClass="font"
                                        ReadOnly="true" Text='<%# Eval("ModelName")%>'  Visible="false" ></asp:Label>
                                                
                                                </EditItemTemplate>
                                                
                                                </asp:TemplateField>
                                                
                                                
                                         <asp:TemplateField HeaderText="Product Description">
                                    <ItemTemplate>
                                        <asp:Label ID="lblPdescription" runat="server" Text='<%# Eval("Product_Desc")%>'
                                                Width="150px" ReadOnly="true" CssClass="font"></asp:Label></ItemTemplate></asp:TemplateField>
                                                
                                       
                                                                         
                                                                    
                                          <asp:TemplateField HeaderText="Employee Name<br/>Quotation Grade"><%--Follow up<br/> Remarks--%>
                                    <ItemTemplate>
                                   
                                       <div align="left">
                                        <asp:Label ID="lbl_emp_name" runat="server" Text='<%# Eval("EmpName") %>'></asp:Label>
                                        </div>
                                         <div align="right"  style="width:10px;float:right;">
                                    <asp:Label runat="server" ID="lbl_Quotation_grade" Text='<%# Eval("enq_grade") %>' ForeColor="Red" ></asp:Label>                                        
                                                </div>

                                    </ItemTemplate>
                                    
                                     <EditItemTemplate>
                                        <asp:Label ID="lbl_employee_code_val_quotation" runat="server" Text='<%# Eval("EMP_code") %>' Visible="false" ></asp:Label>
                                     
                                         <asp:CheckBoxList ID="ddl_quotation_employee_update" runat="server" CssClass="regular-checkboxnew">
                                        </asp:CheckBoxList>
                                        <br />
                                           <asp:Label runat="server" ID="lbl_quotation_grade_edit" Text='<%# Eval("enq_grade") %>' ForeColor="Red" ></asp:Label>
                                    </EditItemTemplate>
                                    </asp:TemplateField>
                                         
                                          
                                          
                                          <asp:TemplateField HeaderText="" HeaderStyle-Width="135px">
                                    <ItemTemplate>
                                    <asp:HyperLink Text="Update" Font-Size="12px"  runat="server" ID="hl_show_links" style="cursor:pointer; color:Blue;"></asp:HyperLink>
                                                                           
                                                <cc1:CollapsiblePanelExtender  ID="collextend"
                                                    runat="server"
                                                    CollapseControlID="hl_show_links"
                                                    Collapsed="true"
                                                    ExpandControlID="hl_show_links" ExpandDirection="Vertical"
                                                    TargetControlID="pnlSubCategories">
                                                          
                                                            </cc1:CollapsiblePanelExtender>
                                                            
                                                              <asp:Panel ID="pnlSubCategories" runat="server"  CssClass="cpHeader" >
                                                <div  align="left" style="padding:0px 0px 0px 0px;margin:0px 0px 0px 0px;">                                             
                                            
                                            <div>
                          <asp:LinkButton ID="lnk_Revise_Quotation" runat="server" 
                                                CommandArgument='<%# Eval("Rowid") %>' CommandName="Select" 
                                                Font-Size="12px" OnClick="lnk_Revise_Quotation_Click" Font-Underline="false"
                                                Text="Revise Quotation" Width="100%" ></asp:LinkButton>
                                                 </div>
                                                 <div>                                      
                                                      <asp:HyperLink ID="hyper_pdflink" runat="server" Font-Bold="false" Text="Quotation PDF" Width="100%"
                                NavigateUrl='<%# Eval("pdf_url")%>' Target="_blank" Font-Underline="false" ForeColor="Blue" 
                                 style="" Visible="true"  Font-Size="12px"></asp:HyperLink>                             
                                 </div>
                                       <div>
                                       <asp:LinkButton ID="lnk_create_proforma_invoice" runat="server"  
                Text="Create PI" onclick="lnk_create_proforma_invoice_Click" Font-Underline="false" CommandArgument='<%# Eval("Rowid") %>'
                 OnClientClick="return confirm('Are you sure to create quotation to Proforma Invoice? ')"  Font-Size="12px"  ToolTip="Create Proforma Invoice" ></asp:LinkButton>
                                            </div>
                                                         <asp:LinkButton ID="lnk_convert_Quotation_to_order" runat="server"  
                Text="Convert To Order" onclick="lnk_convert_Quotation_to_order_Click" Font-Underline="false" CommandArgument='<%# Eval("Rowid") %>'
                 OnClientClick="return confirm('Are you sure to convert quotation to order? ')"   Font-Size="12px"  ></asp:LinkButton>
                  
                                                    <asp:Label ID="lbl_rowid_e_q" runat="server" Text='<%# Eval("Rowid") %>' Visible="false"></asp:Label>
                                              <%--  <asp:LinkButton ID="lnkCustomer_Name_Quotation" runat="server" 
                                                CommandArgument='<%# Eval("Rowid") %>' CommandName="Quotation" 
                                                Font-Size="11pt" OnClick="lnkCustomer_Name_Quotation_Click" Font-Underline="false"
                                                Text="More Details" Width="100%"></asp:LinkButton>--%>
                                                  <br />
                                                
                                                 <a id="lnkCustomer_Name_Quotation" style="color:Blue;cursor:pointer;font-size:13px;font-family:Verdana;" >
                                                   More Details</a>
                                                      <asp:HiddenField ID="hf_enq_quot_Row_id" runat="server" Value='<%# Eval("Rowid") %>' />
                                              
                                              <%--  <asp:LinkButton ID="lnk_add_customer_master1" runat="server" 
                                                CommandArgument='<%# Eval("Rowid") %>' CommandName="Quotation"
                                                Font-Size="11pt" OnClick="lnk_add_customer_master_Click" Font-Underline="false"
                                                Text="Add to customer" Width="100%"></asp:LinkButton>--%>
                                              
          
                                                <br />
                                                <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="false" CommandName="Edit" Text="Edit" Font-Underline="false"></asp:LinkButton>
          
                <br />
        <asp:LinkButton ID="lnkclose" runat="server"  Text="Close"   CommandArgument='<%# Eval("Rowid") %>'  Font-Underline="false"
                onclick="lnkclose_Click" ></asp:LinkButton>
                
                
                                                
                                             
                                                
                                                
                                     
                                                </div>
                                                
                                                
                                                <asp:Label ID="lbl_enq_quo_id" runat="server" Text='<% # Eval("enq_quot_id") %>' Visible="false"> </asp:Label>
                                                
                                                </asp:Panel>
                                                </ItemTemplate>
                                                                     
                                                                     <EditItemTemplate>
                                                                     
       <asp:LinkButton ID="lnkUpdate" runat="server" CausesValidation="true" CommandName="Update" Text="Update"  ValidationGroup="quoU1"></asp:LinkButton><br />
        <asp:LinkButton ID="lnkcancel" runat="server" CausesValidation="true" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                                                     </EditItemTemplate>                  
                                                </asp:TemplateField>
                                              
           <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="chk_Quotation" runat="server" oncheckedchanged="chk_Quotation" onclick = "Check(this)"/>
                        </ItemTemplate>
                        <HeaderTemplate >
                        Select All<br />
                            <asp:CheckBox  Text="" ID="selectAll1_Quotation" runat="server" AutoPostBack="True" 
                                oncheckedchanged="selectAll_Quotation" align="Center" />
                        </HeaderTemplate>
<ItemStyle CssClass="rowstyle" HorizontalAlign="Center" Width="5%" />
                   </asp:TemplateField>
        </Columns><FooterStyle BackColor="LightGoldenrodYellow" />
                    <PagerStyle BackColor="LightGoldenrodYellow" ForeColor="#FFC46A" 
                        HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#FFCF88" ForeColor="GhostWhite" />
                    <HeaderStyle BackColor="#A0A012" Font-Bold="True" />
                    <AlternatingRowStyle BackColor="#F8F4DA" />
                        </asp:GridView>
                              <div style="width:100%;float:right;margin-bottom:0px" visible="false" align="right">
              <asp:Button ID="close_quotation" runat="server" CssClass="myButton"  Visible="false"
                    Text="Close Quotation"  Width="130px" onclick="close_quotation_Click" 
                  /> 
                   <br /><br />
                   <asp:Label ID="lbl_chkquo" runat="server" Text="" ForeColor="Red" Visible="false"></asp:Label> 
                   <asp:Label ID="lbl_quot" runat="server" Text="" ForeColor="Red" Visible="false"></asp:Label> 
             
           </div> 
                        <br />
    
         <div style="width:100%;" id="div_quotation_previ_next" runat="server">
          <div style="width:45%;float:left;margin-top:-43px;" align="center">
           <asp:HiddenField ID="hf_from_date_quotation" runat="server" />
         <asp:HiddenField ID="hf_todate_quotation" runat="server" />
        
        <asp:HiddenField ID="hf_date_quotation" runat="server" />
          <asp:HiddenField ID="hf_month_no_quotation" runat="server" />
            <asp:HiddenField ID="hf_year_no_Quotation" runat="server" />
            
            <asp:Button ID="btn_Quotation_previous" runat="server" CssClass="myButton" 
                    Text="Previous Month" ValidationGroup="1" Width="150px" onclick="btn_Quotation_previous_Click" 
           /><%--onclick="btn_Previous_week_Click"--%>
          </div>
           <div style="width:45%;float:right;margin-top:-43px;">
              <asp:Button ID="btn_quotation_next" runat="server" CssClass="myButton" 
                    Text="Next Month" ValidationGroup="1" Width="100px" 
                   onclick="btn_quotation_next_Click" /> <%--onclick="btnNextWeek_Click"--%>
           </div>
          </div>
    
    
 </asp:Panel>
 </div>
 
  <asp:Button ID="btn_leave_addvisit" runat="server" style="display:none" />
<cc1:modalpopupextender ID="ModalPopupExtender_delete_close" 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" style="display:none" 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">  
<a href = "javascript:void(0)" onclick = "closepopup()"><img src="../Images/Close.gif" alt="Close" style="border :0px" align="right"/></a>
  </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:HiddenField ID="hf_lead_quo_enq_type" runat="server" />
    <asp:DropDownList ID="ddl_delete_close_reason" runat="server" AppendDataBoundItems="true">
    </asp:DropDownList>
   <%-- <asp:TextBox ID="txt_delete_close_reason" runat="server" TextMode="MultiLine" Width="90%" Height="30px"></asp:TextBox>--%>
    
    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" 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;
</td>
</tr>
<%--<tr>
<td align="center" style="padding-right:15px; background-color:White;" >
 <b style="color:Green;">[Add Visit]</b> 
</td>
<td align="center" style="padding-right:15px; background-color:White;" >
   <b style="color:Green;">[Leave] </b>
</td>
</tr>--%>
</table>

</asp:Panel>


<br />




    <asp:Button ID="btn_popup21" runat="server" style="display:none;" Text="Popup" />
                <cc1:ModalPopupExtender ID="model_popup_show_cust_person_info" runat="server" 
                     PopupControlID="pnlCrDetails" BehaviorID="enq_quot_popup"
                    TargetControlID="btn_popup21" BackgroundCssClass="modelbackground">
                </cc1:ModalPopupExtender>
         <asp:Panel ID="pnlCrDetails" runat="server" CssClass="categorypanel" Width="50%" style="margin-left:0px;margin-top:10px;height:400px;overflow:auto;"> 
        
        <table width="100%" style="border:Solid 2px #D46900; width:100%; height:70%" cellpadding="0" cellspacing="0">
<tr style="background-image:url(../Images/header.gif)">
<td style="height:8px; color:White; font-weight:bold;padding:3px; font-size:larger; font-family:Calibri" align="left">More Details</td>
<td style=" color:White; font-weight:bold;padding:3px; font-size:larger" align="right">  
   
    <a  id="ImageButton1">
<img  src="../Images/Close.gif" alt="Close" style="border :0px" align="right"/>
</a>

  </td>
</tr>
<tr>
<td colspan="2">


  &nbsp; <asp:Label ID="Label71" runat="server" Text="Customer Name :" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
            ForeColor="#cc0000" ></asp:Label>
  <asp:Label ID="lbl_customer_name_val" runat="server" Text="" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
             ></asp:Label><br />
           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;   <asp:Label ID="Label84" runat="server" Text="Person Name :" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
            ForeColor="#cc0000" ></asp:Label>
              <asp:Label ID="lbl_person_name_val" runat="server" Text="" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
             ></asp:Label>
             
               <br />
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; 
                <asp:Label ID="Label68" runat="server" Text="Phone No :" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
            ForeColor="#cc0000" ></asp:Label>
              <asp:Label ID="lbl_Pone_No" runat="server" Text="" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
             ></asp:Label>
        

  <div runat="server" id="follwup_update_submit">
 
 
     <table width="100%">
         <tr>
        <td></td>
        <td></td>
        <td>
      <h2>Add Follow up updates</h2>
        </td>
         <td></td>
        </tr>
        <tr>
        <td></td>
        <td></td>
        <td></td>
         <td></td>
        </tr>
        <tr>
        <td align="right">Person Name</td>
        <td><b style="color:Red;">*</b></td>
        <td>
         <asp:TextBox ID="txt_person_name_discussion" runat="server"  
             Width="200px"  ></asp:TextBox>

        </td>
         <td>            <asp:RequiredFieldValidator ID="RequiredFieldValidator37" runat="server" ErrorMessage="Enter Person Name" ControlToValidate="txt_person_name_discussion" ValidationGroup="dd1" ForeColor="Red" ></asp:RequiredFieldValidator>
</td>
        </tr>
        
          <tr>
        <td align="right">
         Outcome of visit/Call 
        </td>
        <td>
     
      <b style="color:Red;">*</b>
        </td>
        <td>
            <asp:TextBox ID="txt_outcome_visit_call" runat="server" TextMode="MultiLine" 
                Height="49px"></asp:TextBox>
                <br />
                  <asp:RequiredFieldValidator ID="RequiredFieldValidator36" runat="server" ErrorMessage="Enter Discussion description" ControlToValidate="txt_outcome_visit_call" ValidationGroup="dd1" ForeColor="Red" ></asp:RequiredFieldValidator>
        </td>       
         <td  align="right">
         
 <div id="div_show_next_followup_heading">
              <asp:Label ID="lbltxtdate" runat="server" CssClass="lb" Font-Names="Verdana" 
                    Font-Size="14px" Text=" Next followup Date " ></asp:Label>
                    </div>                   
                  
                    </td>
                     <td>
      <div id="div_star">
      <b  id="star"  runat="server" style="color:Red;" >*</b>
      </div>
        </td>
                                      <td>
                                          <div id="div_followup_date_textbox">
             <asp:TextBox ID="txtDate11" runat="server"  Width="100px" ></asp:TextBox>
             
             <cc1:CalendarExtender ID="CalendarExtender3" runat="server"
                    Enabled="True" TargetControlID="txtDate11" Format="dd-MMM-yyyy">
                </cc1:CalendarExtender>
              &nbsp;&nbsp;  
          <asp:RequiredFieldValidator ID="rfq_next_followup_date" runat="server" ErrorMessage="Enter Date" 
          ControlToValidate="txtDate11" ValidationGroup="dd1" ForeColor="Red"  ></asp:RequiredFieldValidator>
          </div>
          </td>
       
        </tr>
                <tr>
        <td></td>
        <td></td>
        <td></td>
        </tr>
                <tr>
        <td></td>
        <td></td>
        <td align="center">
        
          <input type="button" value="Submit" id="btn_Submit_follwuo_update"  class="myButton"  validationgroup="dd1" style="width:100px;" />
           <%-- <asp:Button ID="btn_Submit_follwuo_update" runat="server" Text="Submit" 
                CssClass="myButton" ValidationGroup="dd1" Width="100px" 
                onclick="btn_Submit_follwuo_update_Click"/>--%>
        </td>
         <td></td>
        </tr>
        <tr>
        <td></td>
         <td></td>
          <td>
              <asp:Label ID="lbl_followup_msg" runat="server" Text="" ForeColor="Red" Font-Bold="true"></asp:Label>
          </td> <td></td>
        </tr>
        </table>
      
       <div style="margin-left:5px;margin-right:5px;margin-top:6px;">
       
       <div id="div_enq_quot_product_show">
         <asp:Label ID="lbl_enq_quotation_no_date_heading" runat="server" Text="" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
            ForeColor="#cc0000"></asp:Label>
            <br />    
            <div id="div_Regular_quotation_products">     
            
             <table id="tableRegular_quotation_products" border='0.5px' style="border-color:Black;" width="100%">
<tr style="background-color:#A0A012;"><th>Product Group Name</th><th>Product Name</th><th>Model Name</th><th>Product Description</th><th>Quantity</th><th>Price</th><th>Discount(%)</th><th>Total</th> <th id="th_re_mark">Remarks</th></tr>
<tbody id="Regular_quotation_products" style="background-color:LightGoldenrodYellow;">

</tbody>
</table>
   
        </div>
        <div id="div_Budgetary_Offer">
        
        
        <table id="table_Budgetary_Offer_items" border='0.5px' style="border-color:Black;" width="100%">
<tr style="background-color:#A0A012;"><th>Product Group Name</th><th>Product Name</th><th>Model Name</th><th>Product Description</th><th>Quantity1</th><th>Price1</th><th>Quantity2</th><th>Price2</th><th>Quantity3</th><th>Price3</th><th>Tax (%)</th></tr>
<tbody id="Budgetary_Offer_items" style="background-color:LightGoldenrodYellow;">

</tbody>
</table>
   
        
        </div>
        </div>
        
            <asp:HiddenField ID="hf_quotatio_enquiry_lead_id" runat="server" />
        
             <div style="margin-left:5px;margin-right:5px;">
            <asp:HiddenField ID="HiddenField1" runat="server" />
           &nbsp;&nbsp;&nbsp;  
           
           
           <div id="div_remark_new"> 
              <asp:Label ID="lbl_remarks" runat="server" Text="Remarks" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
            ForeColor="#cc0000" ></asp:Label>
           
                  <table id="tb_remarks_new" border='0.5px' style="border-color:Black;" width="80%">
<tr style="background-color:#A0A012;"><th>Remarks</th></tr>
<tbody id="leadremarklist" style="background-color:LightGoldenrodYellow;">
</tbody>
</table>

           </div>
           
           
           
             <div id="div_lead_followup">
             
            <asp:Label ID="lbl_leads_followup_heading" runat="server" Text="Lead Follow up" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
            ForeColor="#cc0000" ></asp:Label>
            
            
              <table id="lead_follow_table" border='0.5px' style="border-color:Black;" width="100%">
<tr style="background-color:#A0A012;"><th>Date</th><th>Reported By</th><th>Person Name</th><th>Outcome</th></tr>
<tbody id="Leadlist" style="background-color:LightGoldenrodYellow;">

</tbody>
</table>
</div>
            
            
   
            <br />
            
            
              <div id="div_enquiry_foollowup"> 
               <asp:Label ID="lbl_enquiry_followup_updates" runat="server" Text="Enquiry Follow up" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
                ForeColor="#cc0000" ></asp:Label>
               <table id="enq_followup_table" border='0.5px' style="border-color:Black;" width="100%">
<tr style="background-color:#A0A012;"><th>Date</th><th>Reported By</th><th>Person Name</th><th>Outcome</th></tr>
<tbody id="Enquirylist" style="background-color:LightGoldenrodYellow;">

</tbody>
</table>
     
            </div>
            
            
                 
            <br />
            
            
            
              <div id="div_Quotation_followup"> 
           <asp:Label ID="lbl_Quotation_followup_heading" runat="server" Text="Quotation Follow up" Font-Bold="true" Font-Size="14px" Font-Names="Verdana" ForeColor="#cc0000" > </asp:Label>
           
            <table id="quotation_follow_table" border='0.5px' style="border-color:Black;" width="100%">
<tr style="background-color:#A0A012;"><th>Date</th><th>Reported By</th><th>Person Name</th><th>Outcome</th></tr>
<tbody id="Quotationlist" style="background-color:LightGoldenrodYellow;">

</tbody>
</table>
           
        
    
            </div>
            
            
   
            
            
            
            </div>
       </div>
       <br />
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   
                
                 <input type="button" id="btn_popup_close" value="Close" class="myButton" style="width:108px" /> 
                        
       <br /><br />
       </div>
       </td></tr></table>

    </asp:Panel>  
<asp:HiddenField ID="en_person_id" runat="server" />
  <asp:HiddenField ID="hf_enquiry_rowid_close" runat="server" /> 
      <asp:HiddenField ID="hf_flag_quotation" runat="server" /> 
        <asp:HiddenField ID="hf_flag_enquiry" runat="server" /> 
           <asp:HiddenField ID="hf_status" runat="server" />
         <asp:HiddenField ID="hf_convert_enq_pid" runat="server" /> 
      <asp:HiddenField ID="hf_connvert_EMP_code" runat="server" /> 
        <asp:HiddenField ID="hf_connvert_CID" runat="server" /> 
         <asp:HiddenField ID="hf_convert_to_quotation" runat="server" /> 

  <asp:HiddenField ID="en_qu_lead" runat="server" /> 
  
  
  
  
  
  
  
<asp:Button ID="btn_assign_emp" runat="server" style="display:none;" Text="Popup" />
  <cc1:ModalPopupExtender ID="model_popup_show_assign_emp" runat="server" 
                     PopupControlID="pnlempassign_update"  BehaviorID="Quotation_assign_emp_update"
                    TargetControlID="btn_assign_emp" BackgroundCssClass="modelbackground">
                </cc1:ModalPopupExtender>
                
                  <asp:Panel ID="pnlempassign_update" runat="server" CssClass="categorypanel" Width="35%" style="margin-left:0px;margin-top:10px;height:200px;overflow:auto;"> 
        
        <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:8px; color:White; font-weight:bold;padding:3px; font-size:larger; font-family:Calibri" align="left">Assign employees</td>
<td style=" color:White; font-weight:bold;padding:3px; font-size:larger" align="right">  
   
    <a  id="btn_popup_close_edit">
<img  src="../Images/Close.gif" alt="Close" style="border :0px" align="right"/>
</a>

  </td>
</tr>
<tr>
<td colspan="2" align="center">
<div id="SomeDiv">


<asp:CheckBoxList ID="chk_quotation_employee_update" runat="server" CssClass="regular-checkboxnew" DataValueField="ECode" DataTextField="EName" >
   <asp:ListItem Text="AT89S51" Value="0"></asp:ListItem>

                                        </asp:CheckBoxList>
                                        </div>
</td>
</tr>
<tr>
<td>
 <input type="button" id="close_popup_edit" value="Close" class="myButton" style="width:108px" /> 
</td>
<td >
       <input type="button" id="update_assign_employee_quotation" value="Update" class="myButton" style="width:108px" /> 

</td>
</tr>
</table>
</asp:Panel>
  
  
  
    <asp:Button ID="btn_popup2100" runat="server" style="display:none" />
           
                <cc1:ModalPopupExtender ID="mp1" runat="server" 
                     PopupControlID="AddnwProduct"  
                    TargetControlID="btn_popup2100" BackgroundCssClass="modelbackground">
                </cc1:ModalPopupExtender>


                
                  <asp:Panel ID="AddnwProduct" runat="server"  CssClass="shadow_five222" 
                 Width="794px">
                  <table style="width:90%">
                  <tr>
                  <td class="style58" ><asp:Label ID="Label3" runat="server" Text="Product Group Name " CssClass="lb"
                     Font-Names="Verdana" Font-Size="14px" ></asp:Label></td>
                    <td>
                     <asp:Label ID="Label9" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red" Text="*"></asp:Label>
                    </td>
                    <td>    
                      <asp:DropDownList ID="ddlgroupname_list" runat="server" AppendDataBoundItems="True" 
                    AutoPostBack="true" 
                    onselectedindexchanged="ddlgroupname_list_SelectedIndexChanged">
                </asp:DropDownList>
                    <asp:TextBox ID="txtGroupName" Visible="false" runat="server"  Width="240px"></asp:TextBox>
                        &nbsp;&nbsp;&nbsp;
                    <asp:LinkButton ID="btnAddgroupnam" runat="server" Text="Add New" 
                    onclick="btnAddgroupname_Click"   />
                    &nbsp;&nbsp;
                <asp:LinkButton ID="btnshowexist" runat="server"  
                    Text="Show Product Group Names " onclick="btnshowexist_Click" />
                    
                    </td>
                    <td align="Right" style="margin-left:50%;"> <asp:LinkButton ID="Linknewproductclose" runat="server" 
                        onclick="Linknewproductclose_Click"> <img src="../Images/close_box_red.png" Height="29" 
                id="img3"/></asp:LinkButton></td></tr><tr>
                  <td class="style58">
                  <asp:Label ID="Label19" runat="server" Text="Product Name " CssClass="lb"
                     Font-Names="Verdana" Font-Size="14px" ></asp:Label>
                     
                     </td><td>
                      <asp:Label ID="Label10" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red" Text="*"></asp:Label></td>
                    <td> 
                     <asp:DropDownList ID="ddlPName" runat="server" AppendDataBoundItems="True" 
                    AutoPostBack="true" 
                onselectedindexchanged="ddlPName_SelectedIndexChanged" style="height: 25px">
                </asp:DropDownList>
                    <asp:TextBox ID="txtPName"  Visible="false" runat="server"  Width="250px"></asp:TextBox>
                     &nbsp; &nbsp;
                   <asp:LinkButton ID="btnAddProductName" runat="server" Text="Add New" onclick="btnAddProductName_Click" 
                      />
                 &nbsp;&nbsp;
                <asp:LinkButton ID="btnExistproduct" runat="server" 
                    Text="Show Product Names " onclick="btnExistproduct_Click" />
                    </td>
                  </tr>
                  <tr>
                  <td class="style58">
                   <asp:Label ID="Label11" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Model Name "></asp:Label></td><td> 
                    <asp:Label ID="Label30" runat="server" Font-Names="Verdana" Font-Size="14px" 
                    ForeColor="Red" Text="*"></asp:Label>
                    
                    </td><td> <asp:HiddenField ID="hf_model_name_exist" runat="server" />
                    
                
                <asp:TextBox ID="txtMName" runat="server"
                    Width="250px" AutoPostBack="True" ontextchanged="txtMName_TextChanged"></asp:TextBox>
                    <br />
                     <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                ControlToValidate="txtMName" ErrorMessage="Enter Model Name" ValidationGroup="3"></asp:RequiredFieldValidator>
                    <div id="div1">
                      </div>
                       <cc1:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server" TargetControlID="txtMName" ServiceMethod="Getproduct_wise_Model_name_CompletionList"
                        ServicePath="~/Admin/AutoComplete_Model_Name.asmx" MinimumPrefixLength="1"
    EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000"  
    CompletionListElementID="divwidth1"
     CompletionListCssClass="AutoExtender"
      CompletionListItemCssClass="AutoExtenderList"
    CompletionListHighlightedItemCssClass="AutoExtenderList" > </cc1:AutoCompleteExtender>

            
                    </td>
                    
                  </tr>
                  <tr>
                  <td>
                   <asp:Label ID="Labelmake" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Product Make"></asp:Label></td><td></td>
                  <td>    
                      <asp:TextBox ID="txt_product_make" runat="server" 
                    Width="250px" ></asp:TextBox>
                    </td>
                    </tr>
                    <tr>
                  <td><asp:Label ID="Labelcode" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Product Code"></asp:Label>
                    
                    </td><td></td>
                    <td> 
                    
                        <asp:TextBox ID="txt_product_code" runat="server" 
                    Width="166px"  ></asp:TextBox>
                    
                    </td></tr><tr>
                  <td>
                   <asp:Label ID="Label31" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Product Description"></asp:Label>
                    
                    </td><td></td>
                    <td> 
                     <asp:TextBox ID="txtDescription" runat="server" Height="71px" 
                    Width="250px" TextMode="MultiLine"></asp:TextBox>
                    
                    </td>
                    </tr><tr>
                  <td>
                   <asp:Label ID="Label32" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Product Price"></asp:Label></td><td></td>
                    <td>  <asp:TextBox ID="txtPrice" runat="server" 
                    Width="100px" MaxLength="10" ></asp:TextBox></td></tr><tr>
                  <td>
                   <asp:Label ID="lbl_taxhead" runat="server" Font-Names="Verdana" Font-Size="14px" CssClass="lb"
                    Text="Product Tax (%)"></asp:Label></td><td></td>
                  <td> 
                      <asp:TextBox ID="txt_product_tax" runat="server" 
                    Width="145px" MaxLength="10" ></asp:TextBox>
                    
                    </td></tr><tr>
                  <td></td>
                  <td></td>
                  <td>  
                      <asp:Button ID="Button2" runat="server" CssClass="myButton" Width="100px"
                    Text="Submit" ValidationGroup="3" onclick="Button2_Click"  />
                    <br />
                     <asp:Label ID="lblInsert" runat="server" Font-Names="Verdana" Font-Size="14px"
                    ForeColor="Red" Font-Bold="true"></asp:Label><br />
                           <b> <a style="color:Red;  padding-right:20px;">* Indicates Compulsory Fields</a></b> 
                           <br />
                             <asp:Label ID="Label1911" runat="server" Font-Names="Verdana" Font-Size="13px" 
                        ForeColor="#007500" Text="[<b>'Submit'</b> to add this record into product master.]"></asp:Label></td></tr>
                        </table>
                        </asp:Panel>
  
  
  

<%--
</ContentTemplate> 
<Triggers>
<asp:PostBackTrigger ControlID="btn_exp1" />
<asp:PostBackTrigger ControlID="btn_export" />
</Triggers>


    </asp:UpdatePanel>--%></asp:Panel>


  <script type="text/javascript" language="javascript" >
      var prm = Sys.WebForms.PageRequestManager.getInstance();
      prm.add_endRequest(function() {
          $(document).ready(function() {
              $("span[id$='lblInsert0']").delay(3000).fadeOut(3000, function() {
                  //                         $(this).innerHTML("");
              });
          });
      });

</script>
  <script type="text/javascript" language="javascript" >
      var prm = Sys.WebForms.PageRequestManager.getInstance();
      prm.add_endRequest(function() {
          $(document).ready(function() {
              $("span[id$='lblInsert.ClientID']").delay(20000).fadeOut(5000, function() {
                  //                         $(this).innerHTML("");
              });
          });
      });

</script>

    
   
    <script type="text/javascript">
        $(document).ready(function() {
            $('#<%= lbl_insert_count.ClientID %>').fadeOut(20000, function() {
                $(this).html(""); //reset the label after fadeout
            });
        });
    </script>
     
      <script type="text/javascript">
          $(document).ready(function() {
              $('#<%= lbl_count_date_format_wrong.ClientID %>').fadeOut(20000, function() {
                  $(this).html("");
              });
          });
    </script>
   
    
    
    
  
    
     <script type="text/javascript" language="javascript" >
         var prm = Sys.WebForms.PageRequestManager.getInstance();
         prm.add_endRequest(function() {
             $(document).ready(function() {
                 $("span[id$='lblInsert1']").delay(3000).fadeOut(3000, function() {
                     //                         $(this).innerHTML("");
                 });
             });
         });

</script>
  
    
    
     <script type="text/javascript" language="javascript" >
         var prm = Sys.WebForms.PageRequestManager.getInstance();
         prm.add_endRequest(function() {
             $(document).ready(function() {
                 $("span[id$='lbl_duplicate_msg']").delay(3000).fadeOut(3000, function() {
                     //                         $(this).innerHTML("");
                 });
             });
         });

</script>
    
    
     <script type="text/javascript" language="javascript" >
         var prm = Sys.WebForms.PageRequestManager.getInstance();
         prm.add_endRequest(function() {
             $(document).ready(function() {
                 $("span[id$='lbl_delete_up_lead_msg']").delay(3000).fadeOut(3000, function() {
                     //                         $(this).innerHTML("");
                 });
             });
         });

</script>
    
    
      <script type="text/javascript" language="javascript" >
          var prm = Sys.WebForms.PageRequestManager.getInstance();
          prm.add_endRequest(function() {
              $(document).ready(function() {
                  $("span[id$='lbl_quotation_up_dele_msg']").delay(3000).fadeOut(3000, function() {
                      //                         $(this).innerHTML("");
                  });
              });
          });

</script>

 <script type="text/javascript">
     $(document).ready(function() {
         $('#<%= lbl_product_delete.ClientID %>').fadeOut(20000, function() {
             $(this).html("");
         });
     });
    </script>
    
     <script type="text/javascript">
         $(document).ready(function() {
             $('#<%= lblCustDeleted.ClientID %>').fadeOut(20000, function() {
                 $(this).html("");
             });
         });
    </script>
    
    
  
  
    
      <script type="text/javascript" language="javascript" >
          var prm = Sys.WebForms.PageRequestManager.getInstance();
          prm.add_endRequest(function() {
              $(document).ready(function() {
                  $("span[id$='lbl_delete_up_enq_mag']").delay(3000).fadeOut(3000, function() {
                      //                         $(this).innerHTML("");
                  });
              });
          });

</script>

   <script type="text/javascript" language="javascript" >
       var prm = Sys.WebForms.PageRequestManager.getInstance();
       prm.add_endRequest(function() {
           $(document).ready(function() {
               $("span[id$='lbl_followup_msg']").delay(3000).fadeOut(3000, function() {
                   //                         $(this).innerHTML("");
               });
           });
       });

</script>

     
    
</asp:Content>


