コード例 #1
0
 public ParkingLot(string address, int totalSpaces, int reservedSpaces, ParkingLotState state, int lotCheckTimeSpan, DateTime lastDroneVisit, int fk_Drone, int fk_RouteFrom, int fk_RouteTo)
 {
     this.address          = address;
     this.totalSpaces      = totalSpaces;
     this.reservedSpaces   = reservedSpaces;
     this.state            = state;
     this.lotCheckTimeSpan = lotCheckTimeSpan;
     this.lastDroneVisit   = lastDroneVisit;
     this.fk_Drone         = fk_Drone;
     this.fk_RouteFrom     = fk_RouteFrom;
     this.fk_RouteTo       = fk_RouteTo;
 }
コード例 #2
0
        public IActionResult confirmInformation()
        {
            string          adress         = Request.Form["address"];
            int             totalSpaces    = int.Parse(Request.Form["totalSpaces"]);
            int             reservedSpaces = int.Parse(Request.Form["reservedSpaces"]);
            string          stateString    = Request.Form["state"];
            ParkingLotState state          = (ParkingLotState)Enum.Parse(typeof(ParkingLotState), stateString, true);
            string          selectedDrone  = Request.Form["fk_drone"];
            int             fk_drone       = Drone.getDroneIdFromName(selectedDrone);
            int             checkInterval  = int.Parse(Request.Form["checkTimeSpan"]);
            DateTime        lastVisit      = DateTime.Parse(Request.Form["lastDroneVisit"]);

            ParkingLot.Create(new ParkingLot(adress, totalSpaces, reservedSpaces, state, checkInterval, lastVisit, fk_drone, -1, -1));

            //// create parking lot
            return(View("/Views/DroneSubsystem/DroneRouteFormFromView.cshtml"));
        }