public ActionResult CreateOrder() { var model = new CreateOrderModel(); model.Automobiles = taxiService.GetAutomobileCollection(); model.Customers = taxiService.GetCustomers(); return View(model); }
public Order CreateOrderModelToOrderMapper(CreateOrderModel createOrderModel) { Mapper.RegisterMapper<CreateOrderModel, Order>(); var order = new Order(); order.Automobile = createOrderModel.Order.Automobile; order.Cost = createOrderModel.Order.Cost; order.Customer = createOrderModel.Order.Customer; order.DateTime = createOrderModel.Order.DateTime; order.FactLong = createOrderModel.Order.FactLong; order.Id = createOrderModel.Order.Id; order.PlaneLong = createOrderModel.Order.PlaneLong; return order; }
public ActionResult CreateOrder(CreateOrderModel createOrderModel) { taxiService.SetOrdersAutomobile(); return Redirect(Url.Action("Orders", "Home", new {Id = 1})); }