public List <DataTable> PricelistProductGroupViewAllForComboBox() { List <DataTable> ListObj = new List <DataTable>(); try { ListObj = spPriceList.PricelistProductGroupViewAllForComboBox(); } catch (Exception ex) { MessageBox.Show("PL3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(ListObj); }
/// <summary> /// Function to fill the ProductGroup comboBox /// </summary> public void ProductGroupComboFill() { try { DataTable dtbl = new DataTable(); PriceListSP spPriceList = new PriceListSP(); dtbl = spPriceList.PricelistProductGroupViewAllForComboBox(); DataRow dr = dtbl.NewRow(); dr[0] = 0; dr[1] = "All"; dtbl.Rows.InsertAt(dr, 0); cmbProductGroup.DataSource = dtbl; cmbProductGroup.ValueMember = "groupId"; cmbProductGroup.DisplayMember = "groupName"; } catch (Exception ex) { MessageBox.Show("PCL2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }