示例#1
0
        /// <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));
        }
示例#2
0
        public static IEnumerable <Consensus.Learning.BillOfMaterial> FetchAllByPsgIdId(System.Nullable <System.Int32> psgIdId)
        {
            ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite];

            return(BillOfMaterial.FetchAllByPsgIdId(site, psgIdId));
        }
示例#3
0
        public static System.String GetTableName()
        {
            ConsensusSite site = ConsensusDomain.Configuration[ConsensusDomain.Configuration.DefaultSite];

            return(BillOfMaterial.GetTableName(site));
        }
示例#4
0
        /// <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));
        }
示例#5
0
        /// <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));
        }
示例#6
0
        /// <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));
        }
示例#7
0
 /// <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());
     }
 }