コード例 #1
0
ファイル: Service.cs プロジェクト: donimuzur/dotnet-hms-ems
        private IXmlDataReader XmlReaderFactoryMonthly(string xmlfile)
        {
            configjson = (SchedulerConfigJson)JsonConvert.DeserializeObject(File.ReadAllText(schedulerjsonPath), typeof(SchedulerConfigJson));
            if (xmlfile.Contains("COY") && configjson.IsRead.COY)
            {
                return(new XmlCompanyDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("PLANTV") && configjson.IsRead.T001K)
            {
                return(new XmlT001KDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("UOM") && configjson.IsRead.UOM)
            {
                return(new XmlUoMDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("NPPBKC") && configjson.IsRead.NPPBKC)
            {
                return(new XmlNPPBKCDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("KPPBC") && configjson.IsRead.KPPBC)
            {
                return(new XmlKPPBCDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("VENDOR") && configjson.IsRead.VENDOR)
            {
                return(new XmlVendorDataMapper(xmlfile));
            }

            else if (xmlfile.Contains("MARKET") && configjson.IsRead.MARKET)
            {
                return(new XmlMarketDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("PRODTYP") && configjson.IsRead.PRODTYP)
            {
                return(new XmlProdTypeDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("PCODE") && configjson.IsRead.PCODE)
            {
                return(new XmlPCodeDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("SERIES") && configjson.IsRead.SERIES)
            {
                return(new XmlSeriesDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("PLANT-") && configjson.IsRead.T001W)
            {
                return(new XmlPlantDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("GOODTYP") && configjson.IsRead.GOODTYP)
            {
                return(new XmlGoodsTypeDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("MATERIAL") && configjson.IsRead.MATERIAL)
            {
                return(new XmlMaterialDataMapper(xmlfile));
            }


            return(null);
        }
コード例 #2
0
ファイル: Service.cs プロジェクト: donimuzur/dotnet-hms-ems
        private IXmlDataReader XmlReaderFactoryDaily(string xmlfile)
        {
            configjson = (SchedulerConfigJson)JsonConvert.DeserializeObject(File.ReadAllText(schedulerjsonPath), typeof(SchedulerConfigJson));
            if (xmlfile.Contains("POA") && configjson.IsRead.POA)
            {
                if (xmlfile.Contains("POAMAP") && configjson.IsRead.POAMAP)
                {
                    return(new XmlPoaMapDataMapper(xmlfile));
                }

                return(new XmlPoaDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("BRANDREG") && configjson.IsRead.BRANDREG)
            {
                return(new XmlBrandDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("CK5") && configjson.IsRead.CK5)
            {
                return(new XmlCk5DataMapper(xmlfile));
            }
            else if (xmlfile.Contains("InvMovement") && configjson.IsRead.InvMovement)
            {
                return(new XmlMovementDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("BOMMAP") && configjson.IsRead.BOMMAP)
            {
                return(new XmlBOMDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("BLOCKSTOCK") && configjson.IsRead.BLOCKSTOCK)
            {
                return(new XmlBlockStockDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("PRDOUTPUT") && configjson.IsRead.PRDOUTPUT)
            {
                return(new XmlProdOutputDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("CK1") && configjson.IsRead.CK1)
            {
                return(new XmlCK1DataMapper(xmlfile));
            }
            else if (xmlfile.Contains("PAYMENT") && configjson.IsRead.PAYMENT)
            {
                return(new XmlPaymentDataMapper(xmlfile));
            }
            else if (xmlfile.Contains("USER") && configjson.IsRead.USER)
            {
                return(new XmlUserDataMapper(xmlfile));
            }

            return(null);
        }