예제 #1
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     VehiculosCL oVehiculosCl = new VehiculosCL();
     oVehiculosCl.EditarVehiculo( txtmatricula.Text,txtmarca.Text);
     if (oVehiculosCl.IsError)
     {
         MessageBox.Show(oVehiculosCl.ErrorDescripcion, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         MessageBox.Show("Vehiculo Editado", "Inforamcion", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #2
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            VehiculosCL oVehiculosCl = new VehiculosCL();
            oVehiculosCl.InsertarVehiculo(txtmatricula.Text, txtmarca.Text);
            if (oVehiculosCl.IsError)
            {
                MessageBox.Show(oVehiculosCl.ErrorDescripcion, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                Form1 oPrincipal = new Form1();
                this.Close();
                oPrincipal.Show();
                MessageBox.Show("Vehiculo agregado", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information);

            }
        }