public static OrdersHistory FromDomainModel(Order model) { if (model == null) return null; return new OrdersHistory() { ID = model.ID ///TODO Extract data from tickets API }; }
public static OrderDetails FromDomainModel(Order model) { if (model == null) return null; return new OrderDetails() { ID = model.ID, RentStartTime = String.Format("{0:dd/MM/yyyy}", (new DateTime(1970, 1, 1, 0, 0, 0, 0)).AddSeconds(model.StartDateRent)), RentEndTime = String.Format("{0:dd/MM/yyyy}", (new DateTime(1970, 1, 1, 0, 0, 0, 0)).AddSeconds(model.EndDateRent)) }; }
public ActionResult ClientNewOrder(ClientNewOrder neworder) { if (ModelState.IsValid) { var user = Membership.GetUser(neworder.Username); neworder.ClientID = Guid.Parse(user.ProviderUserKey.ToString()); Order ord = new Order(); neworder.AssignTo(ord); OrderAPI.AddOrder(ord); return RedirectToAction("NewOrderSuccessfull", "Home"); } return View(neworder); }
public static ClientNewOrder FromDomainModel(Order order) { if (order == null) return null; return new ClientNewOrder() { CarNumber = order.CarNumber, Username = order.UserName, ClientID = order.ClientID, Type = order.Type ///TODO }; }