温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:网博直销系统软件源码
当前文件:
WangBoDirect/admin/admin.aspx.cs,打开代码结构图
WangBoDirect/admin/admin.aspx.cs,打开代码结构图1using System; 2
using System.Data; 3
using System.Configuration; 4
using System.Collections; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.WebControls; 9
using System.Web.UI.WebControls.WebParts; 10
using System.Web.UI.HtmlControls; 11
12
public partial class admin_admin : System.Web.UI.Page 13
{ 14
protected void Page_Load(object sender, EventArgs e) 15
{ 16
if (!IsPostBack) 17
{ 18
if (Session["aid"] == null) 19
{ Response.Write("<script language=javascript>top.location.href='login.aspx';alert('您未登录!');</script>"); } 20
else 21
{ 22
bind(); 23
} 24
} 25
} 26
void bind() 27
{ 28
string sql = "select * from webhww_hy where id=" + Session["aid"] + ""; 29
DataTable dt = new DataTable(); 30
dt = access.GreatDs(sql).Tables[0]; 31
32
TextBox1.Text = dt.Rows[0]["webhww_hyxm"].ToString(); 33
TextBox2.Text = dt.Rows[0]["webhww_hymm"].ToString(); 34
TextBox3.Text = dt.Rows[0]["webhww_hyxb"].ToString(); 35
TextBox4.Text = dt.Rows[0]["webhww_sfzhm"].ToString(); 36
TextBox5.Text = dt.Rows[0]["webhww_khh"].ToString(); 37
TextBox6.Text = dt.Rows[0]["webhww_khhmc"].ToString(); 38
TextBox7.Text = dt.Rows[0]["webhww_khxm"].ToString(); 39
TextBox8.Text = dt.Rows[0]["webhww_yhkh"].ToString(); 40
TextBox9.Text = dt.Rows[0]["webhww_lxdh"].ToString(); 41
TextBox10.Text = dt.Rows[0]["webhww_bz"].ToString(); 42
TextBox11.Text = dt.Rows[0]["webhww_hybh"].ToString(); 43
TextBox12.Text = dt.Rows[0]["webhww_lxdz"].ToString(); 44
} 45
protected void Button1_Click(object sender, EventArgs e) 46
{ 47
string _webhww_hyxm = re.replace(TextBox1.Text); 48
string _webhww_hymm = fun.Encrypt(re.replace(TextBox2.Text), 0); 49
string _webhww_hyxb = re.replace(TextBox3.Text); 50
string _webhww_sfzhm = re.replace(TextBox4.Text); 51
string _webhww_khh = re.replace(TextBox5.Text); 52
string _webhww_khhmc = re.replace(TextBox6.Text); 53
string _webhww_khxm = re.replace(TextBox7.Text); 54
string _webhww_yhkh = re.replace(TextBox8.Text); 55
string _webhww_lxdh = re.replace(TextBox9.Text); 56
string _webhww_bz = re.replace(TextBox10.Text); 57
string _webhww_lxdz = re.replace(TextBox12.Text); 58
string sql = "update webhww_hy set webhww_hyxm='" + _webhww_hyxm + "',webhww_hyxb='" + _webhww_hyxb + "',webhww_hymm='" + _webhww_hymm + "',webhww_sfzhm='" + _webhww_sfzhm + "',webhww_khh='" + _webhww_khh + "',webhww_khhmc='" + _webhww_khhmc + "',webhww_khxm='" + _webhww_khxm + "',webhww_yhkh='" + _webhww_yhkh + "',webhww_lxdh='" + _webhww_lxdh + "',webhww_bz='" + _webhww_bz + "',webhww_lxdz='" + _webhww_lxdz + "' where id=" + Session["aid"] + ""; 59
access.DoSql(sql); 60
Label1.Text = "修改成功"; 61
bind(); 62
} 63
} 64





}
}