using System;
using System.Data;
using System.Collections.Generic;
using ZXDT.CallCenter.Model;
namespace ZXDT.CallCenter.BLL
{
///
/// T_Good_TransInfo
///
public partial class T_Good_TransInfo
{
private readonly ZXDT.CallCenter.DAL.T_Good_TransInfo dal=new ZXDT.CallCenter.DAL.T_Good_TransInfo();
public T_Good_TransInfo()
{}
#region BasicMethod
///
/// 增加一条数据
///
public int Add(ZXDT.CallCenter.Model.T_Good_TransInfo model)
{
return dal.Add(model);
}
///
/// 更新一条数据
///
public bool Update(ZXDT.CallCenter.Model.T_Good_TransInfo model)
{
return dal.Update(model);
}
///
/// 删除一条数据
///
public bool Delete(int id)
{
return dal.Delete(id);
}
///
/// 删除一条数据
///
public bool DeleteList(string idlist )
{
return dal.DeleteList(idlist );
}
///
/// 得到一个对象实体
///
public ZXDT.CallCenter.Model.T_Good_TransInfo GetModel(int id)
{
return dal.GetModel(id);
}
///
/// 获得数据列表
///
public List GetModelList(string strWhere)
{
DataSet ds = dal.GetList(strWhere);
return DataTableToList(ds.Tables[0]);
}
///
/// 获得数据列表
///
public List DataTableToList(DataTable dt)
{
List modelList = new List();
int rowsCount = dt.Rows.Count;
if (rowsCount > 0)
{
ZXDT.CallCenter.Model.T_Good_TransInfo model;
for (int n = 0; n < rowsCount; n++)
{
model = dal.DataRowToModel(dt.Rows[n]);
if (model != null)
{
modelList.Add(model);
}
}
}
return modelList;
}
#endregion BasicMethod
}
}