<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage/AdminMasterPage.master"
    AutoEventWireup="true" CodeFile="AddUsers.aspx.cs" Inherits="AddUsers" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

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

    <script src="script/ddlevelsmenu.js" type="text/javascript"></script>

    <script src="script/func.js" type="text/javascript"></script>
    <script type="text/javascript">
        // code for risk dropdown 
        function toggleSubmit(obj) {

            count = 0
            while (document.getElementById("d" + count)) {
                document.getElementById("d" + count).style.display = "none"
                count++
            }
            document.getElementById("d" + obj.selectedIndex).style.display = "block"

        }
        function toggleSubmit1(obj) {

            count = 0
            while (document.getElementById("c" + count)) {
                document.getElementById("c" + count).style.display = "none"
                count++
            }
            document.getElementById("c" + obj.selectedIndex).style.display = "block"

        }
        function toggleSubmit2(obj) {

            count = 0
            while (document.getElementById("b" + count)) {
                document.getElementById("b" + count).style.display = "none"
                count++
            }
            document.getElementById("b" + obj.selectedIndex).style.display = "block"

        }
    </script>

    <script src="../Javascript/scriptvalidation.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="contentmain">
        <div id="content">
            <div id="detailform">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="27%">
                            &nbsp;
                        </td>
                        <td width="14%">
                            Select User for Registration
                        </td>
                        <td width="1%">
                            <strong>:</strong>
                        </td>
                        <td width="58%">
                            <asp:DropDownList ID="DropDownList3" runat="server" Width="225px" OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged"
                                AutoPostBack="true">
                                <asp:ListItem Value="0">Select Type</asp:ListItem>
                                <asp:ListItem Value="1">White Label</asp:ListItem>
                                <asp:ListItem Value="2">Master Distributor</asp:ListItem>
                                <asp:ListItem Value="3">Distributor</asp:ListItem>
                                <asp:ListItem Value="4">Agent</asp:ListItem>
                                <%--<asp:ListItem Value="5">API</asp:ListItem>--%>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            <div id="c0" style="display: " align="center">
                                <asp:Label ID="lblsucess" runat="server"></asp:Label>
                            </div>
                            <!-------------------------------------------------White Label Registration Form---------------------------------------------------------------->
                            <div id="c1" style="display: " runat="server">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tblRegFrm" runat="server">
                                    <tr>
                                        <td colspan="4" style="text-align: center; font-size: 18px; padding: 15px 0 15px 0;">
                                            <strong>White Label Registration</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="27%">
                                            &nbsp;
                                        </td>
                                        <td width="14%">
                                            Select Category <b>*</b>
                                        </td>
                                        <td width="1%">
                                            <strong>:</strong>
                                        </td>
                                        <td width="58%">
                                            <asp:DropDownList ID="ddlCategory" runat="server" Width="223px">
                                                <asp:ListItem Value="0">Select</asp:ListItem>
                                                <asp:ListItem Value="1">Platinum</asp:ListItem>
                                                <asp:ListItem Value="2">Gold</asp:ListItem>
                                                <asp:ListItem Value="3">Silver</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" InitialValue="Select"
                                                ErrorMessage="Please Select Category" ControlToValidate="ddlCategory"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Company/Firm Name <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtCompanyName" runat="server" onkeypress="return isAlpha(event)"
                                                MaxLength="40" Width="218px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvCompanyName" runat="server" ErrorMessage="Fill your Company Name"
                                                ControlToValidate="txtCompanyName"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Image for Header Logo <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:FileUpload ID="FileUpload_Img_Header" runat="server" Width="255px" />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Please Select Image For Header Logo"
                                                ControlToValidate="FileUpload_Img_Header"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator_Header_Logo" runat="server"
                                                ValidationExpression='(.*\.([jJ][pP][eE][gG]|[gG][iI][fF]|[pP][nN][gG]|[jJ][pP][gG])$)'
                                                ControlToValidate="FileUpload_Img_Header" ErrorMessage="Please Upload only .jpeg,.gif,.png,.jpg file."></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Helpdesk Mobile No. <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtHelpDeskMobileNo1" runat="server" MaxLength="10" onkeypress="return digitonly(this,event)"
                                                Width="104px"></asp:TextBox>
                                            <asp:TextBox ID="txtHelpDeskMobileNo2" runat="server" MaxLength="10" onkeypress="return digitonly(this,event)"
                                                Width="104px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Fill helpdesk mobile no.1"
                                                ControlToValidate="txtHelpDeskMobileNo1"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Helpdesk E-mail Id <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtHelpDeskEMailID" runat="server" Width="218px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Fill helpdesk email id"
                                                ControlToValidate="txtHelpDeskEMailID"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="rev_Help_Desh_EmailID" runat="server" ErrorMessage="Please Enter Valid Email ID"
                                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="txtHelpDeskEMailID"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Domain Name <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtDomainName" runat="server" Width="218px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvDomainName" runat="server" ControlToValidate="txtDomainName"
                                                ErrorMessage="Pls fill your domain name or contact us."></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="rev_Domain_Name" runat="server" ErrorMessage="Please Enter Valid Domail Name"
                                                ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?" ControlToValidate="txtDomainName"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Copyright <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtCopyright" runat="server" Width="218px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvCopyright" runat="server" ErrorMessage="Fill Copyright Name"
                                                ControlToValidate="txtCopyright"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Panel Title <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtAgentPanelTitle" runat="server" onkeypress="return isAlpha(event)"
                                                Width="218px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvAgentPanelTitle" runat="server" ErrorMessage="Fill Agent Page Title"
                                                ControlToValidate="txtAgentPanelTitle"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Portal Name <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtPortalName" runat="server" onkeypress="return isAlpha(event)"
                                                Width="218px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Fill Agent Page Title"
                                                ControlToValidate="txtPortalName"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Authorize Person Name <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddl_Authorize_Person_Name" runat="server" Width="47px">
                                                <asp:ListItem Value="Select">Select</asp:ListItem>
                                                <asp:ListItem Value="1">Mr.</asp:ListItem>
                                                <asp:ListItem Value="2">Ms.</asp:ListItem>
                                                <asp:ListItem Value="3">Mrs.</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:TextBox ID="txtAuthorizePersonName1" runat="server" MaxLength="20" onkeypress="return isAlpha(event)"
                                                Width="50px"></asp:TextBox>
                                            <asp:TextBox ID="txtAuthorizePersonName2" runat="server" MaxLength="20" onkeypress="return isAlpha(event)"
                                                Width="50px"></asp:TextBox>
                                            <asp:TextBox ID="txtAuthorizePersonName3" runat="server" MaxLength="20" onkeypress="return isAlpha(event)"
                                                Width="50px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvAuthorizePersonName" runat="server" ErrorMessage="Fill your First Name"
                                                ControlToValidate="txtAuthorizePersonName1"></asp:RequiredFieldValidator>    
                                        </td>
                                    </tr>
                                   
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Authorize Person E-mail Id <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtEmailId" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvEmailId" runat="server" ErrorMessage="Please Enter EmailId"
                                                ControlToValidate="txtEmailId"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="reguexpvalid_Emailid_Pers" runat="server" ControlToValidate="txtEmailId"
                                                ErrorMessage="Please Enter Valid Email ID" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Authorize Person Mobile No <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtAuthorizePersonMobileNo" runat="server" onkeypress="return digitonly(this,event)"
                                                MaxLength="10"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvAuthorizePersonMobileNo" runat="server" ErrorMessage="Please Enter Authorize Person Mobile No"
                                                ControlToValidate="txtAuthorizePersonMobileNo"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            PAN/ S. Tax/ TIN Number <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtPansTaxTinNumber" runat="server" onkeyup="ConvertToCaps(this)"
                                                MaxLength="10"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvPansTaxTinNumber" runat="server" ErrorMessage="Please Enter PAN/ S. Tax/ TIN Number"
                                                ControlToValidate="txtPansTaxTinNumber"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Office Address <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtAddressLineOF1" runat="server" TextMode="MultiLine" Width="220px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvAddressLine1" runat="server" ErrorMessage="Please Enter AddressLine1"
                                                ControlToValidate="txtAddressLineOF1"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Contry &amp; State <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:UpdatePanel ID="update1" runat="server"><ContentTemplate> 
                                            <asp:Label ID="lblIndia" runat="server" Text="India"></asp:Label>&nbsp;
                                            <asp:DropDownList ID="ddl_State_OA" runat="server" Style="width: 187px;" AutoPostBack="true"
                                                OnSelectedIndexChanged="ddl_State_OA_SelectedIndexChanged">
                                                <asp:ListItem>Select</asp:ListItem>
                                            </asp:DropDownList>
                                            </ContentTemplate></asp:UpdatePanel> 
                                            <asp:RequiredFieldValidator ID="rfv_ddl_State_OA" runat="server" ErrorMessage="Please Select State"
                                                ControlToValidate="ddl_State_OA" InitialValue="Select"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            District &amp; City <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:UpdatePanel ID="update2" runat="server"><ContentTemplate>
                                            <asp:DropDownList ID="ddl_Distric_OA" runat="server" Style="width: 105px">
                                                <asp:ListItem>Select</asp:ListItem>
                                            </asp:DropDownList>
                                            
                                            <asp:TextBox ID="txt_City_OA" runat="server" Style="width: 110px" onkeypress="return isAlpha(event)"
                                                MaxLength="25" Width="104px"></asp:TextBox>
                                                </ContentTemplate></asp:UpdatePanel>
                                            <asp:RequiredFieldValidator ID="rfv_ddl_Distric_OA" runat="server" ErrorMessage="Please Select Distric"
                                                ControlToValidate="ddl_Distric_OA" InitialValue="Select"></asp:RequiredFieldValidator>
                                            <asp:RequiredFieldValidator ID="rfv_txt_City_OA" runat="server" ErrorMessage="Please Enter City"
                                                ControlToValidate="txt_City_OA"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Pin Code <b>*</b>
                                        </td>
                                        <td>
                                            <strong>:</strong>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtPinCode" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="Rfv_PinCode" runat="server" ErrorMessage="Please Enter PinCode"
                                                ControlToValidate="txtPinCode"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <strong></strong>
                                        </td>
                                        <td style="padding: 10px 0 0 70px;">
                                            <asp:Button ID="btnWlReg" runat="server" CssClass="button active" Text="Submit" OnClick="btnWlReg_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</asp:Content>
