protected void btnReset(object sender, EventArgs e) { string FName = GlobalMethods.KillChars(txt_FName.Text); string LName = GlobalMethods.KillChars(txt_LName.Text); string EmailIn = GlobalMethods.KillChars(txt_email.Text); if (EmailIn.Length > 0) { if (LoginBAL.CheckEmailExsists(EmailIn)) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "script", "CallNotify('This email address has been used by some other user. Please use another valid email!', '', 'danger', 'RegisterClass.aspx');", true); } else { if (LoginBAL.Registration(FName, LName, EmailIn)) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "script", "CallNotify('Your Account has been created!', '', 'success', 'RegisterClass.aspx');", true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "script", "CallNotify('Cannot Reset Password!', '', 'danger', 'RegisterClass.aspx');", true); } } } }
protected void AddTManual_Click(object sender, EventArgs e) { Security objSecurity = new Security(); #region "variables" string vFName = objSecurity.KillChars(txtFName.Text); string vLName = objSecurity.KillChars(txtLName.Text); string vEmail = objSecurity.KillChars(txtEmail.Text); #endregion if (LoginBAL.CheckEmailExsists(vEmail)) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "script", "CallNotify('This email address has been used by some other user. Please use another valid email!', '', 'danger', 'Ad_MDE_Mgmt.aspx?MDE=active');", true); } else { if (LoginBAL.RegistrationByRole(vFName, vLName, vEmail, 1, Convert.ToInt32(HttpContext.Current.Session["UserAuthId"].ToString()))) { } } }