Exemplo n.º 1
0
 public void SetOrderState(SellOrderState state)
 {
     lock (this._lock)
     {
         this._sellOrder.OrderState = state;
     }
 }
Exemplo n.º 2
0
        public bool UpdateAllSellOrderState(SellOrderState oldState, SellOrderState newState, CustomerMySqlTransaction trans)
        {
            //1.修改订单状态;
            //2.删除锁定信息记录。
            MySqlCommand mycmd = null;

            try
            {
                string textA = "update sellstonesorder set OrderState = @NewOrderState where OrderState = @OldOrderState;";

                mycmd             = trans.CreateCommand();
                mycmd.CommandText = textA;
                mycmd.Parameters.AddWithValue("@NewOrderState", (int)newState);
                mycmd.Parameters.AddWithValue("@OldOrderState", (int)oldState);
                mycmd.ExecuteNonQuery();

                return(true);
            }
            finally
            {
                mycmd.Dispose();
            }
        }
Exemplo n.º 3
0
        private bool UpdateSellOrderState(string orderNumber, SellOrderState state, CustomerMySqlTransaction trans)
        {
            //1.修改订单状态;
            //2.删除锁定信息记录。
            MySqlCommand mycmd = null;

            try
            {
                string textA = "update sellstonesorder set OrderState = @OrderState where OrderNumber = @OrderNumber;";
                string textB = "delete from locksellstonesorder where OrderNumber = @OrderNumber;";

                mycmd             = trans.CreateCommand();
                mycmd.CommandText = textA + textB;
                mycmd.Parameters.AddWithValue("@OrderState", (int)state);
                mycmd.Parameters.AddWithValue("@OrderNumber", orderNumber);
                mycmd.ExecuteNonQuery();

                return(true);
            }
            finally
            {
                mycmd.Dispose();
            }
        }