public bool IsPasswordChanged() { SqlParameter[] parameters = new SqlParameter[4]; parameters[0] = DataAccess.AddParameter("@GUID", UserObj.GlobalUniqueIDForResetPassword); parameters[1] = DataAccess.AddParameter("@password", UserObj.getPassword()); parameters[2] = DataAccess.AddParameter("@salt", UserObj.getSalt()); parameters[3] = DataAccess.AddParameter("@hash", UserObj.getHash()); DataTable dt = DataAccess.ExecuteDTByProcedure("SP_CHANGE_PASSWORD", parameters); if (dt == null) { return(false); } else { if (dt.Rows.Count > 0) { return(dt.Rows[0]["returnCode"].ToString().Equals("1")); } else { return(false); } } }
public void AddNewUser() { SqlParameter[] parameters = new SqlParameter[11]; parameters[0] = DataAccess.AddParameter("@username", UserObj.Username); parameters[1] = DataAccess.AddParameter("@fullname", UserObj.getFullName()); parameters[2] = DataAccess.AddParameter("@email", UserObj.Email); parameters[3] = DataAccess.AddParameter("@dob", UserObj.getDateOfBirth()); parameters[4] = DataAccess.AddParameter("@age", UserObj.getAge()); parameters[5] = DataAccess.AddParameter("@image", UserObj.getImage()); parameters[6] = DataAccess.AddParameter("@religion", UserObj.getReligion()); parameters[7] = DataAccess.AddParameter("@password", UserObj.getPassword()); parameters[8] = DataAccess.AddParameter("@gender", UserObj.getGender()); parameters[9] = DataAccess.AddParameter("@salt", UserObj.getSalt()); parameters[10] = DataAccess.AddParameter("@hash", UserObj.getHash()); DataAccess.ExecuteDTByProcedure("sp_addNewUser", parameters); }