コード例 #1
0
 public OrderFillTransaction(TransactionID transactionID, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type, OrderID orderID, ClientID clientOrderID, InstrumentName instrument, double units, double gainQuoteHomeConversionFactor, double lossQuoteHomeConversionFactor, ClientPrice fullPrice, OrderFillReason reason, AccountUnits pL, AccountUnits financing, AccountUnits commission, AccountUnits guaranteedExecutionFee, AccountUnits accountBalance, TradeOpen tradeOpened, List <TradeReduce> tradesClosed, TradeReduce tradeReduced, AccountUnits halfSpreadCost)
 {
     this.TransactionID = transactionID;
     this.Time          = time;
     this.UserID        = userID;
     this.AccountID     = accountID;
     this.BatchID       = batchID;
     this.RequestID     = requestID;
     this.Type          = type;
     this.OrderID       = orderID;
     this.ClientOrderID = clientOrderID;
     this.Instrument    = instrument;
     this.Units         = units;
     this.GainQuoteHomeConversionFactor = gainQuoteHomeConversionFactor;
     this.LossQuoteHomeConversionFactor = lossQuoteHomeConversionFactor;
     this.FullPrice              = fullPrice;
     this.Reason                 = reason;
     this.PL                     = pL;
     this.Financing              = financing;
     this.Commission             = commission;
     this.GuaranteedExecutionFee = guaranteedExecutionFee;
     this.AccountBalance         = accountBalance;
     this.TradeOpened            = tradeOpened;
     this.TradesClosed           = tradesClosed;
     this.TradeReduced           = tradeReduced;
     this.HalfSpreadCost         = halfSpreadCost;
 }
コード例 #2
0
        private static string CheckRequestCache(Database db, RequestID rid, string UserID, string url)
        {
            DateTime dt = TimeZone.CurrentTimeZone.ToUniversalTime(DateTime.Now);
            RequestCacheCollection col  = new RequestCacheCollection();
            IDBCollection          icol = (IDBCollection)col;

            icol.SetConstraint((long)RequestCache.QueryValues.UserID,
                               new DBConstraint(DBConstraint.QueryConstraints.Equal, UserID));
            icol.SetConstraint((long)RequestCache.QueryValues.ValidUntil,
                               new DBConstraint(DBConstraint.QueryConstraints.Greater, dt.ToOADate().ToString()));
            icol.SetConstraint((long)RequestCache.QueryValues.url,
                               new DBConstraint(DBConstraint.QueryConstraints.Equal, url));

            db.ReadRecord((IDBCollection)col);
            IDBCollectionContents ccol = (IDBCollectionContents)col;

            if (0 == ccol.Count())
            {
                return(null);
            }
            IDBRecord     rec = ccol.GetRecordInterface(0);
            RequestObject obj = (RequestObject)rec.GetDataObject();

            Logger.ReportNotice("Using cached response, can make a new call after " + obj.ValidUntil.ToString());
            return(Compression.Decompress(obj.Response));
        }
コード例 #3
0
 public CreateTransaction(
     TransactionID id,
     DateTime time,
     int userID, AccountID accountID,
     TransactionID batchID,
     RequestID requestID,
     TransactionType type,
     int divisionID,
     int siteID,
     int accountUserID,
     int accountNumber,
     Currency homeCurrency
     )
 {
     this.Id            = id;
     this.Time          = time;
     this.UserID        = userID;
     this.AccountID     = accountID;
     this.BatchID       = batchID;
     this.RequestID     = requestID;
     this.Type          = type;
     this.DivisionID    = divisionID;
     this.SiteID        = siteID;
     this.AccountUserID = accountUserID;
     this.AccountNumber = accountNumber;
     this.HomeCurrency  = homeCurrency;
 }
