protected void btnAdd_Click(object sender, EventArgs e) { if (!commonBAL.isUserAuthorisedForPageFunc(LoggedInUser.UserId, thisPageName, "add")) { LoggedIn master = (LoggedIn)this.Master; master.ShowMessage("You are not authorised to Perform any operation on this page. Please contact system administrator.", false); return; } if (ValidData()) { } else { LoggedIn master = (LoggedIn)this.Master; CommonBAL combal = new CommonBAL(); UserBE addUserBE = new UserBE(); UserDAL addUserdAL = new UserDAL(); UserBAL addUserBal = new UserBAL(); int ReturnOutput = 0; addUserBE.LastModifiedBy = ((UserBE)Session["LoggedInUser"]).UserId; addUserBE.UserName = txtUserName.Text; addUserBE.FirstName = txtFName.Text; addUserBE.MiddleName = txtMName.Text; addUserBE.LastName = txtLName.Text; addUserBE.PrimaryEmailId = txtPREmailId.Text; addUserBE.SecondaryEmailId = txtSCEmailId.Text; addUserBE.MobileNo = txtMobileNo.Text; addUserBE.Address1 = txtAddress1.Text; addUserBE.Address2 = txtAddress2.Text; addUserBE.Street = txtStreet.Text; addUserBE.City = txtCity.Text; addUserBE.State1 = txtState.Text; addUserBE.Country = txtCountry.Text; addUserBE.SecretQuest = ddSecretQuest.SelectedValue; addUserBE.SecretAns = txtSecretAns.Text; addUserBE.EncPass = combal.Encrypt(txtPass.Text, false); if (addUserBal.AddUser(addUserBE, ref ReturnOutput)) { if(ReturnOutput==1) { master.ShowMessage("User of this User Name Already exist. ", false); } else if (ReturnOutput == 2) { clearFields(); master.ShowMessage("Record Inserted Successfully.", true); } } else { master.ShowMessage("Unsuccessful", false); } } }
public bool Validate(ref UserBE user) { UserDAL userDAL = new UserDAL(); if (userDAL.Validate(ref user)) return true; else return false; }
public bool GetAllUserDetails(ref DataTable dt) { UserDAL userDAL = new UserDAL(); if (userDAL.GetAllUserDetails(ref dt)) return true; else return false; }
public bool ViewUser(UserBE viewuser) { UserDAL userDAL = new UserDAL(); if (userDAL.ViewUser(viewuser)) { return true; } else { return false; } }
public bool Modify(UserBE user) { UserDAL userDAL = new UserDAL(); if (userDAL.Modify(user)) { return true; } else { return false; } }
public bool Delete(UserBE user) { UserDAL userDAL = new UserDAL(); if (userDAL.Delete(user)) { return true; } else { return false; } }
public bool AddUser(UserBE addUserBE , ref int ReturnOutput) { UserDAL userDAL = new UserDAL(); if (userDAL.AddUser(addUserBE, ref ReturnOutput)) { return true; } else { return false; } }
public DataSet CheckConfirmationRequest(string UserId, string key) { try { UserDAL userDAL = new UserDAL(); return userDAL.CheckConfirmationRequest(UserId, key); } catch (Exception ex) { throw ex; } finally { } }
public int SaveConfirmation(string UserId, string Key, string Password) { try { UserDAL userDAL = new UserDAL(); return userDAL.SaveConfirmation(UserId, Key, Password); } catch (Exception ex) { throw ex; } finally { } }
public DataSet GetSecretQuestion() { UserDAL userDAL = new UserDAL(); return userDAL.GetSecretQuestion(); }
public DataSet InsertUser(UserBE UserBE) { try { UserDAL userDAL = new UserDAL(); return userDAL.InsertUser(UserBE); } catch (Exception ex) { throw ex; } finally { } }
public DataSet GetUsers() { try { UserDAL userDAL = new UserDAL(); return userDAL.GetUsers(); } catch (Exception ex) { throw ex; } finally { } }
public bool ResetPassword(UserBE user) { UserDAL userDAL = new UserDAL(); if (userDAL.ResetPassword(user)) { return true; } else { return false; } }
public bool UserAccessRight(UserBE user, ref DataTable dt) { UserDAL userDAL = new UserDAL(); if(userDAL.UserAccessRight(user,ref dt)) { return true; } else { return false; } }