Пример #1
0
        private void button2_Click(object sender, EventArgs e) //新增订单
        {
            NewOrderOne newOrder = new NewOrderOne();

            newOrder.ShowDialog();
            if (newOrder.OK)
            {
                OrderDetatils order = new OrderDetatils
                {
                    OrderNumber   = Order.NumToString(OrderService.list.Count + 1),
                    OrderQuantity = newOrder.od.OrderQuantity,
                    ProductName   = newOrder.od.ProductName,
                    Client        = newOrder.od.Client
                };
                _orderService.AddOrder(order);
            }
        }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         OK     = true;
         Num    = int.Parse(this.textBox1.Text);
         cOrder = new OrderDetatils
         {
             OrderNumber   = Order.NumToString(Num),
             OrderQuantity = int.Parse(this.textBox2.Text),
             ProductName   = this.textBox3.Text,
             Client        = this.textBox4.Text
         };
     }
     catch (Exception ex)
     {
         ErrorScene errorScene = new ErrorScene();
         errorScene.ShowDialog();
     }
 }