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 ExecuteDeleteData(object para)
 {
     try
     {
         DeleteModel rtm = para as DeleteModel;
         ConditionBillModelViewModel temp = UCConditionBillViewModel.Instance().ConditionBillList.FirstOrDefault(o => o.ConditionOrderID == rtm.condition_orderID);
         //添加持仓集合
         if (temp != null)
         {
             UCConditionBillViewModel.Instance().ConditionBillList.Remove(temp);
         }
     }
     catch (Exception ex)
     {
         LogHelper.Info(ex.ToString());
     }
 }
Exemplo n.º 3
0
 public void ExecuteSendDeleteData(object para)
 {
     try
     {
         ConditionBillModel          cmd  = para as ConditionBillModel;
         ConditionBillModelViewModel item = UCConditionBillViewModel.Instance().ConditionBillList.FirstOrDefault(x => x.ConditionOrderID == cmd.condition_orderID);
         if (item != null)
         {
             item.Status      = cmd.status;
             item.TrrigerDate = cmd.trriger_date;
             item.TrrigerTime = cmd.trriger_time;
             //UCConditionBillViewModel.Instance().ConditionBillList.Remove(item);
         }
     }
     catch (Exception ex)
     {
         LogHelper.Info(ex.ToString());
     }
 }