Нет описания

T_Sys_MobileData.cs 4.3KB

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