Information/kehuEdit.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)
        {
          
           
            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 kehu_inf where kehu_id = '" + Request.QueryString["License"].ToString() + "'";
        DataSet ds = db.Select(sqlStr, conn);
        txt_Name.Text = ds.Tables[0].Rows[0]["kehu_name"].ToString();
        txt_tele.Text = ds.Tables[0].Rows[0]["kehu_tele"].ToString();
        this.ddl_sex.SelectedValue = ds.Tables[0].Rows[0]["kehu_sex"].ToString();
        txt_content.Text = ds.Tables[0].Rows[0]["kehu_content"].ToString();
        this.ddl_type.SelectedValue = ds.Tables[0].Rows[0]["kehu_type"].ToString();

        this.txt_bir.Text = ds.Tables[0].Rows[0]["kehu_bir"].ToString();
        this.txt_dan.Text = ds.Tables[0].Rows[0]["kehu_dan"].ToString();
        this.txt_kuan.Text = ds.Tables[0].Rows[0]["kehu_kuan"].ToString();
       
    }
    protected void btn_reset_Click(object sender, EventArgs e)
    {
        string url = "kehuInfo.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)
    {
后面还有 31 行代码,购买后查看完整代码

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

AI 解读 AI

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

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