市长热线演示版

T_Form_FormInfo.cs 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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_Form_FormInfo
  10. /// </summary>
  11. public partial class T_Form_FormInfo
  12. {
  13. private readonly HySoft.BaseCallCenter.DAL.T_Form_FormInfo dal = new HySoft.BaseCallCenter.DAL.T_Form_FormInfo();
  14. public T_Form_FormInfo()
  15. { }
  16. #region Method
  17. /// <summary>
  18. /// 是否存在该记录
  19. /// </summary>
  20. public bool Exists(int F_FormId)
  21. {
  22. return dal.Exists(F_FormId);
  23. }
  24. /// <summary>
  25. /// 增加一条数据
  26. /// </summary>
  27. public int Add(HySoft.BaseCallCenter.Model.T_Form_FormInfo model)
  28. {
  29. return dal.Add(model);
  30. }
  31. /// <summary>
  32. /// 更新一条数据
  33. /// </summary>
  34. public bool Update(HySoft.BaseCallCenter.Model.T_Form_FormInfo model)
  35. {
  36. return dal.Update(model);
  37. }
  38. /// <summary>
  39. /// 删除一条数据
  40. /// </summary>
  41. public bool Delete(int F_FormId)
  42. {
  43. return dal.Delete(F_FormId);
  44. }
  45. /// <summary>
  46. /// 删除一条数据
  47. /// </summary>
  48. public bool DeleteList(string F_FormIdlist)
  49. {
  50. return dal.DeleteList(F_FormIdlist);
  51. }
  52. /// <summary>
  53. /// 得到一个对象实体
  54. /// </summary>
  55. public HySoft.BaseCallCenter.Model.T_Form_FormInfo GetModel(int F_FormId)
  56. {
  57. return dal.GetModel(F_FormId);
  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_Form_FormInfo> 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_Form_FormInfo> DataTableToList(DataTable dt)
  85. {
  86. List<HySoft.BaseCallCenter.Model.T_Form_FormInfo> modelList = new List<HySoft.BaseCallCenter.Model.T_Form_FormInfo>();
  87. int rowsCount = dt.Rows.Count;
  88. if (rowsCount > 0)
  89. {
  90. HySoft.BaseCallCenter.Model.T_Form_FormInfo model;
  91. for (int n = 0; n < rowsCount; n++)
  92. {
  93. model = new HySoft.BaseCallCenter.Model.T_Form_FormInfo();
  94. if (dt.Rows[n]["F_FormId"] != null && dt.Rows[n]["F_FormId"].ToString() != "")
  95. {
  96. model.F_FormId = int.Parse(dt.Rows[n]["F_FormId"].ToString());
  97. }
  98. if (dt.Rows[n]["F_FormName"] != null && dt.Rows[n]["F_FormName"].ToString() != "")
  99. {
  100. model.F_FormName = dt.Rows[n]["F_FormName"].ToString();
  101. }
  102. if (dt.Rows[n]["F_FormTable"] != null && dt.Rows[n]["F_FormTable"].ToString() != "")
  103. {
  104. model.F_FormTable = dt.Rows[n]["F_FormTable"].ToString();
  105. }
  106. if (dt.Rows[n]["F_FormType"] != null && dt.Rows[n]["F_FormType"].ToString() != "")
  107. {
  108. model.F_FormType = dt.Rows[n]["F_FormType"].ToString();
  109. }
  110. if (dt.Rows[n]["F_FormDes"] != null && dt.Rows[n]["F_FormDes"].ToString() != "")
  111. {
  112. model.F_FormDes = dt.Rows[n]["F_FormDes"].ToString();
  113. }
  114. if (dt.Rows[n]["F_FormUrl"] != null && dt.Rows[n]["F_FormUrl"].ToString() != "")
  115. {
  116. model.F_FormUrl = dt.Rows[n]["F_FormUrl"].ToString();
  117. }
  118. if (dt.Rows[n]["F_EntityId"] != null && dt.Rows[n]["F_EntityId"].ToString() != "")
  119. {
  120. model.F_EntityId = int.Parse(dt.Rows[n]["F_EntityId"].ToString());
  121. }
  122. if (dt.Rows[n]["F_CreateOn"] != null && dt.Rows[n]["F_CreateOn"].ToString() != "")
  123. {
  124. model.F_CreateOn = DateTime.Parse(dt.Rows[n]["F_CreateOn"].ToString());
  125. }
  126. if (dt.Rows[n]["F_CreateBy"] != null && dt.Rows[n]["F_CreateBy"].ToString() != "")
  127. {
  128. model.F_CreateBy = int.Parse(dt.Rows[n]["F_CreateBy"].ToString());
  129. }
  130. if (dt.Rows[n]["F_CreateName"] != null && dt.Rows[n]["F_CreateName"].ToString() != "")
  131. {
  132. model.F_CreateName = dt.Rows[n]["F_CreateName"].ToString();
  133. }
  134. if (dt.Rows[n]["F_ModifyOn"] != null && dt.Rows[n]["F_ModifyOn"].ToString() != "")
  135. {
  136. model.F_ModifyOn = DateTime.Parse(dt.Rows[n]["F_ModifyOn"].ToString());
  137. }
  138. if (dt.Rows[n]["F_ModifyBy"] != null && dt.Rows[n]["F_ModifyBy"].ToString() != "")
  139. {
  140. model.F_ModifyBy = int.Parse(dt.Rows[n]["F_ModifyBy"].ToString());
  141. }
  142. if (dt.Rows[n]["F_ModifyName"] != null && dt.Rows[n]["F_ModifyName"].ToString() != "")
  143. {
  144. model.F_ModifyName = dt.Rows[n]["F_ModifyName"].ToString();
  145. }
  146. if (dt.Rows[n]["F_DeleteFlag"] != null && dt.Rows[n]["F_DeleteFlag"].ToString() != "")
  147. {
  148. model.F_DeleteFlag = int.Parse(dt.Rows[n]["F_DeleteFlag"].ToString());
  149. }
  150. if (dt.Rows[n]["F_ColumnCount"] != null && dt.Rows[n]["F_ColumnCount"].ToString() != "")
  151. {
  152. model.F_ColumnCount = int.Parse(dt.Rows[n]["F_ColumnCount"].ToString());
  153. }
  154. if (dt.Rows[n]["F_DBTableName"] != null && dt.Rows[n]["F_DBTableName"].ToString() != "")
  155. {
  156. model.F_DBTableName = dt.Rows[n]["F_DBTableName"].ToString();
  157. }
  158. modelList.Add(model);
  159. }
  160. }
  161. return modelList;
  162. }
  163. /// <summary>
  164. /// 获得数据列表
  165. /// </summary>
  166. public DataSet GetAllList()
  167. {
  168. return GetList("");
  169. }
  170. /// <summary>
  171. /// 分页获取数据列表
  172. /// </summary>
  173. public int GetRecordCount(string strWhere)
  174. {
  175. return dal.GetRecordCount(strWhere);
  176. }
  177. /// <summary>
  178. /// 分页获取数据列表
  179. /// </summary>
  180. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  181. {
  182. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  183. }
  184. /// <summary>
  185. /// 分页获取数据列表
  186. /// </summary>
  187. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  188. //{
  189. //return dal.GetList(PageSize,PageIndex,strWhere);
  190. //}
  191. #endregion Method
  192. }
  193. }