コード例 #1
0
        public EntityBuildOfMaterial GetMaterialBySparePart(string SparePart, int ProductID)
        {
            var data = base.DataContext.BuildOfMaterials.Where(p => p.SparePartsID == SparePart && p.FK_ProductID == ProductID).Take(1);

            if (data.Count() == 1)
            {
                return(FactoryBuildOfMaterial.Get(data.Single()));
            }
            else
            {
                return(null);
            }
        }
コード例 #2
0
        public EntityBuildOfMaterial GetByBOMID(int PK_BuildOfMaterialsID)
        {
            var data = base.DataContext.BuildOfMaterials.Where(p => p.PK_BuildOfMaterialsID == PK_BuildOfMaterialsID);

            if (data.Count() == 1)
            {
                return(FactoryBuildOfMaterial.Get(data.Single()));
            }
            else
            {
                return(null);
            }
        }
コード例 #3
0
        public EntityBuildOfMaterial GetMaterialByModel(string Model)
        {
            var data = base.DataContext.BuildOfMaterials.Where(p => p.Model == Model);

            if (data.Count() == 1)
            {
                return(FactoryBuildOfMaterial.Get(data.Single()));
            }
            else
            {
                return(null);
            }
        }