Пример #1
0
        public BuySellStockOptionTransaction(XmlNode node, string currency)
        {
            InvTransaction = new InvestmentTransaction();

            InvTransaction.TransactionType = node.Name;
            //Look in first child of the context node (.//)
            FITransactionID = node.GetValue(".//FITID");
            Memo            = node.GetValue(".//MEMO");
            Units           = Convert.ToDecimal(node.GetValue(".//UNITS").Trim(), CultureInfo.InvariantCulture);
            UnitPrice       = Convert.ToDecimal(node.GetValue(".//UNITPRICE").Trim(), CultureInfo.InvariantCulture);
            switch (InvTransaction.TransactionType)
            {
            case "BUYOPT":
                Markup = Convert.ToDecimal(node.GetValue(".//MARKUP").Trim(), CultureInfo.InvariantCulture);
                Type   = node.GetValue(".//OPTBUYTYPE");
                break;

            case "SELLOPT":
                Markdown = Convert.ToDecimal(node.GetValue(".//MARKDOWN").Trim(), CultureInfo.InvariantCulture);
                Type     = node.GetValue(".//OPTSELLTYPE");
                break;
            }
            Commission = Convert.ToDecimal(node.GetValue(".//COMMISSION").Trim(), CultureInfo.InvariantCulture);
            Fees       = Convert.ToDecimal(node.GetValue(".//FEES").Trim(), CultureInfo.InvariantCulture);
            Type       = node.GetValue(".//OPTBUYTYPE");
            InvTransaction.TradeDate          = node.GetValue(".//DTTRADE").ToDate();
            InvTransaction.SettleDate         = node.GetValue(".//DTSETTLE").ToDate();
            InvTransaction.UniqueID           = node.GetValue(".//SECID//UNIQUEID");
            InvTransaction.UniqueIDType       = node.GetValue(".//SECID//UNIQUEIDTYPE");
            InvTransaction.Total              = Convert.ToDecimal(node.GetValue(".//TOTAL").Trim(), CultureInfo.InvariantCulture);
            InvTransaction.SecuritySubAccount = node.GetValue(".//SUBACCTSEC");
            InvTransaction.FundSubAccount     = node.GetValue(".//SUBACCTFUND");
        }
Пример #2
0
        public IncomeTransaction(XmlNode node, string currency)
        {
            InvTransaction = new InvestmentTransaction();

            //Look in first child of the context node (.//)
            FITransactionID                   = node.GetValue(".//FITID");
            Memo                              = node.GetValue(".//MEMO");
            InvTransaction.TradeDate          = node.GetValue(".//DTTRADE").ToDate();
            InvTransaction.SettleDate         = node.GetValue(".//DTSETTLE").ToDate();
            InvTransaction.UniqueID           = node.GetValue(".//SECID//UNIQUEID");
            InvTransaction.UniqueIDType       = node.GetValue(".//SECID//UNIQUEIDTYPE");
            InvTransaction.TransactionType    = node.GetValue(".//INCOMETYPE");
            InvTransaction.Total              = Convert.ToDecimal(node.GetValue(".//TOTAL").Trim(), CultureInfo.InvariantCulture);
            InvTransaction.SecuritySubAccount = node.GetValue(".//SUBACCTSEC");
            InvTransaction.FundSubAccount     = node.GetValue(".//SUBACCTFUND");
        }
Пример #3
0
        public StockTransferTransaction(XmlNode node, string currency)
        {
            InvTransaction = new InvestmentTransaction();

            InvTransaction.TransactionType = node.Name;
            //Look in first child of the context node (.//)
            FITransactionID = node.GetValue(".//FITID");
            Memo            = node.GetValue(".//MEMO");
            Units           = Convert.ToDecimal(node.GetValue(".//UNITS").Trim(), CultureInfo.InvariantCulture);

            String unitPrice = node.GetValue(".//UNITPRICE").Trim();

            if (unitPrice != null && unitPrice != "")
            {
                UnitPrice = Convert.ToDecimal(unitPrice, CultureInfo.InvariantCulture);
            }
            Action = node.GetValue(".//TFERACTION");
            InvTransaction.TradeDate          = node.GetValue(".//DTTRADE").ToDate();
            InvTransaction.SettleDate         = node.GetValue(".//DTSETTLE").ToDate();
            InvTransaction.UniqueID           = node.GetValue(".//SECID//UNIQUEID");
            InvTransaction.UniqueIDType       = node.GetValue(".//SECID//UNIQUEIDTYPE");
            InvTransaction.Total              = 0;
            InvTransaction.SecuritySubAccount = node.GetValue(".//SUBACCTSEC");
        }