Ejemplo n.º 1
0
        public int Update(ProductSellRecord info)
        {
            string commandText = string.Format("update ProductSellRecord set productID={0}, num={1}, price={2} where ID={3}",
                                               info.ProductID, info.Num, info.Price, info.ID);

            return(DbHelperAccess.executeNonQuery(commandText));
        }
Ejemplo n.º 2
0
        public int Insert(ProductSellRecord info)
        {
            try
            {
                //string commandText = @"insert into Users(userName,userPassword,userLevel,userPhone,userAddress) values (
                //?userName,?userPassword,?userLevel,?userPhone,?userAddress)";
                string commandText = string.Format("insert into ProductSellRecord(productID, num, price, sellID) values('{0}', '{1}', '{2}', '{3}')",
                                                   info.ProductID, info.Num, info.Price, info.SellID);

                return(DbHelperAccess.executeNonQuery(commandText));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }