Information/workerEdit.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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 System.Data.SqlClient;
using Mysqlserver;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btn_submit.Attributes.Add("onclick", "return isNull();");
if (Request.QueryString["License"].ToString() != "null")
{
DriverBind();
btn_submit.Text = "修改";
}
else
{
btn_submit.Text = "添加";
}
}
}
public void DriverBind()
{
SqlServerDataBase db = new SqlServerDataBase();
SqlConnection conn = db.DBconn();
string sqlStr = "select * from worker_inf where worker_id = '" + Request.QueryString["License"].ToString() + "'";
DataSet ds = db.Select(sqlStr, conn);
txt_Name.Text = ds.Tables[0].Rows[0]["worker_name"].ToString();
txt_depart.Text = ds.Tables[0].Rows[0]["worker_depart"].ToString();
this.ddl_sex.SelectedValue = ds.Tables[0].Rows[0]["worker_sex"].ToString();
txt_date.Text = ds.Tables[0].Rows[0]["worker_date"].ToString();
txt_tele.Text = ds.Tables[0].Rows[0]["worker_tele"].ToString();
txt_weizhi.Text = ds.Tables[0].Rows[0]["worker_weizhi"].ToString();
txt_wage.Text = ds.Tables[0].Rows[0]["worker_wage"].ToString();
}
protected void btn_reset_Click(object sender, EventArgs e)
{
string url = "workerInfo.aspx";
this.Response.Write("<script>window.opener.location.href=window.opener.location.href;window.close();</script>");
this.Response.Write("<script>window.opener.location.replace('" + url + "');window.close();</script>");
}
protected void btn_submit_Click(object sender, EventArgs e)
{
SqlServerDataBase db = new SqlServerDataBase();
SqlConnection conn = db.DBconn();
后面还有 29 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。