Web/admin/xt/xtgg_Modify.aspx.cs

(完整代码) 1KB

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Bll;
using System.Data.SqlClient;

public partial class admin_xt_xtgg_Modify : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                string id = Request["id"].ToString();
                string sql = "select * from xtgg where id= " + id;
                SqlDataReader reader = DbHelperSQL.ExecuteReader(sql);
                reader.Read();
                this.name.Text = reader.GetString(1);
                this.num.Text = reader.GetString(2);
            }
            
        }
        catch (Exception )
        {
            
            
        }
        

    }

    protected void Button1_Click(object sender, EventArgs e)
    {

        string sql = "update xtgg set ggname='" + this.name.Text + "',ggdesc='" + this.num.Text + "' where id=" + Request["id"].ToString(); ;        
        int result =  DbHelperSQL.ExecuteSql(sql);
        if(result == 1)
        {
            MessageBox.ShowUrl(Page,this,"修改成功","xtgg.aspx");
        }
    }
}

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

AI 解读 AI

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

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