/// <summary> /// GridFill Function /// </summary> public void GridFill() { try { ProductGroupSP spProductGroup = new ProductGroupSP(); DataTable dtbl = new DataTable(); dtbl = spProductGroup.ProductAndUnitViewAllForGridFill(Convert.ToDecimal(cmbProductGroup.SelectedValue.ToString()), txtProductCode.Text.Trim(), txtProductName.Text.Trim()); dgvStandardRate.DataSource = dtbl; } catch (Exception ex) { MessageBox.Show("SR3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to get product and unit details /// </summary> /// <param name="decgroupId"></param> /// <param name="strProductCode"></param> /// <param name="strProductName"></param> /// <returns></returns> public List <DataTable> ProductAndUnitViewAllForGridFill(decimal decgroupId, string strProductCode, string strProductName) { List <DataTable> listObj = new List <DataTable>(); try { listObj = spProductGroup.ProductAndUnitViewAllForGridFill(decgroupId, strProductCode, strProductName); } catch (Exception ex) { MessageBox.Show("AL23:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listObj); }