Пример #1
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="Detail"></param>
        /// <returns></returns>
        public int UpdateDetail(Detail Detail)
        {
            string sql  = CreateSqlString.UpdateSqlString(Detail) + " WHERE DetailId =@DetailId";
            var    pars = CreateSqlString.SqlServerParameterArray(Detail);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #2
0
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="Detail"></param>
        /// <returns></returns>
        public int AddDetail(Detail Detail)
        {
            string sql  = CreateSqlString.InsertSqlString(Detail);
            var    pars = CreateSqlString.SqlServerParameterArray(Detail);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #3
0
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="Appraise"></param>
        /// <returns></returns>
        public int AddAppraise(Appraise Appraise)
        {
            string sql  = CreateSqlString.InsertSqlString(Appraise);
            var    pars = CreateSqlString.SqlServerParameterArray(Appraise);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #4
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="Appraise"></param>
        /// <returns></returns>
        public int UpdateAppraise(Appraise Appraise)
        {
            string sql  = CreateSqlString.UpdateSqlString(Appraise) + " WHERE AppraiseId =@AppraiseId";
            var    pars = CreateSqlString.SqlServerParameterArray(Appraise);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #5
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="Orders"></param>
        /// <returns></returns>
        public int UpdateOrders(Orders Orders)
        {
            string sql  = CreateSqlString.UpdateSqlString(Orders) + " WHERE OrdersId =@OrdersId";
            var    pars = CreateSqlString.SqlServerParameterArray(Orders);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #6
0
        /// <summary>
        /// 更新信息
        /// </summary>
        /// <param name="Favorite"></param>
        /// <returns></returns>
        public int UpdateFavorite(Favorite Favorite)
        {
            string sql  = CreateSqlString.UpdateSqlString(Favorite) + " WHERE FavoriteId =@FavoriteId";
            var    pars = CreateSqlString.SqlServerParameterArray(Favorite);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #7
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="Photo"></param>
        /// <returns></returns>
        public int UpdatePhoto(Photo Photo)
        {
            string sql  = CreateSqlString.UpdateSqlString(Photo) + " WHERE PhotoId =@PhotoId";
            var    pars = CreateSqlString.SqlServerParameterArray(Photo);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #8
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="Product"></param>
        /// <returns></returns>
        public int UpdateProduct(Product Product)
        {
            string sql  = CreateSqlString.UpdateSqlString(Product) + " WHERE ProductId =@ProductId";
            var    pars = CreateSqlString.SqlServerParameterArray(Product);

            //SqlParameter[] pars = {
            //                    new SqlParameter("@ProductId",SqlDbType.VarChar,32),
            //                      new SqlParameter("@Title",SqlDbType.VarChar,32),
            //                                  new SqlParameter("@CateId",SqlDbType.VarChar,32),
            //                             new SqlParameter("@MarketPrice",SqlDbType.Decimal),
            //                             new SqlParameter("@Price",SqlDbType.Decimal),
            //                               new SqlParameter("@Stock",SqlDbType.Int32),
            //                               new SqlParameter("@PostTime",SqlDbType.DateTime),
            //                               new SqlParameter("@Content",SqlDbType.Text),
            //                      };
            //pars[0].Value = Product.ProductId;
            //pars[1].Value = Product.Title;
            //pars[2].Value = Product.CateId;
            //pars[3].Value = Product.MarketPrice;
            //pars[4].Value = Product.Price;
            //pars[5].Value = Product.Content;
            //pars[5].Value = Product.PostTime;
            //pars[7].Value = Product.Stock;
            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #9
0
        /// <summary>
        /// 添加信息
        /// </summary>
        /// <param name="Product"></param>
        /// <returns></returns>
        public int AddProduct(Product Product)
        {
            //string sql = "insert into Product(ProductId,Title,CateId,MarketPrice,Price,Content,PostTime,Stock) values(@ProductId,@Title,@CateId,@MarketPrice,@Price,@Content,@PostTime,@Stock)";
            string sql  = CreateSqlString.InsertSqlString(Product);
            var    pars = CreateSqlString.SqlServerParameterArray(Product);

            //SqlParameter[] pars = {
            //                    new SqlParameter("@ProductId",SqlDbType.VarChar,32),
            //                      new SqlParameter("@Title",SqlDbType.VarChar,32),
            //                                  new SqlParameter("@CateId",SqlDbType.VarChar,32),
            //                             new SqlParameter("@MarketPrice",SqlDbType.Decimal),
            //                             new SqlParameter("@Price",SqlDbType.Decimal),
            //                               new SqlParameter("@Stock",SqlDbType.Int32),
            //                               new SqlParameter("@PostTime",SqlDbType.DateTime),
            //                               new SqlParameter("@Content",SqlDbType.Text),
            //                      };
            //pars[0].Value = Product.ProductId;
            //pars[1].Value = Product.Title;
            //pars[2].Value = Product.CateId;
            //pars[3].Value = Product.MarketPrice;
            //pars[4].Value = Product.Price;
            //pars[5].Value = Product.Content;
            //pars[5].Value = Product.PostTime;
            //pars[7].Value = Product.Stock;
            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #10
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="AdminUser"></param>
        /// <returns></returns>
        public int UpdateAdminUser(AdminUser AdminUser)
        {
            string sql = CreateSqlString.UpdateSqlString(new AdminUser {
            }) + " WHERE SuId =@SuId";
            var pars   = CreateSqlString.SqlServerParameterArray(AdminUser);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Пример #11
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        public int Updatecategory(Category category)
        {
            string sql  = CreateSqlString.UpdateSqlString(category) + " WHERE CateId =@CateId";
            var    pars = CreateSqlString.SqlServerParameterArray(category);

            //string sql = "UPDATE Category SET CateName = @CateName,ParentId = @ParentId, WHERE CateId = @CateId";
            //SqlParameter[] pars = {
            //                           new SqlParameter("@CateName",SqlDbType.VarChar,50),
            //                           new SqlParameter("@ParentId",SqlDbType.VarChar,50),
            //                           new SqlParameter("@CateId",SqlDbType.VarChar),

            //                       };
            //pars[0].Value = category.CateName;
            //pars[1].Value = category.ParentId;
            //pars[2].Value = category.CateId;
            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }