protected void butSave_Click(object sender, EventArgs e)
 {
     ShowShop.BLL.Accessories.CommentReply replyBll = new ShowShop.BLL.Accessories.CommentReply();
     ShowShop.Model.Accessories.CommentReply reply = new ShowShop.Model.Accessories.CommentReply();
     ShowShop.Model.Admin.AdminInfo adminModel = (ShowShop.Model.Admin.AdminInfo)ShowShop.Common.AdministrorManager.Get();
     reply.CommentID = ChangeHope.WebPage.PageRequest.GetQueryInt("w_d_commentid");
     reply.UID = adminModel.AdminId;
     reply.Content = this.txtReply.Text.Trim().ToString();
     reply.ReplyTime = Convert.ToDateTime(System.DateTime.Now);
     int count = replyBll.Add(reply);
     if (count > 0)
     {
         this.ltlMsg.Text = "操作成功,已回复该信息";
         this.pnlMsg.Visible = true;
         this.pnlMsg.CssClass = "actionOk";
     }
     else
     {
         this.ltlMsg.Text = "操作失败";
         this.pnlMsg.Visible = true;
         this.pnlMsg.CssClass = "actionErr";
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 返回数据
 /// </summary>
 /// <param name="row"></param>
 /// <returns></returns>
 public ShowShop.Model.Accessories.CommentReply GetModel(System.Data.DataRow row)
 {
     ShowShop.Model.Accessories.CommentReply model = new ShowShop.Model.Accessories.CommentReply();
     if (row != null)
     {
         model.RID = int.Parse(row["id"].ToString());
         model.UID = int.Parse(row["uid"].ToString());
         model.Content = row["content"].ToString();
         model.ReplyTime = DateTime.Parse(row["replytime"].ToString());
         model.CommentID = int.Parse(row["commentid"].ToString());
         return model;
     }
     else
     {
         return null;
     }
 }