DAL_FunctionList.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Text;
  6. namespace LYFZ.WeixinServiceDate.DAL
  7. {
  8. public class DAL_FunctionList : BaseDataOperate
  9. {
  10. public DAL_FunctionList()
  11. {
  12. this.TableFieldNameString = "";
  13. }
  14. #region 属性和字段
  15. string _tableName = "tb_FunctionList";
  16. /// <summary>
  17. /// 获取数据表名
  18. /// </summary>
  19. public override string TableName
  20. {
  21. get { return _tableName; }
  22. set { this._tableName = value; }
  23. }
  24. /// <summary>
  25. /// 获取当前新的数据表模型对象
  26. /// </summary>
  27. public override object ObjModel
  28. {
  29. get
  30. {
  31. return this.CurrentModel;
  32. }
  33. }
  34. /// <summary>
  35. /// 获取当前新的MOdel
  36. /// </summary>
  37. public Model.Model_FunctionList CurrentModel
  38. {
  39. get { return new Model.Model_FunctionList(); }
  40. }
  41. string _tableFieldNameString = "";
  42. /// <summary>
  43. /// 数据表字段名数组
  44. /// </summary>
  45. public override string TableFieldNameString
  46. {
  47. get { return this._tableFieldNameString; }
  48. set { this._tableFieldNameString = value; }
  49. }
  50. #endregion
  51. #region 检查记录
  52. //基类已经实现
  53. #endregion
  54. #region 增加数据
  55. /// <summary>
  56. /// 增加一条数据
  57. /// </summary>
  58. /// <param name="model">Model对象</param>
  59. /// <returns></returns>
  60. public bool Add(Model.Model_FunctionList model)
  61. {
  62. return base.Add(model);
  63. }
  64. /// <summary>
  65. /// 增加一条数据
  66. /// </summary>
  67. /// <param name="model">Model对象</param>
  68. /// <param name="overlookFieldList">忽略字段名列表 字段名之间用“,”号分隔</param>
  69. /// <returns></returns>
  70. public bool Add(Model.Model_FunctionList model, string overlookFieldList = "ID")
  71. {
  72. return base.Add(model, overlookFieldList);
  73. }
  74. #endregion
  75. #region 删除数据
  76. /// <summary>
  77. /// 删除数据
  78. /// </summary>
  79. /// <param name="model"></param>
  80. /// <returns></returns>
  81. public bool Delete(Model.Model_FunctionList model)
  82. {
  83. return base.Delete(model.ID);
  84. }
  85. #endregion
  86. #region 更新数据
  87. /// <summary>
  88. /// 更新一条数据
  89. /// </summary>
  90. public bool Update(Model.Model_FunctionList model)
  91. {
  92. return base.Update(model);
  93. }
  94. /// <summary>
  95. /// 根据筛选字段和SQL筛选运算符号更新数据
  96. /// </summary>
  97. /// <param name="model">Model对象</param>
  98. /// <param name="filterFieldName">筛选字段名称</param>
  99. /// <param name="operators">SQL筛选运算符号</param>
  100. /// <param name="overlookFieldList">忽略字段名列表 字段名之间用“,”号分隔</param>
  101. /// <returns></returns>
  102. public bool Update(Model.Model_FunctionList model, string filterFieldName = "ID", string operators = "=", string overlookFieldList = "ID")
  103. {
  104. return base.Update(model, filterFieldName, operators, overlookFieldList);
  105. }
  106. #endregion
  107. #region 查询数据
  108. /// <summary>
  109. /// 得到一个对象实体
  110. /// </summary>
  111. public Model.Model_FunctionList GetModel(int ID)
  112. {
  113. return DataRowToModel(GetDataRow(ID));
  114. }
  115. /// <summary>
  116. /// 得到一个对象实体
  117. /// </summary>
  118. /// <param name="row"></param>
  119. /// <returns></returns>
  120. public Model.Model_FunctionList DataRowToModel(DataRow row)
  121. {
  122. return DataRowToModelObject(row) as Model.Model_FunctionList;
  123. }
  124. #endregion
  125. #region 数据分页
  126. //基类已实现相关方法
  127. #endregion
  128. }
  129. }