/// <summary> /// Function to fill Brand combobox /// </summary> public void BrandComboFill() { try { List<DataTable> listBrand = new List<DataTable>(); BrandBll BllBrand = new BrandBll(); listBrand = BllBrand.BrandViewAll(); DataRow dr = listBrand[0].NewRow(); dr["brandName"] = "All"; dr["brandId"] = 0; listBrand[0].Rows.InsertAt(dr, 0); cmbBrand.DataSource = listBrand[0]; cmbBrand.DisplayMember = "brandName"; cmbBrand.ValueMember = "brandId"; } catch (Exception ex) { MessageBox.Show("ST:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
//-------------------------------------------------------------BrandComboFill--------------------------- public void BrandComboFill() { try { List<DataTable> listBrand = new List<DataTable>(); BrandBll BllBrand = new BrandBll(); listBrand = BllBrand.BrandViewAll(); cmbBrand.DataSource = listBrand[0]; cmbBrand.DisplayMember = "brandName"; cmbBrand.ValueMember = "brandId"; cmbBrand.SelectedValue = 1; } catch (Exception ex) { MessageBox.Show("PC:46" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Brand combobox /// </summary> public void BrandComboFill() { try { BrandBll BllBrand = new BrandBll(); listBrand = BllBrand.BrandViewAll(); dgvcmbBrand.DataSource = listBrand[0]; dgvcmbBrand.ValueMember = "brandId"; dgvcmbBrand.DisplayMember = "brandName"; SettingsBll BllSettings = new SettingsBll(); if (BllSettings.SettingsStatusCheck("ShowBrand") == "Yes") { dgvcmbBrand.ReadOnly = false; } else { dgvcmbBrand.ReadOnly = true; } } catch (Exception ex) { MessageBox.Show("MPC6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }