public async Task <IActionResult> FolderDirectoryList(Guid ID, bool Removed = false)
        {
            try
            {
                FolderDirectoryListViewModel model = new FolderDirectoryListViewModel();
                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.FolderDirectoryList", ex.Message, User, ex);
            }

            if (Removed)
            {
                ViewBag.Success = "Folder Directory removed successfully";
            }

            return(View());
        }
        public async Task <JsonResult> FolderDirectoryList(FolderDirectoryListViewModel 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.FolderDirectoryList", ex.Message, User, ex);
            }

            return(Json(new { result = false, message = "An error occurred. Please try again later." }));
        }