private async Task <UserViewModel> GetModelFromParameters(UserParameters parameters) { return(await UserViewModel.GetModel( DataContext, UserFilter.FromCDSId(parameters.CDSId), parameters.Action)); }
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)); }
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 })); }
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 })); }
public async Task <ActionResult> Roles(UserParameters parameters) { return(View(await UserViewModel.GetModel(DataContext, UserFilter.FromCDSId(parameters.CDSId)))); }