private void GUI_Load(object sender, EventArgs e) { cbSchools.DataSource = new BindingSource(Schools.GetSchools(), null); cbSchools.DisplayMember = "Value"; cbSchools.ValueMember = "Key"; cbSchools.SelectedIndex = 0; cbSchools.ResetText(); //to reset selected value cbSchools.SelectedIndex = -1; prevHET = Program.HEALTHEVENTTYPE2; Dictionary <string, string> hetItems = new Dictionary <string, string>(); hetItems.Add("Add Dependent", HealthEventType.AddDependent); hetItems.Add("Delete Dependent", HealthEventType.DeleteDependent); hetItems.Add("Cancel Coverage", HealthEventType.CancelCoverage); hetItems.Add("Change Health Plan", HealthEventType.ChangeHealthPlan); hetItems.Add("Dependent Address Change", HealthEventType.DependentAddressChange); hetItems.Add("Change Premium Payment Method", HealthEventType.ChangePremiumPaymentMethod); hetItems.Add("New Enrollment", HealthEventType.NewEnrollment); hetItems.Add("Open Enrollment", HealthEventType.OpenEnrollment); hetItems.Add("Continued Enrollment", HealthEventType.ContinuedEnrollment); hetItems.Add("Update Enrollment", HealthEventType.UpdateEnrollment); hetItems.Add("COBRA New Enrollment", HealthEventType.COBRANewEnrollment); cbEnroll.DataSource = new BindingSource(hetItems, null); cbEnroll.DisplayMember = "Key"; cbEnroll.ValueMember = "Value"; }
public string GetAllSchools() { Schools Forecast = new Schools(); return(Forecast.GetSchools()); }