public FeeCalcVersionFlat(IFeeCalc parent, Money fixedSetup, Money minValue, Money maxValue, int startPeriod, string createdBy) : base(parent, fixedSetup, startPeriod, createdBy) { MinValue = minValue; MaxValue = maxValue; checkCurrencies(); }
internal FeeCalcVersion(IFeeCalc parent, Money fixedSetup, int startPeriod, string createdBy) { if (parent == null) throw new ApplicationException("Parent calculation can not be null"); Parent = parent; FixedSetup = fixedSetup; StartPeriod = startPeriod; CreatedBy = createdBy; checkCurrencies(); }
public FeeCalcHelper(IFeeCalc calc) : this() { if (calc != null) { CalcID = calc.Key; if (calc.FeeCurrency != null) CurrencyID = calc.FeeCurrency.Key; CalcName = calc.Name; FeeType = calc.FeeType.Key; IsActive = calc.IsActive; if (calc.LatestVersion != null) { FeeCalcType = calc.LatestVersion.FeeCalcType; StartPeriod = calc.LatestVersion.StartPeriod; EndPeriod = calc.LatestVersion.EndPeriod; if (calc.LatestVersion.FixedSetup != null) SetUp = calc.LatestVersion.FixedSetup.Quantity; switch (calc.LatestVersion.FeeCalcType) { case FeeCalcTypes.Flat: IFeeCalcVersionFlat flat = (IFeeCalcVersionFlat)calc.LatestVersion; if (flat.MinValue != null) MinValue = flat.MinValue.Quantity; if (flat.MaxValue != null) MaxValue = flat.MaxValue.Quantity; foreach (IFeeCalcLine line in flat.FeeLines) Lines.Add(new FeeCalcLineHelper(line)); break; case FeeCalcTypes.Simple: IFeeCalcVersionSimple simple = (IFeeCalcVersionSimple)calc.LatestVersion; NoFees = simple.NoFees; break; } } } }
public FeeCalcVersionSimple(IFeeCalc parent, Money fixedSetup, int startPeriod, string createdBy) : base(parent, fixedSetup, startPeriod, createdBy) { }
/// <summary> /// Deletes a <b>FeeCalc</b> object from the database. /// </summary> /// <param name="session">An instance of the Data Access Library (see class <see cref="B4F.TotalGiro.DAL.NHSession">NHSession</see>).</param> /// <param name="obj">The <b>FeeCalc</b> object to delete from the database.</param> public static bool Delete(IDalSession session, IFeeCalc obj) { return session.Delete(obj); }
/// <summary> /// Updates a <b>FeeCalc</b> object to the database. /// </summary> /// <param name="session">An instance of the Data Access Library (see class <see cref="B4F.TotalGiro.DAL.NHSession">NHSession</see>).</param> /// <param name="obj">The <b>FeeCalc</b> object to update into the database.</param> public static bool Update(IDalSession session, IFeeCalc obj) { InternalEmployeeLogin emp = LoginMapper.GetCurrentLogin(session) as InternalEmployeeLogin; obj.AssetManager = (IAssetManager)emp.Employer; return session.InsertOrUpdate(obj); }