예제 #1
0
        public static OrdersHistory FromDomainModel(Order model)
        {
            if (model == null)
                return null;

            return new OrdersHistory()
            {
                ID = model.ID
                ///TODO Extract data from tickets API
            };
        }
예제 #2
0
        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))
            };
        }
예제 #3
0
 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);
 }
예제 #4
0
        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
            };
        }