/// <summary>
/// 获取ceshi列表
/// </summary>
/// <returns></returns>
public List<Ceshi> getCeshiList()
{
return CeshiSelecter.ExecuteTypedList<Ceshi>();
}
/// <summary>
/// 获取ceshi列表,同时分页操作
/// </summary>
/// <returns></returns>
public List<Ceshi> getCeshiList(int currentPage, int pageSize, out int RecordCount)
{
RecordCount = m_sqlquery.GetRecordCount();
return CeshiSelecter
.Paged(currentPage, pageSize)
.ExecuteTypedList<Ceshi>();
}
/// <summary>
/// 新增 ceshi
/// </summary>
/// <param></param>
/// <param></param>
/// <returns></returns>
public bool AddCeshi(Ceshi beAddMode, out string sErr)
{
sErr = "";
bool bRet = true;
try
{
using (TransactionScope sc = new TransactionScope())
{
//此处写代码
//流水编号的生成
//GenerateNo No = new GenerateNo();
//No.TableName = "Ceshi"; //表名
//No.NoName = "XXX"; //流水号前字母
//No.ColName = "CC_Number"; //编号字段
//No.CreateTime = "CC_CreateTime"; //日期字段
//string BillNo = "";
//Customer_Comp.CC_Number = No.AutoGenerateNo();
beAddMode.IsNew = true;
beAddMode.Save();
//LogHelper.WriteLog(logType.新增 , logModule.Deptrelation,"ceshi新增成功("+beAddMode.GetPrimaryKeyValue().ToString()
//+")!");
//如果生成扩展类请使用add方法方法
sc.Complete();
}
}
catch (Exception ex)
{
sErr = "ceshi新增不成功!";
return false;
}
sErr = "ceshi新增成功!";
return bRet;
}