private void btnModifyOrder_Click(object sender, EventArgs e) { UpdateOrder updateOrder = new UpdateOrder(); if (updateOrder.ShowDialog() == DialogResult.OK) { Order tempDelete = updateOrder.UpdateItem; CreateOrder createOrder = new CreateOrder(); if (createOrder.ShowDialog() == DialogResult.OK) { orderService.UpdateOrder(tempDelete.OrderId, createOrder.order); RefreshDgv(); } } }
private void btnModifyOrder_Click(object sender, EventArgs e) { UpdateOrder updateOrder = new UpdateOrder(); if (updateOrder.ShowDialog() == DialogResult.OK) { Order temp = (Order)Intent.dict["updateItem"]; orderService.DeleteOneOrder(temp.ID); CreateOrder createOrder = new CreateOrder(); if (createOrder.ShowDialog() == DialogResult.OK) { Order tempCreate = (Order)Intent.dict["order"]; tempCreate.ID = temp.ID; this.orderService.Orders.Add(tempCreate); //Intent.dict["orders"] = orderService.Orders; RefreshDgv(); } } }