/// <summary> /// 将BLL层传递过来的UI.User对象转换为Enitity映射中的USER对象,所有属性拷贝 /// </summary> /// <param name="user">UI.User对象,由BLL层传递</param> /// <returns>转换完毕的USER对象</returns> private USER ConvertUserToUSER(User user) { USER ResultUSER = new USER(); ResultUSER.u_id = user.U_id; ResultUSER.user_id = user.User_id; ResultUSER.user_head = user.User_head; ResultUSER.user_account = user.User_account; ResultUSER.user_introduction = user.User_introduction; ResultUSER.user_isChecked = user.User_isChecked; ResultUSER.user_isDeleted = user.User_isDeleted; ResultUSER.user_last_login_ip = user.User_last_login_ip; ResultUSER.user_last_login_time = user.User_last_login_date; ResultUSER.user_money = user.User_money; ResultUSER.user_nickname = user.User_nickname; ResultUSER.user_password = user.User_password; ResultUSER.user_sex = user.User_sex; ResultUSER.user_timestamp = user.User_timestamp; ResultUSER.user_verify_code = user.User_verify_code; return ResultUSER; }
/// <summary> /// 用于向 USER EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet<T> 属性的 .Add 方法。 /// </summary> public void AddToUSER(USER uSER) { base.AddObject("USER", uSER); }
/// <summary> /// 将DAL的USER类转换成BLL的User类 /// </summary> /// <param name="user">要转换的USER类</param> /// <returns>转换后对应的user类</returns> private User ConvertUSERToUser(USER user) { User ResultUSER = new User(); //这行代码不要的原因是因为U_id无意义啊! ResultUSER.U_id = user.u_id; ResultUSER.User_id = user.user_id; ResultUSER.User_head = user.user_head; ResultUSER.User_account = user.user_account; ResultUSER.User_introduction = user.user_introduction; ResultUSER.User_isChecked = user.user_isChecked; ResultUSER.User_isDeleted = user.user_isDeleted; ResultUSER.User_last_login_ip = user.user_last_login_ip; ResultUSER.User_last_login_date = user.user_last_login_time; ResultUSER.User_money = user.user_money; ResultUSER.User_nickname = user.user_nickname; ResultUSER.User_password = user.user_password; ResultUSER.User_sex = user.user_sex; ResultUSER.User_timestamp = user.user_timestamp; ResultUSER.User_verify_code = user.user_verify_code; return ResultUSER; }
/// <summary> /// 创建新的 USER 对象。 /// </summary> /// <param name="u_id">u_id 属性的初始值。</param> /// <param name="user_id">user_id 属性的初始值。</param> /// <param name="user_account">user_account 属性的初始值。</param> /// <param name="user_password">user_password 属性的初始值。</param> /// <param name="user_nickname">user_nickname 属性的初始值。</param> /// <param name="user_sex">user_sex 属性的初始值。</param> /// <param name="user_head">user_head 属性的初始值。</param> /// <param name="user_isDeleted">user_isDeleted 属性的初始值。</param> /// <param name="user_isChecked">user_isChecked 属性的初始值。</param> /// <param name="user_last_login_time">user_last_login_time 属性的初始值。</param> /// <param name="user_last_login_ip">user_last_login_ip 属性的初始值。</param> /// <param name="user_money">user_money 属性的初始值。</param> /// <param name="user_introduction">user_introduction 属性的初始值。</param> /// <param name="user_timestamp">user_timestamp 属性的初始值。</param> /// <param name="user_verify_code">user_verify_code 属性的初始值。</param> public static USER CreateUSER(global::System.Int64 u_id, global::System.Guid user_id, global::System.String user_account, global::System.String user_password, global::System.String user_nickname, global::System.Boolean user_sex, global::System.String user_head, global::System.Boolean user_isDeleted, global::System.Boolean user_isChecked, global::System.DateTime user_last_login_time, global::System.String user_last_login_ip, global::System.Double user_money, global::System.String user_introduction, global::System.Byte[] user_timestamp, global::System.Guid user_verify_code) { USER uSER = new USER(); uSER.u_id = u_id; uSER.user_id = user_id; uSER.user_account = user_account; uSER.user_password = user_password; uSER.user_nickname = user_nickname; uSER.user_sex = user_sex; uSER.user_head = user_head; uSER.user_isDeleted = user_isDeleted; uSER.user_isChecked = user_isChecked; uSER.user_last_login_time = user_last_login_time; uSER.user_last_login_ip = user_last_login_ip; uSER.user_money = user_money; uSER.user_introduction = user_introduction; uSER.user_timestamp = user_timestamp; uSER.user_verify_code = user_verify_code; return uSER; }