예제 #1
0
 public ActionResult CreateOrder()
 {
     var model = new CreateOrderModel();
     model.Automobiles = taxiService.GetAutomobileCollection();
     model.Customers =  taxiService.GetCustomers();
     return View(model);
 }
예제 #2
0
 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;
 }
예제 #3
0
 public ActionResult CreateOrder(CreateOrderModel createOrderModel)
 {
     taxiService.SetOrdersAutomobile();
     return Redirect(Url.Action("Orders", "Home", new {Id = 1}));
 }