示例#1
0
 public static void SaveOrder()
 {
     string[] keys = TradeRA.KeySearch("O_*");
     foreach (string key in keys)
     {
         Order order = OrderRA.Get(key);
         if (order.state_enum == OrderStatusEnum.Submitted)
         {
             order.state_enum = OrderStatusEnum.Abnormal;
         }
         OrderDA.Add(order);
     }
 }
示例#2
0
        private void buttonAddToList_Click(object sender, EventArgs e)
        {
            Order order = new Order();

            if (OrderValidation.isValidID(textboxOrderId) && OrderValidation.isValidClient(textboxClientId) && OrderValidation.isValidBooks(textboxBookId) && OrderValidation.isValidValues(textboxbQuantity))
            {
                order.OrderID  = Convert.ToInt32(textboxOrderId.Text);
                order.ClientID = Convert.ToInt32(textboxClientId.Text);
                order.BookID   = Convert.ToInt64(textboxBookId.Text);
                order.Quantity = Convert.ToInt32(textboxbQuantity.Text);
                OrderDA.Add(order);
                ClearAll();
            }
        }