Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Application["GalleryInt"] != null) //删除相册临时数据
     {
         GalleryBll.Delete("Rid=" + Application["GalleryInt"]);
     }
     else
     {
         Application["GalleryInt"] = ROYcms.Common.StringPlus.GetRamTimeCode();//修改相册时用到
     }
     //绑定输出相册数据
     if (ROYcms.Common.Request.GetQueryInt("Id") != 0)
     {
         GalleryBind(ROYcms.Common.Request.GetQueryInt("Id"));
         AppendixBind(ROYcms.Common.Request.GetQueryInt("Id"));
     }
     DdClass_bind();
     brand_id_bind();
     goods_type.SelectedValue = ROYcms.Common.Request.GetQueryInt("Class").ToString();
     brand_id.SelectedValue   = ROYcms.Common.Request.GetQueryInt("Brand").ToString();
     if (ROYcms.Common.Request.GetQueryInt("Id") > 0)//编辑
     {
         Model = BLL.GetModel(ROYcms.Common.Request.GetQueryInt("Id"));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 将购物车数据插入到数据库
        /// </summary>
        /// <param name="OrderId">订单号</param>
        /// <returns></returns>
        public bool InsertOrderGoods(string OrderId)
        {
            //try
            //{
            DataTable DT = ROYcms.Common.ShopCooksCar.GetAllChoppingCar(); //获取购物车数据

            foreach (DataRow Dr in DT.Rows)
            {
                Goods_Model = Goods_BLL.GetModel(Convert.ToInt32(Dr["Id"]));
                Order_Detail_Model.goods_id       = Goods_Model.Id;
                Order_Detail_Model.order_id       = OrderId;                    //订单商品信息对应的详细信息id,取值order_info的order_id
                Order_Detail_Model.goods_number   = Convert.ToInt32(Dr["num"]); //商品的购买数量
                Order_Detail_Model.goods_id       = Goods_Model.Id;             //商品的的id,取值表ecs_goods 的 goods_id
                Order_Detail_Model.goods_name     = Goods_Model.goods_name;     //商品的名称,取值表ecs_goods
                Order_Detail_Model.goods_sn       = Goods_Model.goods_sn;       //商品的唯一货号,取值ecs_goods
                Order_Detail_Model.market_price   = Goods_Model.market_price;   //商品的市场售价,取值ecs_goods
                Order_Detail_Model.goods_price    = Goods_Model.shop_price;     //商品的本店售价,取值ecs_goods
                Order_Detail_Model.send_number    = Goods_Model.goods_number;   //是否已发货,0 ,否;1,是
                Order_Detail_Model.is_real        = Goods_Model.is_real;        //是否是实物
                Order_Detail_Model.extension_code = Goods_Model.extension_code; //商品的扩展属性,比如像虚拟卡
                Order_Detail_Model.goods_attr     = null;                       //购买该商品时所选择的属性;
                Order_Detail_Model.parent_id      = 0;                          //父商品id,取值于ecs_cart的 parent_id;如果有该值则是值多代表的物品的配件
                Order_Detail_Model.is_gift        = 0;                          //是参加的优惠活动的id
                Order_Detail_BLL.Add(Order_Detail_Model);
            }
            return(true);
            //}
            //catch { return false; }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Page_Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            int PRE = 0;

            Model.Id = ROYcms.Common.Request.GetFormInt("Id");
            if (Model.Id > 0)//编辑
            {
                Model = BLL.GetModel(Model.Id);
            }

            Model.goods_type         = ROYcms.Common.Request.GetFormInt("goods_type");
            Model.goods_sn           = ROYcms.Common.Request.GetFormString("goods_sn");
            Model.goods_name         = ROYcms.Common.Request.GetFormString("goods_name");
            Model.goods_name_style   = ROYcms.Common.Request.GetFormString("goods_name_style");
            Model.brand_id           = ROYcms.Common.Request.GetFormInt("brand_id");
            Model.provider_name      = ROYcms.Common.Request.GetFormString("provider_name");
            Model.goods_number       = ROYcms.Common.Request.GetFormInt("goods_number");
            Model.goods_weight       = ROYcms.Common.Request.GetFormInt("goods_weight");
            Model.market_price       = ROYcms.Common.Request.GetFormInt("market_price");
            Model.shop_price         = ROYcms.Common.Request.GetFormInt("shop_price");
            Model.promote_price      = ROYcms.Common.Request.GetFormInt("promote_price");
            Model.promote_start_date = Convert.ToDateTime(ROYcms.Common.Request.GetFormString("promote_start_date") == ""?DateTime.Now.ToString():ROYcms.Common.Request.GetFormString("promote_start_date"));
            Model.promote_end_date   = Convert.ToDateTime(ROYcms.Common.Request.GetFormString("promote_end_date") == "" ? DateTime.Now.ToString(): ROYcms.Common.Request.GetFormString("promote_end_date"));
            Model.warn_number        = ROYcms.Common.Request.GetFormInt("warn_number");
            Model.keywords           = ROYcms.Common.Request.GetFormString("keywords");
            Model.goods_brief        = ROYcms.Common.Request.GetFormString("goods_brief");
            Model.goods_desc         = ROYcms.Common.Request.GetFormString("goods_desc");
            Model.goods_thumb        = ROYcms.Common.Request.GetFormString("goods_thumb");
            Model.goods_img          = ROYcms.Common.Request.GetFormString("goods_img");
            Model.original_img       = ROYcms.Common.Request.GetFormString("original_img");
            Model.is_real            = ROYcms.Common.Request.GetFormInt("is_real");
            Model.extension_code     = ROYcms.Common.Request.GetFormString("extension_code");
            Model.is_on_sale         = ROYcms.Common.Request.GetFormInt("is_on_sale");
            Model.is_alone_sale      = ROYcms.Common.Request.GetFormInt("is_alone_sale");
            Model.integral           = ROYcms.Common.Request.GetFormInt("integral");

            Model.is_delete     = ROYcms.Common.Request.GetFormInt("is_delete");
            Model.is_best       = ROYcms.Common.Request.GetFormInt("is_best");
            Model.is_hot        = ROYcms.Common.Request.GetFormInt("is_hot");
            Model.is_promote    = ROYcms.Common.Request.GetFormInt("is_promote");
            Model.give_integral = ROYcms.Common.Request.GetFormInt("give_integral");
            Model.classkind     = ROYcms.Common.Request.GetFormInt("ClassKind");
            Model.last_update   = DateTime.Now;
            Model.click_count   = 1;
            Model.add_time      = DateTime.Now;

            if (Model.Id == 0)//添加
            {
                PRE = this.BLL.Add(this.Model);
                try //将相册的图片数据关联到文章来
                {
                    new ROYcms.Sys.BLL.ROYcms_Gallery().ZUpdate(PRE, Convert.ToInt32(Application["GalleryInt"] == null ? 0 : Application["GalleryInt"]));
                }
                catch
                {
                    new ROYcms.Sys.BLL.ROYcms_Log().InsertSystemLog("3", "将相册的图片数据关联到文章失败", "将相册的图片数据关联到文章失败");//写入日志
                }
            }
            else //编辑
            {
                PRE = this.BLL.Update(this.Model) == true ? 1 : 0;
            }

            Response.ContentType = "text/plain";
            Response.Write(PRE);
        }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     Model = BLL.GetModel(ROYcms.Common.Request.GetQueryInt("Id"));
     GalleryBind(ROYcms.Common.Request.GetQueryInt("Id"));
 }
