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

📄 tasksummary.ascx.cs

📁 该项目管理系统可对项目的过程进行管理和控制
💻 CS
字号:
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Collections.Specialized;

namespace BronzeMonkey.GeneralTaskList
{
	/// <summary>
	///		Summary description for TaskSummary.
	/// </summary>
	public abstract class TaskSummary : System.Web.UI.UserControl
	{
		protected System.Web.UI.WebControls.Label lblSubject;
		protected System.Web.UI.WebControls.Label lblLastModifiedOn;

		private string _Subject = String.Empty;
		private DateTime _CreatedOn = DateTime.Now;
		private DateTime _LastModified = DateTime.Now;
    private string _LastModifiedBy = String.Empty;
		private string _CategoryIconUrl = String.Empty;

		protected System.Web.UI.WebControls.Label lblStatus;
		protected System.Web.UI.WebControls.Image imgCategoryIcon;
    protected System.Web.UI.WebControls.Label lblLastModifiedBy;
		private string _Status = "Open";

		private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
		}

		/// <summary>
		/// The Task Subject
		/// </summary>
		public string Subject
		{
			get { return _Subject; }
			set { _Subject = Server.HtmlDecode(value); lblSubject.Text = _Subject; }
		}

		/// <summary>
		/// The Date/Time the Task was created
		/// </summary>
		public DateTime CreatedOn
		{
			get { return _CreatedOn; }
			set 
			{ 
				_CreatedOn = value; 
			}
		}

		/// <summary>
		/// The Date/Time the Task was last modified
		/// </summary>
		public DateTime LastModified
		{
			get { return _LastModified; }
			set 
			{ 
				_LastModified = value; 
				if (value.Date == DateTime.Today.Date)
					lblLastModifiedOn.Text = "Today @ " + value.ToShortTimeString();
				else
					lblLastModifiedOn.Text = value.ToString("MM/dd/yy hh:mm"); 
			}
		}

    public string LastModifiedBy
    {
      get { return _LastModifiedBy; }
      set
      {
        _LastModifiedBy = value;
        lblLastModifiedBy.Text = value;
      }
    }

		public string Status
		{
			get { return _Status; }
			set
			{
				string FontStartTag = String.Empty;

				_Status = value;
				lblStatus.Text = _Status;
				// put some code here to grab the font tags out of session - get the font tags when we call
				// tasklist.GetStatusList'
				NameValueCollection StatusFontFlags = (NameValueCollection)Session["StatusFontFlagsCollection"];

				if (StatusFontFlags == null) return;

				FontStartTag = StatusFontFlags.Get(value);

				if (FontStartTag != null)
					lblSubject.Text = FontStartTag + this.Subject + "</Font>";
			}
		}

		public string CategoryIconUrl
		{
			get { return _CategoryIconUrl; }
			set { _CategoryIconUrl = value; imgCategoryIcon.ImageUrl = value; }
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		///		Required method for Designer support - do not modify
		///		the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}

⌨️ 快捷键说明

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