예제 #1
0
 /// <summary>
 /// 将ADMIN类转换为Admin类,a_id在这里没管,因为无意义。
 /// </summary>
 /// <param name="admin">要转换的ADMIN类对象</param>
 /// <returns>等价的Admin对象</returns>
 public Admin ConvertADMINToAdmin(ADMIN admin)
 {
     Admin result = new Admin();
     result.User_id = admin.admin_id;
     result.User_account = admin.admin_account;
     result.User_password = admin.admin_password;
     result.User_last_login_date = admin.admin_last_login_time;
     result.User_last_login_ip = admin.admin_last_login_ip;
     result.User_nickname = admin.admin_nickname;
     result.User_timestamp = admin.admin_timestamp;
     return result;
 }
예제 #2
0
 /// <summary>
 /// 将ADMIN对象转换为Admin对象,a_id这里没管因为没意义
 /// </summary>
 /// <param name="admin">要转换的Admin对象</param>
 /// <returns>转换后的ADMIN对象</returns>
 public ADMIN ConvertAdminToADMIN(Admin admin)
 {
     /*数据库里就这5个*/
     ADMIN result = new ADMIN();
     result.admin_id = admin.User_id;
     result.admin_account = admin.User_account;
     result.admin_password = admin.User_password;
     result.admin_last_login_time = admin.User_last_login_date;
     result.admin_last_login_ip = admin.User_last_login_ip;
     result.admin_nickname = admin.User_nickname;
     result.admin_timestamp = admin.User_timestamp;
     return result;
 }
예제 #3
0
 /// <summary>
 /// 创建新的 ADMIN 对象。
 /// </summary>
 /// <param name="a_id">a_id 属性的初始值。</param>
 /// <param name="admin_id">admin_id 属性的初始值。</param>
 /// <param name="admin_account">admin_account 属性的初始值。</param>
 /// <param name="admin_password">admin_password 属性的初始值。</param>
 /// <param name="admin_last_login_time">admin_last_login_time 属性的初始值。</param>
 /// <param name="admin_last_login_ip">admin_last_login_ip 属性的初始值。</param>
 /// <param name="admin_nickname">admin_nickname 属性的初始值。</param>
 /// <param name="admin_timestamp">admin_timestamp 属性的初始值。</param>
 public static ADMIN CreateADMIN(global::System.Int64 a_id, global::System.Guid admin_id, global::System.String admin_account, global::System.String admin_password, global::System.DateTime admin_last_login_time, global::System.String admin_last_login_ip, global::System.String admin_nickname, global::System.Byte[] admin_timestamp)
 {
     ADMIN aDMIN = new ADMIN();
     aDMIN.a_id = a_id;
     aDMIN.admin_id = admin_id;
     aDMIN.admin_account = admin_account;
     aDMIN.admin_password = admin_password;
     aDMIN.admin_last_login_time = admin_last_login_time;
     aDMIN.admin_last_login_ip = admin_last_login_ip;
     aDMIN.admin_nickname = admin_nickname;
     aDMIN.admin_timestamp = admin_timestamp;
     return aDMIN;
 }
예제 #4
0
 /// <summary>
 /// 用于向 ADMIN EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToADMIN(ADMIN aDMIN)
 {
     base.AddObject("ADMIN", aDMIN);
 }