123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- using System.Collections.Generic;
- using TellerSystem.Library.Ext;
-
- namespace TellerSystem.Library.Ext.TradeExtension
- {
-
- public static class OutOfDataObject
- {
-
- //public static NormalTradePage page = new NormalTradePage();
-
- //public static NormalTradePage Page
- // {
- // get { return page; }
- // set { page = value; }
- // }
- //public static Dictionary<string, Dictionary<string, string>> dirt = new Dictionary<string, Dictionary<string, string>>();
-
- // public static Dictionary<string, Dictionary<string, string>> Dirt
- // {
- // get { return dirt; }
- // set { dirt = value; }
- // }
- // private static string id;
-
- // public static string Id
- // {
- // get { return OutOfDataObject.id; }
- // set { OutOfDataObject.id = value; }
- // }
-
-
- /// <summary>
- /// 检索数据,得到外部数据
- /// </summary>
- /// <param name="trade_type">交易类型</param>
- /// <param name="keywords">关键字</param>
- /// <returns>外部数据</returns>
- public static Dictionary<string,string> GetOutofData(string trade_type, string keywords)
- {
- //Dictionary<string, string> outData = new Dictionary<string, string>();
- //TradeServiceService trade = new TradeServiceService();
- //string tradeNo = page.GetType().Name;
- //string branch_no = LoginUserInfo.KinbrNo;
- //if (OutOfDataObject.Dirt != null)
- //{
- // if (OutOfDataObject.Dirt.ContainsKey(keywords))
- // {
- // outData = OutOfDataObject.Dirt[keywords];
- // }
- // else
- // {
-
- // string outstr = trade.GetOutOfData(tradeNo, trade_type, keywords, branch_no);
- // if (outstr != null)
- // {
- // //反序列化
- // outData = TradePageExtension.Deserialize <Dictionary<string, string>>(page, outstr);
- // }
- // //else
- // //{
- // // MessageBox.Show("没有查到保存的数据");
- // //}
- // }
-
- //}
- //else
- //{
- // ////查询数据库
- // string outstr = trade.GetOutOfData(tradeNo, trade_type, keywords, branch_no);
- // if (outstr != null)
- // {
- // //反序列化
- // outData = TradePageExtension.Deserialize<Dictionary<string, string>>(page, outstr);
- // }
-
- //}
-
- //return outData;
- return null;
- }
- /// <summary>
- /// 保存外部数据
- /// </summary>
- /// <param name="keywords"></param>
- /// <param name="dirct"></param>
- /// <returns></returns>
- //public static bool SetOutofData(string trade_type, string keywords,Dictionary<string,string> dirct)
- //{
- // string outdataId = Guid.NewGuid().ToString("N");
- // OutOfDataObject.Id = outdataId;
- // string branch_no = LoginUserInfo.KinbrNo;
- // string tradeNo = OutOfDataObject.page.GetType().Name;
- // string tellerNo = LoginUserInfo.TellerNo.Trim();
- // string outdata = TradePageExtension.Serialize(page, dirct);
- // TradeServiceService trade = new TradeServiceService();
- // bool Isok = trade.SetOutOfData(outdataId, tradeNo, trade_type, keywords, outdata, tellerNo, branch_no);
- // return Isok;
- //}
-
- }
-
- }
|