/// <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) { formMDI.infoError.ErrorString = "PG2:" + ex.Message; } }
/// <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) { formMDI.infoError.ErrorString = "SORP5:" + ex.Message; } }