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

<%@ Register assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>

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

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

    <style type="text/css">
        .style2
        {
            width: 100%;
          height: auto;
        }
        .style6
        {
            width: 73px;
            height: 56px;
        }
        .style8
        {
           
            height: 56px;
        }
         .style19 
    {
            height: 90px;
    }
        .style25
        {
           
            height: 37px;
        }
        .style26
        {
            height: 42px;
        }
        .style28
        {
          height: 33px;
      }
        .style29
        {
          height: 35px;
      }
        .style30
      {
          height: 37px;
      }
      .style32
      {
          height: 12px;
      }
      .style33
      {
          height: 16px;
      }
      .style34
      {
          height: 35px;
         
      }
      .style35
      {
          height: 42px;
        
      }
      .style38
      {
          height: 12px;
        
      }
      .style39
      {
          height: 16px;
         
      }
      .style41
      {
          height: 35px;
          width: 73px;
      }
      .style42
      {
          height: 42px;
          width: 73px;
      }
      .style43
      {
          width: 73px;
          height: 37px;
      }
      .style44
      {
          width: 73px;
          height: 33px;
      }
      .style45
      {
      }
      .style46
      {
          height: 12px;
          }
      .style47
      {
          height: 16px;
          width: 73px;
      }
      .style48
      {
         
      }
      .style49
      {
          
          height: 56px;
      }
      .style50
      {
         
          height: 33px;
      }
      .style51
      {
          width: 16px;
          height: 56px;
      }
      .style52
      {
          height: 35px;
          width: 16px;
      }
      .style53
      {
          height: 42px;
          width: 16px;
      }
      .style54
      {
          width: 16px;
          height: 37px;
      }
      .style55
      {
          width: 16px;
          height: 33px;
      }
      .style56
      {
          width: 16px;
      }
      .style57
      {
          height: 12px;
          width: 16px;
      }
      .style58
      {
          height: 16px;
          width: 16px;
      }
      .style59
      {
          width: 100%;
      }
      .style60
      {
          height: 31px;
      }
      .style61
      {
         
      }
      .style62
      {
         
          height: 10px;
      }
      .style63
      {
          height: 10px;
      }
      .style65
      {
          width: 20px;
          height: 10px;
      }
      .style66
      {
          width: 20px;
      }
      .contactpanelcss
        {
        	width:60%;
        	margin:0px;
        	background-color:White;
        	border:10px solid ActiveBorder;
        	padding:10px;
        	margin-top:50px;
        	     	   	
        } 
        
         .cssLoadingTimer
        {        	
        	/* filter:alpha(opacity=90);       	
        	opacity:0.7; */        	
        	text-align:center; 
        	position:fixed; 
        	margin:5% 0% 0px 30%; 
        	background-color:White;
          
        	width:300px;
        	height:150PX;
        	 background-color:#ffebcc;
        	
        
        }  
        .right_lbl
    {
    	margin-left:25px;
    }
        .style67
        {
           
            height: 35px;
        }
        .style68
        {
            width: 20px;
            height: 35px;
        }
        .style69
        {
            height: 56px;
        }
        .style70
        {
            height: 35px;
            }
        .style71
        {
            height: 42px;
            }
        .style72
        {
            height: 37px;
            }
        .style73
        {
            height: 33px;
        }
        .style74
        {
        }
        .style75
        {
            height: 16px;
          
        }
        .style76
        {
            height: 12px;
           
        }
        
        .shadow_five {
        background-color: #FFECCE;
        -moz-border-radius: 10px;
        -webkit-border-radius: 10px;
        -o-border-radius: 10px;
        -ms-border-radius: 10px;
        border-radius: 10px;
        -moz-box-shadow: 3px 3px 5px #B1A59A;
        -webkit-box-shadow: 3px 3px 5px #B1A59A;
        -o-box-shadow: 3px 3px 5px #B1A59A;
        -ms-box-shadow: 3px 3px 5px #B1A59A;
        box-shadow: 3px 3px 5px #B1A59A;
        padding: 10px;
        margin-bottom:10px;
        
    } .shadow_five1 {
        background-color: #ffa8a8;
        -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;
        
    }
    
    .shadow {
      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;
            margin-bottom: 10px;
            width:100%;
        
    }
    
       .p1
        {
       background-image: linear-gradient(to bottom, #fcfcfc, #f7f7f7 3%, #ff9966 12%,#ff9966 90%, #bfbfbf);
-webkit-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
-moz-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white ;
box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
            height:35px;
            width:300px;
        }
        
    </style>
   </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  
     <asp:UpdateProgress ID="UpdateProgress1" runat="server"  
                           DynamicLayout="true"  >
                          <ProgressTemplate>
                          <div style="width:100%;">
                              <div class="cssLoadingTimer"  >
                              <p> Please wait...</p>
                                  <img id="Img1" alt="Loading..." src="../images/Regloader.gif" runat="server" style="margin-top:15px;" align="middle"  />
                                  </div>
                                  
                                  </div>
                          </ProgressTemplate>
                      </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
<asp:Panel ID="Panel1" runat="server" Width="100%">  <%--BorderStyle="Groove"--%>
    <div class="p12" style="width:250px;"  >
      <p style="font-family:Verdana; font-size:13px; margin-top:5px;color:White;font-weight:bold;padding-top:5px;">
     <b style="color:White;">  &nbsp;&nbsp;Employee Master</b>- Add Employee 
      </p>
           </div>
    <table class="style2" style="line-height:20px;">
  
               <tr>
          
            <td class="style49" align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label1" runat="server" Text=" Employee code " 
                     Font-Names="Verdana" Font-Size="12px" Font-Bold="true"  ForeColor=""></asp:Label></td>
                <td align="right" class="style51">
                    &nbsp;</td>
            <td class="style8">
                <asp:TextBox ID="txtECode" runat="server" Height="20px" Width="100px" 
                    Enabled="False"></asp:TextBox>
            </td>
                <td class="style69">
                    &nbsp;</td>
                <td class="style69" colspan="2">
                    &nbsp;</td>
            
        </tr>
             <tr>
         
            <td class="style34" align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label2" runat="server" Text=" Employee Name " 
                     Font-Names="Verdana" Font-Size="12px" Font-Bold="true" ></asp:Label></td>
            <td>
                    <b style="color:Red;">*</b></td>
            <td class="style29">
                <asp:TextBox ID="txtEName" runat="server" Height="22px" Width="201px" ></asp:TextBox>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                         ControlToValidate="txtEName" ErrorMessage="Enter Name" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
                 <td class="style70">
                  
                 </td>
           
                 <td class="style70" colspan="2">
                     &nbsp;</td>
           
           </tr>
           <tr>
          
            <td class="style35" align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label3" runat="server" Text=" Employee Email ID " 
                     Font-Names="Verdana" Font-Size="12px" Font-Bold="true" ></asp:Label></td>
               <td >
                 <%-- <b style="color:Red;">*</b></td>--%>
            <td class="style26">
                <asp:TextBox ID="txtEEmail" runat="server" Height="22px" Width="201px" ></asp:TextBox>
                  <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                       ControlToValidate="txtEEmail" ErrorMessage="Enter proper email ID" 
                       ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                       ValidationGroup="111"></asp:RegularExpressionValidator>
                  <%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                       ControlToValidate="txtEEmail" ErrorMessage="Enter EmailID" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                  --%>     
            </td>
               <td class="style71">
                 
               </td>
               <td class="style71" colspan="2">
                   &nbsp;</td>
        </tr>
         <tr>
          
            <td class="style35" align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label12" runat="server" Text=" Mobile No " 
                     Font-Names="Verdana" Font-Size="12px" Font-Bold="true" ></asp:Label></td>
               <td >
               
            <td class="style26">
                <asp:TextBox ID="txtmobile" runat="server" Width="150px" MaxLength="15"></asp:TextBox>
                <cc1:FilteredTextBoxExtender runat="server" ID="fmobile" TargetControlID="txtmobile" FilterType="Numbers" FilterMode="ValidChars" ValidChars="0123456789"></cc1:FilteredTextBoxExtender>

            </td>
               <td class="style71">
                 
               </td>
               <td class="style71" colspan="2">
                   &nbsp;</td>
        </tr>
         <tr>
          
            <td class="style35" align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Label ID="Label14" runat="server"  Font-Names="Verdana" Font-Size="12px" Font-Bold="true" Text="Type"></asp:Label>&nbsp;<a style="color:Red;">*</a>&nbsp;

               <td >
               
            <td class="style26">
                 <asp:RadioButton ID="rbEditAdmin" runat="server" 
                    Font-Bold="True" ForeColor="#990033" Text="Admin with Editing rights (A)" 
                     GroupName="A" AutoPostBack="true" Font-Size="11px" 
                    oncheckedchanged="rbEditAdmin_CheckedChanged"/>  
                   <br />
                      <asp:RadioButton ID="rbViewAdmin" runat="server"  
                    Font-Bold="True" ForeColor="#990033" Text="Admin with only viewing rights (VA)" 
                     GroupName="A" AutoPostBack="true" Font-Size="11px" 
                    oncheckedchanged="rbViewAdmin_CheckedChanged" />  
                   <br />
                      <asp:RadioButton ID="rbEmployee" runat="server" 
                    Font-Bold="True" ForeColor="#990033" Text="Employee (E)" Font-Size="11px" 
                     GroupName="A" AutoPostBack="true" 
                    oncheckedchanged="rbEmployee_CheckedChanged"/>  
            </td>
               <td class="style71">
                 
               </td>
               <td class="style71" colspan="2">
                   &nbsp;</td>
        </tr>

          <tr id="tr_report_to_select" runat="server" style="width:100%;">
          
            <td class="style35" align="right" colspan="2"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="lbl_report_to_msg" runat="server"   Font-Names="Verdana" Font-Size="12px" Font-Bold="true" 
                    Text="Reports To" Visible="false"></asp:Label><a id="a_report_to_msg" runat="server" visible="false" style="color:Red;">*</a></td>
               
            <td class="style26"  runat="server" visible="false" id="chk_div">
                <div class="shadow" style="height:130px;overflow:auto;width:210px;line-height:20px;">
                <asp:CheckBoxList ID="CheckBoxList1" runat="server" >   </asp:CheckBoxList> 
            </td>
               <td class="style71">
                 
               </td>
               <td class="style71" >
                   &nbsp;</td>
        </tr>
    

     </tr>

           <tr>
          
            <td class="style25" align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label4" runat="server" Text=" Joining Date " 
                     Font-Names="Verdana" Font-Size="12px" Font-Bold="true" ></asp:Label></td>
               <td >
                   <b style="color:Red;">*</b></td>
            <td class="style30">
                <asp:TextBox ID="txtJoinDate" runat="server" Height="22px" Width="101px" ></asp:TextBox>
                <cc1:CalendarExtender ID="txtJoinDate_CalendarExtender" runat="server" 
                    Enabled="True" TargetControlID="txtJoinDate"  >
                </cc1:CalendarExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                       ControlToValidate="txtJoinDate" ErrorMessage="Enter Date" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                
            </td>
               <td class="style72">
                   
               </td>
               <td class="style72" colspan="2">
                   &nbsp;</td>
        </tr>
           <tr>
          
            <td class="style50" align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label5" runat="server" Text="Designation " 
                     Font-Names="Verdana" Font-Size="12px" Font-Bold="true" ></asp:Label></td>
               <td  class="style55">
                   <b style="color:Red;">*</b></td>
            <td class="style28">
           <div style="width:100%;">
              <div style="float:left;">
                  <div id="dvddl"><asp:DropDownList ID="ddlDesig" runat="server" Font-Names="Verdana"  Font-Size="12px" Height="22px">
               </asp:DropDownList></div>
               <div  id="dvnew" >  <asp:TextBox ID="txtdesg" runat="server" Height="22px"  Visible="false"></asp:TextBox>
                </div>

              </div> 
               &nbsp; 
               <asp:LinkButton ID="lnk_newdesignation" runat="server"  onclick="lnk_newdesignation_Click" Text="Add New">Add New</asp:LinkButton>
               <asp:RequiredFieldValidator ID="req_field_vali_designation" runat="server" ControlToValidate="ddlDesig" InitialValue="- Select Designation -"
                ErrorMessage="Select Designation" ValidationGroup="1" ForeColor="Red" ></asp:RequiredFieldValidator>

                 <asp:RequiredFieldValidator ID="reqtxtdesg" runat="server" ErrorMessage="Enter Designation" ControlToValidate="txtdesg" 
                ValidationGroup="1" ForeColor="Red" Font-Bold="False" Display="Dynamic"></asp:RequiredFieldValidator>
               </div>
            </td>
               
               <td class="style73">
                   &nbsp;</td>
               
               <td class="style73" colspan="2">
                   &nbsp;</td>
               
        </tr>


              <tr>
          
            <td class="style50" align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label13" runat="server" Text="Department " 
                     Font-Names="Verdana" Font-Size="12px" Font-Bold="true" ></asp:Label></td>
               <td  class="style55">
                   <b style="color:Red;">*</b></td>
            <td class="style28">
           <div style="width:100%;">
              <div style="float:left;">
                  <div id="ddldept"><asp:DropDownList ID="ddl_Dept" runat="server" Font-Names="Verdana"  Font-Size="12px" Height="22px">
               </asp:DropDownList></div>
               <div  id="divnew" >  <asp:TextBox ID="txt_dept" runat="server" Height="22px"  Visible="false"></asp:TextBox>
                </div>

              </div> 
               &nbsp; 
               <asp:LinkButton ID="lnk_add_new" runat="server"  onclick="lnk_add_new_Click" Text="Add New">Add New</asp:LinkButton>
               <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddl_Dept" InitialValue="- Select Department -"
                ErrorMessage="Select Department" ValidationGroup="1" ForeColor="Red" ></asp:RequiredFieldValidator>

                 <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Enter Department" ControlToValidate="txt_dept" 
                ValidationGroup="1" ForeColor="Red" Font-Bold="False" Display="Dynamic"></asp:RequiredFieldValidator>
               </div>
            </td>
               
               <td class="style73">
                   &nbsp;</td>
               
               <td class="style73" colspan="2">
                   &nbsp;</td>
               
        </tr>
            <tr>
          
            <td align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label6" runat="server" Text=" Chargeable rate/ hour" 
                     Font-Names="Verdana" Font-Size="12px" Font-Bold="true" ></asp:Label>
                    </td>
                <td >
                    <%--<b style="color:Red;">*</b>--%>
                    
                    </td>
            <td >
               
                <asp:TextBox ID="txtCostPerHr" runat="server" Height="22px" Width="100px"></asp:TextBox>
                <%--  <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                        ControlToValidate="txtCostPerHr" ErrorMessage="Enter Charges" 
                        ValidationGroup="1"></asp:RequiredFieldValidator>--%>
            </td>
                <td class="style74">
                  
                          <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers" TargetControlID="txtCostPerHr">
                </cc1:FilteredTextBoxExtender>
                </td>
                <td class="style74" colspan="2">
                    &nbsp;</td>
        </tr>
        
        
         <tr>
         
            <td class="style48" align="right"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label7" runat="server" Text="Enter Currency($/Rs.)" 
                     Font-Names="Verdana" Font-Size="12px" Font-Bold="true" ></asp:Label>
                    </td>
                <td >
                   <%-- <b style="color:Red;">*</b>--%>
                   
                   </td>
            <td class="style22">
                  <asp:RadioButtonList ID="rb_currency" runat="server" Width="100px" Height="20px"  RepeatDirection="Horizontal"
                    >                   
                 <asp:ListItem Selected="True">Rs</asp:ListItem>             
                 <asp:ListItem>$</asp:ListItem>
                 </asp:RadioButtonList>
                 
             <%--   <asp:TextBox ID="txt_currency" runat="server" Height="22px" Width="101px"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtCostPerHr" ErrorMessage="Enter Currency" 
                        ValidationGroup="1"></asp:RequiredFieldValidator>--%>
            </td>
                <td class="style74">
                   
                         <%-- <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers" TargetControlID="txtCostPerHr">
                </cc1:FilteredTextBoxExtender>--%>
                </td>
                <td class="style74" colspan="2">
                    &nbsp;</td>
        </tr>

      
        <tr>
            <td class="style45" colspan="6"  style="margin-left:200px;padding-left:200px;">
            <asp:Panel ID="panel2" runat="server" CssClass="shadow_five1" Width="50%" align="center">
                <table class="style59" align="center" style="line-height:20px;">
                    <tr>
                        <td class="style60">
                            &nbsp;</td>
                        <td class="style60" colspan="3">
                            <asp:Label ID="Label8" runat="server" Font-Names="Verdana" Font-Size="14px" 
                                Text="Assign username and password to the Employee" Font-Bold="true" ForeColor="Blue"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style67" align="right">
                            &nbsp;</td>
                        <td align="right" class="style67">
                            <asp:Label ID="Label9" runat="server" Font-Names="Verdana" Font-Size="12px" 
                                Text="Username/ID" Font-Bold="true" ></asp:Label>
                        </td>
                        <td>
                           <b style="color:Red;">*</b> </td>
                        <td align="left">
                            <asp:TextBox ID="txtUsername" runat="server" Height="16px" Width="175px"  ontextchanged="txtUsername_TextChanged" AutoPostBack="true"></asp:TextBox> 
                                
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                ControlToValidate="txtUsername" ErrorMessage="Enter Username" 
                                ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>

                            <asp:HiddenField ID="hf_user_name_exist" runat="server" />

                         <%--   <asp:Label ID="lbl_exist_username_msg" runat="server" Text="This User Name is already exists.<br> Please enter another name." Visible="false"></asp:Label>
                           --%>

                                
                        </td>
                    </tr>
                    <tr>
                        <td class="style61" align="right">
                            &nbsp;</td>
                        <td align="right" class="style61">
                            <asp:Label ID="Label10" runat="server" Font-Names="Verdana" Font-Size="12px" 
                                Text="Password" Font-Bold="true" ></asp:Label>
                        </td>
                        <td >
                            <b style="color:Red;">*</b></td>
                        <td align="left">
                            <asp:TextBox ID="txtPassword" runat="server" Height="16px" Width="176px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                                ControlToValidate="txtPassword" ErrorMessage="Enter Password" 
                                ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style62">
                          </td>
                        <td class="style62" align="right"> <asp:Label ID="Label11" runat="server" Font-Names="Verdana" Font-Size="12px" 
                                Text="Working starts from" Font-Bold="true" ></asp:Label>
                        </td>
                        <td >
                            <b style="color:Red;">*</b></td>
                        <td class="style63" align="left"><asp:TextBox ID="txtstartDate" runat="server" 
                                AutoPostBack="True" ontextchanged="txtstartDate_TextChanged"></asp:TextBox>
                         <cc1:CalendarExtender ID="CalendarExtender1" runat="server" 
                          Enabled="True" TargetControlID="txtstartDate" >
                         </cc1:CalendarExtender>
                         <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtstartDate" ErrorMessage="Enter starting date" 
                                ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                        
                            </td>
                    </tr>
                   
                </table>
                </asp:Panel>
            </td>
        </tr>
         <tr>
            <td class="style46"></td>
            <td align="right" class="style38"> </td>
          
            <td  colspan="2">
                <asp:Button ID="btnSave" runat="server" CssClass="myButton" Text="Submit" 
                         OnClientClick="if (!Page_ClientValidate(1)){ return false; } this.disabled = true; this.value = 'Saving...';" 
                                UseSubmitBehavior="false" onclick="btnSave_Click" ValidationGroup="1" />
               &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:Button ID="btnShowAll" runat="server" CssClass="myButton"  UseSubmitBehavior="false" onclick="btnShowAll_Click" Text="Show All" />
                    <br />
                 <asp:Label ID="lblInsert" runat="server" Font-Names="Verdana" Font-Size="14px" ForeColor="Red"></asp:Label>
                 <asp:Label ID="lblTest" runat="server" Font-Names="Verdana" Font-Size="14px" ForeColor="Red"></asp:Label>
                 <b> <a style="color:Red;  padding-right:20px; float:right; ">* Indicates Compulsory Fields</a></b>
            </td>
          
             <td class="style76"> &nbsp;</td>
            <td class="style32"> </td>
        </tr>
  
        <tr>
            <td class="style46" colspan="6">
            
         
                <asp:Panel ID="Panel4" runat="server" CssClass="contactpanelcss" Width="100%" Visible="false">
                    <div style="overflow:scroll; height:500px;">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false"  
                            AllowPaging="true" PageSize="50"
                            CellPadding="4"  ForeColor="#333333" GridLines="Both" 
                            onrowcancelingedit="CancelEdit" onrowediting="EditCustomer"  
                            Font-Names="Verdana" Font-Size="12px" 
                            onrowupdating="UpdateCustomer" 
                            onpageindexchanging="GridView1_PageIndexChanging"  >
               
                            <RowStyle BackColor="#ffc9bb" ForeColor="#333333" />
                            <Columns>
                                <%--fIRST record--%>
                                <asp:TemplateField HeaderText="Code" ItemStyle-Width="40px">
                                    <ItemTemplate>
                                        <center>
                                            <asp:Label ID="lblECode" runat="server" Text='<%# Eval("ECode")%>' Width="50px"></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtECode" runat="server" MaxLength="5" Width="40px"></asp:TextBox>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <%-- 2nd record--%>
                                <asp:TemplateField HeaderText="Name" ItemStyle-Width="180px">
                                    <ItemTemplate>
                                            <asp:Label ID="lblEName" runat="server" Text='<%# Eval("EName")%>' Width="150px"></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>                                     
                                            <asp:TextBox ID="txtEName" runat="server" Text='<%# Eval("EName")%>' Width="180px"></asp:TextBox>                                     
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtEName" runat="server" MaxLength="5" Width="180px"></asp:TextBox>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <%--  3rd record--%>
                                <asp:TemplateField HeaderText="Email ID" ItemStyle-Width="180px">
                                    <ItemTemplate>
                                       
                                            <asp:Label ID="lblEEmailid" runat="server" Text='<%# Eval("EEmailid")%>' 
                                                Width="170px"></asp:Label>
                                       
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                            <asp:TextBox ID="txtEEmailid" runat="server" Text='<%# Eval("EEmailid")%>' 
                                                Width="170px"></asp:TextBox>
                                       
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtEEmailid" runat="server" MaxLength="5" Width="100px"></asp:TextBox>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                  <asp:TemplateField HeaderText="Mobile No" ItemStyle-Width="100px">
                                    <ItemTemplate>
                                       
                                     <asp:Label ID="lblMobileNo" runat="server" Text='<%# Eval("MobileNo")%>' 
                                                Width="100px"></asp:Label>
                                       
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                           <asp:TextBox ID="txtMobileNo" runat="server" Text='<%# Eval("MobileNo")%>' 
                                                Width="100px"></asp:TextBox>
                                       
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtMobile" runat="server" MaxLength="5" Width="100px"></asp:TextBox>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <%-- 4th record--%>
                                <asp:TemplateField HeaderText="Joined Date" ItemStyle-Width="125px">
                                    <ItemTemplate>
                                        
                                            <asp:Label ID="lblJoinedDate" runat="server" Text='<%# Eval("JoinedDate")%>' 
                                                Width="100px"></asp:Label>
                                       
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                       
                                            <asp:TextBox ID="txtJoinedDate" runat="server" Text='<%# Eval("JoinedDate")%>' 
                                                Width="125px"></asp:TextBox>
                                             <cc1:CalendarExtender ID="txtJoinDate_CalendarExtender1" runat="server" 
                    Enabled="True" TargetControlID="txtJoinedDate" Format="dd/MM/yyyy">
                </cc1:CalendarExtender>
                                   
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtJoinedDate" runat="server" MaxLength="5" Width="125px"></asp:TextBox>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <%--   5th record--%>
                                <asp:TemplateField HeaderText="Designation" ItemStyle-Width="80px">
                                    <ItemTemplate>
                                  
                                      <asp:Label ID="lblDesignation" runat="server" Text='<%# Eval("emp_designation")%>' 
                                                Width="80px"></asp:Label>
                                     
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                            <asp:TextBox ID="txtDesignation" runat="server" 
                                                Text='<%# Eval("emp_designation")%>' Width="80px"></asp:TextBox>
                                      
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtDesignation" runat="server" MaxLength="5" Width="50px"></asp:TextBox>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="Department" ItemStyle-Width="80px">
                                    <ItemTemplate>
                                      
                                    <%--   <asp:Label ID="lbldept" runat="server" Text='<%# Eval("DepartmentName")%>' Width="80px"></asp:Label>--%>
                                     
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                       
                                 <%--   <asp:TextBox ID="txtdept" runat="server" Text='<%# Eval("DepartmentName")%>' Width="80px"></asp:TextBox> --%>
                                      
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtdepartment" runat="server" MaxLength="5" Width="50px"></asp:TextBox>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <%--   6th record--%>
                                <asp:TemplateField HeaderText="Charge/Hr" ItemStyle-Width="50px" >
                                    <ItemTemplate>
                                      
                                            <asp:Label ID="lblCostPerHr" runat="server" Text='<%# Eval("CostPerHr")%>' 
                                                Width="50px" align="Right" ></asp:Label>
                                     
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                      
                                            <asp:TextBox ID="txtCostPerHr" runat="server" Text='<%# Eval("CostPerHr")%>' 
                                                Width="50px"></asp:TextBox>
                                       
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtCostPerHr" runat="server" MaxLength="5" Width="50px"></asp:TextBox>
                                    </FooterTemplate>
                                </asp:TemplateField>
                              <asp:TemplateField HeaderText="User Name" ItemStyle-Width="180px">
                                    <ItemTemplate>
                                      
                                            <asp:Label ID="lbleMP_USER_NAME" runat="server" Text='<%# Eval("EUname")%>' Width="180px"></asp:Label>
                                     
                                    </ItemTemplate>
                               
                             
                                </asp:TemplateField>

                              
                                <asp:TemplateField HeaderText="Emp Password" ItemStyle-Width="120px">
                                    <ItemTemplate>
                                      
                                            <asp:Label ID="lblEPwd" runat="server" Text='<%# Eval("EPwd")%>' Width="120px"></asp:Label>
                                     
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        
                                            <asp:TextBox ID="txtEPwd" runat="server" Text='<%# Eval("EPwd")%>' 
                                                Width="200px"></asp:TextBox>
                                   
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtEPwd" runat="server" MaxLength="5" Width="50px"></asp:TextBox>
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Start Date" ItemStyle-Width="100px">
                                    <ItemTemplate>
                                        
                                            <asp:Label ID="lblestartdate" runat="server" Text='<%# Eval("estartdatevar")%>' 
                                                Width="100px"></asp:Label>
                                  
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <center>
                                            <asp:TextBox ID="txtestartdate" runat="server" 
                                                Text='<%# Eval("estartdatevar")%>' Width="100px"></asp:TextBox>
                                             <cc1:CalendarExtender ID="txtJoinDate_CalendarExtender2" runat="server" 
                    Enabled="True" TargetControlID="txtestartdate" Format="dd/MM/yyyy">
                </cc1:CalendarExtender>
                                        </center>
                                    </EditItemTemplate>
                                    
                                </asp:TemplateField>
                                
                                  <asp:TemplateField HeaderText="Employee Status" ItemStyle-Width="80px">
                                    <ItemTemplate>
                                        
                                        
                                             <%-- <asp:Label ID="lbl_EmployeeStatus" runat="server" Text='<%# Convert.ToString(Eval("working_status")) == "True" ?
                                              DataBinder.Eval(Container.DataItem, "working_status", "Activate") : DataBinder.Eval(Container.DataItem, "working_status", "Deactivate")%>' 
                                                Width="100px"></asp:Label>--%>
                                                
        <asp:Label ID="lbl_EmployeeStatus" runat="server" Text='<%# Convert.ToString(Eval("working_status")) == "True" ? DataBinder.Eval(Container.DataItem, "working_status", "Active") : DataBinder.Eval(Container.DataItem, "working_status", "Deactivate")%>' 
                                                Width="80px"></asp:Label>
                                                

                                           
                                                
                                         
                        
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                       
                                        <%--    <asp:TextBox ID="txt_Employee_Status" runat="server" 
                                                Text='<%# Eval("estartdatevar")%>' Width="100px"></asp:TextBox>--%>
                                                
                                        <asp:DropDownList ID="ddl_employee_status" runat="server">
                                        <asp:ListItem Text="Activate" Value="1">                       
                                        </asp:ListItem>
                                        <asp:ListItem Text="Deactivate" Value="0"></asp:ListItem>
                                        </asp:DropDownList>
                                           
                                     
                                    </EditItemTemplate>
                                    
                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="Type"  HeaderStyle-Width="30px">
                                    <ItemTemplate>
                                        <center>
                                     <asp:Label ID="lblType" runat="server" Text='<%# Eval("Type")%>' 
                                              ></asp:Label>
                                        </center>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:RadioButton ID="rbEditAdmin" runat="server" Text="Editing rights" GroupName="A" ForeColor="Black" />  
                     <br />
                      <asp:RadioButton ID="rbViewAdmin11" runat="server"  Width="100%" Text="viewing rights"  GroupName="A"  ForeColor="Black" />  
                       <br />
                      <asp:RadioButton ID="rbEmployee" runat="server" Width="100%" Text="Sales Employee (E)" GroupName="A" ForeColor="Black" />  
                    
                                    </EditItemTemplate>
                                                                                                  
                                </asp:TemplateField>
                                      <asp:TemplateField HeaderText="Reporting To"  HeaderStyle-Width="80px">
                                    <ItemTemplate>
                                     
                                         <asp:Label ID="lblESentTo" runat="server" Text='<%# Eval("ESenttovar")%>' 
                                                ></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                     <div style="height:150px;overflow:auto;">    
                                        <asp:CheckBoxList ID="CheckBoxList2" CssClass="regular-checkboxgrid1" runat="server"   ForeColor="Black" >
                                        </asp:CheckBoxList>
                                        
                                           <asp:Label ID="lblType_edit_val" runat="server" Text='<%# Eval("Type")%>' 
                                                 Visible="false"></asp:Label>
                                   
                                            <asp:Label ID="lbl_lblESentTo" runat="server" Text='<%# Eval("ESenttovar")%>' Visible="false"
                                                ></asp:Label>
                                        
                                     </div>   
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <%--  End entry of records--%>
                                
                                 <asp:CommandField ShowEditButton="True" ItemStyle-ForeColor="Blue" ItemStyle-Width="60px" />
                                <asp:TemplateField ItemStyle-Width="60px">
                                    <ItemTemplate >
                                        <asp:LinkButton ID="lnkRemove" runat="server" 
                                            CommandArgument='<%# Eval("ECode")%>' OnClick="DeleteCustomer" 
                                            OnClientClick="return confirm('Do you want to delete?')" Text="Delete">
                                        </asp:LinkButton>
                                    </ItemTemplate>
                                    <%--  <FooterTemplate>
        <asp:Button ID="btnAdd" runat="server" Text="Add"
            OnClick = "AddNewCustomer" />
   </FooterTemplate>--%></asp:TemplateField>
                               
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" CssClass="cssPager" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </div>
                 <%--   <asp:Button ID="btn_Close1" runat="server" CssClass="myButton"
                        Font-Size="Medium" Text="Close" />--%></asp:Panel>
                
              
            
                        
                        <br />
                        
                   
             
            </td>
        </tr>
        </table>
     
</asp:Panel>

</ContentTemplate>
<Triggers >
<asp:PostBackTrigger ControlID="btnSave" />

</Triggers>
</asp:UpdatePanel>
</asp:Content>
