示例#1
0
        /// <summary>
        /// Function to get particular values from StandardRate table based on the parameter
        /// </summary>
        /// <param name="standardRateId"></param>
        /// <returns></returns>
        public StandardRateInfo StandardRateView(decimal standardRateId)
        {
            StandardRateInfo standardrateinfo = new StandardRateInfo();

            try
            {
                standardrateinfo = spStandaredRate.StandardRateView(standardRateId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("AL6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(standardrateinfo);
        }
示例#2
0
 /// <summary>
 /// fill Items into the purticular controls for Update or delete
 /// </summary>
 public void FillControls()
 {
     try
     {
         StandardRateInfo infoStandardRate = new StandardRateInfo();
         StandardRateSP   spStandardRate   = new StandardRateSP();
         infoStandardRate  = spStandardRate.StandardRateView(decStandardRate);
         dtpFromDate.Value = Convert.ToDateTime(infoStandardRate.ApplicableFrom.ToString());
         dtpToDate.Value   = Convert.ToDateTime(infoStandardRate.ApplicableTo.ToString());
         dtpFromDate.Text  = infoStandardRate.ApplicableFrom.ToString();
         dtpToDate.Text    = infoStandardRate.ApplicableTo.ToString();
         txtRate.Text      = infoStandardRate.Rate.ToString();
         decProduct        = infoStandardRate.ProductId;
         decUnitId         = infoStandardRate.UnitId;
         ProductSP   spProduct   = new ProductSP();
         ProductInfo infoProduct = new ProductInfo();
         infoProduct         = spProduct.ProductViewForStandardRate(decProductId);
         txtProductCode.Text = infoProduct.ProductCode;
         txtProductName.Text = infoProduct.ProductName;
         decStandardRateId   = infoStandardRate.StandardRateId;
         UnitInfo infoUnit = new UnitInfo();
         UnitSP   spUnit   = new UnitSP();
         infoUnit                = spUnit.UnitView(decUnit);
         txtUnitName.Text        = infoUnit.UnitName;
         txtProductName.ReadOnly = true;
         txtProductCode.ReadOnly = true;
         txtUnitName.ReadOnly    = true;
         BatchInfo infoBatch = new BatchInfo();
         BatchSP   spBatch   = new BatchSP();
         decBatchId             = infoStandardRate.BatchId;
         infoBatch              = spBatch.BatchView(decBatchId);
         cmbBatch.SelectedValue = infoBatch.BatchId;
     }
     catch (Exception ex)
     {
         MessageBox.Show("SRP5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }