public ActionResult Index()
        {
            try
            {
                int userType = 0;
                int UserId   = 0;
                if (Session["UserId"] != null)
                {
                    UserId   = Convert.ToInt32(Session["UserId"].ToString());
                    userType = Convert.ToInt32(Session["UserType"].ToString());
                }

                ManageDocumentViewModel manageDocumentViewModel = new ManageDocumentViewModel();
                manageDocumentViewModel.ManageDocumentFilterViewModel = new ManageDocumentFilterViewModel()
                {
                    documentViewModel = new DocumentViewModel(),
                    client            = userType == (int)Web.Models.Enums.UserType.ClientUser ? _userClientService.GetUserClients(UserId) : _clientService.GetAllClients(),
                    practiceArea      = _practiceAreaService.GetAllPracticeArea(),
                    categoryModels    = _categoryService.GetAll(),
                    formTypeModels    = _formTypeService.GetAll(),
                    documentType      = _codesService.GetAllByType("DOCTYPE"),
                    state             = _codesService.GetAllStateByType("STATE")
                };

                return(View(manageDocumentViewModel));
            }
            catch (Exception ex)
            {
                _errorLogService.Add(new ErrorLogModel()
                {
                    Page = "DocumentCenter/Index", CreatedBy = Convert.ToInt32(Session["UserId"]), CreateDate = DateTime.Now, ErrorText = ex.ToMessageAndCompleteStacktrace()
                });
                return(View(new ManageDocumentViewModel()
                {
                    ErrorMessage = "Sorry, An error occurred!"
                }));
            }
        }