Ejemplo n.º 1
0
        public int createParkingPlace(ParkingPlaceData toCreate)
        {
            var client = new ServiceReference1.ParkingClient();
            int tmp    = client.createParkingPlace(ParkingPlaceToWebservice(toCreate));

            client.Close();
            return(tmp);
        }
Ejemplo n.º 2
0
        public int editParkingPlace(ParkingPlaceData toEdit)
        {
            var client = new ServiceReference1.ParkingClient();
            int tmp    = client.editParkingPlace(ParkingPlaceToWebservice(toEdit));

            client.Close();
            return(tmp);
        }
Ejemplo n.º 3
0
        //convert parking place data from webservice for application
        private ParkingPlaceData ParkingPlaceFromWebservice(ServiceReference1.parkingPlace toChange)
        {
            ParkingPlaceData tempParkingPlace = new ParkingPlaceData();

            tempParkingPlace.id   = toChange.id;
            tempParkingPlace.Name = toChange.name;
            tempParkingPlace.numberOfParkingSlots = toChange.numberOfParkingSlots;
            tempParkingPlace.pricePerHour         = toChange.pricePerHour;
            return(tempParkingPlace);
        }
Ejemplo n.º 4
0
        //convert parking place data from application for webservice
        private ServiceReference1.parkingPlace ParkingPlaceToWebservice(ParkingPlaceData toChange)
        {
            ServiceReference1.parkingPlace tmp = new ServiceReference1.parkingPlace();

            tmp.id   = toChange.id;
            tmp.name = toChange.Name;
            tmp.numberOfParkingSlots = toChange.numberOfParkingSlots;
            tmp.pricePerHour         = toChange.pricePerHour;
            tmp.deleted = toChange.deleted;
            return(tmp);
        }