Exemplo n.º 1
0
 /// <summary>
 /// Edit function
 /// </summary>
 public void EditFunction()
 {
     try
     {
         StandardRateInfo infoStandardRate = new StandardRateInfo();
         StandardRateSP   spStandardRate   = new StandardRateSP();
         infoStandardRate.StandardRateId = decStandardRate;
         infoStandardRate.ApplicableFrom = Convert.ToDateTime(txtFromDate.Text.ToString());
         infoStandardRate.ApplicableTo   = Convert.ToDateTime(txtToDate.Text.ToString());
         infoStandardRate.ProductId      = decProduct;
         infoStandardRate.UnitId         = decUnitId;
         infoStandardRate.BatchId        = Convert.ToDecimal(cmbBatch.SelectedValue);
         infoStandardRate.Rate           = Convert.ToDecimal(txtRate.Text.ToString());
         infoStandardRate.Extra1         = string.Empty;
         infoStandardRate.Extra2         = string.Empty;
         if (spStandardRate.StandardrateCheckExistence(decStandardRateId, Convert.ToDateTime(txtFromDate.Text.ToString()), Convert.ToDateTime(txtToDate.Text.ToString()), decProduct, infoStandardRate.BatchId) == false)
         {
             spStandardRate.StandardRateEdit(infoStandardRate);
             Messages.UpdatedMessage();
             GridFill(decProduct);
             Clear();
         }
         else
         {
             Messages.InformationMessage("Standard rate already exist for selected product and dates");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SRP6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Function to Update values in StandardRate Table
 /// </summary>
 /// <param name="standardrateinfo"></param>
 public void StandardRateEdit(StandardRateInfo standardrateinfo)
 {
     try
     {
         spStandaredRate.StandardRateEdit(standardrateinfo);
     }
     catch (Exception ex)
     {
         MessageBox.Show("AL6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }