public int InsertRole(AdminRoles roles) { Logging.LogDebugMessage("Method: InsertRole ,MethodType: Post, Layer: RolesController, Parameters: roles = " + JsonConvert.SerializeObject(roles)); using (RolesBL insertRole = new RolesBL()) { return(insertRole.InsertRole(roles)); } }
public AdminRoles GetRolesByName(string roleName) { Logging.LogDebugMessage("Method: GetRolesByName ,MethodType: Get, Layer: RolesController, Parameters: " + "roleName = " + roleName); using (RolesBL roleByName = new RolesBL()) { return(roleByName.GetRolesByName(roleName)); } }
public List <AdminRoles> GetAllActiveRoles() { Logging.LogDebugMessage("Method: GetAllActiveRoles, MethodType: Get, Layer: RolesController, Parameters: No Input Parameters"); using (RolesBL activeRoles = new RolesBL()) { return(activeRoles.GetAllActiveRoles()); } }
/// <summary>This method deletes the selected roles.</summary> /// <param name="deletedRolesWithAdminUser">The DeletedRolesWithAdminUser Object.</param> /// <returns>List of Roles Object.</returns> public List <AdminRoles> DeleteRoles(DeletedRolesWithAdminUser deletedRolesWithAdminUser) { Logging.LogDebugMessage("Method: DeleteRoles, MethodType: Post, Layer: RolesController, Parameters: DeletedUsersWithAdminUser = " + JsonConvert.SerializeObject(deletedRolesWithAdminUser)); using (RolesBL roleBL = new RolesBL()) { return(roleBL.DeleteRoles(deletedRolesWithAdminUser)); } }
public AdminRoles GetRolesById(int roleId) { Logging.LogDebugMessage("Method: GetRolesById ,MethodType: Get, Layer: RolesController, Parameters: " + "roleId = " + roleId.ToString()); using (RolesBL roleById = new RolesBL()) { return(roleById.GetRolesById(roleId)); } }
public bool UpdateRole(AdminRoles role) { Logging.LogDebugMessage("Method: UpdateRole ,MethodType: Post, Layer: RolesController, Parameters:role = " + JsonConvert.SerializeObject(role)); using (RolesBL updateRole = new RolesBL()) { return(updateRole.UpdateRole(role)); } }
private void CargarRoles(Int32 CodigoModulo) { RolesBL ObjetoRoles = new RolesBL(); lbPermisos.DataSource = ObjetoRoles.Listar(CodigoModulo); lbPermisos.DisplayMember = "Descripcion"; lbPermisos.ValueMember = "Codigo"; }
public bool UserRoleInsertBulk(RoleObj roleObj) { Logging.LogDebugMessage("Method: UserRoleInsertBulk ,MethodType: Post, Layer: RolesController, Parameters: roleObj = " + JsonConvert.SerializeObject(roleObj)); using (RolesBL userRoleInsert = new RolesBL()) { List <InserRoleUser> insertroleuser = new List <InserRoleUser>(); int CreatedByUserID = 0; insertroleuser = roleObj.Insertroleuser; CreatedByUserID = roleObj.CreateUserId; return(userRoleInsert.UserRoleInsertBulk(insertroleuser, CreatedByUserID)); } }
//get by user by username public ActionResult EditUser(string username) { User user = db.Users.Find(username); if (user == null) { return(HttpNotFound()); } List <SelectListItem> usertype = new List <SelectListItem>(); IList <Role> userTypes = new RolesBL().GetAllRoles().ToList(); foreach (Role r in userTypes) { if (r.RoleID != 1) { usertype.Add(new SelectListItem { Text = r.RoleName, Value = r.RoleID.ToString() }); } } ViewData["usersList"] = usertype; return(View(user)); }
public void LoadDynamicMenu(string username, string PCC) { List <Rol> rolList = RolesBL.GetRolesByUser(username, PCC); roles = Array.ConvertAll <Rol, string>(rolList.ToArray(), delegate(Rol from) { return(from.RoleName.ToString()); }); //roles = Roles.GetRolesForUser(username); //roles = new string[] { "admin", "" }; List <ApplicationObjects> applicationObjects = MyCTS.Forms.UI.DataAccess.Security.GetMenuData(); List <ApplicationObjects> parentObjects = GetParents(applicationObjects); foreach (ApplicationObjects item in parentObjects) { ToolStripMenuItemExtended menu = new ToolStripMenuItemExtended(); menu.Name = item.Name; menu.Text = item.Text; menu.Value = item.ID.ToString(); menu.Width = 55; menu.AutoSize = false; this.Items.Add(menu); AddChild(applicationObjects, (ToolStripMenuItemExtended)this.Items[this.Items.Count - 1]); } }
public static FASM_Enums.InfoMessages DeleteRoles(Int32 RoleId) { RolesBL RolesBL = new RolesBL(); return(RolesBL.DeleteRoles(RoleId)); }
public static FASM_Enums.InfoMessages SaveRoles(ref Roles eRoles) { RolesBL RolesBL = new RolesBL(); return(RolesBL.SaveRoles(ref eRoles)); }
public static void LoadRoles(ref Roles eRoles) { RolesBL RolesBL = new RolesBL(); RolesBL.LoadRoles(ref eRoles); }
public static DataTable ShowRoles(Int32 UserId) { RolesBL RolesBL = new RolesBL(); return(RolesBL.ShowRoles(UserId)); }
public static DataTable GetRoles() { RolesBL RolesBL = new RolesBL(); return(RolesBL.GetRoles()); }
public void Initialize() { tScope = new TransactionScope(); rolesBL = new RolesBL(); }