人民医院API

T_Sys_MobileData.cs 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. using System;
  2. using System.Data;
  3. using System.Collections.Generic;
  4. using RMYY_CallCenter_Api.Model;
  5. namespace RMYY_CallCenter_Api.Bll
  6. {
  7. /// <summary>
  8. /// T_Sys_MobileData
  9. /// </summary>
  10. public partial class T_Sys_MobileData
  11. {
  12. private readonly RMYY_CallCenter_Api.Dal.T_Sys_MobileData dal = new RMYY_CallCenter_Api.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(RMYY_CallCenter_Api.Model.T_Sys_MobileData model)
  27. {
  28. return dal.Add(model);
  29. }
  30. /// <summary>
  31. /// 更新一条数据
  32. /// </summary>
  33. public bool Update(RMYY_CallCenter_Api.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 RMYY_CallCenter_Api.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 DataSet GetList(int Top, string strWhere, string filedOrder)
  76. {
  77. return dal.GetList(Top, strWhere, filedOrder);
  78. }
  79. /// <summary>
  80. /// 获得数据列表
  81. /// </summary>
  82. public List<RMYY_CallCenter_Api.Model.T_Sys_MobileData> GetModelList(string strWhere)
  83. {
  84. DataSet ds = dal.GetList(strWhere);
  85. return DataTableToList(ds.Tables[0]);
  86. }
  87. /// <summary>
  88. /// 获得数据列表
  89. /// </summary>
  90. public List<RMYY_CallCenter_Api.Model.T_Sys_MobileData> DataTableToList(DataTable dt)
  91. {
  92. List<RMYY_CallCenter_Api.Model.T_Sys_MobileData> modelList = new List<RMYY_CallCenter_Api.Model.T_Sys_MobileData>();
  93. int rowsCount = dt.Rows.Count;
  94. if (rowsCount > 0)
  95. {
  96. RMYY_CallCenter_Api.Model.T_Sys_MobileData model;
  97. for (int n = 0; n < rowsCount; n++)
  98. {
  99. model = dal.DataRowToModel(dt.Rows[n]);
  100. if (model != null)
  101. {
  102. modelList.Add(model);
  103. }
  104. }
  105. }
  106. return modelList;
  107. }
  108. /// <summary>
  109. /// 获得数据列表
  110. /// </summary>
  111. public DataSet GetAllList()
  112. {
  113. return GetList("");
  114. }
  115. /// <summary>
  116. /// 分页获取数据列表
  117. /// </summary>
  118. public int GetRecordCount(string strWhere)
  119. {
  120. return dal.GetRecordCount(strWhere);
  121. }
  122. #endregion BasicMethod
  123. }
  124. }