예제 #1
0
        public PCDController()
        {
            string ClassName = "ProcessXml", SetString = "SetPath", InitXmlDoc = "InitXml";
            MemoryCacherApi Cache = new MemoryCacherApi();

            //init setting
            if ((Info = (SettingInfo)Cache.GetValue(SetString)) == null)
            {
                Info = new SettingInfo();
                DateTimeOffset TimeOffset = DateTimeOffset.Now.AddMonths(1);
                Cache.AddCache(SetString, Info, TimeOffset);
            }

            //init xml
            if ((Xml = (InitXml)Cache.GetValue(InitXmlDoc)) == null)
            {
                Xml = new InitXml(Info);
                DateTimeOffset TimeOffset = DateTimeOffset.Now.AddHours(5);
                Cache.AddCache(InitXmlDoc, Xml, TimeOffset);
            }

            //init processxml
            if ((XmlOperation = (ProcessXml)Cache.GetValue(ClassName)) == null)
            {
                XmlOperation = new ProcessXml(Info, Xml);
                DateTimeOffset TimeOffset = DateTimeOffset.Now.AddHours(5);
                Cache.AddCache(ClassName, XmlOperation, TimeOffset);
            }
        }
 public SeriesNumberUpdateController()
 {
     string SetString = "Path2";
     //init setting
     if ((PathInfo = (SettingInfo)Cache.GetValue(SetString)) == null)
     {
         PathInfo = new SettingInfo();
        PathInfo.UpdatePath = @"D:\C sharp code\LongTermCare(Xml)\Update\";
         DateTimeOffset TimeOffset = DateTimeOffset.Now.AddMonths(1);
         Cache.AddCache(SetString, PathInfo, TimeOffset);
     }
     XmlOperation = new ProcessXml(PathInfo);
 }
예제 #3
0
 //建構
 public ProcessXml(SettingInfo Path_Info, InitXml XmlDoc)
 {
     this.Path_Info = Path_Info;
     this.XmlInCacher = XmlDoc;
 }
예제 #4
0
 //建構
 public ProcessXml(SettingInfo Info)
 {
     Path_Info = Info;
 }
예제 #5
0
 public InitXml(SettingInfo info)
 {
     InsertXml = XDocument.Load(info.InsertPath + "InsertModel\\Insert.xml");
     StudyXml = XDocument.Load(info.SearchPath + "SearchModel\\STUDYXML-1.xml");
 }