예제 #1
0
파일: avion.cs 프로젝트: jorland/proyecto
        public static void eliminarAvion(int id)
        {
            //DataContext dc = new DataContext(myConnection.getConnection());
            var elimina = dc.GetTable <tablaAvion>();
            var aviones = from a in elimina
                          where a.ID_AVION.Equals(id)
                          select a;

            foreach (var item in aviones)
            {
                elimina.DeleteOnSubmit(item);
                dc.SubmitChanges();
            }

            eliminarAsientos(id);
            Vuelo.eliminarVuelo(id);
        }