using System.ComponentModel.DataAnnotations;
using Yw.Auth;
namespace HStation.WinFrmUI
{
public class UserLoginViewModel
{
public UserLoginViewModel()
{
}
public UserLoginViewModel(Yw.Dto.UserLoginLogStandardDto rhs)
{
this.ID = rhs.ID;
this.CorpName = rhs.CorpName;
this.UserName = rhs.UserName;
this.LoginPlatform = rhs.LoginPlatform;
this.LoginTypeName = rhs.LoginTypeName;
this.LoginAccountName = rhs.LoginAccountName;
this.ProjectName = rhs.ProjectName;
this.SoftwareName = rhs.SoftwareName;
this.UserName = rhs.UserName;
switch (rhs.LoginOperation)
{
case eLoginOperation.LoginIn:
this.LoginOperation = "登录";
break;
case eLoginOperation.LoginOut:
this.LoginOperation = "登出";
break;
}
this.LoginIP = rhs.LoginIP;
this.LoginTime = rhs.LoginTime.ToString("yyyy-MM-dd HH:mm:ss");
this.Message = rhs.Message;
}
///
/// id
///
[Display(Name = "ID")]
public long ID { get; set; }
///
/// 客户名称
///
[Display(Name = "客户名称")]
public string CorpName { get; set; }
///
/// 用户名称
///
[Display(Name = "用户名称")]
public string UserName { get; set; }
///
/// 登录平台
///
[Display(Name = "登录平台")]
public eLoginPlatform LoginPlatform { get; set; }
///
/// 登录类型名称
///
[Display(Name = "登录类型")]
public string LoginTypeName { get; set; }
///
/// 账户名称
///
[Display(Name = "账户名称")]
public string LoginAccountName { get; set; }
///
/// 项目名称
///
[Display(Name = "项目名称")]
public string ProjectName { get; set; }
///
/// 软件名称
///
[Display(Name = "软件名称")]
public string SoftwareName { get; set; }
///
/// 登录操作
///
[Display(Name = "登录操作")]
public string LoginOperation { get; set; }
///
/// 登录IP
///
[Display(Name = "登录IP")]
public string LoginIP { get; set; }
///
/// 登录时间
///
[Display(Name = "登录时间")]
public string LoginTime { get; set; }
///
/// 登录信息
///
[Display(Name = "登录信息")]
public string Message { get; set; }
}
}