Exemple #1
0
 private static List<Property> GenerateInfo(TradingAccount tradingAccount)
 {
     return new List<Property>()
     {
         new Property("BrokerID",tradingAccount.BrokerID),
         new Property("AccountID",tradingAccount.AccountID),
         new Property("PreMortgage",tradingAccount.PreMortgage),
         new Property("PreCredit",tradingAccount.PreCredit),
         new Property("PreDeposit",tradingAccount.PreDeposit),
         new Property("PreBalance",tradingAccount.PreBalance),
         new Property("PreMargin",tradingAccount.PreMargin),
         new Property("InterestBase",tradingAccount.InterestBase),
         new Property("Interest",tradingAccount.Interest),
         new Property("Deposit",tradingAccount.Deposit),
         new Property("Withdraw",tradingAccount.Withdraw),
         new Property("FrozenMargin",tradingAccount.FrozenMargin),
         new Property("FrozenCash",tradingAccount.FrozenCash),
         new Property("FrozenCommission",tradingAccount.FrozenCommission),
         new Property("CurrMargin",tradingAccount.CurrMargin),
         new Property("CashIn",tradingAccount.CashIn),
         new Property("Commission",tradingAccount.Commission),
         new Property("CloseProfit",tradingAccount.CloseProfit),
         new Property("PositionProfit",tradingAccount.PositionProfit),
         new Property("Balance",tradingAccount.Balance),
         new Property("Available",tradingAccount.Available),
         new Property("WithdrawQuota",tradingAccount.WithdrawQuota),
         new Property("Reserve",tradingAccount.Reserve),
         new Property("TradingDay",tradingAccount.TradingDay),
         new Property("SettlementID",tradingAccount.SettlementID),
         new Property("Credit",tradingAccount.Credit),
         new Property("Mortgage",tradingAccount.Mortgage),
         new Property("ExchangeMargin",tradingAccount.ExchangeMargin),
         new Property("DeliveryMargin",tradingAccount.DeliveryMargin),
         new Property("ExchangeDeliveryMargin",tradingAccount.ExchangeDeliveryMargin),
         new Property("ReserveBalance",tradingAccount.ReserveBalance),
         new Property("CurrencyID",tradingAccount.CurrencyID),
         new Property("PreFundMortgageIn",tradingAccount.PreFundMortgageIn),
         new Property("PreFundMortgageOut",tradingAccount.PreFundMortgageOut),
         new Property("FundMortgageIn",tradingAccount.FundMortgageIn),
         new Property("FundMortgageOut",tradingAccount.FundMortgageOut),
         new Property("FundMortgageAvailable",tradingAccount.FundMortgageAvailable),
         new Property("MortgageableFund",tradingAccount.MortgageableFund),
         new Property("SpecProductMargin",tradingAccount.SpecProductMargin),
         new Property("SpecProductFrozenMargin",tradingAccount.SpecProductFrozenMargin),
         new Property("SpecProductCommission",tradingAccount.SpecProductCommission),
         new Property("SpecProductFrozenCommission",tradingAccount.SpecProductFrozenCommission),
         new Property("SpecProductPositionProfit",tradingAccount.SpecProductPositionProfit),
         new Property("SpecProductCloseProfit",tradingAccount.SpecProductCloseProfit),
         new Property("SpecProductPositionProfitByAlg",tradingAccount.SpecProductPositionProfitByAlg),
         new Property("SpecProductExchangeMargin",tradingAccount.SpecProductExchangeMargin)
     };
 }
Exemple #2
0
 public override void OnRspQryTradingAccount(ThostFtdcTradingAccountField pTradingAccount, ThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast)
 {
     if (pRspInfo != null && pRspInfo.ErrorID != 0)
     {
         LogCenter.Error("请求查询资金账户错误:" + pRspInfo.ErrorMsg);
         return;
     }
     if (pTradingAccount == null)
     {
         LogCenter.Error("请求查询资金账户错误,返回值为空");
         return;
     }
     var tradingAccount = new TradingAccount
     {
         BrokerID = pTradingAccount.BrokerID,
         AccountID = pTradingAccount.AccountID,
         PreMortgage = pTradingAccount.PreMortgage,
         PreCredit = pTradingAccount.PreCredit,
         PreDeposit = pTradingAccount.PreDeposit,
         PreBalance = pTradingAccount.PreBalance,
         PreMargin = pTradingAccount.PreMargin,
         InterestBase = pTradingAccount.InterestBase,
         Interest = pTradingAccount.Interest,
         Deposit = pTradingAccount.Deposit,
         Withdraw = pTradingAccount.Withdraw,
         FrozenMargin = pTradingAccount.FrozenMargin,
         FrozenCash = pTradingAccount.FrozenCash,
         FrozenCommission = pTradingAccount.FrozenCommission,
         CurrMargin = pTradingAccount.CurrMargin,
         CashIn = pTradingAccount.CashIn,
         Commission = pTradingAccount.Commission,
         CloseProfit = pTradingAccount.CloseProfit,
         PositionProfit = pTradingAccount.PositionProfit,
         Balance = pTradingAccount.Balance,
         Available = pTradingAccount.Available,
         WithdrawQuota = pTradingAccount.WithdrawQuota,
         Reserve = pTradingAccount.Reserve,
         TradingDay = pTradingAccount.TradingDay,
         SettlementID = pTradingAccount.SettlementID,
         Credit = pTradingAccount.Credit,
         Mortgage = pTradingAccount.Mortgage,
         ExchangeMargin = pTradingAccount.ExchangeMargin,
         DeliveryMargin = pTradingAccount.DeliveryMargin,
         ExchangeDeliveryMargin = pTradingAccount.ExchangeDeliveryMargin,
         ReserveBalance = pTradingAccount.ReserveBalance,
         CurrencyID = pTradingAccount.CurrencyID,
         PreFundMortgageIn = pTradingAccount.PreFundMortgageIn,
         PreFundMortgageOut = pTradingAccount.PreFundMortgageOut,
         FundMortgageIn = pTradingAccount.FundMortgageIn,
         FundMortgageOut = pTradingAccount.FundMortgageOut,
         FundMortgageAvailable = pTradingAccount.FundMortgageAvailable,
         MortgageableFund = pTradingAccount.MortgageableFund,
         SpecProductMargin = pTradingAccount.SpecProductMargin,
         SpecProductFrozenMargin = pTradingAccount.SpecProductFrozenMargin,
         SpecProductCommission = pTradingAccount.SpecProductCommission,
         SpecProductFrozenCommission = pTradingAccount.SpecProductFrozenCommission,
         SpecProductPositionProfit = pTradingAccount.SpecProductPositionProfit,
         SpecProductCloseProfit = pTradingAccount.SpecProductCloseProfit,
         SpecProductPositionProfitByAlg = pTradingAccount.SpecProductPositionProfitByAlg,
         SpecProductExchangeMargin = pTradingAccount.SpecProductExchangeMargin,
     };
     TradingAccountViewModel.Instance.Update(tradingAccount);
 }
Exemple #3
0
 public void Update(TradingAccount tradingAccount)
 {
     this.TradingAccountInfo = GenerateInfo(tradingAccount);
 }