?????????????
//name:wujc 2013-06-20
namespace Yc.BLL
{
public class DataDomain : IDataService
{
private readonly IDataService dal = DataAccess.CreateService();
public DataDomain()
{ }
#region ???????
/// <summary>
/// ?????????
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="strWhere"></param>
/// <returns></returns>
public int GetRowsCount<T>(string strWhere) where T : BaseModel?? new() { return dal.GetRowsCount<T>(strWhere); }
/// <summary>
/// ?????????
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="sql"></param>
/// <returns></returns>
public int GetRowsCount(string sql) { return dal.GetRowsCount(sql); }
/// <summary>
/// ??????ü??
/// </summary>
public bool Exists<T>(string id) where T : BaseModel?? new() { return dal.Exists<T>(id); }
/// <summary>
/// ???????????
/// </summary>
public bool Add<T>(T model) where T : BaseModel?? new() { return dal.Add<T>(model); }
/// <summary>
/// ???????????
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="modelList"></param>
/// <returns></returns>
public bool Add<T>(List<T> modelList) where T : BaseModel?? new() { return dal.Add<T>(modelList); }
/// <summary>
/// ???????????
/// </summary>
public bool Update<T>(T model) where T : BaseModel?? new() { return dal.Update<T>(model); }
/// <summary>
/// ???????????
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="model"></param>
/// <returns></returns>
public bool Update<T>(List<T> modelList) where T : BaseModel?? new() { return dal.Update<T>(modelList); }
/// <summary>
/// ??????????
/// </summary>
public bool Delete<T>(string id) where T : BaseModel?? new() { return dal.Delete<T>(id); }
/// <summary>
/// ??????????
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="id"></param>
/// <returns></returns>
public bool Delete<T>(T model) where T : BaseModel?? new() { return dal.Delete<T>(model); }
/// <summary>
/// ???????????
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="model"></param>
/// <returns></returns>
public bool Delete<T>(List<T> modelList) where T : BaseModel?? new() { return dal.Delete<T>(modelList); }
/// <summary>
/// ???????????
/// </summary>
/// <param name="idList">??????</param>
/// <returns></returns>
public bool DeleteList<T>(string idList) where T : BaseModel?? new() { return dal.DeleteList<T>(idList); }
/// <summary>
/// ?????????????
/// </summary>
public T GetModel<T>(string id) where T : BaseModel?? new() { return dal.GetModel<T>(id); }
/// <summary>
/// ?????????????
/// </summary>
public List<T> GetModelList<T>(string strWhere) where T : BaseModel?? new() { return dal.GetModelList<T>(strWhere); }
/// <summary>
/// ????????б?
/// </summary>
public DataSet GetList<T>(string strWhere) where T : BaseModel?? new() { return dal.GetList<T>(strWhere); }
/// <summary>
/// ????????
/// </summary>
public DataTable GetTable<T>(string strWhere) where T : BaseModel?? new() { return dal.GetTable<T>(strWhere); }
/// <summary>
/// ??????????????б?
/// </summary>
public DataSet GetList<T>(string strWhere?? string orderby?? int startIndex?? int endIndex) where T : BaseModel?? new() { return dal.GetList<T>(strWhere?? orderby?? startIndex?? endIndex); }
/// <summary>
/// ??????????????б?
/// </summary>
public DataSet GetListBySql(string sql?? string orderby?? int startIndex?? int endIndex) { return dal.GetListBySql(sql?? orderby?? startIndex?? endIndex); }
/// <summary>
/// ???SQL???????????????
/// </summary>
/// <param name="SQLString">SQL???</param>
/// <returns>????????</returns>
public int ExecuteSql(string SQLString) { return dal.ExecuteSql(SQLString); }
/// <summary>
/// ??в?????????DataSet
/// </summary>
/// <param name="SQLString">??????</param>
/// <returns>DataSet</returns>
public DataSet Query(string SQLString) { return dal.Query(SQLString); }
/// <summary>
/// ??ж???SQL???????????????
/// </summary>
/// <param name="SQLStringList">SQL?????????key?sql???value???????SqlParameter[]??</param>
public void ExecuteSqlTran(Hashtable SQLStringList) { dal.ExecuteSqlTran(SQLStringList); }
#endregion ???????
??????????????????????????????????????????????????????????????ɡ?