地铁二期项目正式开始

T_Call_CheckIDDic.cs 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Data;
  6. namespace YTSoft.BaseCallCenter.BLL
  7. {
  8. /// <summary>
  9. /// T_Call_CheckIDDic
  10. /// </summary>
  11. public partial class T_Call_CheckIDDic
  12. {
  13. private readonly YTSoft.BaseCallCenter.DAL.T_Call_CheckIDDic dal = new YTSoft.BaseCallCenter.DAL.T_Call_CheckIDDic();
  14. public T_Call_CheckIDDic()
  15. { }
  16. #region Method
  17. /// <summary>
  18. /// 是否存在该记录
  19. /// </summary>
  20. public bool Exists(int F_Id)
  21. {
  22. return dal.Exists(F_Id);
  23. }
  24. /// <summary>
  25. /// 增加一条数据
  26. /// </summary>
  27. public int Add(YTSoft.BaseCallCenter.Model.T_Call_CheckIDDic model)
  28. {
  29. return dal.Add(model);
  30. }
  31. /// <summary>
  32. /// 更新一条数据
  33. /// </summary>
  34. public bool Update(YTSoft.BaseCallCenter.Model.T_Call_CheckIDDic model)
  35. {
  36. return dal.Update(model);
  37. }
  38. /// <summary>
  39. /// 删除一条数据
  40. /// </summary>
  41. public bool Delete(int F_Id)
  42. {
  43. return dal.Delete(F_Id);
  44. }
  45. /// <summary>
  46. /// 删除一条数据
  47. /// </summary>
  48. public bool DeleteByCheckId(int F_CheckId, int F_Type)
  49. {
  50. return dal.DeleteByCheckId(F_CheckId, F_Type);
  51. }
  52. /// <summary>
  53. /// 删除一条数据
  54. /// </summary>
  55. public bool DeleteList(string F_Idlist)
  56. {
  57. return dal.DeleteList(F_Idlist);
  58. }
  59. /// <summary>
  60. /// 得到一个对象实体
  61. /// </summary>
  62. public YTSoft.BaseCallCenter.Model.T_Call_CheckIDDic GetModel(int F_Id)
  63. {
  64. return dal.GetModel(F_Id);
  65. }
  66. /// <summary>
  67. /// 获得数据列表
  68. /// </summary>
  69. public DataSet GetList(string strWhere)
  70. {
  71. return dal.GetList(strWhere);
  72. }
  73. /// <summary>
  74. /// 获得前几行数据
  75. /// </summary>
  76. public DataSet GetList(int Top, string strWhere, string filedOrder)
  77. {
  78. return dal.GetList(Top, strWhere, filedOrder);
  79. }
  80. /// <summary>
  81. /// 获得数据列表
  82. /// </summary>
  83. public List<YTSoft.BaseCallCenter.Model.T_Call_CheckIDDic> GetModelList(string strWhere)
  84. {
  85. DataSet ds = dal.GetList(strWhere);
  86. return DataTableToList(ds.Tables[0]);
  87. }
  88. /// <summary>
  89. /// 获得数据列表
  90. /// </summary>
  91. public List<YTSoft.BaseCallCenter.Model.T_Call_CheckIDDic> DataTableToList(DataTable dt)
  92. {
  93. List<YTSoft.BaseCallCenter.Model.T_Call_CheckIDDic> modelList = new List<YTSoft.BaseCallCenter.Model.T_Call_CheckIDDic>();
  94. int rowsCount = dt.Rows.Count;
  95. if (rowsCount > 0)
  96. {
  97. YTSoft.BaseCallCenter.Model.T_Call_CheckIDDic model;
  98. for (int n = 0; n < rowsCount; n++)
  99. {
  100. model = new YTSoft.BaseCallCenter.Model.T_Call_CheckIDDic();
  101. if (dt.Rows[n]["F_Id"] != null && dt.Rows[n]["F_Id"].ToString() != "")
  102. {
  103. model.F_Id = int.Parse(dt.Rows[n]["F_Id"].ToString());
  104. }
  105. if (dt.Rows[n]["F_CheckId"] != null && dt.Rows[n]["F_CheckId"].ToString() != "")
  106. {
  107. model.F_CheckId = int.Parse(dt.Rows[n]["F_CheckId"].ToString());
  108. }
  109. if (dt.Rows[n]["F_DicId"] != null && dt.Rows[n]["F_DicId"].ToString() != "")
  110. {
  111. model.F_DicId = int.Parse(dt.Rows[n]["F_DicId"].ToString());
  112. }
  113. if (dt.Rows[n]["F_DicName"] != null && dt.Rows[n]["F_DicName"].ToString() != "")
  114. {
  115. model.F_DicName = dt.Rows[n]["F_DicName"].ToString();
  116. }
  117. if (dt.Rows[n]["F_Type"] != null && dt.Rows[n]["F_Type"].ToString() != "")
  118. {
  119. model.F_Type = int.Parse(dt.Rows[n]["F_Type"].ToString());
  120. }
  121. modelList.Add(model);
  122. }
  123. }
  124. return modelList;
  125. }
  126. /// <summary>
  127. /// 获得数据列表
  128. /// </summary>
  129. public DataSet GetAllList()
  130. {
  131. return GetList("");
  132. }
  133. /// <summary>
  134. /// 分页获取数据列表
  135. /// </summary>
  136. public int GetRecordCount(string strWhere)
  137. {
  138. return dal.GetRecordCount(strWhere);
  139. }
  140. /// <summary>
  141. /// 分页获取数据列表
  142. /// </summary>
  143. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  144. {
  145. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  146. }
  147. /// <summary>
  148. /// 分页获取数据列表
  149. /// </summary>
  150. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  151. //{
  152. //return dal.GetList(PageSize,PageIndex,strWhere);
  153. //}
  154. #endregion Method
  155. }
  156. }