thesisList.aspx.cs
资源名称:MEIMS.rar [点击查看]
上传用户:ah_jiwei
上传日期:2022-07-24
资源大小:54044k
文件大小:4k
源码类别:
数据库编程
开发平台:
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 student_thesisList : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- string userId = Session["userId"].ToString();
- //string userId = "63081500001";
- string keyan = Label1.Text.ToString().Trim();
- string qiye = Label2.Text.ToString().Trim();
- string xuanbao = Label3.Text.ToString().Trim();
- string kaiti = Label4.Text.ToString().Trim();
- string lunwen = Label5.Text.ToString().Trim();
- SqlConnection connection = DB.connect_la();
- connection.Open();
- string commandString = "SELECT * FROM thsis_data WHERE stu_id= " + userId;
- SqlCommand cmd = new SqlCommand(commandString, connection);
- SqlDataReader sdr = cmd.ExecuteReader();
- string thesis_exist = "未提交";
- if (sdr.Read())
- {
- Label1.Text = sdr.GetValue(3).ToString();
- if (Label1.Text.Trim() == "未提交")
- {
- HyperLink1.NavigateUrl = "../document/template/科研实践能力考核表.doc";
- }
- else if (Label1.Text.Trim() == "已提交")
- {
- HyperLink1.NavigateUrl = "../document/" + userId + "/科研实践能力考核表.doc";
- }
- Label2.Text = sdr.GetValue(4).ToString();
- if (Label2.Text.Trim() == "未提交")
- {
- HyperLink2.NavigateUrl = "../document/template/企业导师表.doc";
- }
- else if (Label2.Text.Trim() == "已提交")
- {
- HyperLink2.NavigateUrl = "../document/" + userId + "/企业导师表.doc";
- }
- Label3.Text = sdr.GetValue(2).ToString();
- if (Label3.Text.Trim() == "未提交")
- {
- HyperLink3.NavigateUrl = "../document/template/选报导师表.doc";
- }
- else if (Label3.Text.Trim() == "已提交")
- {
- HyperLink3.NavigateUrl = "../document/" + userId + "/选报导师表.doc";
- }
- Label4.Text = sdr.GetValue(1).ToString();
- if (Label4.Text.Trim() == "未提交")
- {
- HyperLink4.NavigateUrl = "../document/template/开题报告.doc";
- }
- else if (Label4.Text.Trim() == "已提交")
- {
- HyperLink4.NavigateUrl = "../document/" + userId + "/开题报告.doc";
- }
- thesis_exist = sdr.GetValue(5).ToString();
- }
- sdr.Close();
- commandString = "SELECT thesis_state,thesis_total FROM thesis where stu_id=" + userId;
- SqlCommand cmd2 = new SqlCommand(commandString, connection);
- SqlDataReader sdr2 = cmd2.ExecuteReader();
- if (sdr2.Read())
- {
- Label5.Text = sdr2.GetValue(0).ToString();
- string thesis_title = sdr2.GetValue(1).ToString();
- if (thesis_exist.Trim() == "未提交")
- {
- HyperLink5.NavigateUrl = "../document/template/关于Java的生存现状分析.doc";
- }
- else if (thesis_exist.Trim() == "已提交")
- {
- HyperLink5.NavigateUrl = "../document/" + userId + "/" + thesis_title + ".doc";
- }
- }
- sdr2.Close();
- connection.Close();
- }
- }