Example #1
0
 /// <summary>
 /// Function to add new standard rate for the purticular product
 /// </summary>
 /// <param name="decProductId"></param>
 /// <param name="frmStandardRate"></param>
 public void CallFromStandardRate(decimal decProductId, frmStandardRate frmStandardRate)
 {
     try
     {
         base.Show();
         StandardrateObj         = frmStandardRate;
         StandardrateObj.Enabled = false;
         ProductInfo infoProduct = new ProductInfo();
         ProductSP   spProduct   = new ProductSP();
         UnitSP      spUnit      = new UnitSP();
         UnitInfo    infoUnit    = new UnitInfo();
         infoProduct             = spProduct.ProductViewForStandardRate(decProductId);
         txtProductCode.Text     = infoProduct.ProductCode;
         txtProductName.Text     = infoProduct.ProductName;
         decProduct              = infoProduct.ProductId;
         infoUnit                = spUnit.unitVieWForStandardRate(decProductId);
         decUnitId               = infoUnit.UnitId;
         txtUnitName.Text        = infoUnit.UnitName;
         txtProductName.ReadOnly = true;
         txtProductCode.ReadOnly = true;
         txtUnitName.ReadOnly    = true;
         BatchUnderProductComboFill(decProductId);
         GridFill(decProductId);
     }
     catch (Exception ex)
     {
         MessageBox.Show("SRP2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #2
0
        public UnitInfo unitVieWForStandardRate(decimal decProductId)
        {
            UnitInfo infoUnit = new UnitInfo();

            try
            {
                infoUnit = spUnit.unitVieWForStandardRate(decProductId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("UBLL9:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(infoUnit);
        }