Exemplo n.º 1
0
 private UserEmployeeModel ConvertFromDB(UserEmployeeDetail dbUser)
 {
     if (dbUser == null) return null;
     return new UserEmployeeModel
     {
         Id = dbUser.Id,
         EmployeeNumber = dbUser.EmployeeNumber,
         Name = dbUser.Name,
         Email = dbUser.Email,
         Phone = dbUser.Phone,
     };
 }
Exemplo n.º 2
0
 /// <summary>
 /// 用于向 UserEmployeeDetails EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToUserEmployeeDetails(UserEmployeeDetail userEmployeeDetail)
 {
     base.AddObject("UserEmployeeDetails", userEmployeeDetail);
 }
Exemplo n.º 3
0
 private UserEmployeeModel ConvertFromDB(UserEmployee dbUser , UserEmployeeDetail dbUserDetail)
 {
     if (dbUser == null || dbUserDetail==null) return null;
     return new UserEmployeeModel
     {
         Id = dbUser.Id,
         EmployeeNumber = dbUser.EmployeeNumber,
         Name = dbUserDetail.Name,
         Email = dbUserDetail.Email,
         Phone = dbUserDetail.Phone,
         IsAvailable = dbUser.IsAvailable,
         IsChecker = dbUser.IsChecker,
         IsManager = dbUser.IsManager,
         DepartmentId = dbUser.DepartmentId,
         LastLoginTime = dbUser.LastLoginTime
     };
 }
Exemplo n.º 4
0
 /// <summary>
 /// 创建新的 UserEmployeeDetail 对象。
 /// </summary>
 /// <param name="id">Id 属性的初始值。</param>
 /// <param name="employeeNumber">EmployeeNumber 属性的初始值。</param>
 /// <param name="name">Name 属性的初始值。</param>
 /// <param name="email">Email 属性的初始值。</param>
 public static UserEmployeeDetail CreateUserEmployeeDetail(global::System.Int32 id, global::System.Int32 employeeNumber, global::System.String name, global::System.String email)
 {
     UserEmployeeDetail userEmployeeDetail = new UserEmployeeDetail();
     userEmployeeDetail.Id = id;
     userEmployeeDetail.EmployeeNumber = employeeNumber;
     userEmployeeDetail.Name = name;
     userEmployeeDetail.Email = email;
     return userEmployeeDetail;
 }