Ejemplo n.º 1
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="Delivery"></param>
        /// <returns></returns>
        public int UpdateDelivery(Delivery Delivery)
        {
            string sql  = $"{ CreateSqlString.UpdateSqlString(Delivery)    } WHERE DeliveryId =@DeliveryId";
            var    pars = CreateSqlString.SqlParameterArray(Delivery);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
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));
        }
Ejemplo n.º 4
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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 6
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.SqlParameterArray(Product);

            //MySqlParameter[] pars = {
            //                    new MySqlParameter("@ProductId",MySqlDbType.VarChar,32),
            //                      new MySqlParameter("@Title",MySqlDbType.VarChar,32),
            //                                  new MySqlParameter("@CateId",MySqlDbType.VarChar,32),
            //                             new MySqlParameter("@MarketPrice",MySqlDbType.Decimal),
            //                             new MySqlParameter("@Price",MySqlDbType.Decimal),
            //                               new MySqlParameter("@Stock",MySqlDbType.Int32),
            //                               new MySqlParameter("@PostTime",MySqlDbType.DateTime),
            //                               new MySqlParameter("@Content",MySqlDbType.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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="AdminUser"></param>
        /// <returns></returns>
        public int UpdateAdminUser(AdminUser AdminUser)
        {
            string sql  = $"{ CreateSqlString.UpdateSqlString(AdminUser)    } WHERE SuId =@SuId";
            var    pars = CreateSqlString.SqlParameterArray(AdminUser);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="News"></param>
        /// <returns></returns>
        public int UpdateNews(News News)
        {
            string sql  = $"{ CreateSqlString.UpdateSqlString(News)    } WHERE NewsId =@NewsId";
            var    pars = CreateSqlString.SqlParameterArray(News);

            return(SqlHelper.ExecuteNonquery(sql, CommandType.Text, pars));
        }
Ejemplo n.º 10
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.SqlParameterArray(category);

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

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