Exemple #1
0
    protected void  LeaveMassage_ItemCommand(object source, DataListCommandEventArgs e)
    {
        if (e.CommandName == "detail")
        {
            string theme = e.CommandArgument.ToString();
            textDiv.InnerHtml = theme;
        }
        if (e.CommandName == "Detail")
        {
            string info = e.CommandArgument.ToString();
            textDiv.InnerHtml = info;
        }

        if (e.CommandName == "delete")
        {
            DLeaveMsg info      = new DLeaveMsg();
            string    isSuccuss = (info.Delete(Convert.ToInt32(e.CommandArgument.ToString())) ? "true" : "false");
            Response.Write("<script language=<'javascript'>alert('" + isSuccuss + "');</script>");
        }

        if (e.CommandName == "answer")
        {
            DReply   dRe     = new DReply();
            int      id      = Convert.ToInt32(e.CommandArgument.ToString());
            LeaveMsg msgInfo = new DLeaveMsg().GetleaveMsgById(id);
            LeaveMsgLbl.Text     = msgInfo.Theme;
            ReplyList.DataSource = dRe.GetreplyByparentld(id);
            ReplyList.DataBind();
        }
    }
Exemple #2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        DReply dRe  = new DReply();
        Reply  info = new Reply();

        info.Parentld = id;
        info.Name     = "petter";
        info.Time     = DateTime.Now;
        info.Info     = ReplyBox.Text;
        if (dRe.Insert(info))
        {
            Response.Write("成功!!!");
            IsReplyingLbl.Text = "";
        }
    }
Exemple #3
0
    protected void LeaveMassage_ItemCommand(object source, DataListCommandEventArgs e)
    {
        if (e.CommandName == "detail")
        {
            string theme = e.CommandArgument.ToString();
            textDiv.InnerHtml = theme;
        }
        if (e.CommandName == "Detail")
        {
            string info = e.CommandArgument.ToString();
            textDiv.InnerHtml = info;
        }

        if (e.CommandName == "answer")
        {
            DReply dRe = new DReply();
            id = Convert.ToInt32(e.CommandArgument.ToString());
            IsReplyingLbl.Text = "正在给留言——" + new DLeaveMsg().GetleaveMsgById(id).Theme + "回复:";
        }
    }