/// <summary> /// Creates a new <see cref="!:PriceModel" /> instance. /// </summary> /// <returns> /// A newly instantiated <see cref="!:PriceModel" /> instance. /// </returns> public static Consensus.Finance.Price Create(ConsensusSite site) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Finance.IPriceModel model = provider.Finance.Price.Create(); return(model == null ? null : new Consensus.Finance.Price(model)); }
/// <summary> /// Retrieves a specific <see cref="!:PriceModel" /> instance. /// </summary> /// <param name="id"> /// The unique value which distinctly identifies the <see cref="!:PriceModel" /> instance to be returned. /// </param> /// <returns> /// The <see cref="!:PriceModel" /> instance that matches the specified <paramref name="id" />; or null, if no matching instance can be found. /// </returns> public static Consensus.Finance.Price FetchById(ConsensusSite site, System.String id) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Finance.IPriceModel model = provider.Finance.Price.FetchById(id); return(model == null ? null : new Consensus.Finance.Price(model)); }
public static Consensus.Finance.Price RecalculateMemberFee(ConsensusSite site, System.String productId, System.String plId, System.Nullable <System.DateTime> startDate, System.Nullable <System.DateTime> endDate, System.Int32 qtyTotal) { IBusinessProvider provider = site.GetService <IBusinessProvider>(); Consensus.Finance.IPriceModel model = provider.Finance.Price.RecalculateMemberFee(productId, plId, startDate, endDate, qtyTotal); return(model == null ? null : new Consensus.Finance.Price(model)); }