Exemplo n.º 1
0
        public static CamionVO GetCamionById(int IdCamion)
        {
            try
            {
                return(DALCamiones.GetCamionById(IdCamion));
            }
            catch (Exception)
            {
                return(new CamionVO());

                throw;
            }
        }
Exemplo n.º 2
0
 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);
     }
 }