public string CommentTheGood(CommentParams param)
        {
            string jsonstr = "";
            try
            {
                //查询是否有此订单且,若没有,评论失败
                var orderModel = entity.hp_order.First(o=>o.id==param.orderid&&o.countid==param.countid&&o.goodid==param.goodid);
                var goodModel = entity.hp_goodinfo.First(o => o.id == param.goodid);
                Model.hp_goodcomment model = new Model.hp_goodcomment();
                model.countid = param.countid;
                model.goodid = param.goodid;
                model.images = param.images;
                //model.goodclassid =Convert.ToByte(goodModel.classid);
                //model.images=goodModel.images;
                model.content = param.content;
                //如果没评分,则给默认评分
                model.score = (string.IsNullOrWhiteSpace(param.score))?StringHelper.默认评分:Convert.ToInt32(param.score);
                model.date = DateTime.Now;
                model.create_time = DateTime.Now;
                entity.hp_goodcomment.Add(model);
                entity.SaveChanges();
                orderModel.state = StringHelper.评价成功;
                entity.SaveChanges();
                jsonstr = ReturnJson.toJson("100", "发送成功", -1);

            }
            catch (Exception e)
            {
                jsonstr = ReturnJson.toJson("101", "发送失败", -1);
            }

            return jsonstr;
        }
 private CommentParams GetParams()
 {
     BLL.CommentParams param = new CommentParams();
     param.goodid = Convert.ToInt32(Request.Form["goodid"]);
     param.countid = Convert.ToInt32(Request.Form["countid"]);
     param.content = Request.Form["content"];
     param.score = Request.Form["score"];
     param.images = Request.Form["images"];
     param.orderid = Convert.ToInt32(Request.Form["orderid"]);
     return param;
 }