public OrderPart_Create(int orderId, IPartData partDb)
 {
     OrderId   = orderId;
     Parts     = partDb.GetAll();
     WorkingOn = new OrderPart()
     {
         PartId = Parts.FirstOrDefault().Id
     };
 }
 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));
     }
 }
예제 #3
0
 public Part_Index(IPartData partData) : base()
 {
     Parts = partData.GetAll();
 }