Exemplo n.º 1
0
 public void Closeing(object para)
 {
     try
     {
         ConditionBillModel rtm = para as ConditionBillModel;
         //添加持仓集合
         ConditionBillModelViewModel temp = UCConditionBillViewModel.Instance().ConditionBillList.FirstOrDefault(o => o.ConditionOrderID == rtm.condition_orderID);
         //添加持仓集合
         if (temp != null)
         {
             temp.ConditionOrderID = rtm.condition_orderID;
             temp.ConditionType    = rtm.condition_type;
             temp.ContractCode     = rtm.contract_code;
             temp.Direction        = rtm.direction;
             temp.OpenOffset       = rtm.open_offset;
             temp.OrderPrice       = rtm.order_price;
             temp.OrderVolume      = rtm.order_volume;
             temp.PriceType        = rtm.price_type;
             temp.TrrigerPrice     = rtm.trriger_price;
             temp.TrrigerPriceType = rtm.trriger_price_type;
             temp.TrrigerTime      = rtm.trriger_time;
             temp.TrrigerContime   = rtm.trriger_contime;
             temp.TrrigerCondate   = rtm.trriger_condate;
             temp.TrrigerCondition = rtm.trriger_condition;
         }
         if (ConditionBillViewModel.Intstace(null) != null)
         {
             ConditionBillViewModel.Intstace(null).Close();
         }
     }
     catch (Exception ex)
     {
         LogHelper.Info(ex.ToString());
     }
 }        /// <summary>
Exemplo n.º 2
0
 public void ExecuteAddData(object para)
 {
     try
     {
         ConditionBillModel rtm = para as ConditionBillModel;
         if (rtm == null || rtm.price_type == null)
         {
             LogHelper.Info(para.ToString());
             return;
         }
         //添加持仓集合
         if (UCConditionBillViewModel.Instance().ConditionBillList.FirstOrDefault(x => x.ConditionOrderID == rtm.condition_orderID) == null)
         {
             UCConditionBillViewModel.Instance().ConditionBillList.Add(new ConditionBillModelViewModel(rtm));
         }
         ConditionBillViewModel.Intstace(null, 0, null, 0).Close();
     }
     catch (Exception ex)
     {
         LogHelper.Info(ex.ToString());
     }
 }