public static void AddDBServiceByServiceID(string serviceID,DBService db) { if (!DBService_Dict.ContainsKey(serviceID)) { DBService_Dict.Add(serviceID, db); } }
public void AddDbService(string serviceName, DBService DB) { if (!_Dir_DBService.ContainsKey(serviceName)) { _Dir_DBService.Add(serviceName, DB); } }
public static DataOperation GetDataOperation(string tablename, DBService db, bool IsLoadDt, FieldCollection fields) { if(db == null) db = DBServiceFactory.GetDBService(); switch (db.DBType) { case eDBType.SqlServer: return null; case eDBType.Oracle: return new DataOperationOracle(tablename,db,IsLoadDt,fields); case eDBType.XML: return new DataOperation_XML(tablename, db, IsLoadDt, fields); default: return new DataOperationOracle(tablename, db, IsLoadDt, fields); } }
/// <summary> /// 自动读数据库载入数据的构造函数 /// </summary> /// <param name="tablename">表名</param> /// <param name="db">操作数据类</param> /// <param name="IsLoadDt">是否从数据库载入数据到类中</param> /// <param name="fields">Field集合</param> public DataOperation(string tablename, DBService db, bool IsLoadDt, FieldCollection fields) { this.TableName = tablename; if(db == null) throw WAPExceptionHelper.GetWAPException(10001052, "A DBService must be inputted into the constructer", null); else this.theDB = db; if (fields == null || fields.Count == 0) throw WAPExceptionHelper.GetWAPException(10001051, "A FieldCollection must be inputted into the constructer", null); else this.Fields = fields; if (IsLoadDt) { this.InitData(); } this.WhereFields = new FieldCollection(); }
public UserManger() { theDB = DBServiceFactory.GetDBService("MeasurerXML"); }
public static DataOperation GetDataOperation(string tabNameID, DBService dbserver, bool isload, FieldCollection fields) { DataOperation op = DBServiceFactory.GetDataOperation(tabNameID, dbserver, isload, fields); return op; }
public MeasurerProcess() { CurrentTask = new Task(); theDB = DBServiceFactory.GetDBService("MeasurerXML"); }
public DataOperation_XML(string tablename, DBService db, bool IsLoadDt, FieldCollection fields) : base(tablename, db, IsLoadDt, fields) { }