wxxsd/wxxsd123/message/answer.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace wxxsd.wxxsd123.message
{
    public partial class answer : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["id"] == null)
            {
                Response.Redirect("../login.aspx");
            }
            if (!IsPostBack)
            {
                bindMsg();
            }
        }
        //绑定Message
        public void bindMsg()
        {
            int id = Convert.ToInt32(Request.QueryString["id"]);
            DataTable dt = cs.message.getAnserQuit(id);
            if (dt.Rows.Count > 0)
            {
                this.name.Text = dt.Rows[0]["name"].ToString();
                this.sex.Text = dt.Rows[0]["sex"].ToString();
                this.tel.Text = dt.Rows[0]["tel"].ToString();
                this.zhiye.Text = dt.Rows[0]["zhiye"].ToString();
                this.email.Text = dt.Rows[0]["email"].ToString();
                this.xinshui.Text = dt.Rows[0]["xinshui"].ToString();
                this.address.Text = dt.Rows[0]["address"].ToString();
                this.ctime.Text = dt.Rows[0]["ctime"].ToString();
                this.person.Value= dt.Rows[0]["a_person"].ToString();
                this.answer1.Value = dt.Rows[0]["answer"].ToString();
            }

        }
        protected void Button1_Click1(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(Request.QueryString["id"]);
            string p = this.person.Value.Trim();
            string content = this.answer1.Value.Trim();
            if (cs.message.insertAnser(id, p, content)>0)
            {
                Response.Write("<script>alert('回复成功');window.location.href='message.aspx'</script>");
            }
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            this.person.Value = "";
            this.answer1.Value = "";
        }
后面还有 2 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。