admin/edithelp.aspx.cs
(完整代码) 1KBusing 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 System.Data.SqlClient;
public partial class admin_edithelp : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label1.Visible = false;
if (!IsPostBack)
{
string mysql = "select * from help2 where hhid='" + Request.QueryString["id"] + "'";
SqlDataReader dr = Class1.sqrea(mysql);
if (dr.Read())
{
TextBox1.Text = dr["helpname"].ToString();
Free1.Text = dr["helpdetail"].ToString();
string mysql2 = "select * from help1";
DropDownList1.DataSource = Class1.gd(mysql2);
DropDownList1.DataTextField = "hename";
DropDownList1.DataValueField = "hid";
DropDownList1.SelectedValue = dr["hid"].ToString();
DropDownList1.DataBind();
/* Label3.Text = dr["lastusername"].ToString();
Label4.Text = dr["lasttime"].ToString();
//Image1.ImageUrl = "~/" + "image/ba.jpg";
*/
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string mysql1 = "update help2 set hid='" + DropDownList1.SelectedValue + "',helpname='" + TextBox1.Text + "',helpdetail='" + Free1.Text + "'where hhid='" + Request.QueryString["id"] + "'";
int n = Class1.exexu(mysql1);
if (n > 0)
{
Label1.Visible = true;
Label1.Text = "修改帮助信息成功!";
//Response.Write("<script>alert('修改手机成功')</script>");
// Server.Transfer("editbankuaigx.aspx?id=" + Request.QueryString["id"]);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。