예제 #1
0
        public void ExisteTest()
        {
            bool paso = false;

            paso = VehiculoBLL.Existe(1);
            Assert.AreEqual(paso, true);
        }
예제 #2
0
        private async void BuscarButton_Click(object sender, RoutedEventArgs e)
        {
            if (int.TryParse(VehiculoIdTextBox.Text, out int vehiculoId))
            {
                if (await VehiculoBLL.Existe(vehiculoId))
                {
                    vehiculo = await VehiculoBLL.Buscar(vehiculoId);

                    MyPropertyChanged("vehiculo");
                }
                else
                {
                    MessageBox.Show("Este vehiculo no existe.");
                    Limpiar();
                }
            }
            else
            {
                MessageBox.Show("Este vehiculo id es invalido.");
            }
        }