Exemplo n.º 1
0
 private void ChangeOrder_Click(object sender, EventArgs e)
 {
     if (OrderId.Text == "" || CustomerId.Text == "" || CustomerName.Text == "" || GoodsId.Text == "" ||
         GoodsName.Text == "" || GoodsPrice.Text == "" || Quantity.Text == "")
     {
         MessageBox.Show("请输入完整信息!");
         return;
     }
     order.Details.ElementAt(j).Goods.Id    = int.Parse(GoodsId.Text);
     order.Details.ElementAt(j).Goods.Name  = GoodsName.Text;
     order.Details.ElementAt(j).Goods.Price = int.Parse(GoodsPrice.Text);
     order.Details.ElementAt(j).Quantity    = int.Parse(Quantity.Text);
     orderService.Update(order);
     MessageBox.Show("修改成功!");
 }