Exemplo n.º 1
0
        public static void Delete(string user)
        {
            string query = String.Format(
                "DELETE FROM APPUSER WHERE userName='******';", user
                );

            ConectionDB.ExecuteNonQuery(query);
        }
Exemplo n.º 2
0
        public static void NewPassword(string usuario, string nuevaContra)
        {
            string sql = String.Format(
                "update APPUSER set password='******' where userName='******';",
                nuevaContra, usuario);

            ConectionDB.ExecuteNonQuery(sql);
        }
Exemplo n.º 3
0
        //UPDATE ADDRESS SET address = 'nueva' WHERE idAddress = 1

        public static void NewAddress(string newAddress, int idAddress)
        {
            string query = String.Format(
                "UPDATE ADDRESS SET address='{0}' WHERE idaddress='{1}';", newAddress, idAddress
                );

            ConectionDB.ExecuteNonQuery(query);
        }
        public static void DeleteBusiness(string name)
        {
            string query = String.Format(
                "DELETE FROM BUSINESS WHERE name = '{0}'; ", name
                );

            ConectionDB.ExecuteNonQuery(query);
        }
Exemplo n.º 5
0
        public static void CreateUser(string name, string userName)
        {
            string query = String.Format(
                "INSERT INTO APPUSER(fullname,username,password,userType) " +
                "VALUES('{0}','{1}','{2}', false);", name, userName, name
                );

            ConectionDB.ExecuteNonQuery(query);
        }
        public static void AddOrder(DateTime order, int idProduct, int idAddress)
        {
            string query = String.Format(
                "INSERT INTO APPORDER(createDate,idProduct,idAddress) " + "VALUES('{0}','{1}','{2}');", order, idProduct, idAddress

                );

            ConectionDB.ExecuteNonQuery(query);
        }
Exemplo n.º 7
0
        public static void DeleteAddress(int idAddress)
        {
            string query = String.Format(
                "DELETE FROM ADDRESS WHERE idAddress='{0}';", idAddress

                );

            ConectionDB.ExecuteNonQuery(query);
        }
Exemplo n.º 8
0
        public static void Address(int idUser, string address)
        {
            string query = String.Format(
                "INSERT INTO ADDRESS(idUser,address)" + "VALUES('{0}', '{1}');", idUser, address

                );

            ConectionDB.ExecuteNonQuery(query);
        }
        public static void AddBusiness(string name, string description)
        {
            string query = String.Format(
                "INSERT INTO BUSINESS(name, description) " + "VALUES('{0}','{1}'); ", name, description

                );

            ConectionDB.ExecuteNonQuery(query);
        }
        public static void EliminateOrder(int id)
        {
            string query = String.Format(
                "DELETE FROM APPORDER WHERE idOrder = '{0}';", id


                );

            ConectionDB.ExecuteNonQuery(query);
        }