Exemplo n.º 1
0
        private void btnAgregar_Click(object sender, RoutedEventArgs e)
        {
            AnimalControlador _CAN    = new AnimalControlador();
            Animal            _animal = new Animal();
            string            mensaje;

            _animal.Nombre = txtNombre.Text;
            _animal.Tipo   = cmbTipo.SelectedValue.ToString();
            _animal.Precio = float.Parse(txtPrecio.Text);
            mensaje        = _CAN.InsertarAnimal(_animal);
            this.MostrarMensaje(mensaje);
        }
Exemplo n.º 2
0
        public void CargarAnimales()
        {
            AnimalControlador _CAN = new AnimalControlador();

            dtgLista.ItemsSource = _CAN.All();
        }