/// <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; } }
/// <summary> /// Product group combofill Function /// </summary> public void ProductGroupComboFill() { try { ProductGroupSP spProductGroup = new ProductGroupSP(); DataTable dtblProductGroup = new DataTable(); dtblProductGroup = spProductGroup.ProductGroupViewForComboFill(); cmbProductGroup.DataSource = dtblProductGroup; cmbProductGroup.ValueMember = "groupId"; cmbProductGroup.DisplayMember = "groupName"; } catch (Exception ex) { MessageBox.Show("SR2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <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; } }