private void FillDropdowns() { var now = DateTime.Now; for (int i = 1; i > -4; i--) { ddlYearSelection.Items.Add(new ListItem(now.AddYears(i).Year.ToString(CultureInfo.InvariantCulture))); } ddlYearSelection.SelectedValue = now.Year.ToString(CultureInfo.InvariantCulture); var months = new List <ListItem>(); for (int i = 0; i < 12; i++) { months.Add(new ListItem(CultureInfo.CurrentUICulture.DateTimeFormat.MonthNames[i], (i + 1).ToString(CultureInfo.InvariantCulture))); } ddlMonthSelection.Items.AddRange(months.ToArray()); ddlCarSegment.Items.Add(new ListItem("Car", "4")); ddlCarSegment.Items.Add(new ListItem("Van", "6")); ListGenerator.FillDropdownWithFaoCountries(ddlCountry); //ddlCountry.Items }
protected void Page_Load(object sender, EventArgs e) { ucMaxFactors.GridItemType = typeof(LifecycleHoldingCostRow); ucMaxFactors.SessionNameForGridData = FaoSessionDataGrid; ucMaxFactors.ColumnHeaders = LifecycleHoldingCostRow.HeaderRows; ucMaxFactors.ColumnFormats = LifecycleHoldingCostRow.Formats; ucParameters.SessionStoredFaoMinCommSegParameters = SessionStoredFaoLifecycleHoldingCostParameters; if (IsPostBack) { if (fuFaoHoldingCostFile.PostedFile != null) { if (hfFaoUploadHoldingCostFile.Value != string.Empty) { var file = fuFaoHoldingCostFile.PostedFile; SelectedPanel = 2; //Bring the panel pack here after a full page postback ParseUploadedFile(file); btnUpload.Visible = true; hfFaoUploadHoldingCostFile.Value = string.Empty; } } else { SelectedPanel = 0; } } else { ListGenerator.FillDropdownWithFaoCountries(ddlCountry); } }
private void PopulateDropdowns() { for (var i = 2; i < 12; i++) { ddlWeeksSelection.Items.Add(i.ToString(CultureInfo.InvariantCulture)); } ddlWeeksSelection.Items[4].Selected = true; ListGenerator.FillDropdownWithFaoCountries(ddlCountry); }
protected void Page_Load(object sender, EventArgs e) { agLimits.GridItemType = typeof(RankingOrderEntitiy); agLimits.SessionNameForGridData = "FaoRankingLimits"; agLimits.ColumnHeaders = RankingOrderEntitiy.HeaderRows; agLimits.ColumnFormats = RankingOrderEntitiy.Formats; if (!IsPostBack) { ListGenerator.FillDropdownWithFaoCountries(ddlCountry); } }
protected void Page_Load(object sender, EventArgs e) { agAdditionPlanHistory.GridItemType = typeof(AdditionPlanEntity); agAdditionPlanHistory.SessionNameForGridData = FaoAppliedAdditionPlanHistoryHolder; agAdditionPlanHistory.ColumnHeaders = AdditionPlanEntity.HeaderRows; agAdditionPlanDetails.GridItemType = typeof(AdditionEntity); agAdditionPlanDetails.ColumnFormats = AdditionEntity.Formats; agAdditionPlanDetails.SessionNameForGridData = FaoAppliedAdditionPlanEntryHolder; agAdditionPlanDetails.ColumnHeaders = AdditionEntity.HeaderRows; if (!IsPostBack) { ListGenerator.FillDropdownWithFaoCountries(ddlCountry); FillAdditionPlanHistory(); } }
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); } }
protected void Page_Load(object sender, EventArgs e) { agAdditionPlanHistory.GridItemType = typeof(AdditionPlanEntity); agAdditionPlanHistory.SessionNameForGridData = AdditionPlanHistorySessionHolder; agAdditionPlanHistory.ColumnHeaders = AdditionPlanEntity.HeaderRows; agV1AdditionPlanEntries.GridItemType = typeof(AdditionEntity); agV1AdditionPlanEntries.ColumnFormats = AdditionEntity.Formats; agV1AdditionPlanEntries.SessionNameForGridData = AdditionPlanHistoryV1WeeklyAdditionsSessionHolder; agV1AdditionPlanEntries.ColumnHeaders = AdditionEntity.HeaderRows; agV1AdditionPlanMinMaxValues.GridItemType = typeof(AdditionPlanMinMaxRow); agV1AdditionPlanMinMaxValues.SessionNameForGridData = AdditionPlanHistoryV1MinMaxSessionHolder; agV1AdditionPlanMinMaxValues.ColumnHeaders = AdditionPlanMinMaxRow.HeaderRows; agV2AdditionPlanEntries.GridItemType = typeof(AdditionEntity); agV2AdditionPlanEntries.SessionNameForGridData = AdditionPlanHistoryV2WeeklyAdditionsSessionHolder; agV2AdditionPlanEntries.ColumnHeaders = AdditionEntity.HeaderRows; agV2AdditionPlanEntries.ColumnFormats = AdditionEntity.Formats; agV2AdditionPlanMinMaxValues.GridItemType = typeof(AdditionPlanMinMaxRow); agV2AdditionPlanMinMaxValues.SessionNameForGridData = AdditionPlanHistoryV2MinMaxSessionHolder; agV2AdditionPlanMinMaxValues.ColumnHeaders = AdditionPlanMinMaxRow.HeaderRows; btnFilterHistory.Enabled = hfSelectedScenarioBId.Value != string.Empty; if (!IsPostBack) { ListGenerator.FillDropdownWithFaoCountries(ddlCountry); FillAdditionPlanHistory(); PopulateRadioButtonList(); ClearGrids(); SetComparisonType(); SetScenarioPanels(pnlScenarioA, pnlScenarioB); } }
public void PopulateCountryDropdown() { ListGenerator.FillDropdownWithFaoCountries(ddlCountry); }