Esempio n. 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            Parking myPark = Parking.Instance;

            app.UseMvc();

            app.Run(async(context) =>
            {
                await context.Response.WriteAsync("error adress");
            });
        }
Esempio n. 2
0
        public void Delete(int id)
        {
            Parking myPark = Parking.Instance;

            myPark.DeleteCar(id);
        }
Esempio n. 3
0
        public void Post([FromBody] Car temp)
        {
            Parking myPark = Parking.Instance;

            myPark.AddCar(temp);
        }
Esempio n. 4
0
        public Car GetOne(int id)
        {
            Parking myPark = Parking.Instance;

            return(myPark.parkingLot[id]);
        }
Esempio n. 5
0
        public List <Car> GetAll()
        {
            Parking myPark = Parking.Instance;

            return(myPark.parkingLot);
        }
Esempio n. 6
0
        public List <string> GetTransactions()
        {
            Parking myPark = Parking.Instance;

            return(myPark.LogFileInPut());
        }
Esempio n. 7
0
        public int GetBusyPlaces()
        {
            Parking myPark = Parking.Instance;

            return(myPark.parkingLot.Count);
        }
Esempio n. 8
0
        public int GetFreePlaces()
        {
            Parking myPark = Parking.Instance;

            return(Settings.ParkingSpace - myPark.parkingLot.Count);
        }
Esempio n. 9
0
        public double GetMoney()
        {
            Parking myPark = Parking.Instance;

            return(myPark.balance);
        }