Esempio n. 1
0
        public DB2OperateBase()
        {
            var content = File.ReadAllText(HttpContext.Current.Server.MapPath("~/App_Data/db2Config.json"));
            var conn    = JsonConvert.DeserializeObject <Db2ConnObj>(content);

            DB2 = new DB2Oper(conn);

            Initial();
        }
Esempio n. 2
0
        //MainLogic
        private void Initialize()
        {
            // GetLastUpdateTimeFromFile();
            string     jsonObj = System.IO.File.ReadAllText(DirPath + Db2ConfigFileName);
            Db2ConnObj conn    = JsonConvert.DeserializeObject <Db2ConnObj>(jsonObj);

            Db2 = new DB2Oper(conn);
            HandleDBData();
        }
Esempio n. 3
0
 /// <summary>
 /// DB2实体集合构造函数
 /// </summary>
 /// <param name="tableName">指定表名</param>
 public DB2OperDataCatcher(string tableName, DB2Oper dB2)
 {
     this.tableName = tableName;
     DB2            = dB2;
 }
Esempio n. 4
0
 /// <summary>
 /// DB2实体集合构造函数
 /// </summary>
 /// <param name="tableName">指定表名</param>
 public DB2OperDataPusher(string tableName, DB2Oper db2)
 {
     entities = new DB2Entities <T>(tableName);
     DB2      = db2;
 }