public static void ActualizarPassword(string username, string password) { string sql = String.Format( "update appuser set password ='******' where username='******';", password, username); ConnectionDB.realizarAccion(sql); }
public static void agregarProducto(Producto p, Negocio b) { string sql = String.Format("insert into product(idbusiness, name) " + "select bus.idbusiness, '{0}' from business bus where bus.name = '{1}' ", p.name, b.name); ConnectionDB.realizarAccion(sql); }
public static void EliminarUsuario(string username) { string sql = string.Format( "DELETE FROM appuser WHERE username='******';", username); ConnectionDB.realizarAccion(sql); }
public static void ActualizarPermiso(string username, bool userType) { string sql = string.Format( "UPDATE appuser SET userType='{true}' WHERE username='******';", userType, username); ConnectionDB.realizarAccion(sql); }
public static void NewUser(string fullname, string username, string password, bool type) { string sql = string.Format( "INSERT INTO appuser(fullname, username, password, userType) VALUES('{0}', '{1}', '{2}', {3});", fullname, username, password, type ? "true" : "false"); ConnectionDB.realizarAccion(sql); }
public static void ActualizarDireccion(string old, string newD) { string sql = String.Format( "update address set address = '{0}' WHERE address = '{1}';", newD, old); ConnectionDB.realizarAccion(sql); }
private static void agregarRegistro(string pUsuario, bool entra) { string sql = String.Format( "insert into registro(usuario, entrar) values ('{0}', {1});", pUsuario, entra); ConnectionDB.realizarAccion(sql); }
public static void eliminarDireccion(string address) { string sql = String.Format( "delete from address where address = '{0}';", address); ConnectionDB.realizarAccion(sql); }
public static void agregarDireccion(string address, string name) { string sql = String.Format( "INSERT INTO ADDRESS(idUser, address) select us.idUser, '{0}'" + "from appuser us where us.username = '******';", address, name); ConnectionDB.realizarAccion(sql); }
public static void crearOrden(DateTime ptime, int pidProduct, int pidAdress) { string sql = String.Format( "insert into apporder(createDate, idProduct, idAddress) " + "values('{0}', {1}, {2});", ptime, pidProduct, pidAdress); ConnectionDB.realizarAccion(sql); }
public static void eliminarProducto(string name) { string sql = String.Format("delete from product where name = '{0}';", name); ConnectionDB.realizarAccion(sql); }
public static void eliminarNegocio(string name) { string sql = String.Format("delete from business where name ='{0}'; ", name); ConnectionDB.realizarAccion(sql); }
public static void crearNegocio(string name, string des) { string sql = String.Format("insert into business(name, description) " + "values('{0}', '{1}');", name, des); ConnectionDB.realizarAccion(sql); }