/// <summary> /// Function to execute while calling from frmPriceList form to add new pricelist for the product /// </summary> /// <param name="decPricingLevel"></param> /// <param name="decProduct"></param> /// <param name="decPriceListId"></param> /// <param name="frmPriceList"></param> public void CallFromPriceListForPricingLevel(decimal decPricingLevel, decimal decProduct, decimal decPriceListId, frmPriceList frmPriceList) { try { ProductInfo infoProduct = new ProductInfo(); ProductSP spProduct = new ProductSP(); UnitSP spunit = new UnitSP(); UnitInfo infoUnit = new UnitInfo(); PriceListSP spPriceList = new PriceListSP(); PriceListInfo infoPriceList = new PriceListInfo(); PricingLevelSP spPricingLevel = new PricingLevelSP(); PricingLevelInfo infoPricingLevel = new PricingLevelInfo(); infoProduct = spProduct.PriceListPopUpView(decProduct); txtProductCode.Text = infoProduct.ProductCode; txtProductName.Text = infoProduct.ProductName; decProduct = infoProduct.ProductId; decProductMain = infoProduct.ProductId; infoUnit = spunit.UnitViewForPriceListPopUp(decProduct); decUnitId = infoUnit.UnitId; txtUnitName.Text = infoUnit.UnitName; decPriceLevelId = infoPriceList.PricinglevelId; infoPricingLevel = spPricingLevel.PricingLevelNameViewForPriceListPopUp(decPricingLevel, decProduct, decUnitId); decPriceLevelId = infoPricingLevel.PricinglevelId; txtPricingLevel.Text = infoPricingLevel.PricinglevelName; if (txtPricingLevel.Text == string.Empty) { infoPricingLevel = spPricingLevel.PricingLevelView(decPricingLevel); txtPricingLevel.Text = infoPricingLevel.PricinglevelName; } decPricingLevelMain = infoPricingLevel.PricinglevelId; txtPricingLevel.ReadOnly = true; txtProductCode.ReadOnly = true; txtProductName.ReadOnly = true; txtUnitName.ReadOnly = true; txtRate.Focus(); BatchUnderProductComboFill(decProduct); PriceListPopupGridFill(); deca = decPriceListId; this.frmPriceListobj = frmPriceList; } catch (Exception ex) { MessageBox.Show("PLP1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }