Beispiel #1
0
        // ------------------------------------------------------------------------------------------------------------

        /// <summary>	Inserts a transaction. </summary>
        ///
        /// <remarks>	Paul, 05/02/2015. </remarks>
        ///
        /// <param name="symbolPair">   The symbol pair. </param>
        /// <param name="orderType">    Type of the order. </param>
        /// <param name="receivedTxid">	The received txid. </param>
        /// <param name="sentTxid">	    The sent txid. </param>
        /// <param name="amount">	    The amount. </param>
        /// <param name="type">		    The type. </param>
        /// <param name="notes">	    (Optional) the notes. </param>
        public void InsertTransaction(string symbolPair, string depositAddress, MetaOrderType orderType,
                                      string receivedTxid, string sentTxid, decimal amount, decimal price, decimal fee,
                                      MetaOrderStatus status, DateTime date, string notes = null, TransactionPolicy policy = TransactionPolicy.INSERT)
        {
            string verb;

            if (policy == TransactionPolicy.INSERT || policy == TransactionPolicy.REPLACE)
            {
                verb = policy.ToString();
            }
            else if (policy == TransactionPolicy.IGNORE)
            {
                verb = "INSERT IGNORE";
            }
            else
            {
                throw new NotImplementedException();
            }

            m_database.Statement(verb + " INTO transactions (received_txid, deposit_address, sent_txid, symbol_pair, amount, price, fee, date, status, notes, order_type) VALUES(@a,@b,@c,@d,@e,@f,@g,@h,@i,@j,@k);",
                                 receivedTxid, depositAddress, sentTxid, symbolPair, amount, price, fee, date, status, notes, orderType);
        }
Beispiel #2
0
 public abstract void MarkTransactionAsRefundedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, string notes);
Beispiel #3
0
 public override void MarkTransactionAsRefundedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, string notes)
 {
     m_dataAccess.MarkTransactionAsRefundedEnd(receivedTxid, sentTxid, status, amount, notes);
 }
Beispiel #4
0
 public void MarkDespositAsCreditedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, decimal price, decimal fee)
 {
     m_dataAccess.MarkDespositAsCreditedEnd(receivedTxid, sentTxid, status, amount, price, fee);
 }
Beispiel #5
0
 public void MarkDespositAsCreditedStart(string receivedTxid, string depositAddress, string symbolPair,
                                         MetaOrderType orderType, MetaOrderStatus status = MetaOrderStatus.processing,
                                         TransactionPolicy policy = TransactionPolicy.INSERT)
 {
     m_dataAccess.MarkDespositAsCreditedStart(receivedTxid, depositAddress, symbolPair, orderType, status, policy);
 }
Beispiel #6
0
 /// <summary>	Mark transaction start. </summary>
 ///
 /// <remarks>	Paul, 11/02/2015. </remarks>
 ///
 /// <param name="receivedTxid">     The received txid. </param>
 /// <param name="depositAddress">	The deposit address. </param>
 /// <param name="symbolPair">	    The symbol pair. </param>
 /// <param name="orderType">	    Type of the order. </param>
 /// <param name="amount">		    The amount. </param>
 public void MarkTransactionStart(string receivedTxid, string depositAddress, string symbolPair,
                                  MetaOrderType orderType, MetaOrderStatus status = MetaOrderStatus.processing,
                                  TransactionPolicy policy = TransactionPolicy.INSERT)
 {
     InsertTransaction(symbolPair, depositAddress, orderType, receivedTxid, null, 0, 0, 0, status, DateTime.UtcNow, null, policy);
 }
Beispiel #7
0
 /// <summary>	Mark transaction end./ </summary>
 ///
 /// <remarks>	Paul, 11/02/2015. </remarks>
 ///
 /// <param name="receivedTxid">	The received txid. </param>
 /// <param name="sentTxid">	   	The sent txid. </param>
 /// <param name="status">	   	The status. </param>
 /// <param name="notes">	   	(Optional) the notes. </param>
 public void MarkTransactionEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, decimal price, decimal fee, string notes = null)
 {
     m_database.Statement(	"UPDATE transactions SET sent_txid=@sent, status=@status, notes=@notes, amount=@amount, price=@price, fee=@fee WHERE received_txid=@txid;",
                             sentTxid, status, notes, amount, price, fee, receivedTxid);
 }
