前端转vue
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

OutOfDataObject.cs 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. using System.Collections.Generic;
  2. using TellerSystem.Library.Ext;
  3. namespace TellerSystem.Library.Ext.TradeExtension
  4. {
  5. public static class OutOfDataObject
  6. {
  7. //public static NormalTradePage page = new NormalTradePage();
  8. //public static NormalTradePage Page
  9. // {
  10. // get { return page; }
  11. // set { page = value; }
  12. // }
  13. //public static Dictionary<string, Dictionary<string, string>> dirt = new Dictionary<string, Dictionary<string, string>>();
  14. // public static Dictionary<string, Dictionary<string, string>> Dirt
  15. // {
  16. // get { return dirt; }
  17. // set { dirt = value; }
  18. // }
  19. // private static string id;
  20. // public static string Id
  21. // {
  22. // get { return OutOfDataObject.id; }
  23. // set { OutOfDataObject.id = value; }
  24. // }
  25. /// <summary>
  26. /// 检索数据,得到外部数据
  27. /// </summary>
  28. /// <param name="trade_type">交易类型</param>
  29. /// <param name="keywords">关键字</param>
  30. /// <returns>外部数据</returns>
  31. public static Dictionary<string,string> GetOutofData(string trade_type, string keywords)
  32. {
  33. //Dictionary<string, string> outData = new Dictionary<string, string>();
  34. //TradeServiceService trade = new TradeServiceService();
  35. //string tradeNo = page.GetType().Name;
  36. //string branch_no = LoginUserInfo.KinbrNo;
  37. //if (OutOfDataObject.Dirt != null)
  38. //{
  39. // if (OutOfDataObject.Dirt.ContainsKey(keywords))
  40. // {
  41. // outData = OutOfDataObject.Dirt[keywords];
  42. // }
  43. // else
  44. // {
  45. // string outstr = trade.GetOutOfData(tradeNo, trade_type, keywords, branch_no);
  46. // if (outstr != null)
  47. // {
  48. // //反序列化
  49. // outData = TradePageExtension.Deserialize <Dictionary<string, string>>(page, outstr);
  50. // }
  51. // //else
  52. // //{
  53. // // MessageBox.Show("没有查到保存的数据");
  54. // //}
  55. // }
  56. //}
  57. //else
  58. //{
  59. // ////查询数据库
  60. // string outstr = trade.GetOutOfData(tradeNo, trade_type, keywords, branch_no);
  61. // if (outstr != null)
  62. // {
  63. // //反序列化
  64. // outData = TradePageExtension.Deserialize<Dictionary<string, string>>(page, outstr);
  65. // }
  66. //}
  67. //return outData;
  68. return null;
  69. }
  70. /// <summary>
  71. /// 保存外部数据
  72. /// </summary>
  73. /// <param name="keywords"></param>
  74. /// <param name="dirct"></param>
  75. /// <returns></returns>
  76. //public static bool SetOutofData(string trade_type, string keywords,Dictionary<string,string> dirct)
  77. //{
  78. // string outdataId = Guid.NewGuid().ToString("N");
  79. // OutOfDataObject.Id = outdataId;
  80. // string branch_no = LoginUserInfo.KinbrNo;
  81. // string tradeNo = OutOfDataObject.page.GetType().Name;
  82. // string tellerNo = LoginUserInfo.TellerNo.Trim();
  83. // string outdata = TradePageExtension.Serialize(page, dirct);
  84. // TradeServiceService trade = new TradeServiceService();
  85. // bool Isok = trade.SetOutOfData(outdataId, tradeNo, trade_type, keywords, outdata, tellerNo, branch_no);
  86. // return Isok;
  87. //}
  88. }
  89. }