Beispiel #1
0
 /// <summary>
 /// 查询数据列表、返回List
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public List <T> FindListBySql(string strSql, DbParameter[] parameters)
 {
     return(DataFactory.Database().FindListBySql <T>(strSql, parameters));
 }
Beispiel #2
0
 /// <summary>
 /// 查询数据、返回条数
 /// </summary>
 /// <param name="WhereSql">条件</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public int FindCount(string WhereSql, DbParameter[] parameters)
 {
     return(DataFactory.Database().FindCount <T>(WhereSql, parameters));
 }
Beispiel #3
0
 /// <summary>
 /// 执行SQL语句
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public int ExecuteBySql(StringBuilder strSql, DbParameter[] parameters)
 {
     return(DataFactory.Database().ExecuteBySql(strSql, parameters));
 }
Beispiel #4
0
 /// <summary>
 /// 查询对象、返回实体
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public T FindEntityBySql(string strSql, DbParameter[] parameters)
 {
     return(DataFactory.Database().FindEntityBySql <T>(strSql, parameters));
 }
Beispiel #5
0
 /// <summary>
 /// 查询数据、返回条数
 /// <param name="propertyName">实体属性名称</param>
 /// <param name="propertyValue">字段值</param>
 /// </summary>
 /// <returns></returns>
 public int FindCount(string propertyName, string propertyValue)
 {
     return(DataFactory.Database().FindCount <T>(propertyName, propertyValue));
 }
Beispiel #6
0
 /// <summary>
 /// 查询对象、返回实体
 /// </summary>
 /// <param name="propertyName">实体属性名称</param>
 /// <param name="propertyValue">字段值</param>
 /// <returns></returns>
 public T FindEntity(string propertyName, object propertyValue)
 {
     return(DataFactory.Database().FindEntity <T>(propertyName, propertyValue));
 }
Beispiel #7
0
 /// <summary>
 /// 查询对象、返回实体
 /// </summary>
 /// <param name="WhereSql">条件</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public T FindEntityByWhere(string WhereSql, DbParameter[] parameters)
 {
     return(DataFactory.Database().FindEntity <T>(WhereSql, parameters));
 }
Beispiel #8
0
 /// <summary>
 /// 查询数据列表、返回 DataTable
 /// </summary>
 /// <param name="WhereSql">条件</param>
 /// <returns></returns>
 public DataTable FindTable(string WhereSql)
 {
     return(DataFactory.Database().FindTable <T>(WhereSql));
 }
Beispiel #9
0
 /// <summary>
 /// 查询数据列表、返回 DataTable
 /// </summary>
 /// <param name="WhereSql">条件</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public DataTable FindTable(string WhereSql, DbParameter[] parameters)
 {
     return(DataFactory.Database().FindTable <T>(WhereSql, parameters));
 }
Beispiel #10
0
 /// <summary>
 /// 查询数据列表、返回 DataTable
 /// </summary>
 /// <param name="Top">显示条数</param>
 /// <param name="WhereSql">条件</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public DataTable FindTableTop(int Top, string WhereSql, DbParameter[] parameters)
 {
     return(DataFactory.Database().FindTableTop <T>(Top, WhereSql, parameters));
 }
Beispiel #11
0
 /// <summary>
 /// 查询数据列表、返回 DataTable
 /// </summary>
 /// <returns></returns>
 public DataTable FindTable()
 {
     return(DataFactory.Database().FindTable <T>());
 }
Beispiel #12
0
 /// <summary>
 /// 大批量数据插入
 /// </summary>
 /// <param name="datatable">资料表</param>
 /// <returns></returns>
 public bool BulkInsert(DataTable datatable)
 {
     return(DataFactory.Database().BulkInsert(datatable));
 }
Beispiel #13
0
 /// <summary>
 /// 查询数据列表、返回 DataTable
 /// </summary>
 /// <param name="Top">显示条数</param>
 /// <param name="WhereSql">条件</param>
 /// <returns></returns>
 public DataTable FindTableTop(int Top, string WhereSql)
 {
     return(DataFactory.Database().FindTableTop <T>(Top, WhereSql));
 }
Beispiel #14
0
 /// <summary>
 /// 查询数据列表、返回 DataTable
 /// </summary>
 /// <param name="Top">显示条数</param>
 /// <returns></returns>
 public DataTable FindTableTop(int Top)
 {
     return(DataFactory.Database().FindTableTop <T>(Top));
 }
