public static void Add(Order order, string key) { Dictionary <string, string> items = new Dictionary <string, string>(); items.Add("trade_no", order.trade_no); items.Add("trade_count", order.trade_count.ToString()); items.Add("code", order.code); items.Add("name", order.name); items.Add("price", order.price.ToString()); items.Add("count", order.count.ToString()); items.Add("type", order.type.ToString()); items.Add("unit_id", order.unit_id.ToString()); items.Add("unit_name", order.unit_name ?? UnitRA.GetName(order.unit_id)); items.Add("user_id", order.user_id.ToString()); items.Add("user_name", order.user_name ?? UserRA.Get(order.user_id.ToString(), "name")); items.Add("platform", order.platform.ToString()); items.Add("deal_count", order.deal_count.ToString()); items.Add("deal_average_price", order.deal_average_price.ToString()); items.Add("cancel_count", "0"); items.Add("status", order.status ?? ""); items.Add("state", order.state.ToString()); items.Add("time_dt", order.time_dt.Format()); items.Add("account_id", order.account_id.ToString()); items.Add("account_name", order.account_name ?? AccountRA.GetName(order.account_id)); items.Add("order_no", order.order_no ?? ""); items.Add("remark", order.remark ?? ""); TradeRA.SetFields(key, items); TradeRA.SetExpire(key); }
public static void UpdateStatus(Order order, string key) { Dictionary <string, string> items = new Dictionary <string, string>(); items.Add("deal_count", order.deal_count.ToString()); items.Add("cancel_count", order.cancel_count.ToString()); items.Add("status", order.status); TradeRA.SetFields(key, items); }
public static void UpdateNew(Order order, string key) { Dictionary <string, string> items = new Dictionary <string, string>(); items.Add("name", order.name); items.Add("deal_count", order.deal_count.ToString()); items.Add("cancel_count", order.cancel_count.ToString()); items.Add("status", order.status); items.Add("time_dt", order.time_dt.Format()); TradeRA.SetFields(key, items); }