Beispiel #1
0
 private void LoadScenarios()
 {
     using (var dataAccess = new MinCommercialSegmentDataAccess())
     {
         var scenarioListItems = dataAccess.GetMinCommSegScenarios(ucScenarioSelection.CountryId);
         ucScenarioSelection.LoadScenarios(scenarioListItems);
     }
 }
        private void PopulateScenarios()
        {
            int countryIdSelected;

            using (var dataAccess = new MinCommercialSegmentDataAccess())
            {
                ListGenerator.FillDropdownWithFaoCountries(ddlCountry, dataAccess);

                countryIdSelected = int.Parse(ddlCountry.SelectedValue);
                var scenarioListItems = dataAccess.GetMinCommSegScenarios(countryIdSelected);
                ddlMinCommSeg.Items.AddRange(scenarioListItems.ToArray());

                SetMinScenDescription(dataAccess);
            }
            using (var dataAccess = new MaxFleetFactorDataAccess())
            {
                var scenarioListItems = dataAccess.GetMaxFleetFactorScenarios(countryIdSelected);
                ddlMaxFleetFactor.Items.AddRange(scenarioListItems.ToArray());

                SetMaxScenDescription(dataAccess);
            }
        }