市长热线演示版

T_Sys_MobileData.cs 3.9KB

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