123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Data;
- namespace LYFZ.StandardInterface
- {
-
-
-
- public interface IBaseDataLaye
- {
- #region 属性
-
-
-
- object ObjModel { get; }
-
-
-
- string TableName { get; set; }
-
-
-
- string TableFieldNameString { get; set; }
-
-
-
- string[] TableFieldNames { get; }
- #endregion
- #region 检查记录
-
-
-
- bool Exists(int ID);
-
-
-
-
-
-
- bool Exists(string filterFieldName, object filterValue);
-
-
-
-
-
- bool ColumnExists(string columnName);
-
- #endregion
- #region 公共方法
-
-
-
-
- int GetMaxID();
-
-
-
-
-
- int GetMaxID(string FieldName);
- #endregion
- #region 增加数据
-
-
-
-
-
-
- bool Add(object model, string overlookFieldList = "ID");
- #endregion
- #region 删除数据
-
-
-
- bool Delete(int ID);
-
-
-
-
- bool DeleteList(string idList);
-
-
-
-
-
- bool DeleteList(string filterFieldName, string valueList);
-
-
-
-
-
-
-
- bool Delete(object filterValue, string filterFieldName = "ID", string operators = "=");
-
-
-
-
-
- bool Delete(string whereStr);
- #endregion
- #region 更新数据
-
-
-
-
-
-
-
-
- bool Update(object model, string filterFieldName = "ID", string operators = "=", string overlookFieldList = "ID");
-
-
-
-
-
-
-
- bool Update(object model, string whereStr, string overlookFieldList = "ID");
- #endregion
- #region 查询数据
-
-
-
-
- object GetModelObject(int ID);
-
-
-
- object DataRowToModelObject(DataRow row);
-
-
-
-
-
-
- object GetModelObject(string filterFieldName, object filterValue);
-
-
-
-
-
-
-
- object GetModelObject(string filterFieldName, object filterValue, string operators);
-
-
-
-
-
- DataRow GetDataRow(int id);
-
-
-
-
-
-
-
- DataRow GetDataRow(string filterFieldName, object filterValue, string operators = "=");
-
-
-
-
-
-
- DataRow GetDataRow(string filterFieldName, object filterValue);
-
-
-
- object DataRowToModel(DataRow row, object model);
-
-
-
-
-
- DataSet GetList(string strWhere, string filedOrder = "ID desc");
-
-
-
-
-
-
-
- DataSet GetList(int Top, string strWhere, string filedOrder = "ID asc");
-
-
-
-
- DataSet GetAllList(string filedOrder = "ID desc");
- #endregion
- #region 数据分页
-
-
-
-
-
-
- int GetByPageCount(string strWhere, int pageSize);
-
-
-
- int GetRecordCount(string strWhere);
-
-
-
-
-
-
-
-
- DataSet GetListByPage(string strWhere, int pageIndex, int pageSize, string orderby = "id desc");
-
-
-
-
-
-
-
-
-
- DataSet GetListByPage(string strWhere, string orderby, int pageIndex, int pageSize, ref int pageCount);
-
-
-
-
-
-
-
-
- DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex);
- #endregion
- }
- }
|