/// <summary> /// obtains the role detail /// </summary> /// <param name="id">identifier of role</param> /// <returns>returns the result to action</returns> public ActionResult Detail(int?id) { RolRepository objrol = new RolRepository(SessionCustom); ModulRepository objmod = new ModulRepository(SessionCustom); RolmodulRepository objrolmodul = new RolmodulRepository(SessionCustom); objmod.Entity.LanguageId = CurrentLanguage.LanguageId.Value; Domain.Entities.Rol rol = null; if (id != null) { objrolmodul.Entity.RolId = objrol.Entity.RolId = id; objrol.Load(); rol = objrol.Entity; ViewBag.id = id; } return(this.View(new Roles() { UserPrincipal = CustomUser, Module = this.Module, RolCustom = rol, ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext), CollModuls = objmod.GetAllReadOnly(), CollRolmodul = id != null ? objrolmodul.GetAllReadOnly() : null, CurrentLanguage = CurrentLanguage })); }