Ejemplo n.º 1
0
 /// <summary>
 /// 动态实体
 /// </summary>
 /// <param name="deAdapter"></param>
 /// <param name="tableName"></param>
 /// <param name="sqlWhere"></param>
 /// <param name="SqlParams"></param>
 public DynamicEntity(DataAdapter deAdapter, string tableName, string sqlWhere, object[] SqlParams)
 {
     _ETDataAdapter = deAdapter;
     TableName      = tableName;
     SqlText        = BuildFillSql(tableName, sqlWhere);
     QueryParams    = SqlParams;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 动态实体
 /// </summary>
 /// <param name="DBType"></param>
 /// <param name="deAdapter"></param>
 /// <param name="SqlQuery"></param>
 /// <param name="SqlParams"></param>
 public DynamicEntity(ORM.DatabaseType DBType, DataAdapter deAdapter, string SqlQuery, object[] SqlParams)
 {
     _ETDataAdapter = deAdapter;
     SqlText        = SqlQuery;
     QueryParams    = SqlParams;
     deDBType       = DBType;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 缺省数据库访问组件
 /// </summary>
 static DefaultSQLite()
 {
     ada = new DataAdapter(DbConfigName.SQLite.ToString());
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 缺省数据库访问组件
 /// </summary>
 static DefaultData()
 {
     ada = new DataAdapter(ClientConfig.DefaultDbName.ToString());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 业务/数据实体
 /// </summary>
 /// <param name="adapter">指定数据访问适配器</param>
 /// <param name="drcData">初始化多条记录</param>
 public DataEntity(DataAdapter adapter, DataRow[] drcData)
 {
     EntityAdapter = adapter;
     InitEntity();
     Add(drcData);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 业务/数据实体
 /// </summary>
 /// <param name="adapter">指定数据访问适配器</param>
 public DataEntity(DataAdapter adapter)
 {
     EntityAdapter = adapter;
     InitEntity();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Postgre数据库访问组件
 /// </summary>
 static DefaultPostgre()
 {
     ada = new DataAdapter(DbConfigName.Postgre.ToString());
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 动态实体
 /// </summary>
 /// <param name="deAdapter"></param>
 /// <param name="SqlQuery"></param>
 /// <param name="SqlParams"></param>
 public DynamicEntity(DataAdapter deAdapter, string SqlQuery, object[] SqlParams)
 {
     _ETDataAdapter = deAdapter;
     SqlText        = SqlQuery;
     QueryParams    = SqlParams;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 动态实体
 /// </summary>
 /// <param name="deAdapter"></param>
 /// <param name="SqlQuery"></param>
 public DynamicEntity(DataAdapter deAdapter, string SqlQuery)
 {
     _ETDataAdapter = deAdapter;
     SqlText        = SqlQuery;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 动态实体
 /// </summary>
 /// <param name="DBType"></param>
 /// <param name="deAdapter"></param>
 /// <param name="SqlQuery"></param>
 public DynamicEntity(ORM.DatabaseType DBType, DataAdapter deAdapter, string SqlQuery)
 {
     _ETDataAdapter = deAdapter;
     SqlText        = SqlQuery;
     deDBType       = DBType;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 缺省数据库访问组件
 /// </summary>
 static DefaultOleDb()
 {
     ada = new DataAdapter(DbConfigName.OleDb.ToString());
 }
Ejemplo n.º 12
0
 /// <summary>
 /// 缺省数据库访问组件
 /// </summary>
 static DefaultSQL()
 {
     ada = new DataAdapter(DbConfigName.SqlDB.ToString());
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 客户端事务
 /// </summary>
 public Transaction(DataAdapter Adapter)
 {
     ada           = Adapter;
     TransactionID = System.Guid.NewGuid().ToString();
 }