<%@ Page Title="User Creation Page" Language="C#" MasterPageFile="~/SunMaster.Master" AutoEventWireup="true" CodeBehind="UserCreation.aspx.cs" Inherits="SUNWEB.UserCreation" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript">

    function checkNumber(evt) {
        evt = (evt) ? evt : window.event
        var charCode = (evt.which) ? evt.which : evt.keyCode
        if (charCode > 31 && (charCode < 48 || charCode > 57)) {
            status = "This field accepts numbers only."
            return false
        }
        status = ""
        return true
    }




    function validate() {

        if (document.getElementById("<%=txtUserName.ClientID %>").value == "") {
            alert("Enter UserName");
            document.getElementById("<%=txtUserName.ClientID %>").focus();
            return false;
        }

        if (document.getElementById("<%=txtPassword.ClientID %>").value == "") {
            alert("Enter Password");
            document.getElementById("<%=txtPassword.ClientID %>").focus();
            return false;
        }
   

    }

    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel runat="server" ID="updatepanel1" UpdateMode="Conditional">
  <ContentTemplate>
       <table style="margin-left: 1%; width: 98%;">
       <tr>
      <td style="font-size:large; width: 50%; font-family:'Open Sans', sans-serif; font-weight:bolder;">
       USER CREATION 
     </td>    
     
     </tr>
     </table>
    

      

        <div class="row">
                        <!-- ============================================================== -->
                        <!-- valifation types -->
                        <!-- ============================================================== -->
                        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                            <div class="card">
                                <h5 class="card-header" style="background-color: #4c4c4c; color: White; font-size: 14px;">User Informations</h5>
                                <div class="card-body">
                                    <form id="validationform" data-parsley-validate="" novalidate="">
                                        <div class="form-group row">
                                            <label class="col-12 col-sm-3 col-form-label text-sm-right">Company Name </label>
                                            <div class="col-12 col-sm-8 col-lg-6">
                                                <asp:DropDownList ID="cmbCompanyName" runat="server" CssClass="custom-select" Enabled="false"></asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="form-group row" runat="server" visible="false">
                                            <label class="col-12 col-sm-3 col-form-label text-sm-right"></label>
                                            <div class="col-12 col-sm-8 col-lg-6">
                                                  <asp:DropDownList ID="cmbBranchHeader" runat="server" CssClass="custom-select" Visible="false"></asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-12 col-sm-3 col-form-label text-sm-right">User Name</label>
                                            <div class="col-12 col-sm-8 col-lg-6">
                                               <asp:TextBox ID="txtUserName" class="form-control" MaxLength="20" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-12 col-sm-3 col-form-label text-sm-right">Pass word</label>
                                            <div class="col-12 col-sm-8 col-lg-6">
                                                <asp:TextBox ID="txtPassword"  TextMode="Password" MaxLength="15" class="form-control" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="form-group row" runat="server" visible="false">
                                            <label class="col-12 col-sm-3 col-form-label text-sm-right"></label>
                                            <div class="col-12 col-sm-8 col-lg-6">
                                              <asp:Label ID="lblBranchAliasName"  ForeColor="Gray" runat="server" Text="Branch Name" Visible="false"></asp:Label></label>
                                          <asp:DropDownList ID="cmbBranches" CssClass="custom-select"  
                                           runat="server" AutoPostBack="true" Visible="false" 
                                           onselectedindexchanged="cmbBranches_SelectedIndexChanged"></asp:DropDownList>
                                            </div>
                                        </div>

                                       <div class="form-group row" runat="server" visible="false">
                                                  
                                            <asp:CheckBox ID="chkIsMultiBranch" runat="server" Checked="true"  /> MultiBranch
                                            <asp:CheckBox ID="chkIsSuperAdmin" runat="server" Checked="true" /> Super Admin 
                                            
                                        </div>



                                        <div class="form-group row text-right">
                                            <div class="col col-sm-10 col-lg-9 offset-sm-1 offset-lg-0">

                                                <asp:Button ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" OnClientClick="return validate()"  CssClass="btn btn-space btn-primary"/>
                                                <%--<button type="submit" class="btn btn-space btn-primary">Submit</button>--%>
                                                
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                     
                    </div>

 
   
   <div>
       <h4>&nbsp;<asp:Label ID="lblGreeting" runat="server"></asp:Label></h4>
       <asp:HiddenField ID="hidCmid" runat="server" Visible="false"/>
           <%--<asp:Button ID="btnPdf" runat="server" Text="PDF" 
            ToolTip="To Export  the Report Click Here"  CssClass="btn btn-secondary" 
            onclick="btnPdf_Click"/>--%>   
     </div>
     </ContentTemplate>
     </asp:UpdatePanel>


<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css?v=1.1" rel="stylesheet" />
<!-- Bootstrap 5 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
<!-- Optional Bootstrap Icons -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css" rel="stylesheet" />


</asp:Content>
