LogOnModel.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.AccountManage
  8. {
  9. public class LogOnModel
  10. {
  11. /// <summary>
  12. ///
  13. /// </summary>
  14. [Required]
  15. [Display(Name = "用户名")]
  16. public string UserName { get; set; }
  17. /// <summary>
  18. ///
  19. /// </summary>
  20. [Required]
  21. [DataType(DataType.Password)]
  22. [Display(Name = "密码")]
  23. public string Password { get; set; }
  24. /// <summary>
  25. ///
  26. /// </summary>
  27. [Display(Name = "记住我")]
  28. public bool RememberMe { get; set; }
  29. /// <summary>
  30. ///
  31. /// </summary>
  32. [Display(Name = "验证码")]
  33. public string VerifyCode { get; set; }
  34. /// <summary>
  35. ///
  36. /// </summary>
  37. public HttpSessionStateBase Session { get; set; }
  38. /// <summary>
  39. ///
  40. /// </summary>
  41. [Display(Name = "登录错误次数")]
  42. public int FailCount
  43. {
  44. get
  45. {
  46. int value = 0;
  47. if (Session != null)
  48. {
  49. value = (int)Session["FailCount"];
  50. }
  51. return value;
  52. }
  53. }
  54. }
  55. }