public bool GetAllRoleDetails(ref DataTable dt) { RoleDAL roleDAL = new RoleDAL(); if (roleDAL.GetAllRoleDetails(ref dt)) return true; else return false; }
public bool ModifyRole(RoleBE role) { RoleDAL roleDAL = new RoleDAL(); if (roleDAL.ModifyRole(role)) { return true; } else { return false; } }
public bool DeleteRole(RoleBE role) { RoleDAL roleDAL = new RoleDAL(); if (roleDAL.DeleteRole(role)) { return true; } else { return false; } }
protected void btnAddRole_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); // Server.Transfer("UM_BlankPage.aspx"); //?? send Message through Query String to the BlankPage // string cat = Request.QueryString["Message"]; // Response.Redirect("UM_BlankPage.aspx?Message=You are not authorised to Perform any operation on this page. Please contact system administrator."); return; } if (ValidData()) { } else { UserBE user = (UserBE)Session["LoggedInUser"]; RoleBE addRoleBE = new RoleBE(); RoleDAL addRoleDal = new RoleDAL(); RoleBAL addRoleBal = new RoleBAL(); addRoleBE.RoleShortDesc = txtRoleShortDesc.Text; addRoleBE.RoleLongDesc = txtRoleLongDesc.Text; addRoleBE.LastModifiedBy = user.UserId; if (addRoleBal.AddRole(addRoleBE)) { txtRoleShortDesc.Text = ""; txtRoleLongDesc.Text = ""; LoggedIn master = (LoggedIn)this.Master; master.ShowMessage("Record Inserted Successfully.", true); } else { LoggedIn master = (LoggedIn)this.Master; master.ShowMessage("Unsuccessful.", false); } } }