totalcount.aspx.cs

来自「为武汉市10多家人才网站量身订做的仿真面试版块」· CS 代码 · 共 94 行

CS
94
字号
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
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 System.Globalization;
namespace Job111
{
	/// <summary>
	/// TotalCount 的摘要说明。
	/// </summary>
	public class TotalCount : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.Label Label1;
		protected System.Web.UI.WebControls.Button Button2;
		protected System.Web.UI.WebControls.Label Label9;
		protected System.Web.UI.WebControls.Label Label7;
		protected System.Web.UI.WebControls.Label Label5;
		protected System.Web.UI.WebControls.Button Button1;
		private JobFairService.JobFairService jobSer= new Job111.JobFairService.JobFairService();
		private int JobFairID = 0;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			
			try
			{
				JobFairID = new State(this).JobFairID;
			}
			catch
			{
				JobFairID = 0;
			}
			if ( JobFairID == 0 )
			{
				return;
			}
			
			DataSet myds = null;
			try
			{
				myds = jobSer.CountMessage(JobFairID);
			}
			catch
			{
				return;
			}
			DateTime time = DateTime.Parse(myds.Tables[0].Rows[0]["Time"].ToString());
			string formatTime = time.ToString("yyyy-MM-dd",DateTimeFormatInfo.InvariantInfo);    //用规定的格式来显示时间 如:2004-04-30
			Label5.Text = "从" + formatTime + "  至  " + System.DateTime.Now.ToString("yyyy-MM-dd",DateTimeFormatInfo.InvariantInfo);
			Label7.Text = "共发送" + myds.Tables[0].Rows[0]["NoteCount"].ToString() + "条面试通知";
			Label9.Text = "共有" + myds.Tables[0].Rows[0]["QueueCount"].ToString() + "名求职者参与交流";
		}

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

		}
		#endregion

		private void Button1_Click(object sender, System.EventArgs e)
		{
			JavaScript.CloseWindow(this);
		}

		private void Button2_Click(object sender, System.EventArgs e)
		{
			jobSer.ClearCount(new State(this).JobFairID);
		}
	}
}

⌨️ 快捷键说明

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