예제 #1
0
        public bool UpdateProduct(string ProductID, string ProductName, string ProductPrice, string ProductCatagoryID, string ProductStock)
        {
            string qry = "UPDATE Products SET ProductName='" + ProductName + "' , ProductPrice='" + ProductPrice + "' , ProductCatagoryID='" + ProductCatagoryID + "' , ProductStock='" + ProductStock + "' WHERE ProductID='" + ProductID + "'";

            if (DBClient.QueryExecute(qry))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #2
0
        public bool Register()
        {
            string qry = "INSERT INTO Customer ([name],phone,[address],email,pass,registrationDate) " +
                         "VALUES('" + Name + "' , '" + Phone + "' , '" + Address + "' , '" + Email + "' , '" + Password + "','" + DateTime.Now + "')";

            if (DBClient.QueryExecute(qry))  // this method is bool,
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }