コード例 #1
0
        public async void DeleteWorker()
        {
            var response = await Dal.DeleteAsync(RestUrl + _selectedWorker.IdWorker);

            if (response.IsSuccessStatusCode)
            {
                Workers.Remove(_selectedWorker);
                RaisePropertyChanged("DeleteWorker");
                SelectedWorker = new Worker();
            }
        }
コード例 #2
0
        public async void DeleteCar()
        {
            var response = await Dal.DeleteAsync(RestUrl + _selectedCar.IdCar);

            if (response.IsSuccessStatusCode)
            {
                Cars.Remove(_selectedCar);
                RaisePropertyChanged("DeleteCar");
                SelectedCar = new Car();
            }
            else
            {
                RaisePropertyChanged("DeleteCarUn");
            }
        }
コード例 #3
0
        public async void DeleteBill()
        {
            var response = await Dal.DeleteAsync(RestUrl + _selectedBill.IdBill);

            if (response.IsSuccessStatusCode)
            {
                Revenue -= _selectedBill.Car.Price - _selectedBill.Discount;
                RaisePropertyChanged("Revenue");
                Bills.Remove(_selectedBill);
                RaisePropertyChanged("Calculate");
                RaisePropertyChanged("DeleteBill");

                SelectedBill = new Bill();
            }
        }
コード例 #4
0
        public async void DeleteCity()
        {
            var response = await Dal.DeleteAsync(RestUrl + _selectedCity.IdCity);


            if (response.IsSuccessStatusCode)
            {
                Cities.Remove(_selectedCity);
                RaisePropertyChanged("DeleteCar");
                SelectedCity = new City();
            }
            else
            {
                RaisePropertyChanged("DeleteCarUnsuccessful");
            }
        }