Backup1/add_bl.aspx.cs

(完整代码) 1KB

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 add_bl : System.Web.UI.Page
    {
        SQLHelper db = new SQLHelper();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bind();
            }
        }
        //
        public void bind()
        {
            int id = int.Parse(Request.QueryString["id"].ToString());
            string sql = "select * from ill where ill_id="+id;
            DataTable dt = db.ExecuteQuery(sql, CommandType.Text);
            this.lb_ill.Text = dt.Rows[0]["name"].ToString();
            this.lb_doctor.Text = Session["name"].ToString();
            this.lb_depart.Text = Session["depart"].ToString();
        }
        //
        protected void Button1_Click(object sender, EventArgs e)
        {
            int ill_id = int.Parse(Request.QueryString["id"].ToString());
            string name = this.lb_ill.Text.ToString();
            string depart = this.lb_depart.Text.ToString();
            string doctor = this.lb_doctor.Text.ToString();
            string bq = this.txt_bq.Text.ToString();
            string sick= this.txt_sick.Text.ToString();
            string yz = this.txt_yz.Text.ToString();
            string sql = "insert into bl(ill_id,name,depart,doctor,bq,sick,yz,is_cf) values('"+ill_id+"','"+name+"','"+depart+"','"+doctor+"','"+bq+"','"+sick+"','"+yz+"','未处理')";
            int s = db.ExecuteNonQuery(sql, CommandType.Text);
            int d = db.ExecuteNonQuery("update ill set state='已处理' where ill_id="+ill_id, CommandType.Text);
            Response.Write("<script>alert('添加成功!');location='doctor_index.aspx'</script>");
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。