⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.aspx.cs

📁 网络营销软件的源代码
💻 CS
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using WebApplication8.firstPage;

namespace WebApplication8.company
{
	/// <summary>
	/// index2 的摘要说明。
	/// </summary>
	public class index : System.Web.UI.Page
	{
		protected System.Web.UI.HtmlControls.HtmlTableCell prolist;
		protected System.Web.UI.HtmlControls.HtmlTableCell view;
		protected System.Web.UI.HtmlControls.HtmlTableCell description;
		protected System.Web.UI.HtmlControls.HtmlTableCell survey;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			string html;
			Connection conn = new Connection(Application["market"].ToString());
			SqlDataReader reader = conn.execute("select * from Company where studentNO = '" + Request.QueryString["studentNO"] + "'");
			if( reader.Read() )
			{
				html =  "公司名称    :"+reader["comName"].ToString()+"<br>";
				html += "公司成立时间:"+reader["createTime"].ToString()+"<br>";
				html += "公司创建人  :"+reader["realName"].ToString()+"<br>";
				html += "注册资金    :"+reader["regAccount"].ToString()+"<br>"; 
				view.InnerHtml = html;
				html = reader["description"].ToString() + "<br>";
				description.InnerHtml = html;
			}// Put user code to initialize the page here

			reader.Close();
			html = "";
			reader = conn.execute("select * from Product where studentNO='"+Request["studentNO"]+"'");
			int count = 15;
			while(reader.Read()&&count>=0)
			{
				html += "产品名称:  "+reader["productName"].ToString()+"<br>";

			}
			prolist.InnerHtml = html;
			reader.Close();
			
			html = "";
			reader = conn.execute("select * from Survey where studentNO='" + Request["studentNO"] +"' and state = '进行中'");
			while( reader.Read())
			{
				html += "<a href='showSurvey.aspx?id=" + reader["id"] + "'>" + reader["title"] + "</a><br><br>";
			}
			survey.InnerHtml = html;
			reader.Close();
			// Put user code to initialize the page here
		}

		#region Web 窗体设计器生成的代码
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}

⌨️ 快捷键说明

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