DBTableMsgService.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Muchinfo.MTPClient.IService;
  6. using Muchinfo.MTPClient.Service.Utilities;
  7. using Muchinfo.MTPClient.Resources;
  8. using Muchinfo.MTPClient.Data.Model.DBTableMsg;
  9. using Muchinfo.MTPClient.Infrastructure.Cache;
  10. namespace Muchinfo.MTPClient.Service
  11. {
  12. /// <summary>
  13. /// 数据库表信息通用服务
  14. /// </summary>
  15. public class DBTableMsgService : IDBTableMsgService
  16. {
  17. /// <summary>
  18. /// 查询合约单位
  19. /// </summary>
  20. /// <param name="statement">QueryAllGoodsUnit</param>
  21. /// <param name="queryCommonParams">查询参数</param>
  22. /// <param name="successAction">成功执行</param>
  23. /// <param name="errorAction">失败执行</param>
  24. public void SearchAllGoodsUnit(string statement, List<Data.QueryCommonParam> queryCommonParams, Action<List<GoodsUnit>> successAction, Action<Data.ErrorEntity> errorAction)
  25. {
  26. QueryCommonHelper.QueryCommon(statement, queryCommonParams, new Action<List<GoodsUnit>>((goodsUnit) =>
  27. {
  28. if (successAction != null)
  29. {
  30. successAction(goodsUnit);
  31. }
  32. }), (error) =>
  33. {
  34. if (errorAction != null)
  35. {
  36. //RequestFunc = 查询合约单位
  37. error.RequestFunc = Client_Resource.Resources_Service_SearchAllGoodsUnit;
  38. errorAction(error);
  39. }
  40. });
  41. }
  42. }
  43. }