CallFunction.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Cksoft.Unity;
  2. using DllEapEntity;
  3. using DllPubInfo;
  4. using Newtonsoft.Json;
  5. using System;
  6. using System.Collections;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Windows.Forms;
  12. namespace DllXqManager
  13. {
  14. public class CallFunction
  15. {
  16. public static LayoutMst CallIULayoutMst(LayoutMst entity,List<LayoutDetail> details)
  17. {
  18. try
  19. {
  20. Hashtable tempds = new Hashtable();
  21. string str = JsonConvert.SerializeObject(entity);
  22. tempds.Add(nameof(LayoutMst), str);
  23. tempds.Add(nameof(LayoutDetail), JsonConvert.SerializeObject(details));
  24. Hashtable reds = PubInfo.CallFunction("DllStatusShowBll.StatusShowBll", "IULayoutMst", tempds);
  25. if (reds == null)
  26. return null;
  27. LayoutMst reentity = JsonConvert.DeserializeObject<LayoutMst>(reds[nameof(LayoutMst)].ToString());
  28. return reentity;
  29. }
  30. catch (Exception e)
  31. {
  32. MessageBox.Show("操作发生错误,错误信息为:" + e.Message.ToString(), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
  33. return null;
  34. }
  35. }
  36. }
  37. }