Ejemplo n.º 1
0
        private void ExecuteEdit()
        {
            AnimalShelter animalShelter = animalShelterBindingSource.Current as AnimalShelter;

            if (animalShelter == null)
            {
                return;
            }

            ShelterForm shelter = new ShelterForm(animalShelter);

            shelter.ShowDialog();
        }
Ejemplo n.º 2
0
        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();
        }