Beispiel #1
0
        private CountryProgramViewModel GetUseOfCSTab(string operationNumber)
        {
            var model = new CountryProgramViewModel()
            {
                UseOfCountrySystemTab = new UseOfCountrySystemsTabViewModel()
            };
            var response = _countryProgramService.GetUseOfCountrySystemsTab(operationNumber);

            model.UseOfCountrySystemTab = response.UseOfCountrySystemsTab;
            SetViewBagErrorMessageInvalidResponse(response);
            return(model);
        }
Beispiel #2
0
        private CountryProgramViewModel GetStrategicAlignmentTab(string operationNumber)
        {
            var model = new CountryProgramViewModel()
            {
                StrategicAlignmentTab = new StrategicAlignmentTabViewModel()
            };

            var response = _countryProgramService.GetStrategicAligmentTab(operationNumber);

            model.StrategicAlignmentTab = response.StrategicAlignmentTab;
            SetViewBagErrorMessageInvalidResponse(response);
            return(model);
        }
Beispiel #3
0
        private CountryProgramViewModel GetCountryProgram(string operationNumber)
        {
            var model    = new CountryProgramViewModel();
            var response = _countryProgramService.GetCountryProgram(operationNumber);

            model.CountryProgramTab     = response.CountryProgramTab;
            model.UseOfCountrySystemTab = response.UseOfCountrySystemsTab;
            model.StrategicAlignmentTab = response.StrategicAlignmentTab;
            model.IsOperationClosed     = response.IsOperationClosed;
            SetViewBagErrorMessageInvalidResponse(response);

            model.FieldAccessList = _securityModelRepository.GetFieldBehaviorByPermissions(
                IDBContext.Current.Operation,
                AttributeCPD.PAGE_NAME_COUNTRY_PROGRAM +
                '|' + AttributeCPD.PAGE_NAME_COUNTRY_PROGRAM_COUNTRY +
                '|' + AttributeCPD.PAGE_NAME_COUNTRY_PROGRAM_STRATEGIC,
                IDBContext.Current.Permissions,
                0,
                0)
                                    .ToList();

            return(model);
        }