LogOnModel.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.Web;
  7. namespace EMIS.ViewModel.Account
  8. {
  9. public class LogOnModel
  10. {
  11. [Required]
  12. [Display(Name = "用户名")]
  13. public string UserName { get; set; }
  14. public string EncryptedUserName { get; set; }
  15. [Required]
  16. [DataType(DataType.Password)]
  17. [Display(Name = "密码")]
  18. public string Password { get; set; }
  19. [Display(Name = "记住我")]
  20. public bool RememberMe { get; set; }
  21. [Display(Name = "验证码")]
  22. public string VerifyCode { get; set; }
  23. public HttpSessionStateBase Session { get; set; }
  24. [Display(Name = "登录错误次数")]
  25. public int FailCount
  26. {
  27. get
  28. {
  29. int value = 0;
  30. if (Session != null)
  31. {
  32. value = (int)Session["FailCount"];
  33. }
  34. return value;
  35. }
  36. }
  37. }
  38. }