Beispiel #15
0
 /// <summary>
 /// 查询对象、返回实体
 /// </summary>
 /// <param name="propertyValue">主键值</param>
 /// <returns></returns>
 public T FindEntity(object propertyValue)
 {
     return(DataFactory.Database().FindEntity <T>(propertyValue));
 }
Beispiel #16
0
 /// <summary>
 /// 查询数据列表、返回 DataTable
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <returns></returns>
 public DataTable FindTableBySql(string strSql)
 {
     return(DataFactory.Database().FindTableBySql(strSql));
 }
Beispiel #17
0
 /// <summary>
 /// 执行SQL语句
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <param name="isOpenTrans">事务对象</param>
 /// <returns></returns>
 public int ExecuteBySql(StringBuilder strSql, DbTransaction isOpenTrans)
 {
     return(DataFactory.Database().ExecuteBySql(strSql, isOpenTrans));
 }
Beispiel #18
0
 /// <summary>
 /// 查询数据列表、返回 DataTable
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public DataTable FindTableBySql(string strSql, DbParameter[] parameters)
 {
     return(DataFactory.Database().FindTableBySql(strSql, parameters));
 }
Beispiel #19
0
 /// <summary>
 /// 查询对象、返回实体
 /// </summary>
 /// <param name="WhereSql">条件</param>
 /// <returns></returns>
 public T FindEntityByWhere(string WhereSql)
 {
     return(DataFactory.Database().FindEntity <T>(WhereSql));
 }
Beispiel #20
0
 /// <summary>
 /// 执行SQL语句
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <returns></returns>
 public int ExecuteBySql(StringBuilder strSql)
 {
     return(DataFactory.Database().ExecuteBySql(strSql));
 }
Beispiel #21
0
 /// <summary>
 /// 查询对象、返回实体
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <returns></returns>
 public T FindEntityBySql(string strSql)
 {
     return(DataFactory.Database().FindEntityBySql <T>(strSql));
 }
Beispiel #22
0
 /// <summary>
 /// 查询数据列表、返回 DataTable
 /// </summary>
 /// <param name="procName">存储过程</param>
 /// <returns></returns>
 public DataTable FindTableByProc(string procName)
 {
     return(DataFactory.Database().FindTableByProc(procName));
 }
Beispiel #23
0
 /// <summary>
 /// 查询数据、返回条数
 /// </summary>
 /// <returns></returns>
 public int FindCount()
 {
     return(DataFactory.Database().FindCount <T>());
 }
Beispiel #24
0
 /// <summary>
 /// 查询数据列表、返回DataSet
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <returns></returns>
 public DataSet FindDataSetBySql(string strSql)
 {
     return(DataFactory.Database().FindDataSetBySql(strSql));
 }
Beispiel #25
0
 /// <summary>
 /// 查询数据、返回条数
 /// </summary>
 /// <param name="WhereSql">条件</param>
 /// <returns></returns>
 public int FindCount(string WhereSql)
 {
     return(DataFactory.Database().FindCount <T>(WhereSql));
 }
Beispiel #26
0
 /// <summary>
 /// 查询数据列表、返回DataSet
 /// </summary>
 /// <param name="strSql">存储过程</param>
 /// <returns></returns>
 public DataSet FindDataSetByProc(string procName)
 {
     return(DataFactory.Database().FindDataSetByProc(procName));
 }
Beispiel #27
0
 /// <summary>
 /// 查询数据、返回条数
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <returns></returns>
 public int FindCountBySql(string strSql)
 {
     return(DataFactory.Database().FindCountBySql(strSql));
 }
Beispiel #28
0
 /// <summary>
 /// 查询数据列表、返回DataSet
 /// </summary>
 /// <param name="strSql">存储过程</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public DataSet FindDataSetByProc(string procName, DbParameter[] parameters)
 {
     return(DataFactory.Database().FindDataSetByProc(procName, parameters));
 }
Beispiel #29
0
 /// <summary>
 /// 查询数据、返回条数
 /// </summary>
 /// <param name="strSql">Sql语句</param>
 /// <param name="parameters">sql语句对应参数</param>
 /// <returns></returns>
 public int FindCountBySql(string strSql, DbParameter[] parameters)
 {
     return(DataFactory.Database().FindCountBySql(strSql, parameters));
 }
Beispiel #30
0
 /// <summary>
 /// 关闭数据库连接
 /// </summary>
 public void Close()
 {
     DataFactory.Database().Close();
 }