Exemplo n.º 1
0
 public virtual void UpdateProductAmounts()
 {
     if (NeedFinRecalc)
     {
         ProductEntryUtils utils = Core.Factories.ClassFactory.Get <ProductEntryUtils>(new Core.Factories.ConstructorArgument("userConnection", UserConnection));
         utils.UpdateRecordProductAmounts(Entity, true);
     }
 }
        public static void RecalculateFinanceByProducts(UserConnection userConnection, string masterSchemaName, string masterRecordId,
                                                        string productDetailSchemaName, string masterRecordCurrencyId, double masterRecordCurrencyRate)
        {
            ProductEntryUtils utils = ClassFactory.Get <ProductEntryUtils>(new ConstructorArgument("userConnection", userConnection));
            Guid masterRecordIdGuid, masterRecordCurrencyIdGuid;

            if (!Guid.TryParse(masterRecordId, out masterRecordIdGuid))
            {
                return;
            }
            Guid.TryParse(masterRecordCurrencyId, out masterRecordCurrencyIdGuid);
            utils.RecalculateAmountByProducts(masterSchemaName, masterRecordIdGuid, productDetailSchemaName,
                                              masterRecordCurrencyIdGuid, Convert.ToDecimal(masterRecordCurrencyRate));
        }