public static CamionVO GetCamionById(int IdCamion) { try { return(DALCamiones.GetCamionById(IdCamion)); } catch (Exception) { return(new CamionVO()); throw; } }
public static string DelCamion(int IdCamion) { try { CamionVO camion = DALCamiones.GetCamionById(IdCamion); if (camion.Disponibilidad) { DALCamiones.DelCamion(IdCamion); return("Camión Eliminado"); } else { return("El camion no se puede eliminar se encuentra en ruta"); } } catch (Exception ex) { return(ex.Message); } }