1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.Linq;
- using System.Text;
- namespace EMIS.ViewModel.SystemView
- {
- public class RegistView
- {
- public Guid? UserID { get; set; }
- /// <summary>
- /// 证件类型
- /// </summary>
- [Required]
- [DisplayName("证件类型")]
- public int? CertificatesType { get; set; }
- /// <summary>
- /// 证件号码
- /// </summary>
- [Required]
- [DisplayName("证件号码")]
- public string LoginID { get; set; }
- [Required(ErrorMessage = "请输入密码。")]
- [DataType(DataType.Password)]
- [DisplayName("密码")]
- //[StringLength(50, ErrorMessage = "密码长度不能小于6位", MinimumLength = 6)]
- [RegularExpression(@"^(?=.*[0-9])(?=.*[a-zA-Z]).{6,}$", ErrorMessage = "密码必须包含英文、数字,且长度大于等于6位")]
- public string PCode { get; set; }
- [Required(ErrorMessage = "请再次输入密码。")]
- [DisplayName("密码确认")]
- [DataType(DataType.Password)]
- public string CPCode { get; set; }
- /// <summary>
- /// 姓名
- /// </summary>
- [Required]
- [DisplayName("姓名")]
- public string UserName { get; set; }
- /// <summary>
- /// 移动电话
- /// </summary>
- [Required]
- [RegularExpression(@"^[1][0-9]{10}$", ErrorMessage = "联系电话必须是11位数字")]
- [DisplayName("联系电话")]
- public string Mobile { get; set; }
- /// <summary>
- /// 考试校区
- /// </summary>
- [Required]
- [DisplayName("考试校区")]
- public int SchoolAreaID { get; set; }
- /// <summary>
- /// 照片
- /// </summary>
- [DisplayName("照片")]
- public string PhotoUrl { get; set; }
- /// <summary>
- /// 邮箱地址
- /// </summary>
- [Required]
- [DisplayName("邮箱地址")]
- [RegularExpression(@"^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$", ErrorMessage = "请输入正确的邮箱地址")]
- public string Email { get; set; }
- /// <summary>
- /// 性别
- /// </summary>
- [Required]
- [DisplayName("性别")]
- public int? Sex { get; set; }
- /// <summary>
- /// 性别
- /// </summary>
- [Required]
- [DisplayName("性别")]
- public string SexName { get; set; }
- /// <summary>
- /// 出生日期
- /// </summary>
- [Required]
- [DisplayName("出生日期")]
- [DataType(DataType.Date)]
- [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")]
- public DateTime? BirthDate { get; set; }
- /// <summary>
- /// 工作单位(或院校)
- /// </summary>
- [DisplayName("工作单位(或院校)")]
- public string WorkUnit { get; set; }
- }
- }
|