Ejemplo n.º 1
0
        public void EliminarVehiculo(Procedimientos vehiculo)
        {
            try
            {
                string query = @"EXEC EliminarVehiculo @estado, @idvehiculo ";

                sqlConnection.Open();

                SqlCommand sqlCommand = new SqlCommand(query, sqlConnection);

                sqlCommand.Parameters.AddWithValue("@idVehiculo", elVehiculo.VehiculoID);
                sqlCommand.Parameters.AddWithValue("@estado", 3);

                sqlCommand.ExecuteNonQuery();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                sqlConnection.Close();
            }
        }