chauffeur_open.aspx.cs

来自「网站开发与实例,提供完整的电子商务网站源代码。」· CS 代码 · 共 41 行

CS
41
字号
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;

public partial class Chauffeur_open : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            SqlConnection strcon = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["strcon"]);
            strcon.Open();
            SqlDataAdapter sda = new SqlDataAdapter("select * from tb_Chauffeur where id="+Request["id"], strcon);
            DataSet ds = new DataSet();
            sda.Fill(ds, "tb_Chauffeur");
            DataRowView rowview = ds.Tables["tb_Chauffeur"].DefaultView[0];
            LBLType.Text = rowview["Type"].ToString();
            LBLChauffeurName.Text = rowview["ChauffeurName"].ToString();
            LBLHealth.Text = rowview["Health"].ToString();
            LBLDriveAge.Text = rowview["DriveAge"].ToString();
            LBLTruckType.Text = rowview["TruckType"].ToString();
            LBLArea.Text = rowview["Area"].ToString();
            LBLTel.Text = rowview["Tel"].ToString();
            LBLEffectDate.Text = rowview["EffectDate"].ToString();
            LBLChauffeurNow.Text = rowview["ChauffeurNow"].ToString();
            LBLBewrite.Text = rowview["Bewrite"].ToString();
            ds.Clear();
            strcon.Close();
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?