modulebase.cs

来自「《C#数据库项目案例导航》一书的配套光盘」· CS 代码 · 共 63 行

CS
63
字号
using System;
using System.Web;
using System.Web.UI;

namespace KhfwWeb
{
	/// <summary>
	/// ModuleBase 的摘要说明。
	/// </summary>
	public class ModuleBase:System.Web.UI.UserControl 
	{
		public ModuleBase()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}

		private String basePathPrefix;
		private bool authenticated;

		/// <value>
		///     Property PathPrefix is used to get or set the file path prefix to be used by the control.
		///     <remarks> 
		///         Sets the value PathPrefix. 
		///         Gets the value PathPrefix. 
		///     </remarks>
		/// </value>
		
		public String PathPrefix
		{
			get
			{
				if (null == basePathPrefix && HttpContext.Current != null)
				{
					basePathPrefix = PageBase.UrlBase;
				}
            
				return basePathPrefix;
			}
			set
			{
				basePathPrefix = value;
			}
		}
		//验证用户身份
		public bool Authenticate(string name,string pwd)
		{
			authenticated= PageBase.CheckUser(name,pwd);

			return authenticated;
			
		}
		public String UserType
		{ 
			get
			{
				return PageBase.UserType;
			}
		}
	}
}

⌨️ 快捷键说明

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