三元财务API

archives.cs 9.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace CallCenterApi.BLL
  8. {
  9. public class archives
  10. {
  11. private readonly DAL.archives dal = new DAL.archives();
  12. /// <summary>
  13. /// 获取档案物资表数据信息
  14. /// </summary>
  15. /// <returns></returns>
  16. public DataSet GetList()
  17. {
  18. return dal.GetList();
  19. }
  20. /// <summary>
  21. /// 是否存在该记录
  22. /// </summary>
  23. public bool IfHave(int id)
  24. {
  25. return dal.IfHave(id);
  26. }
  27. /// <summary>
  28. /// 增加一条档案物资数据
  29. /// </summary>
  30. /// <param name="model"></param>
  31. /// <returns></returns>
  32. public int Add(CallCenterApi.Model.archives model)
  33. {
  34. return dal.Add(model);
  35. }
  36. /// <summary>
  37. /// 得到一个档案物资对象实体
  38. /// </summary>
  39. public CallCenterApi.Model.archives GetModel(int id)
  40. {
  41. return dal.GetModel(id);
  42. }
  43. /// <summary>
  44. /// 更新一条档案物资数据
  45. /// </summary>
  46. public bool Update(CallCenterApi.Model.archives model)
  47. {
  48. return dal.Update(model);
  49. }
  50. /// <summary>
  51. /// 删除一条档案物资数据
  52. /// </summary>
  53. public bool Delete(int id)
  54. {
  55. return dal.Delete(id);
  56. }
  57. /// <summary>
  58. /// 获取物资状态信息 用作可选的下拉框选项
  59. /// </summary>
  60. /// <returns></returns>
  61. public DataSet GetArchivestate()
  62. {
  63. return dal.GetArchivestate();
  64. }
  65. /// <summary>
  66. /// 增加物资状态数据
  67. /// </summary>
  68. /// <param name="model"></param>
  69. /// <returns></returns>
  70. public int Addarchivestate(CallCenterApi.Model.archivestate model)
  71. {
  72. return dal.Addarchivestate(model);
  73. }
  74. /// <summary>
  75. /// 删除一条物资状态信息
  76. /// </summary>
  77. /// <param name="id"></param>
  78. /// <returns></returns>
  79. public bool delarchivestate(int id)
  80. {
  81. return dal.delarchivestate(id);
  82. }
  83. /// <summary>
  84. /// 根据档案名称获取档案状态id
  85. /// </summary>
  86. /// <param name="statename"></param>
  87. /// <returns></returns>
  88. public int GetStateid(string statename)
  89. {
  90. return dal.GetStateid(statename);
  91. }
  92. /// <summary>
  93. /// 根据id 修改档案物资的状态
  94. /// </summary>
  95. /// <returns></returns>
  96. public bool updateState(int id, int stateid)
  97. {
  98. return dal.updateState(id,stateid);
  99. }
  100. /// <summary>
  101. /// 获取外部客户操作表信息
  102. /// </summary>
  103. /// <returns></returns>
  104. public DataSet GetCustomerBorrow()
  105. {
  106. return dal.GetCustomerBorrow();
  107. }
  108. /// <summary>
  109. /// 外部客户操作信息添加
  110. /// </summary>
  111. /// <returns></returns>
  112. public int AddCustomerBorrow(CallCenterApi.Model.customerBorrow model)
  113. {
  114. return dal.AddCustomerBorrow(model);
  115. }
  116. /// <summary>
  117. /// 获取客户操作表实体
  118. /// </summary>
  119. /// <param name="id"></param>
  120. /// <returns></returns>
  121. public CallCenterApi.Model.customerBorrow GetCustomerModel(int id)
  122. {
  123. return dal.GetCustomerModel(id);
  124. }
  125. /// <summary>
  126. /// 修改客户操作信息
  127. /// </summary>
  128. /// <returns></returns>
  129. public bool UpCustomerBorrow(CallCenterApi.Model.customerBorrow model)
  130. {
  131. return dal.UpCustomerBorrow(model);
  132. }
  133. /// <summary>
  134. /// 删除一条客户操作信息
  135. /// </summary>
  136. /// <param name="id"></param>
  137. /// <returns></returns>
  138. public bool delCustomerBorrow(int id)
  139. {
  140. return dal.delCustomerBorrow(id);
  141. }
  142. /// <summary>
  143. /// 获取内部操作表信息
  144. /// </summary>
  145. /// <returns></returns>
  146. public DataSet GetinsideOperation()
  147. {
  148. return dal.GetinsideOperation();
  149. }
  150. /// <summary>
  151. /// 内部员工操作信息添加
  152. /// </summary>
  153. /// <returns></returns>
  154. public int AddinsideOperation(CallCenterApi.Model.insideOperation model)
  155. {
  156. return dal.AddinsideOperation(model);
  157. }
  158. /// <summary>
  159. /// 修改和互操作信息
  160. /// </summary>
  161. /// <returns></returns>
  162. public bool UpinsideOperation(CallCenterApi.Model.insideOperation model)
  163. {
  164. return dal.UpinsideOperation(model);
  165. }
  166. /// <summary>
  167. /// 获取内部员工操作表实体
  168. /// </summary>
  169. /// <param name="id"></param>
  170. /// <returns></returns>
  171. public CallCenterApi.Model.insideOperation GetinsideOperationModel(int id)
  172. {
  173. return dal.GetinsideOperationModel(id);
  174. }
  175. /// <summary>
  176. /// 删除一条内部员工操作信息
  177. /// </summary>
  178. /// <param name="id"></param>
  179. /// <returns></returns>
  180. public bool delinsideOperation(int id)
  181. {
  182. return dal.delinsideOperation(id);
  183. }
  184. /// <summary>
  185. /// 获取操作日志表信息
  186. /// </summary>
  187. /// <returns></returns>
  188. public DataSet GetOperationlog()
  189. {
  190. return dal.GetOperationlog();
  191. }
  192. /// <summary>
  193. /// 操作日志信息添加
  194. /// </summary>
  195. /// <returns></returns>
  196. public int AddOperationlog(CallCenterApi.Model.Operationlog model)
  197. {
  198. return dal.AddOperationlog(model);
  199. }
  200. /// <summary>
  201. /// 获得档案物资数据列表 导入部分
  202. /// </summary>
  203. public List<Model.archives> DataTableToList(DataTable dt)
  204. {
  205. List<Model.archives> modelList = new List<Model.archives>();
  206. int rowsCount = dt.Rows.Count;
  207. if (rowsCount > 0)
  208. {
  209. Model.archives model;
  210. for (int n = 0; n < rowsCount; n++)
  211. {
  212. model = dal.DataRowToModelarchives(dt.Rows[n]);
  213. if (model != null)
  214. {
  215. modelList.Add(model);
  216. }
  217. }
  218. }
  219. return modelList;
  220. }
  221. /// <summary>
  222. /// 获得物资状态数据列表 导入部分
  223. /// </summary>
  224. public List<Model.archivestate> DataTableToList1(DataTable dt)
  225. {
  226. List<Model.archivestate> modelList = new List<Model.archivestate>();
  227. int rowsCount = dt.Rows.Count;
  228. if (rowsCount > 0)
  229. {
  230. Model.archivestate model;
  231. for (int n = 0; n < rowsCount; n++)
  232. {
  233. model = dal.DataRowToModelarchives1(dt.Rows[n]);
  234. if (model != null)
  235. {
  236. modelList.Add(model);
  237. }
  238. }
  239. }
  240. return modelList;
  241. }
  242. /// <summary>
  243. /// 获得客户操作借阅归还数据列表
  244. /// </summary>
  245. public List<Model.customerBorrow> DataTableToListcustomerBorrow(DataTable dt)
  246. {
  247. List<Model.customerBorrow> modelList = new List<Model.customerBorrow>();
  248. int rowsCount = dt.Rows.Count;
  249. if (rowsCount > 0)
  250. {
  251. Model.customerBorrow model;
  252. for (int n = 0; n < rowsCount; n++)
  253. {
  254. model = dal.DataRowToModelcustomerBorrow(dt.Rows[n]);
  255. if (model != null)
  256. {
  257. modelList.Add(model);
  258. }
  259. }
  260. }
  261. return modelList;
  262. }
  263. /// <summary>
  264. /// 获得内部员工操作出入库数据列表 导入部分 分页部分
  265. /// </summary>
  266. public List<Model.insideOperation> DataTableToListinsideOperation(DataTable dt)
  267. {
  268. List<Model.insideOperation> modelList = new List<Model.insideOperation>();
  269. int rowsCount = dt.Rows.Count;
  270. if (rowsCount > 0)
  271. {
  272. Model.insideOperation model;
  273. for (int n = 0; n < rowsCount; n++)
  274. {
  275. model = dal.DataRowToModelinsideOperation(dt.Rows[n]);
  276. if (model != null)
  277. {
  278. modelList.Add(model);
  279. }
  280. }
  281. }
  282. return modelList;
  283. }
  284. /// <summary>
  285. /// 获得操作记录信息数据列表 导入部分
  286. /// </summary>
  287. public List<Model.Operationlog> DataTableToListOperationlog(DataTable dt)
  288. {
  289. List<Model.Operationlog> modelList = new List<Model.Operationlog>();
  290. int rowsCount = dt.Rows.Count;
  291. if (rowsCount > 0)
  292. {
  293. Model.Operationlog model;
  294. for (int n = 0; n < rowsCount; n++)
  295. {
  296. model = dal.DataRowToModelOperationlog(dt.Rows[n]);
  297. if (model != null)
  298. {
  299. modelList.Add(model);
  300. }
  301. }
  302. }
  303. return modelList;
  304. }
  305. }
  306. }