public static bool InsereCupom(RegistrosModel registro) { try { using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString())) { cnn.Execute("insert into Registros (placa, tipo, data_entrada, impresso) " + "values (@placa, @tipo, @data_entrada, 1)", registro); return(true); } } catch (Exception ex) { throw ex; } }
public static bool RegistraSaida(RegistrosModel registro) { try { using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString())) { cnn.Execute("Update Registros Set data_saida = @data_saida, total_pagar = @total_pagar, " + "impresso = 1" + " Where id = @id", registro); return(true); } } catch (Exception ex) { throw ex; } }