Пример #1
0
        public ActionResult AdminIndex()
        {
            UserAdminIndexModel userModel = new UserAdminIndexModel();

            userModel.Admins = new tUserModelCustom {
                IDRole   = (int)Enums.enmRoles.Admin,
                UserList =
                    _userRepository.GetListByIDRole((int)Enums.enmRoles.Admin)
            };
            userModel.Partners = new tUserModelCustom {
                IDRole   = (int)Enums.enmRoles.Partner,
                UserList =
                    _userRepository.GetListByIDRole((int)Enums.enmRoles.Partner)
            };
            userModel.Users = new tUserModelCustom {
                IDRole   = (int)Enums.enmRoles.User,
                UserList =
                    _userRepository.GetListByIDRole((int)Enums.enmRoles.User)
            };
            userModel.Moderators = new tUserModelCustom {
                IDRole   = (int)Enums.enmRoles.Moderator,
                UserList =
                    _userRepository.GetListByIDRole((int)Enums.enmRoles.Moderator)
            };
            return(View(userModel));
        }
 public ActionResult AdminIndex()
 {
     UserAdminIndexModel userModel = new UserAdminIndexModel();
     userModel.Admins = new tUserModelCustom {
         IDRole = (int)Enums.enmRoles.Admin,
         UserList =
             _userRepository.GetListByIDRole((int)Enums.enmRoles.Admin)
     };
     userModel.Partners = new tUserModelCustom {
         IDRole = (int)Enums.enmRoles.Partner,
         UserList =
             _userRepository.GetListByIDRole((int)Enums.enmRoles.Partner)
     };
     userModel.Users = new tUserModelCustom {
         IDRole = (int)Enums.enmRoles.User,
         UserList =
             _userRepository.GetListByIDRole((int)Enums.enmRoles.User)
     };
     userModel.Moderators = new tUserModelCustom {
         IDRole = (int)Enums.enmRoles.Moderator,
         UserList =
             _userRepository.GetListByIDRole((int)Enums.enmRoles.Moderator)
     };
     return View(userModel);
 }