private IList <ConvergenceMasterDataModel> FilterDivisionsForSectorDepartments( List <int> sectorIds) { _filterBusinesslogic = new PMRPublicBusinessLogic(); return(_filterBusinesslogic.FilterDivisions( ClientForGenericReports.GetDivisionFilter( IDBContext.Current.CurrentLanguage, sectorIds))); }
private void LoadSectorsAndDivisions(PMRPublicReportModel model) { _filterBusinesslogic = new PMRPublicBusinessLogic(); model.SectorDepartments = _filterBusinesslogic.FilterSectorDepartment(ClientForGenericReports .GetSectorDepartment(IDBContext.Current.CurrentLanguage)); List <int> sectorIds = model.SectorDepartments.Select(x => x.ConvergenceMasterDataId).ToList(); model.Divisions = FilterDivisionsForSectorDepartments(sectorIds); }
public virtual JsonResult PMRPublicFilterCountries(PMRPublicReportModel model) { _filterBusinesslogic = new PMRPublicBusinessLogic(); model.Countries = _filterBusinesslogic.FilterCountries(ClientForGenericReports .GetCountriesFilter( IDBContext.Current.CurrentLanguage, model.SelectedCountryDepartments)); return(new JsonResult() { Data = model.Countries }); }
private PMRPublicReportModel CreateModel(PMRPublicFilterModel filterModel) { PMRPublicReportModel result = new PMRPublicReportModel(); string language = IDBContext.Current.CurrentLanguage; _filterBusinesslogic = new PMRPublicBusinessLogic(); result.CountryDepartments = _filterBusinesslogic.FilterCountryDepartments( ClientForGenericReports.GetCountryDepartments(language)); result.PMRCycles = ClientPMRForCycleModel .GetPMRCycles(language).OrderByDescending(x => x.StartDate).ToList(); // don't include DRAFT validation stages, no necessary to list them result.PMRValidationStages = _filterBusinesslogic.FilterPMRValidationStages( ClientForGenericReports.GetPMRValidationStages(language)); result.OperationOverallStages = ClientForGenericReports.GetOperationOverallStages(language) .OrderBy(x => x.Name).ToList(); result.Countries = _filterBusinesslogic.FilterCountries( ClientForGenericReports.GetCountries(language)); LoadSectorsAndDivisions(result); List <TriStateFilter> triState = new List <TriStateFilter>(); triState.Add(new TriStateFilter { Name = Localization.GetText("All"), Value = -1 }); triState.Add(new TriStateFilter { Name = Localization.GetText("Yes"), Value = 1 }); triState.Add(new TriStateFilter { Name = Localization.GetText("No"), Value = 0 }); result.IsActive = triState; result.IsAuthorize = triState; result.Table = ClientForPMRPublic.GetPMRPublicTableData(filterModel); return(result); }