private void PopulateCombobox() { try { //Direction Sign this.cmbLatSign.Items.Add("N"); this.cmbLatSign.Items.Add("S"); this.cmbLongSign.Items.Add("E"); this.cmbLongSign.Items.Add("W"); //Region region = new BIZ.Region(); PopulateBussinessLayer(Common.Common.Location.Region); //Race Region DataTable dtregion; dtregion = region.RegionGetByKey().Tables[0]; if (dtregion.Rows.Count > 0) { foreach (DataRow dtrow in dtregion.Rows) { cmbRegion.Items.Add(dtrow["RegionName"].ToString()); } } } catch (Exception ex) { MessageBox.Show(Common.Common.CustomError(ex.Message), "Error"); } }
private void PopulateCombobox() { try { //Region region = new BIZ.Region(); PopulateBussinessLayer(Common.Common.Schedule.Region); //Race Region DataTable dtregion; dtregion = region.RegionGetByKey().Tables[0]; if (dtregion.Rows.Count > 0) { foreach (DataRow dtrow in dtregion.Rows) { cmbRegion.Items.Add(dtrow["RegionName"].ToString()); } } //Race Season DataTable dtSeason; dtSeason = region.GetRaceSeason().Tables[0]; if (dtSeason.Rows.Count > 0) { foreach (DataRow dtrow in dtSeason.Rows) { cmbSeason.Items.Add(dtrow["Description"].ToString()); } } this.cmbYear.Items.Clear(); for (int i = DateTime.Now.Year; i < DateTime.Now.Year + 5; i++) { this.cmbYear.Items.Add(i); } } catch (Exception ex) { MessageBox.Show(Common.Common.CustomError(ex.Message), "Error"); } }