def Borrarcli(dni): dni = str(dni) cursor = bd.cursor() cursor.execute(""" DELETE FROM clientes WHERE dnicli=? """, (dni,)) bd.commit()
def Grabarcli(dni, apel, nom, dir, loc, cmbProv, cp, mov, tel, mail, no): cursor = bd.cursor() registro = (dni, apel, nom, dir, loc, cmbProv, cp, mov, tel, mail, no) if dni != "" and apel != "": cursor.executemany("""INSERT INTO clientes(dnicli,apelcli,nomcli,dircli,poblic,procli,cpcli,movcli,telcli,mailcli,pubcli) VALUES (?,?,?,?,?,?,?,?,?,?,?);""", (registro,)) bd.commit() else: return False
def Grabarven(dataf, concepto, precio): cursor = bd.cursor() registroven = (dataf, concepto, precio) if concepto != "": cursor.executemany("""INSERT INTO ventas(idfac, conceptov, preciov) VALUES (?,?,?);""", (registroven,)) bd.commit() else: return False
def Grabarfac(dnifac, matrifac, marcafac, modelfac, fechafac): cursor = bd.cursor() registrofac = (dnifac, matrifac, marcafac, modelfac, fechafac) if dnifac != "" and matrifac != "": cursor.executemany("""INSERT INTO facturas(dnifac,matrifac, modelfac,marcafac,fechafac) VALUES (?,?,?,?,?);""", (registrofac,)) bd.commit() else: return False
def Grabarcli(dni, apel, nom, dir, loc, pro, cp, mov, tel, mail, no): cursor = bd.cursor() registro = (dni, apel, nom, dir, loc, pro, cp, mov, tel, mail, no) if dni != "" and apel != "": cursor.executemany("""INSERT INTO clientes(dnicli,apelcli,nomcli,dircli,poblic,procli,cpcli,movcli,telcli,mailcli,pubcli) VALUES (?,?,?,?,?,?,?,?,?,?,?);""", (registro,)) bd.commit() else: return False