private void ExecuteEdit() { AnimalShelter animalShelter = animalShelterBindingSource.Current as AnimalShelter; if (animalShelter == null) { return; } ShelterForm shelter = new ShelterForm(animalShelter); shelter.ShowDialog(); }
private void ExcuteInsert() { AnimalShelter animalShelter = new AnimalShelter(); animalShelter.Name = string.Empty; animalShelter.Address = string.Empty; animalShelter.PhoneNumber = string.Empty; animalShelter.ManagerName = string.Empty; animalShelter.AnimalShelterId = DataRepository.AnimalShelter.GetMaxId() + 1; ShelterForm shelter = new ShelterForm(animalShelter); shelter.ShowDialog(); }