/// <summary>
        /// Function to get particular values from PriceList Table based on the parameter
        /// </summary>
        /// <param name="pricelistId"></param>
        /// <returns></returns>
        public PriceListInfo PriceListView(decimal pricelistId)
        {
            PriceListInfo pricelistinfo = new PriceListInfo();

            try
            {
                pricelistinfo = spPriceList.PriceListView(pricelistId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("PL6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(pricelistinfo);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Function to fill the fields while user double click on the datagridview
 /// </summary>
 public void FillControls()
 {
     try
     {
         PriceListInfo infoPricelist = new PriceListInfo();
         PriceListSP   spPricelist   = new PriceListSP();
         infoPricelist.PricelistId = decpriceListId;
         infoPricelist             = spPricelist.PriceListView(decpriceListId);
         txtRate.Text = infoPricelist.Rate.ToString();
         ProductInfo infoProduct = new ProductInfo();
         ProductSP   spProduct   = new ProductSP();
         infoProduct         = spProduct.PriceListPopUpView(decProductId);
         txtProductCode.Text = infoProduct.ProductCode;
         txtProductName.Text = infoProduct.ProductName;
         BatchInfo infobatch = new BatchInfo();
         BatchSP   spBatch   = new BatchSP();
         infobatch = spBatch.BatchView(decBatchId);
         cmbBatch.SelectedValue = infobatch.BatchId;
         UnitInfo infoUnit = new UnitInfo();
         UnitSP   spUnit   = new UnitSP();
         infoUnit         = spUnit.UnitView(decUnitId);
         txtUnitName.Text = infoUnit.UnitName;
         PricingLevelInfo infoPricingLevel = new PricingLevelInfo();
         PricingLevelSP   spPricingLevel   = new PricingLevelSP();
         infoPricingLevel         = spPricingLevel.PricingLevelView(decPriceLevelId);
         txtPricingLevel.Text     = infoPricingLevel.PricinglevelName;
         txtProductName.ReadOnly  = true;
         txtProductCode.ReadOnly  = true;
         txtUnitName.ReadOnly     = true;
         txtPricingLevel.ReadOnly = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PLP9:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }