/// <summary>
 /// Function to Update values in PriceList Table
 /// </summary>
 /// <param name="pricelistinfo"></param>
 public void PriceListEdit(PriceListInfo pricelistinfo)
 {
     try
     {
         spPriceList.PriceListEdit(pricelistinfo);
     }
     catch (Exception ex)
     {
         MessageBox.Show("PL6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Function to edit the pricelist
 /// </summary>
 public void EditFunction()
 {
     try
     {
         if (txtRate.Text.Trim() == String.Empty)
         {
             Messages.InformationMessage("Enter rate");
             txtRate.Focus();
         }
         else if (Convert.ToDecimal(txtRate.Text) == 0)
         {
             PriceListSP spPriceList = new PriceListSP();
             spPriceList.PriceListDelete(deca);
             Messages.UpdatedMessage();
             if (frmPriceListobj != null)
             {
                 this.Close();
             }
         }
         else
         {
             PriceListSP   spPriceList   = new PriceListSP();
             PriceListInfo infoPriceList = new PriceListInfo();
             infoPriceList.ProductId      = decProductMain;
             infoPriceList.PricelistId    = Convert.ToDecimal(dgvProductGroup.CurrentRow.Cells["dgvtxtPriceListId"].Value.ToString());
             infoPriceList.PricinglevelId = decPricingLevelMain;
             infoPriceList.UnitId         = decUnitId;
             infoPriceList.BatchId        = decBatchId;
             infoPriceList.Rate           = Convert.ToDecimal(txtRate.Text);
             infoPriceList.Extra1         = string.Empty;
             infoPriceList.Extra2         = string.Empty;
             spPriceList.PriceListEdit(infoPriceList);
             Messages.UpdatedMessage();
             Clear();
             if (frmPriceListobj != null)
             {
                 this.Close();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PLP3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }