public static object InsertReturnIdentity(object obj, IDbTransaction trans) { Type objType = obj.GetType(); IDBAccesser accesser = DataEntrance.GetDestDealer(objType); return(accesser.InsertReturnIdentity(obj, trans)); }
public static void InsertBatch(ArrayList objs, IDbTransaction trans) { Type objType = objs[0].GetType(); IDBAccesser accesser = DataEntrance.GetDestDealer(objType); accesser.InsertBatch(objs, trans); }
public object InsertReturnIdentity(object obj, IDbTransaction trans) { Type objType = obj.GetType(); IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.InsertReturnIdentity(obj, trans)); }
public object GetAObjectEspecial(Type objType, string theID) { string whereStr = string.Format("Where ID = '{0}'", theID); IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.GetAObject(whereStr)); }
public void InsertBatch(ArrayList objs, IDbTransaction trans) { Type objType = objs[0].GetType(); IDBAccesser accesser = this.CreateDBAccesser(objType); accesser.InsertBatch(objs, trans); }
public static void Update(object obj, IDbTransaction trans) { Type objType = obj.GetType(); IDBAccesser accesser = DataEntrance.GetDestDealer(objType); accesser.Update(obj, trans); }
public void Update(object obj, IDbTransaction trans) { Type objType = obj.GetType(); IDBAccesser accesser = this.CreateDBAccesser(objType); accesser.Update(obj, trans); }
public void Initialize(IDBAccesser accesser, int page_Size, string whereStr, string[] fields) { this.theParas = new DataPaginationParas(accesser.ConnectString, accesser.DbTableName, whereStr); this.theParas.Fields = fields; this.theParas.PageSize = page_Size; this.fieldStrs = this.theParas.GetFiedString(); this.adoBase = new SqlADOBase(this.theParas.ConnectString); }
public DataPaginationManager(IDBAccesser accesser, string selectStr, int page_size, bool ascending) { this.curParas = new PaginationParas(); this.curParas.ComplexIDName = "ID"; this.curParas.PageSize = page_size; this.curParas.SelectString = this.CheckSelectString(selectStr); this.curParas.ConnectString = accesser.ConnectString; this.curParas.DbType = accesser.DataBaseType; this.curParas.DBTableName = accesser.DbTableName; this.curParas.Ascending = ascending; this.InitializeAdoBase(accesser.DataBaseType, accesser.ConnectString); this.pageCount = this.GetPageCount(); }
private void LoadOneOptoticData(AptoticDataInformation info) { if (this.htableData[info.DataClassType] != null) { return; } IDBAccesser accesser = this.dbAccesserFactory.CreateDBAccesser(this.curDbType, info.ConnStr, info.DataClassType, null); if (accesser == null) { return; } object[] objs = accesser.GetObjects(""); if (objs != null) { this.htableData.Add(info.DataClassType, objs); } }
private IDBAccesser CreateDBAccesser(string dealerTypeName, string connStr, Type dataClassType, string assemblyName) { if (this.accesserCached) { if (this.htableCached[dataClassType] != null) { return((IDBAccesser)this.htableCached[dataClassType]); } } Type tarType = AdvancedFunction.GetType(dealerTypeName, assemblyName); if (tarType == null) { throw new Exception("The target type is not exit !"); } Type supType = typeof(DataAccess.IDBAccesser); // 不可用IsSubclassOf,IsSubclassOf 检测不了接口类型。 if (!supType.IsAssignableFrom(tarType)) { throw new Exception("The target DbDealer Type is not subclass of IDBAccesser !"); } object[] args = { connStr }; IDBAccesser accesser = (IDBAccesser)Activator.CreateInstance(tarType, args); if (this.accesserCached) { if (accesser != null) { this.htableCached.Add(dataClassType, accesser); } } return(accesser); }
public static void Insert(Type objType, object obj, IDbTransaction trans) { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); accesser.Insert(obj, trans); }
public static object GetAObject(Type objType, string whereStr) { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); return(accesser.GetAObject(whereStr)); }
public static object[] GetObjectsWithoutBolb(Type objType, string whereStr) { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); return(accesser.GetObjectsWithoutBlob(whereStr)); }
public static DataSet GetDataSet(Type objType, string select_str) { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); return(accesser.GetDataSet(select_str)); }
public bool FillBlobData(Type objType, object obj) { IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.FillBlobData(obj)); }
public static bool FillBlobData(Type objType, object obj) { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); return(accesser.FillBlobData(obj)); }
public DataSet GetDataSet(Type objType, string select_str) { IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.GetDataSet(select_str)); }
public object GetFieldValue(Type objType, string theID, string fieldName) { IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.GetFieldValue(theID, fieldName)); }
public bool UpdateFieldValue(Type objType, object theID, string fieldName, object newVal, IDbTransaction trans) { IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.UpdateFieldValue(theID, fieldName, newVal, trans)); }
public void Delete(Type objType, object ID, IDbTransaction trans) { IDBAccesser accesser = this.CreateDBAccesser(objType); accesser.Delete(ID, trans); }
public static bool UpdateFieldValue(Type objType, object theID, string fieldName, object newVal, IDbTransaction trans) { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); return(accesser.UpdateFieldValue(theID, fieldName, newVal, trans)); }
public object GetFieldValueEx(Type objType, string whereStr, string fieldName) { IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.GetFieldValueEx(whereStr, fieldName)); }
public static void Delete(Type objType, object ID, IDbTransaction trans) //ID一般为int或string类型 { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); accesser.Delete(ID, trans); }
public object GetAObject(Type objType, string whereStr) { IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.GetAObject(whereStr)); }
public static IPaginationManager GetPaginationMgr(Type objType, int page_size, string whereStr, string[] columns) { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); return(accesser.GetPaginationMgr(page_size, whereStr, columns)); }
public object[] GetObjectsWithoutBolb(Type objType, string whereStr) { IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.GetObjectsWithoutBlob(whereStr)); }
public static object GetFieldValue(Type objType, string theID, string fieldName) { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); return(accesser.GetFieldValue(theID, fieldName)); }
public IPaginationManager GetPaginationMgr(Type objType, int page_size, string whereStr, string[] columns) { IDBAccesser accesser = this.CreateDBAccesser(objType); return(accesser.GetPaginationMgr(page_size, whereStr, columns)); }
public static object GetFieldValueEx(Type objType, string whereStr, string fieldName) { IDBAccesser accesser = DataEntrance.GetDestDealer(objType); return(accesser.GetFieldValueEx(whereStr, fieldName)); }