📄 st_identity.cs
字号:
using System;
using System.Security.Principal;
using System.Collections;
using System.Globalization;
using Microsoft.ApplicationBlocks.Data;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
namespace STGROUP.ST_CourseBiz
{
/// <summary>
/// ST_Identity 的摘要说明。
/// </summary>
public class ST_Identity : IIdentity
{
protected string _name;
protected string _authenticationType;
protected int _companyID=0;
protected string _companyName="TopGene";
protected short _companyType=0;
public ST_Identity(string name,string authenticationType,int companyID,string companyName,short companyType)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
if (authenticationType == null)
{
_authenticationType = "TopGene";
}
else
{
_authenticationType = authenticationType;
}
_name=name;
_companyID=companyID;
_companyName=companyName;
_companyType=companyType;
}
#region IIdentity 成员
/// <summary>
/// 只读属性,返回用户是否通过了验证
/// </summary>
public bool IsAuthenticated
{
get
{
return !this._name.Equals("");
}
}
/// <summary>
/// 只读属性,返回用户名
/// </summary>
public string Name
{
get
{
return _name;
}
}
/// <summary>
/// 只读属性,返回身份验证类型
/// </summary>
public string AuthenticationType
{
get
{
return _authenticationType;
}
}
/// <summary>
/// 只读属性,返回User表中CompanyID属性
/// </summary>
public int CompanyID
{
get{return _companyID;}
}
/// <summary>
/// 只读属性,返回User表中CompanyName属性
/// </summary>
public string CompanyName
{
get{return _companyName;}
set{ _companyName = value;}
}
/// <summary>
/// 只读属性,返回User表中CompanyType属性
/// </summary>
public short CompanyType
{
get{return _companyType;}
set{ _companyType = value;}
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -