private void SelectTable_CB_SelectedIndexChanged(object sender, EventArgs e) { if (SelectTable_CB.SelectedIndex == (int)TableNames.NotSelected) { Select_DGV.Hide(); } else { Presenter.GetDGV(Select_DGV, SelectTable_CB.Text); Select_DGV.Show(); SearchValue_CB.Hide(); DayTime_checkList.Hide(); } if (SelectTable_CB.Text == "Маршруты") { Search_lbl.Show(); SearchOption_CB.Show(); } else { Search_lbl.Hide(); SearchOption_CB.Hide(); } }
private void SearchOption_CB_SelectedIndexChanged(object sender, EventArgs e) { SearchValue_CB.Hide(); DayTime_checkList.Hide(); SearchValue_CB.SelectedIndex = -1; Presenter.GetDGV(Select_DGV, SelectTable_CB.Text); switch (SearchOption_CB.SelectedIndex) { case (int)OperationOption.None: break; case (int)OperationOption.Trains: Configurate.SearchOptionValues(SearchValue_CB, Select_DGV, (int)OperationOption.Trains); SearchValue_CB.Show(); break; case (int)OperationOption.FirstStop: Configurate.SearchOptionValues(SearchValue_CB, Select_DGV, (int)OperationOption.FirstStop); SearchValue_CB.Show(); break; case (int)OperationOption.LastStop: Configurate.SearchOptionValues(SearchValue_CB, Select_DGV, (int)OperationOption.LastStop); SearchValue_CB.Show(); break; case (int)OperationOption.DepartmentTime: DayTime_checkList.Show(); break; case (int)OperationOption.ArrivalTime: DayTime_checkList.Show(); break; } }