edit_ill.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
namespace 淮安协和门诊
{
public partial class edit_ill : System.Web.UI.Page
{
SQLHelper db = new SQLHelper();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bind();
this.txt_rq.Attributes["onClick"] = "WdatePicker()";
}
}
//
public void bind()
{
string sql = "select * from depart";
DataTable dt = db.ExecuteQuery(sql, CommandType.Text);
this.ddl_depart.DataSource = dt;
this.ddl_depart.DataTextField = "depart";
this.ddl_depart.DataValueField = "depart";
this.ddl_depart.DataBind();
//
int id = int.Parse(Request.QueryString["id"].ToString());
string cx = "select * from ill where ill_id=" + id;
DataTable d = db.ExecuteQuery(cx, CommandType.Text);
this.txt_name.Text = d.Rows[0]["name"].ToString();
this.txt_rq.Text = d.Rows[0]["rq"].ToString();
this.txt_nl.Text = d.Rows[0]["nl"].ToString();
this.txt_sg.Text = d.Rows[0]["sg"].ToString();
this.txt_tz.Text = d.Rows[0]["tz"].ToString();
this.txt_tel.Text = d.Rows[0]["tel"].ToString();
this.rbt_sex.Items.FindByValue(d.Rows[0]["sex"].ToString()).Selected = true;
this.ddl_depart.Items.FindByValue(d.Rows[0]["depart"].ToString()).Selected = true;
//
}
protected void Button1_Click(object sender, EventArgs e)
{
int id = int.Parse(Request.QueryString["id"].ToString());
string depart = this.ddl_depart.SelectedValue.ToString();
string name = this.txt_name.Text.ToString();
string sex = this.rbt_sex.SelectedValue.ToString();
int nl = int.Parse(this.txt_nl.Text.ToString());
int tz = int.Parse(this.txt_tz.Text.ToString());
int sg = int.Parse(this.txt_sg.Text.ToString());
string tel = this.txt_tel.Text.ToString();
DateTime rq = Convert.ToDateTime(this.txt_rq.Text.ToString());
string sql = "update ill set name='" + name + "',sex='" + sex + "',nl='" + nl + "',tz='" + tz + "',sg='" + sg + "',tel='" + tel + "',depart='" + depart+ "',rq='" + rq + "' where ill_id="+id;
int s = db.ExecuteNonQuery(sql, CommandType.Text);
Response.Write("<script>alert('成功!');location='manage_ill.aspx'</script>");
}
后面还有 2 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。