public async Task <IActionResult> FolderAccessList(Guid ID, bool Removed = false) { try { FolderAccessListViewModel model = new FolderAccessListViewModel(); model._context = _context; model._emailService = _emailService; model._securityOptions = _securityOptions; model._user = User; model.FolderID = ID; await model.PopulateList(); ViewData.Model = model; } catch (Exception ex) { HelperFunctions.Log(_context, PublicEnums.LogLevel.LEVEL_EXCEPTION, "Controllers.FileShareController.FolderAccessList", ex.Message, User, ex); } if (Removed) { ViewBag.Success = "Folder removed successfully"; } return(View()); }
public async Task <JsonResult> FolderAccessList(FolderAccessListViewModel model) { try { model._context = _context; model._emailService = _emailService; model._securityOptions = _securityOptions; model._user = User; await model.PopulateList(); return(Json(new { result = true, data = model })); } catch (Exception ex) { HelperFunctions.Log(_context, PublicEnums.LogLevel.LEVEL_EXCEPTION, "Checklist.Controllers.FileShareController.FolderAccessList", ex.Message, User, ex); } return(Json(new { result = false, message = "An error occurred. Please try again later." })); }