/// <summary> /// 实例化一个后台管理View Mode对象 /// </summary> private ManagementViewModel() { lockobj = new Object(); _TradeJuJianInfo = new ClientTradeJuJianInfo(); _dpObj = new DependencyObject(); LogRequestInfo = new LogRequestInformation(); ClientAccFilter = new ClientAccountFilter(); OnlineClientAccFilter = new ClientAccountFilter(); MarketOrderRequestInfo = new RequestInformationBase(); PendingOrderRequestInfo = new RequestInformationBase(); HedgingTradeRequestInfo = new RequestInformationBase(); StatementsRequestInfo = new StatementsRequestInformation(); _businessService = new BusinessServiceProvider(); _tradeService = new TradeServiceProvider(); _bzjService = new BzjServiceProvider(); // GetNewsCondition = new SelectCondition(); _BzjInfoInformation = new BzjInfoInformation(); TakeGoodsDetialSelectCondition = new SelectCondition(); _TakeGoodsDetailList = new ObservableCollection<BzjTakeGoodsDetailEntity>(); BindingJgjAccountCondition = new SelectCondition(); _DeliveryGoodsCondition = new SelectCondition(); _DeliveryGoodsList = new ObservableCollection<BzjDeliverEntity>(); _TakeGoodsCondition = new SelectCondition(); _TakeGoodsList = new ObservableCollection<BzjOrderEntity>(); _BackGoodsCondition = new SelectCondition(); _BackGoodsList = new ObservableCollection<BzjOrderEntity>(); _JgjGoodsCondition = new SelectCondition(); _JgjGoodsList = new ObservableCollection<BzjOrderEntity>(); _DeliveryBackGoodsCondition = new SelectCondition(); _DeliveryBackGoodsList = new List<BzjRecoverOrder>(); _GetClerkCondition = new SelectCondition(); _ClerkAccountList = new ObservableCollection<BzjClerk>(); InterOfficeSelectCondtion = new SelectCondition(); ClientAccountSelectCondition = new SelectCondition(); OnlineAccountSelectCondition = new SelectCondition(); ManagerAccountSelectCondition = new SelectCondition(); OrgAccountSelectCondition = new SelectCondition(); FundReportSelectCondition = new SelectCondition(); OrgSelectCondition = new SelectCondition(); ChuJinSelectCondition = new SelectCondition(); TerminationSelectCondition = new SelectCondition(); TradeConfigInfoList = new ObservableCollection<TradeConfigInfo>(); NewsList = new ObservableCollection<NewsInfo>(); ArtilesList = new ObservableCollection<NewsInfo>(); AdvertList = new ObservableCollection<AdvertInfo>(); GetNewsCondition = new SelectCondition(); GetArticlesCondition = new SelectCondition(); GetAdvertCondition = new SelectCondition(); FundReportList = new ObservableCollection<FundChangeInformation>(); ChuJinList = new ObservableCollection<TradeChuJinInformation>(); OrgList = new ObservableCollection<OrgInfo>(); UserGroups = new ObservableCollection<UserGroup>(); UserGroupSelectCon = new SelectCondition(); GroupAccounts = new ObservableCollection<ClientAccount>(); }
public ClientHedgingInfo GetHedgingTradeList(string loginID, ACCOUNT_TYPE accType, RequestInformationBase requestInfo) { ClientHedgingInfo cinfo = new ClientHedgingInfo(); try { HedgingInfo info = _managerService.GetHedgingInfo(loginID, requestInfo.StartTime, requestInfo.EndTime); cinfo.Desc = info.Desc; cinfo.ProfitValue = info.ProfitValue; cinfo.Quantity = info.Quantity; cinfo.Result = info.Result; cinfo.Storagefee = info.StorageFee; cinfo.Tradefee = info.TradeFee; //info.HedgingList.ForEach(p => cinfo.LTdOrderList.Add(MyConverter.ToHedgingTradeData(p))); string PreviousName = ""; for (int i = 0; i < info.HedgingList.Count; i++) { if (info.HedgingList[i].ProductName == PreviousName) { MyConverter.ToHedgingTradeData2(info.HedgingList[i], cinfo.LTdOrderList[cinfo.LTdOrderList.Count - 1]); } else { cinfo.LTdOrderList.Add(MyConverter.ToHedgingTradeData(info.HedgingList[i])); cinfo.LTdOrderList[cinfo.LTdOrderList.Count - 1].OrderType2 = null; } PreviousName = info.HedgingList[i].ProductName; } } catch (TimeoutException te) { cinfo.Result = false; cinfo.Desc = ErrorText.TimeoutException; } catch (Exception ex) { cinfo.Result = false; cinfo.Desc = ErrorText.GetHedgingTradeList; } return cinfo; }
/// <summary> /// 限价挂单查询 /// </summary> /// <param name="loginID">登录ID标识</param> /// <param name="accType">账户类型,管理员或金商</param> /// <param name="requestInfo">查询的限定信息</param> /// <param name="orderList">返回的限价挂单列表</param> /// <returns>ErrType</returns> public ErrType GetPendingOrderList(string loginID, ACCOUNT_TYPE accType, RequestInformationBase requestInfo, out List<PendingOrderData> orderList) { orderList = null; try { //Todo:金通网待处理 #region MyRegion //TradeHoldOrderInfo info = ManagerService.GetMultiTradeHoldOrder((int)accType, loginID, requestInfo.AccountName, requestInfo.StartTime, requestInfo.EndTime); //if (!info.Result) // return new ErrType(ERR.SERVICE, info.Desc); //orderList = info.TdHoldOrderList.Select(MyConverter.ToPendingOrderData).ToList(); #endregion return GeneralErr.Success; } catch (TimeoutException te) { FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, te.Message); return new ErrType(ERR.EXEPTION, ErrorText.TimeoutException); } catch (Exception ex) { FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, ex.Message); return new ErrType(ERR.EXEPTION, ErrorText.GetPendingOrderList); } }
/// <summary> /// 获取对冲交易记录 /// </summary> /// <param name="loginID">登录ID标识</param> /// <param name="accType">账户类型,管理员或金商</param> /// <param name="requestInfo">查询的限定信息</param> /// <param name="orderList">返回的对冲交易记录</param> /// <returns>ErrType</returns> public ErrType GetHedgingTradeList(string loginID, ACCOUNT_TYPE accType, RequestInformationBase requestInfo, out List<HedgingTradeData> orderList) { orderList = null; try { HedgingInfo info = _managerService.GetHedgingInfo(loginID, requestInfo.StartTime, requestInfo.EndTime); if (!info.Result) return new ErrType(ERR.SERVICE, info.Desc); orderList = info.HedgingList.Select(MyConverter.ToHedgingTradeData).ToList(); return GeneralErr.Success; } catch (TimeoutException te) { FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, te.Message); return new ErrType(ERR.EXEPTION, ErrorText.TimeoutException); } catch (Exception ex) { FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, ex.Message); return new ErrType(ERR.EXEPTION, ErrorText.GetHedgingTradeList); } }