コード例 #1
0
        public ActionResult CreateCar(Vehicle car)
        {
            var manager = new VehicleManager();
            var response = manager.AddCar(car);

            return View("Home");
        }
コード例 #2
0
        public ActionResult InfoList()
        {
            var manager = new VehicleManager();
            var infos = manager.GetAllRequests().Data;

            return View("_RequestInfoList", infos);
        }
コード例 #3
0
        public ActionResult Index(RequestInfo info)
        {
            var manager = new VehicleManager();
            var response = manager.AddRequest(info);

            return View("RequestInfo");
        }
コード例 #4
0
        public ActionResult CarList()
        {
            var manager = new VehicleManager();
            var cars = manager.GetAllCars().Data;

            return View("_userCarList", cars);
        }
コード例 #5
0
        public ActionResult AdminIndex()
        {
            var manager = new VehicleManager();
            var cars = manager.GetAllCars().Data;

            return View("_CarList", cars);
        }
コード例 #6
0
        public ActionResult Delete(int VehicleID)
        {
            var manager = new VehicleManager();
            manager.DeleteCarByID(VehicleID);

            return Json(new { route = "/Home/Index" });
        }
コード例 #7
0
        public ActionResult ChangeStatus(int sID, int rID)
        {
            var manager = new VehicleManager();
            manager.UpdateRequestStatus(sID, rID);
            var status = manager.GetAllRequests().Data;

            return View("_RequestInfoList", status);
        }
コード例 #8
0
 public Vehicle Get(int id)
 {
     var manager = new VehicleManager();
     var data = manager.GetCarByID(id).Data;
     return data;
 }