Exemple #1
0
 private void AddOrderDetailbutton1_Click(object sender, EventArgs e)
 {
     HomeWork6.Client       client          = new HomeWork6.Client(clientID, clientname);
     HomeWork6.Goods        goods           = new HomeWork6.Goods(goodsname, goodsprice);
     HomeWork6.Order        neworder        = new HomeWork6.Order(orderID, client);
     HomeWork6.OrderDetails neworderdetails = new HomeWork6.OrderDetails(goods, quantity, address, phone);
     neworder.addDetails(neworderdetails);
     Form1.orderService.addOrder(neworder);
 }
Exemple #2
0
 private void ModifyOrderDetbutton1_Click(object sender, EventArgs e)
 {
     HomeWork6.Client       client          = new HomeWork6.Client(clientID, clientname);
     HomeWork6.Goods        goods           = new HomeWork6.Goods(goodsname, goodsprice);
     HomeWork6.Order        neworder        = new HomeWork6.Order(orderID, client);
     HomeWork6.OrderDetails neworderdetails = new HomeWork6.OrderDetails(goods, quantity, address, phone);
     neworder.addDetails(neworderdetails);
     Form1.orderlist = Form1.orderService.findOrder("order", orderID);
     foreach (HomeWork6.Order item in Form1.orderlist)
     {
         HomeWork6.Order order = item; Form1.orderService.modifyOrder(order, neworder);
     }
 }