private void SaveProducer() { _producer.Name = Name; _producer.Country = Country; _producer.Id = _blc.ProducerService().GetNewId(_producer.Id); _dialogService.CloseWindow(_guid); }
private void DeleteProcuder() { var countProducers = _motorbikes.Count(x => x.Producer == SelectedProducer); if (countProducers != 0) { _dialogService.ShowError("Nie można usunąć producenta, który jest przypisany do motocykla"); return; } _blc.ProducerService().DeleteProducer(SelectedProducer); _producers.Remove(_selectedProducer); }