public ActionResult Index()
        {
            var model = new UserListViewModel
            {
                HasCreatePermission = _rightService.UserHasRight(Common.LoggedInUser.UserName, Rights.User, RightOperation.Create),
                HasEditPermission = _rightService.UserHasRight(Common.LoggedInUser.UserName, Rights.User, RightOperation.Update),
                HasExportPermission = _rightService.UserHasRight(Common.LoggedInUser.UserName, Rights.UserExport, RightOperation.Execute)
            };

            return View(model);
        }
        public ContentResult Search(int page, int rows, string sidx, string sord, string filters, string searchField, string searchOper, string searchString)
        {
            var model = new UserListViewModel();
            var result = new ContentResult()
            {
                Content = model.UsersGrid.Search(sidx, sord, page, rows, true, filters, searchField, searchOper, searchString),
                ContentType = "application/json"
            };

            return result;
        }
        public FileStreamResult Export(string sidx, string sord, string filters)
        {
            var model = new UserListViewModel();
            Stream fileStream = new MemoryStream(_excelService.GetExcel(model.UsersGrid, "Users", sidx, sord, filters));
            HttpContext.Response.AddHeader("content-disposition", "attachment; filename=users.xlsx");

            return new FileStreamResult(fileStream, "application/ms-excel");
        }