Example #1
0
        public ActionResult OrderPage(int?vehicleTypeID, DateTime startDate, DateTime endDate)
        {
            try
            {
                OrderLogic logic = new OrderLogic();

                AccountLogic UserLogic = new AccountLogic();
                var          fleetCar  = logic.GetCarFromType(vehicleTypeID);

                logic.OrderingVehicle(fleetCar.CarNumber, UserLogic.GetUserID(User.Identity.Name), startDate, endDate);


                return(RedirectToAction("ManageAccount", "Account"));
            }
            catch (Exception)
            {
                ViewBag.Error     = "We have problem on the server, Please try again later!";
                ViewBag.startDate = startDate;
                ViewBag.endDate   = endDate;
                return(View("InformationToUser"));
            }
        }