public List <DataTable> ProductDetailsViewGridfill(decimal decgroupId, string strProductCode, string strProductName, string strPricingLevelName) { List <DataTable> ListObj = new List <DataTable>(); try { ListObj = spPriceList.ProductDetailsViewGridfill(decgroupId, strProductCode, strProductName, strPricingLevelName); } catch (Exception ex) { MessageBox.Show("PL5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(ListObj); }
/// <summary> /// Function to fill the grid based on the /// </summary> public void GridFill() { try { { DataTable dtbl = new DataTable(); PriceListSP spPriceList = new PriceListSP(); if (cmbProductGroup.Text == "All") { cmbProductGroup.Text = "All"; } cmbPricingLevel.Text = cmbPricingLevel.Text; dtbl = spPriceList.ProductDetailsViewGridfill(Convert.ToDecimal(cmbProductGroup.SelectedValue.ToString()), txtProductCode.Text, txtProductName.Text, cmbPricingLevel.Text); dgvPricingList.DataSource = dtbl; } } catch (Exception ex) { MessageBox.Show("PCL4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }