Exemple #1
0
        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;
            }
        }
Exemple #2
0
        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;
            }
        }