/// <summary> /// Retrieves a collection of <see cref="!:BillOfMaterialModel" /> instances. /// </summary> /// <param name="accomProductId"> /// The value which identifies the <see cref="!:BillOfMaterialModel" /> instances to be returned. /// </param> /// <returns> /// The <see cref="!:BillOfMaterialModel" /> instances that match the specified <paramref name="accomProductId" />. /// </returns> public static IEnumerable <Consensus.Learning.BillOfMaterial> FetchAllByAccomProductId(System.String accomProductId) { ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite]; return(BillOfMaterial.FetchAllByAccomProductId(site, accomProductId)); }
public static IEnumerable <Consensus.Learning.BillOfMaterial> FetchAllByPsgIdId(System.Nullable <System.Int32> psgIdId) { ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite]; return(BillOfMaterial.FetchAllByPsgIdId(site, psgIdId)); }
public static System.String GetTableName() { ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite]; return(BillOfMaterial.GetTableName(site)); }
/// <summary> /// Retrieves a specific <see cref="!:BillOfMaterialModel" /> instance. /// </summary> /// <param name="id"> /// The unique value which distinctly identifies the <see cref="!:BillOfMaterialModel" /> instance to be returned. /// </param> /// <returns> /// The <see cref="!:BillOfMaterialModel" /> instance that matches the specified <paramref name="id" />; or null, if no matching instance can be found. /// </returns> public static Consensus.Learning.BillOfMaterial FetchById(System.String id) { ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite]; return(BillOfMaterial.FetchById(site, id)); }
/// <summary> /// Retrieves all instances of the <see cref="!:BillOfMaterialModel" /> class. /// </summary> /// <returns> /// An enumerable collection of <see cref="!:BillOfMaterialModel" /> instances. /// </returns> public static IEnumerable <Consensus.Learning.BillOfMaterial> FetchAll() { ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite]; return(BillOfMaterial.FetchAll(site)); }
/// <summary> /// Creates a new <see cref="!:BillOfMaterialModel" /> instance. /// </summary> /// <returns> /// A newly instantiated <see cref="!:BillOfMaterialModel" /> instance. /// </returns> public static Consensus.Learning.BillOfMaterial Create() { ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite]; return(BillOfMaterial.Create(site)); }
/// <summary> /// Updates the dates for the gift aid records /// </summary> protected override void ResolveDependent() { base.ResolveDependent(); if (this.MainSession == 1) { LocalBillOfMaterialModel[] otherBOMs = this.MasterProduct.BillOfMaterials.Where(BillOfMaterial => BillOfMaterial.Id != this.Id && (BillOfMaterial.MainSession == 1)).ToArray(); otherBOMs.Execute(BillOfMaterial => BillOfMaterial.MainSession = 0).Execute(BillOfMaterial => BillOfMaterial.Save()); } }