Beispiel #8
0
        public void MarkDespositAsCreditedStart(string receivedTxid, string depositAddress, string symbolPair, 
												MetaOrderType orderType, MetaOrderStatus status = MetaOrderStatus.processing,
												TransactionPolicy policy = TransactionPolicy.INSERT)
        {
            MarkTransactionStart(receivedTxid, depositAddress, symbolPair, orderType, status, policy);
        }
Beispiel #9
0
        // ------------------------------------------------------------------------------------------------------------
        /// <summary>	Inserts a transaction. </summary>
        ///
        /// <remarks>	Paul, 05/02/2015. </remarks>
        ///
        /// <param name="symbolPair">  	The symbol pair. </param>
        /// <param name="orderType">   	Type of the order. </param>
        /// <param name="receivedTxid">	The received txid. </param>
        /// <param name="sentTxid">	   	The sent txid. </param>
        /// <param name="amount">	   	The amount. </param>
        /// <param name="type">		   	The type. </param>
        /// <param name="notes">	   	(Optional) the notes. </param>
        void InsertTransaction(	string symbolPair, string depositAddress, MetaOrderType orderType, 
								string receivedTxid, string sentTxid, decimal amount, decimal price, decimal fee,
								MetaOrderStatus status, DateTime date, string notes = null)
        {
            m_dataAccess.InsertTransaction(symbolPair, depositAddress, orderType, receivedTxid, sentTxid, amount, price, fee, status, date, notes);
        }
Beispiel #10
0
 public override void MarkTransactionAsRefundedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, string notes)
 {
     m_dataAccess.MarkTransactionAsRefundedEnd(receivedTxid, sentTxid, status, amount, notes);
 }
Beispiel #11
0
 public void MarkDespositAsCreditedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, decimal price, decimal fee)
 {
     m_dataAccess.MarkDespositAsCreditedEnd(receivedTxid, sentTxid, status, amount, price, fee);
 }
Beispiel #12
0
 public abstract void MarkTransactionAsRefundedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, string notes);
Beispiel #13
0
 public void MarkTransactionAsRefundedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, string notes)
 {
     MarkTransactionEnd(receivedTxid, sentTxid, status, amount, 0, 0, notes);
 }
Beispiel #14
0
 public void MarkDespositAsCreditedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, decimal price, decimal fee)
 {
     MarkTransactionEnd(receivedTxid, sentTxid, status, amount, price, fee);
 }
Beispiel #15
0
 /// <summary>	Mark transaction end./ </summary>
 ///
 /// <remarks>	Paul, 11/02/2015. </remarks>
 ///
 /// <param name="receivedTxid">	The received txid. </param>
 /// <param name="sentTxid">	    The sent txid. </param>
 /// <param name="status">	    The status. </param>
 /// <param name="notes">	    (Optional) the notes. </param>
 public void MarkTransactionEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, decimal price, decimal fee, string notes = null)
 {
     m_database.Statement("UPDATE transactions SET sent_txid=@sent, status=@status, notes=@notes, amount=@amount, price=@price, fee=@fee WHERE received_txid=@txid;",
                          sentTxid, status, notes, amount, price, fee, receivedTxid);
 }
Beispiel #16
0
        // ------------------------------------------------------------------------------------------------------------
        /// <summary>	Inserts a transaction. </summary>
        ///
        /// <remarks>	Paul, 05/02/2015. </remarks>
        ///
        /// <param name="symbolPair">  	The symbol pair. </param>
        /// <param name="orderType">   	Type of the order. </param>
        /// <param name="receivedTxid">	The received txid. </param>
        /// <param name="sentTxid">	   	The sent txid. </param>
        /// <param name="amount">	   	The amount. </param>
        /// <param name="type">		   	The type. </param>
        /// <param name="notes">	   	(Optional) the notes. </param>
        public void InsertTransaction(	string symbolPair, string depositAddress, MetaOrderType orderType, 
										string receivedTxid, string sentTxid, decimal amount, decimal price, decimal fee,
										MetaOrderStatus status, DateTime date, string notes = null, TransactionPolicy policy = TransactionPolicy.INSERT)
        {
            string verb;
            if (policy == TransactionPolicy.INSERT || policy == TransactionPolicy.REPLACE)
            {
                verb = policy.ToString();
            }
            else if (policy == TransactionPolicy.IGNORE)
            {
                verb = "INSERT IGNORE";
            }
            else
            {
                throw new NotImplementedException();
            }

            m_database.Statement(	verb + " INTO transactions (received_txid, deposit_address, sent_txid, symbol_pair, amount, price, fee, date, status, notes, order_type) VALUES(@a,@b,@c,@d,@e,@f,@g,@h,@i,@j,@k);",
                                    receivedTxid, depositAddress, sentTxid, symbolPair, amount, price, fee, date, status, notes, orderType);
        }
