Ejemplo n.º 1
0
 private UserAdminModel ConvertFromDB(UserAdmin dbAdmin)
 {
     if (dbAdmin == null) return null;
     return new UserAdminModel
     {
         Id = dbAdmin.Id,
         EmployeeNumber = dbAdmin.EmployeeNumber,
         Username = dbAdmin.Username,
         Password = dbAdmin.Password,
         LastLoginTime = dbAdmin.LastLoginTime
     };
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 用于向 UserAdmins EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToUserAdmins(UserAdmin userAdmin)
 {
     base.AddObject("UserAdmins", userAdmin);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 创建新的 UserAdmin 对象。
 /// </summary>
 /// <param name="id">Id 属性的初始值。</param>
 /// <param name="employeeNumber">EmployeeNumber 属性的初始值。</param>
 /// <param name="username">Username 属性的初始值。</param>
 /// <param name="password">Password 属性的初始值。</param>
 public static UserAdmin CreateUserAdmin(global::System.Int32 id, global::System.Int32 employeeNumber, global::System.String username, global::System.String password)
 {
     UserAdmin userAdmin = new UserAdmin();
     userAdmin.Id = id;
     userAdmin.EmployeeNumber = employeeNumber;
     userAdmin.Username = username;
     userAdmin.Password = password;
     return userAdmin;
 }