市长热线演示版

T_Wo_WorkOrderEvaluation.cs 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. using System;
  2. using System.Data;
  3. using System.Collections.Generic;
  4. using HySoft.Common;
  5. using HySoft.BaseCallCenter.Model;
  6. namespace HySoft.BaseCallCenter.BLL
  7. {
  8. /// <summary>
  9. /// T_Wo_WorkOrderEvaluation
  10. /// </summary>
  11. public partial class T_Wo_WorkOrderEvaluation
  12. {
  13. private readonly HySoft.BaseCallCenter.DAL.T_Wo_WorkOrderEvaluation dal=new HySoft.BaseCallCenter.DAL.T_Wo_WorkOrderEvaluation();
  14. public T_Wo_WorkOrderEvaluation()
  15. {}
  16. #region Method
  17. /// <summary>
  18. /// 增加一条数据
  19. /// </summary>
  20. public int Add(HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation model)
  21. {
  22. return dal.Add(model);
  23. }
  24. /// <summary>
  25. /// 更新一条数据
  26. /// </summary>
  27. public bool Update(HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation model)
  28. {
  29. return dal.Update(model);
  30. }
  31. /// <summary>
  32. /// 删除一条数据
  33. /// </summary>
  34. public bool Delete(int F_ID)
  35. {
  36. return dal.Delete(F_ID);
  37. }
  38. /// <summary>
  39. /// 删除一条数据
  40. /// </summary>
  41. public bool DeleteList(string F_IDlist )
  42. {
  43. return dal.DeleteList(F_IDlist );
  44. }
  45. /// <summary>
  46. /// 得到一个对象实体
  47. /// </summary>
  48. public HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation GetModel(int F_ID)
  49. {
  50. return dal.GetModel(F_ID);
  51. }
  52. /// <summary>
  53. /// 得到一个对象实体,从缓存中
  54. /// </summary>
  55. //public HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation GetModelByCache(int F_ID)
  56. //{
  57. // string CacheKey = "T_Wo_WorkOrderEvaluationModel-" + F_ID;
  58. // object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
  59. // if (objModel == null)
  60. // {
  61. // try
  62. // {
  63. // objModel = dal.GetModel(F_ID);
  64. // if (objModel != null)
  65. // {
  66. // int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache");
  67. // Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
  68. // }
  69. // }
  70. // catch{}
  71. // }
  72. // return (HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation)objModel;
  73. //}
  74. /// <summary>
  75. /// 获得数据列表
  76. /// </summary>
  77. public DataSet GetList(string strWhere)
  78. {
  79. return dal.GetList(strWhere);
  80. }
  81. /// <summary>
  82. /// 获得前几行数据
  83. /// </summary>
  84. public DataSet GetList(int Top,string strWhere,string filedOrder)
  85. {
  86. return dal.GetList(Top,strWhere,filedOrder);
  87. }
  88. /// <summary>
  89. /// 获得数据列表
  90. /// </summary>
  91. public List<HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation> GetModelList(string strWhere)
  92. {
  93. DataSet ds = dal.GetList(strWhere);
  94. return DataTableToList(ds.Tables[0]);
  95. }
  96. /// <summary>
  97. /// 获得数据列表
  98. /// </summary>
  99. public List<HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation> DataTableToList(DataTable dt)
  100. {
  101. List<HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation> modelList = new List<HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation>();
  102. int rowsCount = dt.Rows.Count;
  103. if (rowsCount > 0)
  104. {
  105. HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation model;
  106. for (int n = 0; n < rowsCount; n++)
  107. {
  108. model = new HySoft.BaseCallCenter.Model.T_Wo_WorkOrderEvaluation();
  109. if(dt.Rows[n]["F_ID"]!=null && dt.Rows[n]["F_ID"].ToString()!="")
  110. {
  111. model.F_ID=int.Parse(dt.Rows[n]["F_ID"].ToString());
  112. }
  113. if(dt.Rows[n]["F_WORKORDERID"]!=null && dt.Rows[n]["F_WORKORDERID"].ToString()!="")
  114. {
  115. model.F_WORKORDERID=int.Parse(dt.Rows[n]["F_WORKORDERID"].ToString());
  116. }
  117. if(dt.Rows[n]["F_USERID"]!=null && dt.Rows[n]["F_USERID"].ToString()!="")
  118. {
  119. model.F_USERID=int.Parse(dt.Rows[n]["F_USERID"].ToString());
  120. }
  121. if(dt.Rows[n]["F_DETAILID"]!=null && dt.Rows[n]["F_DETAILID"].ToString()!="")
  122. {
  123. model.F_DETAILID=int.Parse(dt.Rows[n]["F_DETAILID"].ToString());
  124. }
  125. if(dt.Rows[n]["F_TASKID"]!=null && dt.Rows[n]["F_TASKID"].ToString()!="")
  126. {
  127. model.F_TASKID=int.Parse(dt.Rows[n]["F_TASKID"].ToString());
  128. }
  129. if(dt.Rows[n]["F_EVALUATIONID"]!=null && dt.Rows[n]["F_EVALUATIONID"].ToString()!="")
  130. {
  131. model.F_EVALUATIONID=int.Parse(dt.Rows[n]["F_EVALUATIONID"].ToString());
  132. }
  133. if(dt.Rows[n]["F_X"]!=null && dt.Rows[n]["F_X"].ToString()!="")
  134. {
  135. model.F_X=decimal.Parse(dt.Rows[n]["F_X"].ToString());
  136. }
  137. if(dt.Rows[n]["F_Y"]!=null && dt.Rows[n]["F_Y"].ToString()!="")
  138. {
  139. model.F_Y=decimal.Parse(dt.Rows[n]["F_Y"].ToString());
  140. }
  141. modelList.Add(model);
  142. }
  143. }
  144. return modelList;
  145. }
  146. /// <summary>
  147. /// 获得数据列表
  148. /// </summary>
  149. public DataSet GetAllList()
  150. {
  151. return GetList("");
  152. }
  153. /// <summary>
  154. /// 分页获取数据列表
  155. /// </summary>
  156. public int GetRecordCount(string strWhere)
  157. {
  158. return dal.GetRecordCount(strWhere);
  159. }
  160. /// <summary>
  161. /// 分页获取数据列表
  162. /// </summary>
  163. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  164. {
  165. return dal.GetListByPage( strWhere, orderby, startIndex, endIndex);
  166. }
  167. /// <summary>
  168. /// 分页获取数据列表
  169. /// </summary>
  170. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  171. //{
  172. //return dal.GetList(PageSize,PageIndex,strWhere);
  173. //}
  174. #endregion Method
  175. }
  176. }