// GET: AccessAuthorities/Create public ActionResult Create() { AccessAuthoritiesDto dto = new AccessAuthoritiesDto(); dto.AccessPaths = db.AccessPaths.ToList(); dto.AccessRoles = db.AccessRoles.ToList(); return(View(dto)); }
public ActionResult Role(string ddlCompanies) { AccessAuthoritiesDto dto = new AccessAuthoritiesDto(); dto.AccessPaths = db.AccessPaths.ToList(); dto.AccessRoles = db.AccessRoles.ToList(); dto.UserRole = db.UserRoles.OrderBy(ur => ur.username).Where(ur => ur.COMP_CODE == ddlCompanies).ToList(); ViewBag.CompaniesList = GetCompanyList.GetCompany(); return(View(dto)); }
// GET: System public ActionResult Role() { AccessAuthoritiesDto dto = new AccessAuthoritiesDto(); dto.AccessPaths = db.AccessPaths.ToList(); dto.AccessRoles = db.AccessRoles.ToList(); if (MyRoleManager.hasRole(MyRoleManager.RoleType.DCEADMIN)) { dto.UserRole = db.UserRoles.OrderBy(ur => ur.username).Where(ur => ur.roletype != MyRoleManager.RoleType.SYSTEMADMIN).ToList(); } else { dto.UserRole = db.UserRoles.OrderBy(ur => ur.username).ThenBy(ur => ur.roletype).ToList(); } ViewBag.CompaniesList = GetCompanyList.GetCompany(); return(View(dto)); }