/// <summary> /// Function to fill the Area combobox /// </summary> public void AreaComboFill() { try { RouteBll BllRoute = new RouteBll(); List <DataTable> listObj = new List <DataTable>(); listObj = BllRoute.AreafillInRoute(); cmbArea.DataSource = listObj[0]; cmbArea.ValueMember = "areaId"; cmbArea.DisplayMember = "areaName"; cmbArea.SelectedIndex = -1; } catch (Exception ex) { MessageBox.Show("RT1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Area combobox fill for Search /// </summary> public void AreaComboFillSearch() { try { RouteBll BllRoute = new RouteBll(); List <DataTable> listObj = new List <DataTable>(); listObj = BllRoute.AreafillInRoute(); DataRow dr = listObj[0].NewRow(); dr[1] = "All"; listObj[0].Rows.InsertAt(dr, 0); cmbAreaSearch.DataSource = listObj[0]; cmbAreaSearch.ValueMember = "areaId"; cmbAreaSearch.DisplayMember = "areaName"; } catch (Exception ex) { MessageBox.Show("RT2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }