public override ActionResult Index(int?pageIndex)
        {
            ViewData["ParentId"] = moduleService.GetModuleSelect();
            int index = pageIndex ?? 1;
            IEnumerable <T_Module> entities = (IEnumerable <T_Module>)Session[cacheSearchKey] ??
                                              moduleService.GetAll();
            IEnumerable <T_Module> result = moduleService.GetSearchPagingInfo(entities, index, base.PageSize);

            return(PartialView("_ModuleGrid", result));
        }
 public ActionResult UserAuthorizationEdit(int userId)
 {
     try
     {
         var model = new AuthorizationModel
         {
             Roles   = RoleService.GetAll(),
             Modules = ModuleService.GetAll(),
             User    = UserService.Get(userId)
         };
         return(View(model));
     }
     catch (Exception e)
     {
         Logger.Error("Hata oluştu - " + new StackTrace().GetFrame(0).GetMethod().Name, e);
         return(View(new AuthorizationModel()));
     }
 }
 public ActionResult AuthorizationItemEdit(int authorizationId)
 {
     try
     {
         var model = new AuthorizationModel
         {
             RoleModules = RoleModuleService.GetAll(authorizationId).Select(r => r.ModuleId.Value).ToList(),
             Role        = RoleService.Get(authorizationId),
             Modules     = ModuleService.GetAll()
         };
         return(View(model));
     }
     catch (Exception e)
     {
         Logger.Error("Hata oluştu - " + new StackTrace().GetFrame(0).GetMethod().Name, e);
         return(View(new AuthorizationModel()));
     }
 }
        public IQueryable <Module> GetAll()
        {
            var ModuleList = _moduleService.GetAll();

            return(ModuleList.AsQueryable());
        }