public virtual CloudAccountDA.aspnet_UsersDataTable GetData(string Username)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (Username == null)
     {
         throw new ArgumentNullException("Username");
     }
     this.Adapter.SelectCommand.Parameters[0].Value = Username;
     CloudAccountDA.aspnet_UsersDataTable dataTable = new CloudAccountDA.aspnet_UsersDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 protected void txtUsername_OnTextChanged(object sender, EventArgs e)
 {
     this.objUserDT = this.objUserBll.GetAllDetail(this.txtUsername.Text.Trim());
     if (this.objUserDT.Rows.Count > 0)
     {
         ScriptManager.RegisterClientScriptBlock(sender as Control, this.GetType(), "alert", "alert('User Name Already Register With System.')", true);
         this.txtUsername.Text = "";
         this.txtUsername.Focus();
     }
     else
     {
         this.txtPassword.Focus();
     }
 }
 public virtual int Fill(CloudAccountDA.aspnet_UsersDataTable dataTable, string Username)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (Username == null)
     {
         throw new ArgumentNullException("Username");
     }
     this.Adapter.SelectCommand.Parameters[0].Value = Username;
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
 protected void txtEmail_OnTextChanged(object sender, EventArgs e)
 {
     this.objCompanyMasterDT = this.objCompanyMasterBll.GetDataByCompanyEmail(this.txtEmailAddress.Text.Trim());
     this.objUserDT          = this.objUserBll.GetAllDetail(this.txtEmailAddress.Text.Trim());
     if (this.objCompanyMasterDT.Rows.Count > 0 || this.objUserDT.Rows.Count > 0)
     {
         ScriptManager.RegisterClientScriptBlock(sender as Control, this.GetType(), "alert", "alert('Company Email Already Register With System.')", true);
         this.txtEmailAddress.Text = "";
         this.txtEmailAddress.Focus();
     }
     else
     {
         this.btnCreate.Focus();
     }
 }
 protected void txtUserName_OnTextChanged(object sender, EventArgs e)
 {
     this.objCompanyMasterDT = this.objCompanyMasterBll.GetDataByCompanyUserName(this.txtUserName.Text.Trim());
     this.objUserDT          = this.objUserBll.GetAllDetail(this.txtUserName.Text.Trim());
     if (this.objCompanyMasterDT.Rows.Count > 0 || this.objUserDT.Rows.Count > 0)
     {
         this.DisplayAlert("UserName Already Exists In System.");
         ScriptManager.RegisterClientScriptBlock(sender as Control, this.GetType(), "alert", "alert('UserName Already Exists In System.')", true);
         this.txtUserName.Text = "";
         this.txtUserName.Focus();
     }
     else
     {
         this.txtPassword.Focus();
     }
 }
 protected void BtnCreateClick(object sender, EventArgs e)
 {
     if (!this.Page.IsValid)
     {
         return;
     }
     if (this.txtEmailAddress.Text.Trim().Length > 0 && this.txtPassword.Text.Trim().Length > 0 && this.txtConPassword.Text.Trim().Length > 0)
     {
         this.objAccountantMasterDT = this.objAccountantMasterBll.GetDataByAccountantEmail(this.txtEmailAddress.Text.Trim());
         this.objUserDT             = this.objUserBll.GetAllDetail(this.txtEmailAddress.Text.Trim());
         if (this.objAccountantMasterDT.Rows.Count > 0 || this.objUserDT.Rows.Count > 0)
         {
             this.DisplayAlert("Email has already been taken.");
             this.txtEmailAddress.Text = "";
             this.txtEmailAddress.Focus();
             this.checkInDB = true;
         }
         else
         {
             this.checkInDB = false;
         }
         if (this.checkInDB)
         {
             return;
         }
         string str = string.Empty;
         if (this.Request.QueryString["cmdId"] != null && this.Request.QueryString["Dated"] != null)
         {
             str = str + "&cmdId=" + this.Request.QueryString["cmdId"] + "&Dated=" + this.Request.QueryString["Dated"];
         }
         MembershipCreateStatus status;
         Membership.CreateUser(this.txtEmailAddress.Text, this.txtPassword.Text, this.txtEmailAddress.Text, "What is Your Email.?", this.txtEmailAddress.Text, true, out status);
         if (status != MembershipCreateStatus.Success)
         {
             return;
         }
         Roles.AddUserToRole(this.txtEmailAddress.Text, "Accountant");
         this.Response.Redirect("AccountantRegistration.aspx?em=" + this.txtEmailAddress.Text + str);
     }
     else
     {
         this.DisplayAlert("Please Fill All Required Fields");
     }
 }
 protected void TxtEmailAddressTextChanged(object sender, EventArgs e)
 {
     if (this.txtEmailAddress.Text.Trim().Length <= 0)
     {
         return;
     }
     this.objAccountantMasterDT = this.objAccountantMasterBll.GetDataByAccountantEmail(this.txtEmailAddress.Text.Trim());
     this.objUserDT             = this.objUserBll.GetAllDetail(this.txtEmailAddress.Text.Trim());
     if (this.objAccountantMasterDT.Rows.Count > 0 || this.objUserDT.Rows.Count > 0)
     {
         ScriptManager.RegisterClientScriptBlock(sender as Control, this.GetType(), "alert", "alert('Email has already been taken.')", true);
         this.txtEmailAddress.Text = "";
         this.txtEmailAddress.Focus();
     }
     else
     {
         this.txtPassword.Focus();
     }
 }
 protected void txtUserName_TextChanged(object sender, EventArgs e)
 {
     if (this.txtUserName.Text.Trim().Length <= 0)
     {
         return;
     }
     this.objUserDT = this.objUserBll.GetAllDetail(this.txtUserName.Text.Trim());
     this.objMasterAdminLoginMasterDT = this.objMasterAdminLoginMasterBll.GetDataByUserName(this.txtUserName.Text.Trim());
     if (this.objMasterAdminLoginMasterDT.Rows.Count > 0 && this.objUserDT.Rows.Count > 0)
     {
         this.DisplayAlert("UserName Already Assigned To Someone.");
         this.txtUserName.Text = "";
         this.txtUserName.Focus();
     }
     else
     {
         this.txtEmail.Focus();
     }
 }