/// <summary> /// Funtion to fill produdct combobox /// </summary> public void ProductViewAllForBatchByAllowBatch() { try { ProductCreationBll BllProductCreation = new ProductCreationBll(); List<DataTable> listObjProductName = new List<DataTable>(); listObjProductName = BllProductCreation.ProductViewAllForBatchByAllowBatch(); cmbProduct.DataSource = listObjProductName[0]; cmbProduct.ValueMember = "productId"; cmbProduct.DisplayMember = "productName"; } catch (Exception ex) { MessageBox.Show("B3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill product combobox /// </summary> public void ProductNameComboFill() { try { ProductCreationBll BllProductCreation = new ProductCreationBll(); List<DataTable> listObjProductName = new List<DataTable>(); listObjProductName = BllProductCreation.ProductViewAllForBatchByAllowBatch(); DataRow dr = listObjProductName[0].NewRow(); dr[1] = "All"; listObjProductName[0].Rows.InsertAt(dr, 0); cmbProductName.DataSource = listObjProductName[0]; cmbProductName.ValueMember = "productId"; cmbProductName.DisplayMember = "productName"; } catch (Exception ex) { MessageBox.Show("B2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }