Esempio n. 1
0
 public string HojaRutaConductor(string _conductor)
 {
     try
     {
         using (var conexion = new SQLiteConnection(System.IO.Path.Combine(Directorio, _db)))
         {
             HojaRutaRender r = conexion.FindWithQuery <HojaRutaRender>("SELECT Cód_hoja_ruta FROM HojaRutaRender WHERE Conductor=?", _conductor.ToUpper());
             conexion.Close();
             return(r.Cód_hoja_ruta);
         }
     }
     catch (SQLiteException ex)
     {
         Log.Info("SQLiteEx", ex.Message);
         return(null);
     }
 }
Esempio n. 2
0
 public bool InsertarHojaRuta(HojaRutaRender _hojaRuta)
 {
     try
     {
         using (var conexion = new SQLiteConnection(System.IO.Path.Combine(Directorio, _db)))
         {
             conexion.Insert(_hojaRuta);
             conexion.Close();
             return(true);
         }
     }
     catch (SQLiteException ex)
     {
         Log.Info("SQLiteEx", ex.Message);
         return(false);
     }
 }