public ActionResult CreateOrderPart(int id, OrderPart_Create OrderPart) { try { OrderPart.WorkingOn.OrderId = id; OrderPartDb.Create(OrderPart.WorkingOn); return(RedirectToAction(ActionNameDetails + id)); } catch { OrderPart.Parts = partDb.GetAll(); return(View(OrderPart)); } }
public ActionResult CreateOrderPart(int id) { OrderPart_Create model = new OrderPart_Create(id, partDb); return(View(model)); }