📄 wygsxx.aspx.cs
字号:
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;
public partial class Admin_Wygsxx : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//显示物业公司信息
DataTable dt = new DataTable();
dt = DataControl.GetData("select * from 物业公司信息");
if (dt.Rows.Count > 0)
{
TextBox1.Text = dt.Rows[0]["公司名称"].ToString();
Textbox2.Text = dt.Rows[0]["公司地址"].ToString();
TextBox3.Text = dt.Rows[0]["公司规模"].ToString();
Textbox4.Text = dt.Rows[0]["联系电话"].ToString();
Textbox5.Text = dt.Rows[0]["负责人"].ToString();
TextBox6.Text = dt.Rows[0]["物业公司介绍"].ToString();
}
}
}
protected void Button2_Click(object sender, EventArgs e)
{
//更新物业公司信息
DataControl.Execute("update 物业公司信息 set 公司名称='" + TextBox1.Text + "',公司地址='" + Textbox2.Text + "',公司规模='" + TextBox3.Text + "',联系电话='" + Textbox4.Text + "',负责人='" + Textbox5.Text + "',物业公司介绍='" + TextBox6.Text + "'");
Response.Write("<script>alert('保存成功');</script>");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -