using System; using System.Collections.Generic; using System.Text; using System.ComponentModel.DataAnnotations; namespace CertAuth.Domain { public class User_WD { [Key] [Display(Name = "User ID")] [StringLength(maximumLength: 250, ErrorMessage = "Field Length: Minimum: 8; Maximum 250", MinimumLength = 4)] [Required(ErrorMessage = "The User Id is Required")] //[Remote("Chk4Dups","user", ErrorMessage = "This User Id already exists")] public string UserID { get; set; } [Display(Name = "OID")] public string OID { get; set; } [Required] [Display(Name = "Last Name")] [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Minimum: 2; Maximum 50", MinimumLength = 2)] public string LastName { get; set; } [Required] [Display(Name = "First Name")] [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Minimum: 2; Maximum 50", MinimumLength = 2)] public string FirstName { get; set; } //[StringLength(MinimumLength =2, MaximumLength = 20, ErrorMessage = "Field Length: Minimum: 2 Maximum: 20")] [Required] [Display(Name = "User Type")] public string UserType { get; set; } [Display(Name = "User Type")] public string UsrTypeDesc { get; set; } //[StringLength(maximumLength: 20, ErrorMessage = "Field Length: Minimum: 2 Maximum: 20", MinimumLength = 2)] [Display(Name = "Organization")] public string OrganizationID { get; set; } [Display(Name = "Organization")] public string OrgDesc { get; set; } [StringLength(maximumLength: 250, ErrorMessage = "Field Length: Minimum: 8; Maximum 250", MinimumLength = 8)] [Display(Name = "Tag ID")] public string TagID { get; set; } [Display(Name = "Photo")] public string PhotoBLOB { get; set; } [Required] [Display(Name = "Security")] public string EmployeeSecurity { get; set; } [Display(Name ="Security")] public string SecurityDesc { get; set; } [DataType(DataType.Password)] [Display(Name = "Password")] [StringLength(maximumLength: 250, ErrorMessage = "Field Length: Minimum: 8; Maximum 250", MinimumLength = 8)] public string Passphrase { get; set; } [Required] //[StringLength(maximumLength: 20, ErrorMessage = "Field Length: Minimum: 2 Maximum: 20", MinimumLength = 2)] [Display(Name = "Status")] public string Status { get; set; } [Display(Name ="Status")] public string StatusDesc { get; set; } [Display(Name = "Last Update")] [DataType(DataType.DateTime)] public DateTime TimeStamp { get; set; } [Display(Name = "Name")] public string FullName { get { string fname = FirstName.Trim() + " " + LastName.Trim(); return fname; } } } public class User_VendrKey { [Key] [Display(Name = "User ID")] [StringLength(maximumLength: 250, ErrorMessage = "Field Length: Minimum: 8; Maximum 250", MinimumLength = 4)] [Required(ErrorMessage = "The User Id is Required")] //[Remote("Chk4Dups","user", ErrorMessage = "This User Id already exists")] public string UserID { get; set; } [Display(Name = "OID")] public string OID { get; set; } [Display(Name = "Vendor Key")] public int VendorKey { get; set; } [Required] [Display(Name = "Last Name")] [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Minimum: 2; Maximum 50", MinimumLength = 2)] public string LastName { get; set; } [Required] [Display(Name = "First Name")] [StringLength(maximumLength: 50, ErrorMessage = "Field Length: Minimum: 2; Maximum 50", MinimumLength = 2)] public string FirstName { get; set; } //[StringLength(MinimumLength =2, MaximumLength = 20, ErrorMessage = "Field Length: Minimum: 2 Maximum: 20")] [Required] [Display(Name = "User Type")] public string UserType { get; set; } [Display(Name = "User Type")] public string UsrTypeDesc { get; set; } //[StringLength(maximumLength: 20, ErrorMessage = "Field Length: Minimum: 2 Maximum: 20", MinimumLength = 2)] [Display(Name = "Organization")] public string OrganizationID { get; set; } [Display(Name = "Organization")] public string OrgDesc { get; set; } [StringLength(maximumLength: 250, ErrorMessage = "Field Length: Minimum: 8; Maximum 250", MinimumLength = 8)] [Display(Name = "Tag ID")] public string TagID { get; set; } [Display(Name = "Photo")] public string PhotoBLOB { get; set; } [Required] [Display(Name = "Security")] public string EmployeeSecurity { get; set; } [Display(Name = "Security")] public string SecurityDesc { get; set; } [DataType(DataType.Password)] [Display(Name = "Password")] [StringLength(maximumLength: 250, ErrorMessage = "Field Length: Minimum: 8; Maximum 250", MinimumLength = 8)] public string Passphrase { get; set; } [Required] //[StringLength(maximumLength: 20, ErrorMessage = "Field Length: Minimum: 2 Maximum: 20", MinimumLength = 2)] [Display(Name = "Status")] public string Status { get; set; } [Display(Name = "Status")] public string StatusDesc { get; set; } [Display(Name = "Last Update")] [DataType(DataType.DateTime)] public DateTime TimeStamp { get; set; } [Display(Name = "Name")] public string FullName { get { string fname = FirstName.Trim() + " " + LastName.Trim(); return fname; } } } }