protected void Page_Load(object sender, EventArgs e)
 {
     if (ChangeHope.WebPage.PageRequest.GetFormString("Option") != string.Empty && ChangeHope.WebPage.PageRequest.GetFormString("id") != "")
     {
         string types = Request["Option"].Trim();
         string id = ChangeHope.WebPage.PageRequest.GetFormString("id");
         ShowShop.BLL.Accessories.CommentReply commentRBll = new ShowShop.BLL.Accessories.CommentReply();
         if (types == "del")
         {
             commentRBll.Delete(Convert.ToInt32(id));
         }
         Response.End();
         return;
     }
     if(!IsPostBack)
     {
         InitWebControl();
         string id = ChangeHope.WebPage.PageRequest.GetQueryString("w_d_commentid");
         if(id!=null&&id!="")
         {
             ShowShop.Model.Accessories.CommentInfo model = commentBll.GetModelID(Convert.ToInt32(id));
             if(model!=null)
             {
                 this.litName.Text = model.Title.ToString();
             }
         }
         GetList();
     }
 }
        protected void GetList()
        {
            ShowShop.BLL.Accessories.CommentReply rebll = new ShowShop.BLL.Accessories.CommentReply();
            ChangeHope.WebPage.Table table = new ChangeHope.WebPage.Table();
            ChangeHope.DataBase.DataByPage dataPage = rebll.GetList();
            table.AddHeadCol("", "回复内容");
            table.AddHeadCol("", "回复时间");
            table.AddHeadCol("", "操作");
            table.AddRow();

            if (dataPage.DataReader != null)
            {
                while (dataPage.DataReader.Read())
                {
                    table.AddCol(dataPage.DataReader["content"].ToString());
                    table.AddCol(dataPage.DataReader["replytime"].ToString());
                    table.AddCol("<a href=\"#\" onclick='Del(" + dataPage.DataReader["rid"] + ")'>删除</a>");
                    table.AddRow();
                }
            }
            string view = table.GetTable() + dataPage.PageToolBar;
            dataPage.Dispose();
            dataPage = null;
            this.lblList.Text = view;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                ShowShop.Common.PromptInfo.Popedom("012005001");
                if (ChangeHope.WebPage.PageRequest.GetFormString("Option") != string.Empty && ChangeHope.WebPage.PageRequest.GetFormString("id") != "")
                {
                    string types = Request["Option"].Trim();
                    string id = ChangeHope.WebPage.PageRequest.GetFormString("id");
                    ShowShop.BLL.Accessories.CommentReply commentRBll=new ShowShop.BLL.Accessories.CommentReply();

                    if (ShowShop.Common.PromptInfo.Message("012005003") != "ok")
                    {
                    if (types == "del")
                    {
                            commentBll.Delete(Convert.ToInt32(id));
                            commentRBll.AllDelete(id);
                    }
                    if (types == "delAll")
                    {
                        commentBll.DeleteAll(id);
                        commentRBll.AllDelete(id);
                    }
                    }
                    else
                    {
                        Response.Write("no");
                    }
                    Response.End();
                    return;
                }
                this.lblList.Text = GetList();
            }
        }
 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";
     }
 }