public async Task AddCar() { CarAdd car = new CarAdd() { BodyStyle = this.BodyStyle, DateProduction = this.DateProduction, EngineType = this.EngineType, FuelType = this.FuelType, Id = this.Id, Model = this.Model, OdoMeter = this.OdoMeter }; // try { await _car2EndPoint.PostCar(car); _addedViewModel.UpdateMessage("Komunikat", "Dodano rekord"); _windowManager.ShowWindow(_addedViewModel); } catch { _addedViewModel.UpdateMessage("Ostrzeżenie", "Nie dodano rekord"); _windowManager.ShowWindow(_addedViewModel); } }
public async Task AddModel() { ModelAdd model = new ModelAdd() { Name = this.Name2, Brand_ = this.Brand, FirstDateProduction = this.FirstDateProduction }; // try { await _modelEndPoint.PostModel(model); _addedViewModel.UpdateMessage("Komunikat", "Dodano rekord"); _windowManager.ShowWindow(_addedViewModel); } catch { _addedViewModel.UpdateMessage("Ostrzeżenie", "Nie dodano rekord"); _windowManager.ShowWindow(_addedViewModel); } }
public async Task AddBrand() { BrandAdd brand = new BrandAdd() { Name = this.Name2, Country = this.Country, Owner = this.Owner, DateCreated = this.DateCreated }; // try { await _brandEndPoint.PostBrand(brand); _addedViewModel.UpdateMessage("Komunikat", "Dodano rekord"); _windowManager.ShowWindow(_addedViewModel); } catch { _addedViewModel.UpdateMessage("Ostrzeżenie", "Nie dodano rekord"); _windowManager.ShowWindow(_addedViewModel); } }