Exemplo n.º 1
0
        private void ExcuteUpdate()
        {
            HomelessAnimal homelessAnimal = homelessAnimalBindingSource.Current as HomelessAnimal;

            if (homelessAnimal == null)
            {
                return;
            }

            HomelessAnimalForm form = new HomelessAnimalForm(homelessAnimal);

            form.ShowDialog();
        }
Exemplo n.º 2
0
        private void ExcuteInsert()
        {
            Cursor = Cursors.WaitCursor;
            HomelessAnimal homelessAnimal = new HomelessAnimal();

            homelessAnimal.HomelessAnimalId = DataRepository.HomelessAnimal.GetMaxId() + 1;
            homelessAnimal.Name             = string.Empty;
            homelessAnimal.Age                 = 0;
            homelessAnimal.Feature             = "";
            homelessAnimal.LatestFindingReport = System.DateTime.Today;
            //homelessAnimal.PictureLink = string.Empty;


            HomelessAnimalForm form = new HomelessAnimalForm(homelessAnimal);

            form.ShowDialog();
            Cursor = Cursors.Arrow;
        }