コード例 #4
0
    protected void btnMainStreets_Click(object sender, EventArgs e)
    {
        try
        {
            if (Session["UserID"].ToString() == "55")
            {
                lblFeedback.Text = "";

                if (!bool.Parse(Session["canEdit"].ToString()))
                {
                    throw new Exception(Feedback.NoPermissions());
                }
                RequestID = Guid.NewGuid();
                ThreadStart ts     = new ThreadStart(CalculateMainStreets);
                Thread      worker = new Thread(ts);
                worker.Start();

                string url = string.Format("ResultMd.aspx?id={0}&All=0", RequestID.ToString());
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "RedirectScriptCoupon", "window.open('" + url + "', '_blank')", true);

                lblFeedback.Text = "تم الحساب بنجاح";
            }
            else
            {
                lblFeedback.Text = Feedback.NoPermissions();
            }
        }
        catch (Exception ex)
        {
            lblFeedback.Text = ex.Message;
        }
    }
コード例 #5
0
ファイル: Program.cs プロジェクト: ulmac/ULMAStudio
        private static async Task ValidaAddin()
        {
            UCClientWebService.Services.AddInService addInService = new UCClientWebService.Services.AddInService();
            RequestID requestId = new RequestID()
            {
                id = "gwerZrM2"
            };

            var responseId = await addInService.IsValidAsync("https://www.ulmaconstruction.com/@@bim_form_api", requestId);

            if (responseId != null)
            {
                if (responseId.valid)
                {
                    Console.WriteLine("Addin valid");
                }
                else
                {
                    Console.WriteLine("Addin invalid");
                    Console.WriteLine(responseId.message); //Mensaje personalizado enviado desde el servidor
                }
            }
            else
            {
                Console.WriteLine("Addin invalid");
            }
        }
コード例 #6
0
 public TransferFundsRejectTransaction(
     TransactionID id,
     DateTime time,
     int userID,
     AccountID accountID,
     TransactionID batchID,
     RequestID requestID,
     TransactionType type,
     AccountUnits amount,
     FundingReason fundingReason,
     string comment,
     TransactionRejectReason rejectReason
     )
 {
     this.Id            = id;
     this.Time          = time;
     this.UserID        = userID;
     this.AccountID     = accountID;
     this.BatchID       = batchID;
     this.RequestID     = requestID;
     this.Type          = type;
     this.Amount        = amount;
     this.FundingReason = fundingReason;
     this.Comment       = comment;
     this.RejectReason  = rejectReason;
 }
コード例 #7
0
 public StopOrderTransaction(TransactionID id, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type, InstrumentName instrument, double units, PriceValue price, PriceValue priceBound, TimeInForce timeInForce, DateTime gTDTime, OrderPositionFill positionFill, OrderTriggerCondition triggerCondition, StopOrderReason reason, ClientExtensions clientExtensions, TakeProfitDetails takeProfitOnFill, StopLossDetails stopLossOnFill, TrailingStopLossDetails trailingStopLossOnFill, ClientExtensions tradeClientExtensions, OrderID replacesOrderID, TransactionID cancellingTransactionID)
 {
     this.Id                      = id;
     this.Time                    = time;
     this.UserID                  = userID;
     this.AccountID               = accountID;
     this.BatchID                 = batchID;
     this.RequestID               = requestID;
     this.Type                    = type;
     this.Instrument              = instrument;
     this.Units                   = units;
     this.Price                   = price;
     this.PriceBound              = priceBound;
     this.TimeInForce             = timeInForce;
     this.GTDTime                 = gTDTime;
     this.PositionFill            = positionFill;
     this.TriggerCondition        = triggerCondition;
     this.Reason                  = reason;
     this.ClientExtensions        = clientExtensions;
     this.TakeProfitOnFill        = takeProfitOnFill;
     this.StopLossOnFill          = stopLossOnFill;
     this.TrailingStopLossOnFill  = trailingStopLossOnFill;
     this.TradeClientExtensions   = tradeClientExtensions;
     this.ReplacesOrderID         = replacesOrderID;
     this.CancellingTransactionID = cancellingTransactionID;
 }
