public static void removeBusiness(int idBusiness)
        {
            string act = String.Format(
                "delete from \"Business\" where \"idBusiness\"={0};",
                idBusiness);

            ConnectionBD.ExecuteNonQuery(act);
        }
Exemple #2
0
        public static void removeProduct(int idProduct)
        {
            string act = String.Format(
                "delete from \"Product\" where \"idProduct\"={0};",
                idProduct);

            ConnectionBD.ExecuteNonQuery(act);
        }
        public static void removeOrder(int idOrder)
        {
            string act = String.Format(
                "delete from \"AppOrder\" where \"idOrder\"={0};",
                idOrder);

            ConnectionBD.ExecuteNonQuery(act);
        }
        public static void actualizarContra(int idUser, string newPassword)
        {
            string act = String.Format(
                "update \"AppUser\" set password='******' where \"idUser\"={1};",
                newPassword, idUser);

            ConnectionBD.ExecuteNonQuery(act);
        }
Exemple #5
0
        public static void addProduct(Product p)
        {
            string act = String.Format(
                "insert into \"Product\"" +
                "(\"idBusiness\", \"name\")" +
                "values ({0}, '{1}');",
                p.idBusiness, p.name);

            ConnectionBD.ExecuteNonQuery(act);
        }
        public static void addOrder(AppOrder o)
        {
            string act = String.Format(
                "insert into \"AppOrder\"" +
                "(\"createDate\", \"idProduct\", \"idAddress\")" +
                "values ('{0}', {1}, {2});",
                o.createDate, o.idProduct, o.idAddress);

            ConnectionBD.ExecuteNonQuery(act);
        }
        public static void addBusiness(Business b)
        {
            string act = String.Format(
                "insert into \"Business\"" +
                "(\"name\", \"description\")" +
                "values ('{0}', '{1}');",
                b.name, b.description);

            ConnectionBD.ExecuteNonQuery(act);
        }
Exemple #8
0
        public static void addAddress(Address a)
        {
            string act = String.Format(
                "insert into \"Address\"" +
                "(\"idUser\", \"address\")" +
                "values ({0}, '{1}');",
                a.idUser, a.address);

            ConnectionBD.ExecuteNonQuery(act);
        }
        public static void addUser(AppUser u)
        {
            u.password = Encriptador.CrearMD5(u.username);
            string act = String.Format(
                "insert into \"AppUser\"" +
                "(\"admin\", \"fullname\", \"username\", \"password\")" +
                "values ('{0}', '{1}', '{2}', '{3}');",
                u.admin, u.fullname, u.username, u.password);

            ConnectionBD.ExecuteNonQuery(act);
        }