Exemplo n.º 1
0
        public IActionResult DeleteUserGroup([FromQuery] int groupId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _ugService.DeleteUserGroup(groupId, User.Identity.Name);
            return(Ok());
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Delete(string userGroupId, GroupUserModel groupUserModel)
        {
            try
            {
                string accessToken      = Session["MicrosoftAccessToken"] as string;
                var    userGroupService = new UserGroupService(accessToken);
                var    userGroup        = await userGroupService.GetUserGroupById(userGroupId);

                await userGroupService.DeleteUserGroup(userGroup.Id);

                return(RedirectToAction("Index", new { groupId = userGroup.GroupId }));
            }
            catch
            {
                return(View());
            }
        }
Exemplo n.º 3
0
 public OperationResult DeleteUserGroup(long userGroupId)
 {
     return(userGroupService.DeleteUserGroup(userGroupId));
 }