예제 #1
0
        public string GetModel(ConvertServiceRequest request)
        {
            if (request.Parameters.ContainsKey("Command"))
            {
                if (request.Parameters["Command"] == "LoadDropdown")
                    return LoadDropdownValues(request);
            }

            if (!string.IsNullOrEmpty(request.Data))
            {
                _viewModel = CommonUtils.JsonDeserialize<AdminReportsViewModel>(request.Data);
                RunReport();
            }
            else
            {
                CreateInitialViewModel();
                LoadPage(request);
            }

            return CommonUtils.JsonSerialize(_viewModel);
        }
예제 #2
0
        private void CreateInitialViewModel()
        {
            //Build View Model
            _viewModel = new AdminReportsViewModel()
            {
                ModuleName = "event",
                EntityName = "reports",
                PageHeader = "Reports"
            };

            _viewModel.NavLinks = EventUtils.CreateEventNavLinks().ToList();
            _viewModel.SubEntityNavLinks = EventUtils.CreateEventSubEntityNavLinks().ToList();
            _viewModel.FilterFields = CreateFilterFields();
        }