public bool InsertarPromocionesDescuentos(PromocionesDescuentos promocionesDescuentos) { try { using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "kigest_sltosAriel.db"))) { connection.Insert(promocionesDescuentos); return(true); } } catch (SQLiteException ex) { Log.Info("SQLiteException", ex.Message); return(false); } }
public bool ActualizarPromocionesDescuentos(PromocionesDescuentos promocionesDescuentos) { try { using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "kigest_sltosAriel.db"))) { connection.Query <Usuarios>("UPDATE PromocionesDescuentos set nombrepromo=?, idproducto=?,idcategoria=?, " + "compra_min=?, descuento_porc=? where id=?", promocionesDescuentos.nombrepromo, promocionesDescuentos.idproducto, promocionesDescuentos.idcategoria, promocionesDescuentos.compra_min, promocionesDescuentos.descuento_porc, promocionesDescuentos.id); return(true); } } catch (SQLiteException ex) { Log.Info("SQLiteException", ex.Message); return(false); } }