public async void DeleteWorker() { var response = await Dal.DeleteAsync(RestUrl + _selectedWorker.IdWorker); if (response.IsSuccessStatusCode) { Workers.Remove(_selectedWorker); RaisePropertyChanged("DeleteWorker"); SelectedWorker = new Worker(); } }
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"); } }
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(); } }
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"); } }