/// <summary> /// Function to fill GroupUnder combobox for search /// </summary> public void ProductGroupUnderComboFillForSearch() { try { ProductGroupSP spProductGroup = new ProductGroupSP(); DataTable dtbl = new DataTable(); dtbl = spProductGroup.ProductGroupViewForComboFill(); cmbUnderSearch.DataSource = dtbl; cmbUnderSearch.ValueMember = "GroupId"; cmbUnderSearch.DisplayMember = "GroupName"; } catch (Exception ex) { MessageBox.Show("PG2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill ProductGroup combobox /// </summary> public void ProductGroupViewForComboFill() { try { ProductGroupSP spProductGroup = new ProductGroupSP(); DataTable dtbl = spProductGroup.ProductGroupViewForComboFill(); cmbProductGroup.DataSource = dtbl; cmbProductGroup.DisplayMember = "groupName"; cmbProductGroup.ValueMember = "groupId"; cmbProductGroup.SelectedIndex = 0; } catch (Exception ex) { MessageBox.Show("SORP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }