using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.SystemManage.UserManage
{
public class UserView
{
///
/// 主键ID
///
[DisplayName("主键ID")]
public Guid UserID { get; set; }
///
/// 用户名
///
[Required]
[DisplayName("用户名")]
[RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")]
public string LoginID { get; set; }
///
/// 姓名
///
[Required]
[DisplayName("姓名")]
public string Name { get; set; }
///
/// 性别
///
[DisplayName("性别")]
public int? SexID { get; set; }
///
/// 性别
///
[DisplayName("性别")]
public string SexName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString()).Where(x => x.Value == SexID).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 出生日期
///
[DisplayName("出生日期")]
[DataType(DataType.DateTime)]
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")]
public DateTime? BirthDate { get; set; }
///
/// 校区ID
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
public Guid? CampusID { get; set; }
///
/// 校区代码
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
public string CampusCode { get; set; }
///
/// 校区名称
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
public string CampusName { get; set; }
///
/// 院系所ID
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public Guid? CollegeID { get; set; }
///
/// 院系所代码
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
public string CollegeCode { get; set; }
///
/// 院系所
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public string CollegeName { get; set; }
///
/// 教研室ID
///
[DisplayName("教研室ID")]
public Guid? DepartmentID { get; set; }
///
/// 教研室代码
///
[DisplayName("教研室代码")]
public string DepartmentCode { get; set; }
///
/// 教研室
///
[DisplayName("教研室")]
public string DepartmentName { get; set; }
///
/// 角色ID
///
[DisplayName("角色ID")]
public Guid? RoleID { get; set; }
///
/// 角色序号
///
[DisplayName("角色序号")]
public int? RoleOrderNo { get; set; }
///
/// 角色名称
///
[DisplayName("角色名称")]
public string RoleName { get; set; }
///
/// 角色类型
///
[DisplayName("角色类型")]
public int? TypeID { get; set; }
///
/// 角色类型
///
[DisplayName("角色类型")]
public string TypeName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.SYS_RoleType.ToString()).Where(x => x.Value == TypeID).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 数据范围
///
[DisplayName("数据范围")]
public int? DataRange { get; set; }
///
/// 数据范围
///
[DisplayName("数据范围")]
public string DataRangeName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.SYS_DataRange.ToString()).Where(x => x.Value == DataRange).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 角色状态
///
[DisplayName("角色状态")]
public int? RoleStatus { get; set; }
///
/// 角色状态
///
[DisplayName("数据范围")]
public string RoleStatusName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.SYS_STATUS.ToString()).Where(x => x.Value == RoleStatus).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 备注
///
[DisplayName("备注")]
public string Remark { get; set; }
///
/// 帐号状态
///
[DisplayName("帐号状态")]
public Nullable RecordStatus { get; set; }
///
/// 帐号状态
///
[DisplayName("帐号状态")]
public string RecordStatusName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.SYS_STATUS.ToString()).Where(x => x.Value == RecordStatus).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 创建人
///
[DisplayName("创建人")]
public Nullable CreateUserID { get; set; }
///
/// 创建人
///
[DisplayName("创建人")]
public string CreateUserName { get; set; }
///
/// 创建时间
///
[DisplayName("创建时间")]
public Nullable CreateTime { get; set; }
///
/// 修改人
///
[DisplayName("修改人")]
public Nullable ModifyUserID { get; set; }
///
/// 修改人
///
[DisplayName("修改人")]
public string ModifyUserName { get; set; }
///
/// 修改时间
///
[DisplayName("修改时间")]
public Nullable ModifyTime { get; set; }
}
}