Beispiel #17
0
 public void MarkDespositAsCreditedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, decimal price, decimal fee)
 {
     MarkTransactionEnd(receivedTxid, sentTxid, status, amount, price, fee);
 }
Beispiel #18
0
 /// <summary>	Mark transaction end./ </summary>
 ///
 /// <remarks>	Paul, 11/02/2015. </remarks>
 ///
 /// <param name="receivedTxid">	The received txid. </param>
 /// <param name="sentTxid">	   	The sent txid. </param>
 /// <param name="status">	   	The status. </param>
 /// <param name="notes">	   	(Optional) the notes. </param>
 void MarkTransactionEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, decimal price, decimal fee, string notes = null)
 {
     m_dataAccess.MarkTransactionEnd(receivedTxid, sentTxid, status, amount, price, fee, notes);
 }
Beispiel #19
0
 public void MarkTransactionAsRefundedEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, string notes)
 {
     MarkTransactionEnd(receivedTxid, sentTxid, status, amount, 0, 0, notes);
 }
Beispiel #20
0
        // ------------------------------------------------------------------------------------------------------------

        /// <summary>	Inserts a transaction. </summary>
        ///
        /// <remarks>	Paul, 05/02/2015. </remarks>
        ///
        /// <param name="symbolPair">   The symbol pair. </param>
        /// <param name="orderType">    Type of the order. </param>
        /// <param name="receivedTxid">	The received txid. </param>
        /// <param name="sentTxid">	    The sent txid. </param>
        /// <param name="amount">	    The amount. </param>
        /// <param name="type">		    The type. </param>
        /// <param name="notes">	    (Optional) the notes. </param>
        void InsertTransaction(string symbolPair, string depositAddress, MetaOrderType orderType,
                               string receivedTxid, string sentTxid, decimal amount, decimal price, decimal fee,
                               MetaOrderStatus status, DateTime date, string notes = null)
        {
            m_dataAccess.InsertTransaction(symbolPair, depositAddress, orderType, receivedTxid, sentTxid, amount, price, fee, status, date, notes);
        }
Beispiel #21
0
        /// <summary>	Mark transaction start. </summary>
        ///
        /// <remarks>	Paul, 11/02/2015. </remarks>
        ///
        /// <param name="receivedTxid">  	The received txid. </param>
        /// <param name="depositAddress">	The deposit address. </param>
        /// <param name="symbolPair">	 	The symbol pair. </param>
        /// <param name="orderType">	 	Type of the order. </param>
        /// <param name="amount">		 	The amount. </param>
        public void MarkTransactionStart(	string receivedTxid, string depositAddress, string symbolPair, 
											MetaOrderType orderType, MetaOrderStatus status = MetaOrderStatus.processing,
											TransactionPolicy policy = TransactionPolicy.INSERT)
        {
            InsertTransaction(symbolPair, depositAddress, orderType, receivedTxid, null, 0, 0, 0, status, DateTime.UtcNow, null, policy);
        }
Beispiel #22
0
 /// <summary>	Mark transaction end./ </summary>
 ///
 /// <remarks>	Paul, 11/02/2015. </remarks>
 ///
 /// <param name="receivedTxid">	The received txid. </param>
 /// <param name="sentTxid">	    The sent txid. </param>
 /// <param name="status">	    The status. </param>
 /// <param name="notes">	    (Optional) the notes. </param>
 void MarkTransactionEnd(string receivedTxid, string sentTxid, MetaOrderStatus status, decimal amount, decimal price, decimal fee, string notes = null)
 {
     m_dataAccess.MarkTransactionEnd(receivedTxid, sentTxid, status, amount, price, fee, notes);
 }