コード例 #8
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (RequestID.Length != 0)
            {
                hash ^= RequestID.GetHashCode();
            }
            if (ReplyChannel.Length != 0)
            {
                hash ^= ReplyChannel.GetHashCode();
            }
            if (Metadata.Length != 0)
            {
                hash ^= Metadata.GetHashCode();
            }
            if (Body.Length != 0)
            {
                hash ^= Body.GetHashCode();
            }
            if (CacheHit != false)
            {
                hash ^= CacheHit.GetHashCode();
            }
            if (Context.Length != 0)
            {
                hash ^= Context.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #9
0
ファイル: Transaction.cs プロジェクト: InzenDN/adapter-csharp
 public Transaction()
 {
     this.Id        = new TransactionID();
     this.Time      = new DateTime();
     this.AccountID = new AccountID();
     this.BatchID   = new TransactionID();
     this.RequestID = new RequestID();
 }
コード例 #10
0
 public MarginCallExtendTransaction()
 {
     this.Id        = new TransactionID();
     this.Time      = new DateTime();
     this.AccountID = new AccountID();
     this.BatchID   = new TransactionID();
     this.RequestID = new RequestID();
     this.Type      = new TransactionType(ETransactionType.MARGIN_CALL_EXTEND);
 }
コード例 #11
0
        public override int WriteTo(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            cursor += base.WriteTo(Buffer, cursor);
            cursor += RequestID.WriteTo(Buffer, cursor);

            return(cursor - StartIndex);
        }
コード例 #12
0
 public CloseTransaction()
 {
     this.Id        = new TransactionID();
     this.Time      = new DateTime();
     this.AccountID = new AccountID();
     this.BatchID   = new TransactionID();
     this.RequestID = new RequestID();
     this.Type      = new TransactionType(ETransactionType.CLOSE);
 }
コード例 #13
0
 public ReopenTransaction()
 {
     this.Id        = new TransactionID();
     this.Time      = new DateTime();
     this.AccountID = new AccountID();
     this.BatchID   = new TransactionID();
     this.RequestID = new RequestID();
     this.Type      = new TransactionType(ETransactionType.REOPEN);
 }
コード例 #14
0
        public TransactionType Type; // RESET_RESETTABLE_PL

        public ResetResettablePLTransaction()
        {
            this.Id        = new TransactionID();
            this.Time      = new DateTime();
            this.AccountID = new AccountID();
            this.BatchID   = new TransactionID();
            this.RequestID = new RequestID();
            this.Type      = new TransactionType(ETransactionType.RESET_RESETTABLE_PL);
        }
コード例 #15
0
 public ClientConfigureTransaction()
 {
     this.Type      = new TransactionType(ETransactionType.CLIENT_CONFIGURE);
     this.Id        = new TransactionID();
     this.Time      = new DateTime();
     this.AccountID = new AccountID();
     this.BatchID   = new TransactionID();
     this.RequestID = new RequestID();
     this.Type      = new TransactionType(ETransactionType.CLIENT_CONFIGURE);
 }
コード例 #16
0
 public ResetResettablePLTransaction(TransactionID id, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type)
 {
     this.Id        = id;
     this.Time      = time;
     this.UserID    = userID;
     this.AccountID = accountID;
     this.BatchID   = batchID;
     this.RequestID = requestID;
     this.Type      = type;
 }
コード例 #17
0
 public ClientConfigureRejectTransaction()
 {
     this.Id        = new TransactionID();
     this.Time      = new DateTime();
     this.AccountID = new AccountID();
     this.BatchID   = new TransactionID();
     this.RequestID = new RequestID();
     this.Type      = new TransactionType(ETransactionType.CLIENT_CONFIGURE_REJECT);
     this.TransactionRejectReason = new TransactionRejectReason();
 }
コード例 #18
0
 public MarginCallEnterTransaction(TransactionID id, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type)
 {
     this.Id        = id;
     this.Time      = time;
     this.UserID    = userID;
     this.AccountID = accountID;
     this.BatchID   = batchID;
     this.RequestID = requestID;
     this.Type      = type;
 }
コード例 #19
0
 public CreateTransaction()
 {
     this.Id           = new TransactionID();
     this.Time         = new DateTime();
     this.AccountID    = new AccountID();
     this.BatchID      = new TransactionID();
     this.RequestID    = new RequestID();
     this.Type         = new TransactionType(ETransactionType.CREATE);
     this.HomeCurrency = new Currency();
 }
コード例 #20
0
 public DelayedTradeClosureTransaction()
 {
     this.Id        = new TransactionID();
     this.Time      = new DateTime();
     this.AccountID = new AccountID();
     this.BatchID   = new TransactionID();
     this.RequestID = new RequestID();
     this.Type      = new TransactionType(ETransactionType.DELAYED_TRADE_CLOSURE);
     this.Reason    = new MarketOrderReason();
     this.TradeIDs  = new TradeID();
 }
コード例 #21
0
 public MarginCallExtendTransaction(TransactionID id, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type, int extensionNumber)
 {
     this.Id              = id;
     this.Time            = time;
     this.UserID          = userID;
     this.AccountID       = accountID;
     this.BatchID         = batchID;
     this.RequestID       = requestID;
     this.Type            = type;
     this.ExtensionNumber = extensionNumber;
 }
コード例 #22
0
 public TransferFundsRejectTransaction()
 {
     this.Id            = new TransactionID();
     this.Time          = new DateTime();
     this.AccountID     = new AccountID();
     this.BatchID       = new TransactionID();
     this.RequestID     = new RequestID();
     this.Type          = new TransactionType(ETransactionType.TRANSFER_FUNDS_REJECT);
     this.Amount        = new AccountUnits();
     this.FundingReason = new FundingReason();
     this.RejectReason  = new TransactionRejectReason();
 }
コード例 #23
0
        private static void WriteRequestCache(Database db, RequestID rid, string UserID, string url, string s)
        {
            RequestCacheCollection col =
                new RequestCacheCollection(rid, UserID, url, s);
            IDBCollectionContents ccol = (IDBCollectionContents)col;

            for (int i = 0; i < ccol.Count(); ++i)
            { // this loop should normally have only 1 iteration
                Logger.ReportNotice("Response Cached.");
                db.InsertRecord(ccol.GetRecordInterface(i));
            }
        }
コード例 #24
0
 public DelayedTradeClosureTransaction(TransactionID id, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type, MarketOrderReason reason, TradeID tradeIDs)
 {
     this.Id        = id;
     this.Time      = time;
     this.UserID    = userID;
     this.AccountID = accountID;
     this.BatchID   = batchID;
     this.RequestID = requestID;
     this.Type      = type;
     this.Reason    = reason;
     this.TradeIDs  = tradeIDs;
 }
コード例 #25
0
 public TradeClientExtensionsModifyTransaction()
 {
     this.Id            = new TransactionID();
     this.Time          = new DateTime();
     this.AccountID     = new AccountID();
     this.BatchID       = new TransactionID();
     this.RequestID     = new RequestID();
     this.Type          = new TransactionType(ETransactionType.TRADE_CLIENT_EXTENSIONS_MODIFY);
     this.TradeID       = new TradeID();
     this.ClientTradeID = new ClientID();
     this.TradeClientExtensionsModify = new ClientExtensions();
 }
コード例 #26
0
 public OrderCancelRejectTransaction()
 {
     this.Id            = new TransactionID();
     this.Time          = new DateTime();
     this.AccountID     = new AccountID();
     this.BatchID       = new TransactionID();
     this.RequestID     = new RequestID();
     this.Type          = new TransactionType(ETransactionType.ORDER_CANCEL_REJECT);
     this.OrderID       = new OrderID();
     this.ClientOrderID = new OrderID();
     this.RejectReason  = new TransactionRejectReason();
 }
コード例 #27
0
 public MarketOrderRejectTransaction(
     TransactionID id,
     DateTime time,
     int userId,
     AccountID accountID,
     TransactionID batchID,
     RequestID requestID,
     TransactionType type,
     InstrumentName instrument,
     double units,
     TimeInForce timeInForce,
     PriceValue priceBound,
     OrderPositionFill positionFill,
     MarketOrderTradeClose tradeClose,
     MarketOrderPositionCloseout longPositionCloseout,
     MarketOrderPositionCloseout shortPositionCloseout,
     MarketOrderMarginCloseout marginCloseout,
     MarketOrderDelayedTradeClose delayedTradeClose,
     MarketOrderReason reason,
     ClientExtensions clientExtensions,
     TakeProfitDetails takeProfitOnFill,
     StopLossDetails stopLossOnFill,
     TrailingStopLossDetails trailingStopLossOnFill,
     ClientExtensions tradeClientExtensions,
     TransactionRejectReason rejectReason
     )
 {
     this.Id                     = id;
     this.Time                   = time;
     this.UserId                 = userId;
     this.AccountID              = accountID;
     this.BatchID                = batchID;
     this.RequestID              = requestID;
     this.Type                   = type;
     this.Instrument             = instrument;
     this.Units                  = units;
     this.TimeInForce            = timeInForce;
     this.PriceBound             = priceBound;
     this.PositionFill           = positionFill;
     this.TradeClose             = tradeClose;
     this.LongPositionCloseout   = longPositionCloseout;
     this.ShortPositionCloseout  = shortPositionCloseout;
     this.MarginCloseout         = marginCloseout;
     this.DelayedTradeClose      = delayedTradeClose;
     this.Reason                 = reason;
     this.ClientExtensions       = clientExtensions;
     this.TakeProfitOnFill       = takeProfitOnFill;
     this.StopLossOnFill         = stopLossOnFill;
     this.TrailingStopLossOnFill = trailingStopLossOnFill;
     this.TradeClientExtensions  = tradeClientExtensions;
     this.RejectReason           = rejectReason;
 }
コード例 #28
0
        public RequestCache(RequestID RequestID, string UserID, string url, string xml)
        {
            m_DataObject.RequestID = RequestID;
            m_DataObject.UserID    = UserID;
            m_DataObject.url       = url;
            m_DataObject.Response  = Compression.Compress(xml);

            XmlDocument xmlDoc = new XmlDocument();

            xmlDoc.Load(new StringReader(xml));
            m_DataObject.ValidUntil =
                DBConvert.FromCCPTime(xmlDoc.SelectSingleNode("/eveapi/cachedUntil").InnerText);
        }
コード例 #29
0
 public DailyFinancingTransaction()
 {
     this.Id                   = new TransactionID();
     this.Time                 = new DateTime();
     this.AccountID            = new AccountID();
     this.BatchID              = new TransactionID();
     this.RequestID            = new RequestID();
     this.Type                 = new TransactionType(ETransactionType.DAILY_FINANCING);
     this.Financing            = new AccountUnits();
     this.AccountBalance       = new AccountUnits();
     this.AccountFinancingMode = new AccountFinancingMode();
     this.PositionFinancings   = new List <PositionFinancing>();
 }
コード例 #30
0
 public TradeClientExtensionsModifyTransaction(TransactionID id, DateTime time, int userID, AccountID accountID, TransactionID batchID, RequestID requestID, TransactionType type, TradeID tradeID, ClientID clientTradeID, ClientExtensions tradeClientExtensionsModify)
 {
     this.Id            = id;
     this.Time          = time;
     this.UserID        = userID;
     this.AccountID     = accountID;
     this.BatchID       = batchID;
     this.RequestID     = requestID;
     this.Type          = type;
     this.TradeID       = tradeID;
     this.ClientTradeID = clientTradeID;
     this.TradeClientExtensionsModify = tradeClientExtensionsModify;
 }