Exemplo n.º 5
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(ROYcms.Sys.Model.ROYcms_Goods model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into ROYcms_Goods(");
            strSql.Append("goods_type,goods_sn,goods_name,goods_name_style,click_count,brand_id,provider_name,goods_number,goods_weight,market_price,shop_price,promote_price,promote_start_date,promote_end_date,warn_number,keywords,goods_brief,goods_desc,goods_thumb,goods_img,original_img,is_real,extension_code,is_on_sale,is_alone_sale,integral,add_time,is_delete,is_best,is_hot,is_promote,last_update,give_integral,ClassKind)");
            strSql.Append(" values (");
            strSql.Append("@goods_type,@goods_sn,@goods_name,@goods_name_style,@click_count,@brand_id,@provider_name,@goods_number,@goods_weight,@market_price,@shop_price,@promote_price,@promote_start_date,@promote_end_date,@warn_number,@keywords,@goods_brief,@goods_desc,@goods_thumb,@goods_img,@original_img,@is_real,@extension_code,@is_on_sale,@is_alone_sale,@integral,@add_time,@is_delete,@is_best,@is_hot,@is_promote,@last_update,@give_integral,@ClassKind)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters =
            {
                new SqlParameter("@goods_type",         SqlDbType.Int,         4),
                new SqlParameter("@goods_sn",           SqlDbType.VarChar,   100),
                new SqlParameter("@goods_name",         SqlDbType.VarChar,   500),
                new SqlParameter("@goods_name_style",   SqlDbType.VarChar,   100),
                new SqlParameter("@click_count",        SqlDbType.Int,         4),
                new SqlParameter("@brand_id",           SqlDbType.Int,         4),
                new SqlParameter("@provider_name",      SqlDbType.VarChar,   100),
                new SqlParameter("@goods_number",       SqlDbType.Int,         4),
                new SqlParameter("@goods_weight",       SqlDbType.Int,         4),
                new SqlParameter("@market_price",       SqlDbType.Int,         4),
                new SqlParameter("@shop_price",         SqlDbType.Int,         4),
                new SqlParameter("@promote_price",      SqlDbType.Int,         4),
                new SqlParameter("@promote_start_date", SqlDbType.DateTime),
                new SqlParameter("@promote_end_date",   SqlDbType.DateTime),
                new SqlParameter("@warn_number",        SqlDbType.Int,         4),
                new SqlParameter("@keywords",           SqlDbType.VarChar,   500),
                new SqlParameter("@goods_brief",        SqlDbType.VarChar,   500),
                new SqlParameter("@goods_desc",         SqlDbType.Text),
                new SqlParameter("@goods_thumb",        SqlDbType.VarChar,   500),
                new SqlParameter("@goods_img",          SqlDbType.VarChar,   500),
                new SqlParameter("@original_img",       SqlDbType.VarChar,   500),
                new SqlParameter("@is_real",            SqlDbType.Int,         4),
                new SqlParameter("@extension_code",     SqlDbType.VarChar,   100),
                new SqlParameter("@is_on_sale",         SqlDbType.Int,         4),
                new SqlParameter("@is_alone_sale",      SqlDbType.Int,         4),
                new SqlParameter("@integral",           SqlDbType.Int,         4),
                new SqlParameter("@add_time",           SqlDbType.DateTime),
                new SqlParameter("@is_delete",          SqlDbType.Int,         4),
                new SqlParameter("@is_best",            SqlDbType.Int,         4),
                new SqlParameter("@is_hot",             SqlDbType.Int,         4),
                new SqlParameter("@is_promote",         SqlDbType.Int,         4),
                new SqlParameter("@last_update",        SqlDbType.DateTime),
                new SqlParameter("@give_integral",      SqlDbType.Int,         4),
                new SqlParameter("@ClassKind",          SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.goods_type;
            parameters[1].Value  = model.goods_sn;
            parameters[2].Value  = model.goods_name;
            parameters[3].Value  = model.goods_name_style;
            parameters[4].Value  = model.click_count;
            parameters[5].Value  = model.brand_id;
            parameters[6].Value  = model.provider_name;
            parameters[7].Value  = model.goods_number;
            parameters[8].Value  = model.goods_weight;
            parameters[9].Value  = model.market_price;
            parameters[10].Value = model.shop_price;
            parameters[11].Value = model.promote_price;
            parameters[12].Value = model.promote_start_date;
            parameters[13].Value = model.promote_end_date;
            parameters[14].Value = model.warn_number;
            parameters[15].Value = model.keywords;
            parameters[16].Value = model.goods_brief;
            parameters[17].Value = model.goods_desc;
            parameters[18].Value = model.goods_thumb;
            parameters[19].Value = model.goods_img;
            parameters[20].Value = model.original_img;
            parameters[21].Value = model.is_real;
            parameters[22].Value = model.extension_code;
            parameters[23].Value = model.is_on_sale;
            parameters[24].Value = model.is_alone_sale;
            parameters[25].Value = model.integral;
            parameters[26].Value = model.add_time;
            parameters[27].Value = model.is_delete;
            parameters[28].Value = model.is_best;
            parameters[29].Value = model.is_hot;
            parameters[30].Value = model.is_promote;
            parameters[31].Value = model.last_update;
            parameters[32].Value = model.give_integral;
            parameters[33].Value = model.classkind;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ROYcms.Sys.Model.ROYcms_Goods GetModel(int Id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 Id,goods_type,goods_sn,goods_name,goods_name_style,click_count,brand_id,provider_name,goods_number,goods_weight,market_price,shop_price,promote_price,promote_start_date,promote_end_date,warn_number,keywords,goods_brief,goods_desc,goods_thumb,goods_img,original_img,is_real,extension_code,is_on_sale,is_alone_sale,integral,add_time,is_delete,is_best,is_hot,is_promote,last_update,give_integral,ClassKind from ROYcms_Goods ");
            strSql.Append(" where Id=@Id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Id", SqlDbType.Int, 4)
            };
            parameters[0].Value = Id;

            ROYcms.Sys.Model.ROYcms_Goods model = new ROYcms.Sys.Model.ROYcms_Goods();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["Id"] != null && ds.Tables[0].Rows[0]["Id"].ToString() != "")
                {
                    model.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["goods_type"] != null && ds.Tables[0].Rows[0]["goods_type"].ToString() != "")
                {
                    model.goods_type = int.Parse(ds.Tables[0].Rows[0]["goods_type"].ToString());
                }
                if (ds.Tables[0].Rows[0]["goods_sn"] != null && ds.Tables[0].Rows[0]["goods_sn"].ToString() != "")
                {
                    model.goods_sn = ds.Tables[0].Rows[0]["goods_sn"].ToString();
                }
                if (ds.Tables[0].Rows[0]["goods_name"] != null && ds.Tables[0].Rows[0]["goods_name"].ToString() != "")
                {
                    model.goods_name = ds.Tables[0].Rows[0]["goods_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["goods_name_style"] != null && ds.Tables[0].Rows[0]["goods_name_style"].ToString() != "")
                {
                    model.goods_name_style = ds.Tables[0].Rows[0]["goods_name_style"].ToString();
                }
                if (ds.Tables[0].Rows[0]["click_count"] != null && ds.Tables[0].Rows[0]["click_count"].ToString() != "")
                {
                    model.click_count = int.Parse(ds.Tables[0].Rows[0]["click_count"].ToString());
                }
                if (ds.Tables[0].Rows[0]["brand_id"] != null && ds.Tables[0].Rows[0]["brand_id"].ToString() != "")
                {
                    model.brand_id = int.Parse(ds.Tables[0].Rows[0]["brand_id"].ToString());
                }
                if (ds.Tables[0].Rows[0]["provider_name"] != null && ds.Tables[0].Rows[0]["provider_name"].ToString() != "")
                {
                    model.provider_name = ds.Tables[0].Rows[0]["provider_name"].ToString();
                }
                if (ds.Tables[0].Rows[0]["goods_number"] != null && ds.Tables[0].Rows[0]["goods_number"].ToString() != "")
                {
                    model.goods_number = int.Parse(ds.Tables[0].Rows[0]["goods_number"].ToString());
                }
                if (ds.Tables[0].Rows[0]["goods_weight"] != null && ds.Tables[0].Rows[0]["goods_weight"].ToString() != "")
                {
                    model.goods_weight = int.Parse(ds.Tables[0].Rows[0]["goods_weight"].ToString());
                }
                if (ds.Tables[0].Rows[0]["market_price"] != null && ds.Tables[0].Rows[0]["market_price"].ToString() != "")
                {
                    model.market_price = int.Parse(ds.Tables[0].Rows[0]["market_price"].ToString());
                }
                if (ds.Tables[0].Rows[0]["shop_price"] != null && ds.Tables[0].Rows[0]["shop_price"].ToString() != "")
                {
                    model.shop_price = int.Parse(ds.Tables[0].Rows[0]["shop_price"].ToString());
                }
                if (ds.Tables[0].Rows[0]["promote_price"] != null && ds.Tables[0].Rows[0]["promote_price"].ToString() != "")
                {
                    model.promote_price = int.Parse(ds.Tables[0].Rows[0]["promote_price"].ToString());
                }
                if (ds.Tables[0].Rows[0]["promote_start_date"] != null && ds.Tables[0].Rows[0]["promote_start_date"].ToString() != "")
                {
                    model.promote_start_date = DateTime.Parse(ds.Tables[0].Rows[0]["promote_start_date"].ToString());
                }
                if (ds.Tables[0].Rows[0]["promote_end_date"] != null && ds.Tables[0].Rows[0]["promote_end_date"].ToString() != "")
                {
                    model.promote_end_date = DateTime.Parse(ds.Tables[0].Rows[0]["promote_end_date"].ToString());
                }
                if (ds.Tables[0].Rows[0]["warn_number"] != null && ds.Tables[0].Rows[0]["warn_number"].ToString() != "")
                {
                    model.warn_number = int.Parse(ds.Tables[0].Rows[0]["warn_number"].ToString());
                }
                if (ds.Tables[0].Rows[0]["keywords"] != null && ds.Tables[0].Rows[0]["keywords"].ToString() != "")
                {
                    model.keywords = ds.Tables[0].Rows[0]["keywords"].ToString();
                }
                if (ds.Tables[0].Rows[0]["goods_brief"] != null && ds.Tables[0].Rows[0]["goods_brief"].ToString() != "")
                {
                    model.goods_brief = ds.Tables[0].Rows[0]["goods_brief"].ToString();
                }
                if (ds.Tables[0].Rows[0]["goods_desc"] != null && ds.Tables[0].Rows[0]["goods_desc"].ToString() != "")
                {
                    model.goods_desc = ds.Tables[0].Rows[0]["goods_desc"].ToString();
                }
                if (ds.Tables[0].Rows[0]["goods_thumb"] != null && ds.Tables[0].Rows[0]["goods_thumb"].ToString() != "")
                {
                    model.goods_thumb = ds.Tables[0].Rows[0]["goods_thumb"].ToString();
                }
                if (ds.Tables[0].Rows[0]["goods_img"] != null && ds.Tables[0].Rows[0]["goods_img"].ToString() != "")
                {
                    model.goods_img = ds.Tables[0].Rows[0]["goods_img"].ToString();
                }
                if (ds.Tables[0].Rows[0]["original_img"] != null && ds.Tables[0].Rows[0]["original_img"].ToString() != "")
                {
                    model.original_img = ds.Tables[0].Rows[0]["original_img"].ToString();
                }
                if (ds.Tables[0].Rows[0]["is_real"] != null && ds.Tables[0].Rows[0]["is_real"].ToString() != "")
                {
                    model.is_real = int.Parse(ds.Tables[0].Rows[0]["is_real"].ToString());
                }
                if (ds.Tables[0].Rows[0]["extension_code"] != null && ds.Tables[0].Rows[0]["extension_code"].ToString() != "")
                {
                    model.extension_code = ds.Tables[0].Rows[0]["extension_code"].ToString();
                }
                if (ds.Tables[0].Rows[0]["is_on_sale"] != null && ds.Tables[0].Rows[0]["is_on_sale"].ToString() != "")
                {
                    model.is_on_sale = int.Parse(ds.Tables[0].Rows[0]["is_on_sale"].ToString());
                }
                if (ds.Tables[0].Rows[0]["is_alone_sale"] != null && ds.Tables[0].Rows[0]["is_alone_sale"].ToString() != "")
                {
                    model.is_alone_sale = int.Parse(ds.Tables[0].Rows[0]["is_alone_sale"].ToString());
                }
                if (ds.Tables[0].Rows[0]["integral"] != null && ds.Tables[0].Rows[0]["integral"].ToString() != "")
                {
                    model.integral = int.Parse(ds.Tables[0].Rows[0]["integral"].ToString());
                }
                if (ds.Tables[0].Rows[0]["add_time"] != null && ds.Tables[0].Rows[0]["add_time"].ToString() != "")
                {
                    model.add_time = DateTime.Parse(ds.Tables[0].Rows[0]["add_time"].ToString());
                }
                if (ds.Tables[0].Rows[0]["is_delete"] != null && ds.Tables[0].Rows[0]["is_delete"].ToString() != "")
                {
                    model.is_delete = int.Parse(ds.Tables[0].Rows[0]["is_delete"].ToString());
                }
                if (ds.Tables[0].Rows[0]["is_best"] != null && ds.Tables[0].Rows[0]["is_best"].ToString() != "")
                {
                    model.is_best = int.Parse(ds.Tables[0].Rows[0]["is_best"].ToString());
                }
                if (ds.Tables[0].Rows[0]["is_hot"] != null && ds.Tables[0].Rows[0]["is_hot"].ToString() != "")
                {
                    model.is_hot = int.Parse(ds.Tables[0].Rows[0]["is_hot"].ToString());
                }
                if (ds.Tables[0].Rows[0]["is_promote"] != null && ds.Tables[0].Rows[0]["is_promote"].ToString() != "")
                {
                    model.is_promote = int.Parse(ds.Tables[0].Rows[0]["is_promote"].ToString());
                }
                if (ds.Tables[0].Rows[0]["last_update"] != null && ds.Tables[0].Rows[0]["last_update"].ToString() != "")
                {
                    model.last_update = DateTime.Parse(ds.Tables[0].Rows[0]["last_update"].ToString());
                }
                if (ds.Tables[0].Rows[0]["give_integral"] != null && ds.Tables[0].Rows[0]["give_integral"].ToString() != "")
                {
                    model.give_integral = int.Parse(ds.Tables[0].Rows[0]["give_integral"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ClassKind"] != null && ds.Tables[0].Rows[0]["ClassKind"].ToString() != "")
                {
                    model.classkind = int.Parse(ds.Tables[0].Rows[0]["ClassKind"].ToString());
                }
                return(model);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(ROYcms.Sys.Model.ROYcms_Goods model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update ROYcms_Goods set ");
            strSql.Append("goods_type=@goods_type,");
            strSql.Append("goods_sn=@goods_sn,");
            strSql.Append("goods_name=@goods_name,");
            strSql.Append("goods_name_style=@goods_name_style,");
            strSql.Append("click_count=@click_count,");
            strSql.Append("brand_id=@brand_id,");
            strSql.Append("provider_name=@provider_name,");
            strSql.Append("goods_number=@goods_number,");
            strSql.Append("goods_weight=@goods_weight,");
            strSql.Append("market_price=@market_price,");
            strSql.Append("shop_price=@shop_price,");
            strSql.Append("promote_price=@promote_price,");
            strSql.Append("promote_start_date=@promote_start_date,");
            strSql.Append("promote_end_date=@promote_end_date,");
            strSql.Append("warn_number=@warn_number,");
            strSql.Append("keywords=@keywords,");
            strSql.Append("goods_brief=@goods_brief,");
            strSql.Append("goods_desc=@goods_desc,");
            strSql.Append("goods_thumb=@goods_thumb,");
            strSql.Append("goods_img=@goods_img,");
            strSql.Append("original_img=@original_img,");
            strSql.Append("is_real=@is_real,");
            strSql.Append("extension_code=@extension_code,");
            strSql.Append("is_on_sale=@is_on_sale,");
            strSql.Append("is_alone_sale=@is_alone_sale,");
            strSql.Append("integral=@integral,");
            strSql.Append("add_time=@add_time,");
            strSql.Append("is_delete=@is_delete,");
            strSql.Append("is_best=@is_best,");
            strSql.Append("is_hot=@is_hot,");
            strSql.Append("is_promote=@is_promote,");
            strSql.Append("last_update=@last_update,");
            strSql.Append("ClassKind=@ClassKind,");
            strSql.Append("give_integral=@give_integral");
            strSql.Append(" where Id=@Id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@goods_type",         SqlDbType.Int,         4),
                new SqlParameter("@goods_sn",           SqlDbType.VarChar,   100),
                new SqlParameter("@goods_name",         SqlDbType.VarChar,   500),
                new SqlParameter("@goods_name_style",   SqlDbType.VarChar,   100),
                new SqlParameter("@click_count",        SqlDbType.Int,         4),
                new SqlParameter("@brand_id",           SqlDbType.Int,         4),
                new SqlParameter("@provider_name",      SqlDbType.VarChar,   100),
                new SqlParameter("@goods_number",       SqlDbType.Int,         4),
                new SqlParameter("@goods_weight",       SqlDbType.Int,         4),
                new SqlParameter("@market_price",       SqlDbType.Int,         4),
                new SqlParameter("@shop_price",         SqlDbType.Int,         4),
                new SqlParameter("@promote_price",      SqlDbType.Int,         4),
                new SqlParameter("@promote_start_date", SqlDbType.DateTime),
                new SqlParameter("@promote_end_date",   SqlDbType.DateTime),
                new SqlParameter("@warn_number",        SqlDbType.Int,         4),
                new SqlParameter("@keywords",           SqlDbType.VarChar,   500),
                new SqlParameter("@goods_brief",        SqlDbType.VarChar,   500),
                new SqlParameter("@goods_desc",         SqlDbType.Text),
                new SqlParameter("@goods_thumb",        SqlDbType.VarChar,   500),
                new SqlParameter("@goods_img",          SqlDbType.VarChar,   500),
                new SqlParameter("@original_img",       SqlDbType.VarChar,   500),
                new SqlParameter("@is_real",            SqlDbType.Int,         4),
                new SqlParameter("@extension_code",     SqlDbType.VarChar,   100),
                new SqlParameter("@is_on_sale",         SqlDbType.Int,         4),
                new SqlParameter("@is_alone_sale",      SqlDbType.Int,         4),
                new SqlParameter("@integral",           SqlDbType.Int,         4),
                new SqlParameter("@add_time",           SqlDbType.DateTime),
                new SqlParameter("@is_delete",          SqlDbType.Int,         4),
                new SqlParameter("@is_best",            SqlDbType.Int,         4),
                new SqlParameter("@is_hot",             SqlDbType.Int,         4),
                new SqlParameter("@is_promote",         SqlDbType.Int,         4),
                new SqlParameter("@last_update",        SqlDbType.DateTime),
                new SqlParameter("@ClassKind",          SqlDbType.Int,         4),
                new SqlParameter("@give_integral",      SqlDbType.Int,         4),
                new SqlParameter("@Id",                 SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.goods_type;
            parameters[1].Value  = model.goods_sn;
            parameters[2].Value  = model.goods_name;
            parameters[3].Value  = model.goods_name_style;
            parameters[4].Value  = model.click_count;
            parameters[5].Value  = model.brand_id;
            parameters[6].Value  = model.provider_name;
            parameters[7].Value  = model.goods_number;
            parameters[8].Value  = model.goods_weight;
            parameters[9].Value  = model.market_price;
            parameters[10].Value = model.shop_price;
            parameters[11].Value = model.promote_price;
            parameters[12].Value = model.promote_start_date;
            parameters[13].Value = model.promote_end_date;
            parameters[14].Value = model.warn_number;
            parameters[15].Value = model.keywords;
            parameters[16].Value = model.goods_brief;
            parameters[17].Value = model.goods_desc;
            parameters[18].Value = model.goods_thumb;
            parameters[19].Value = model.goods_img;
            parameters[20].Value = model.original_img;
            parameters[21].Value = model.is_real;
            parameters[22].Value = model.extension_code;
            parameters[23].Value = model.is_on_sale;
            parameters[24].Value = model.is_alone_sale;
            parameters[25].Value = model.integral;
            parameters[26].Value = model.add_time;
            parameters[27].Value = model.is_delete;
            parameters[28].Value = model.is_best;
            parameters[29].Value = model.is_hot;
            parameters[30].Value = model.is_promote;
            parameters[31].Value = model.last_update;
            parameters[32].Value = model.classkind;
            parameters[33].Value = model.give_integral;
            parameters[34].Value = model.Id;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }