public async Task <IActionResult> FolderList(bool Removed = false) { try { FolderListViewModel model = new FolderListViewModel(); model._context = _context; model._emailService = _emailService; model._securityOptions = _securityOptions; model._user = User; await model.PopulateList(); ViewData.Model = model; } catch (Exception ex) { HelperFunctions.Log(_context, PublicEnums.LogLevel.LEVEL_EXCEPTION, "Controllers.FileShareController.Index", ex.Message, User, ex); } if (Removed) { ViewBag.Success = "Folder removed successfully"; } return(View()); }
public async Task <JsonResult> FolderList(FolderListViewModel 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.Index", ex.Message, User, ex); } return(Json(new { result = false, message = "An error occurred. Please try again later." })); }