Exemple #1
0
 private async Task <UserViewModel> GetModelFromParameters(UserParameters parameters)
 {
     return(await UserViewModel.GetModel(
                DataContext,
                UserFilter.FromCDSId(parameters.CDSId),
                parameters.Action));
 }
Exemple #2
0
        public async Task <ActionResult> ContextMenu(UserParameters parameters)
        {
            ValidateUserParameters(parameters, UserParametersValidator.UserIdentifier);

            var userView = await UserViewModel.GetModel(
                DataContext,
                UserFilter.FromCDSId(parameters.CDSId));

            return(PartialView("_ContextMenu", userView));
        }
Exemple #3
0
        public async Task <ActionResult> RemoveRole(UserParameters parameters)
        {
            var filter = UserFilter.FromCDSId(parameters.CDSId);

            filter.Role = parameters.Role;

            await DataContext.User.RemoveRole(filter);

            FlushCache(parameters.CDSId);

            return(RedirectToAction("Roles", new { CDSID = parameters.CDSId }));
        }
Exemple #4
0
        public async Task <ActionResult> AddMarket(UserParameters parameters)
        {
            var filter = UserFilter.FromCDSId(parameters.CDSId);

            filter.MarketId   = parameters.MarketId;
            filter.RoleAction = parameters.RoleAction;

            await DataContext.User.AddMarket(filter);

            FlushCache(parameters.CDSId);

            return(RedirectToAction("Markets", new { CDSID = parameters.CDSId }));
        }
Exemple #5
0
 public async Task <ActionResult> Roles(UserParameters parameters)
 {
     return(View(await UserViewModel.GetModel(DataContext, UserFilter.FromCDSId(parameters.CDSId))));
 }