yangyin
2024-08-14 5b3c122613f3b1574a0a8a8546f0a57dadb167d3
WinFrmUI/HStation.WinFrmUI.Organize.Core/01-EmployeeViewModel/EmployeeViewModel.cs
@@ -1,40 +1,110 @@
using HStation.Dto;
using HStation.Vmo;
namespace HStation.WinFrmUI.Organize
{
    public class EmployeeViewModel : EmployeeMainDto
    public class EmployeeViewModel : EmployeeMain
    {
        public EmployeeViewModel()
        { }
        public EmployeeViewModel(EmployeeMainDto rhs)
        public EmployeeViewModel(EmployeeMain rhs)
        {
            this.ID = rhs.ID;
            this.ErpCode = rhs.ErpCode;//编号
            this.ProfilePhotoFilePath = rhs.ProfilePhotoFilePath;//头像
            this.PositonName = rhs.PositonName;//职位名
            this.FirstName = rhs.FirstName;//姓名(英文就是第一个名)
            this.LastName = rhs.LastName;//姓名(英文名,才会用到)
            this.StaffStatus = rhs.StaffStatus;//在职状态 1 在职 0 离职
            this.FirstName = rhs.FirstName; //姓名(英文就是第一个名)
            this.LastName = rhs.LastName;//姓名(英文就是最后的名)
            //this.StaffStatus = rhs.StaffStatus; //在职状态1在职 0离职
            this.Telephone = rhs.Telephone;//手机号
            this.DrawSignal = rhs.DrawSignal;//签名
            this.Email = rhs.Email;//电子邮箱
            this.DrawSignal = rhs.DrawSignal;//签名
            this.User = rhs.User;//登录用户
            this.AddTime = rhs.AddTime;//添加时间
            this.AddUser = rhs.AddUser;
            this.RequirePasswordReset = rhs.RequirePasswordReset;//登录时是否必须重置密码
            this.LastModifyUser = rhs.LastModifyUser;
            this.AddUser = rhs.AddUser;//添加用户
            this.LastModifyTime = rhs.LastModifyTime;//最后修改时间
            this.Paras = rhs.Paras;
            this.StaffStatusLabel = this.StaffStatus == 0 ? "离职" : "在职";
            this.RequirePasswordResetLabel = this.RequirePasswordReset == 0 ? "否" : "是";
            this.LastModifyUser = rhs.LastModifyUser;//最后修改用户
            this.SortCode = rhs.SortCode;//排序码
            this.StaffStatus = rhs.StaffStatus == eJobType.exist ? "离职" : "在职";
            this.RequirePasswordReset = rhs.RequirePasswordReset == 0 ? "否" : "是";
            /// <summary>
            /// 0 男  1女
            /// </summary>
        }
        public string StaffStatusLabel { get; set; }
        public string RequirePasswordResetLabel { get; set; }
         /// <summary>
         /// ID
         /// </summary>
         public long ID { get; set; }
         /// <summary>
         /// 编号
         /// </summary>
         public string ErpCode { get; set; }
         /// <summary>
         /// 头像
         /// </summary>
         public string ProfilePhotoFilePath { get; set; }
         /// <summary>
         /// 职位名
         /// </summary>
         public string PositonName { get; set; }
         /// <summary>
         /// 姓名(英文就是第一个名)
         /// </summary>
         public string FirstName { get; set; }
         /// <summary>
         /// 在职状态 1在职 0离职
         /// </summary>
         public string StaffStatus  { get; set; }
         /// <summary>
         /// 手机号
         /// </summary>
         public string Telephone {  get; set; }
         /// <summary>
         /// 姓名(英文名,才会用到)
         /// </summary>
         public string LastName { get; set; }
         /// <summary>
         /// 登录时是否必须重置密码
         /// </summary>
         public string RequirePasswordReset { get; set; }
         /// <summary>
         /// 图纸上的签名
         /// </summary>
         public string DrawSignal { get; set; }
         /// <summary>
         /// 电子邮箱
         /// </summary>
         public string Email { get; set; }
         /// <summary>
         /// 登录用户
         /// </summary>
         public Yw.Vmo.User User { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddTime { get; set; }
        /// <summary>
        /// 添加用户
        /// </summary>
        public string AddUser { get; set; }
        /// <summary>
        /// 最后修改用户
        /// </summary>
        public string LastModifyUser { get; set; }
        /// <summary>
        /// 最后修改时间
        /// </summary>
        public string LastModifyTime { get; set; }
        /// <summary>
        /// 排序码
        /// </summary>
        public int SortCode { get; set; }
    }
}