tea_details.aspx.cs
资源名称:MEIMS.rar [点击查看]
上传用户:ah_jiwei
上传日期:2022-07-24
资源大小:54044k
文件大小:2k
源码类别:
数据库编程
开发平台:
Visual C++
- 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 administration_details : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- //导师详细信息,注意导师图片还没有做呢。。。。。。。。
- string tea_Id = Request.QueryString["tea_Id"];
- SqlConnection connection = DB.connect_la();
- connection.Open();
- string commandString = "SELECT * FROM tea_table WHERE tea_id= " + tea_Id;
- SqlCommand cmd = new SqlCommand(commandString, connection);
- SqlDataReader sdr = cmd.ExecuteReader();
- if (sdr.Read())
- {
- Label1.Text = sdr.GetValue(1).ToString();
- Label2.Text = sdr.GetValue(11).ToString();
- Label3.Text = sdr.GetValue(12).ToString();
- Label4.Text = sdr.GetValue(13).ToString();
- Label5.Text = sdr.GetValue(7).ToString();
- Label6.Text = sdr.GetValue(3).ToString();
- Label7.Text = sdr.GetValue(0).ToString();
- Label8.Text = sdr.GetValue(9).ToString();
- Label9.Text = sdr.GetValue(2).ToString();
- Label10.Text = sdr.GetValue(5).ToString();
- Label11.Text = sdr.GetValue(4).ToString();
- }
- sdr.Close();
- connection.Close();
- }
- }