public static void UpdateUserInfo(string _user_id, string _current_password, string _new_password, string _user_name, string _email, string _address, string _phone, string _ym, string _website) { UserRow objUser; using (DFISYS.User.Db.MainDB objUserDB = new DFISYS.User.Db.MainDB()) { objUser = objUserDB.UserCollection.GetByPrimaryKey(_user_id); } if (objUser != null) { objUser.User_Address = _address != null ? _address : ""; objUser.User_Email = _email != null ? _email : ""; objUser.User_Im = _ym; objUser.User_Name = _user_name; objUser.User_PhoneNum = _phone; objUser.User_Website = _website; if (_current_password != null && _new_password != null) { if (objUser.User_Pwd.Trim() == FormsAuthentication.HashPasswordForStoringInConfigFile(_current_password.Trim(), "MD5") && _new_password.Trim() != "") { objUser.User_Pwd = FormsAuthentication.HashPasswordForStoringInConfigFile(_new_password.Trim(), "MD5"); } } using (DFISYS.User.Db.MainDB objUserDB = new DFISYS.User.Db.MainDB()) { objUserDB.UserCollection.Update(objUser); } //Cập nhật thời gian thay đổi pass lần cuối cùng ChannelUsers.UpdateLastChanged(_user_id, FormsAuthentication.HashPasswordForStoringInConfigFile(_new_password.Trim(), "MD5")); } }
protected void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here if (Page.User.Identity.IsAuthenticated) { // lbtLogout.Attributes.Add("style", "color:#fff;"); string key = Page.User.Identity.Name + "_Full"; if (Session[key] == null) { using (DFISYS.User.Db.MainDB db = new DFISYS.User.Db.MainDB()) { UserRow row = db.UserCollection.GetByPrimaryKey(Page.User.Identity.Name.Trim()); if (row != null) { Session[key] = row.User_Name; } } } ltrUser.Text = String.Format("{0}", Session[key] != "" ? Session[key].ToString() : Page.User.Identity.Name); } }
//public DataTable Searching(string StrCol1, string StrCol2, string StrCmp, DataTable Dt) { // StrProcess ObjStr = new StrProcess(); // DataTable DTable = new DataTable("Unknown"); // DTable = Dt.Clone(); // if (Dt.Columns.Contains(StrCol1) && Dt.Columns.Contains(StrCol2)) { // foreach (DataRow Dr in Dt.Rows) { // if (ObjStr.IsSubString(ObjStr.StandNonUnicode(Dr[StrCol1].ToString()), ObjStr.StandNonUnicode(StrCmp)) || ObjStr.IsSubString(ObjStr.StandNonUnicode(Dr[StrCol2].ToString()), ObjStr.StandNonUnicode(StrCmp))) { DTable.ImportRow(Dr); } // } // } // else DTable = null; // return DTable; //} public UserCollection_Base(MainDB db) { _db = db; }
public Box_Permission_Base(MainDB db) { _db = db; }
public Channel_UserCollection_Base(MainDB db) { _db = db; }
public Role_PermissionCollection_Base(MainDB db) { _db = db; }
internal User_CategoryCollection(MainDB db) : base(db) { // EMPTY }
internal RoleCollection(MainDB db) : base(db) { // EMPTY }
public static UserRow GetUserInfo(string _user_id) { using (DFISYS.User.Db.MainDB objUserDB = new DFISYS.User.Db.MainDB()) { return(objUserDB.UserCollection.GetByPrimaryKey(_user_id)); } }
internal Box_Permission(MainDB db) : base(db) { // EMPTY }
internal Channel_UserCollection(MainDB db) : base(db) { // EMPTY }
internal UserCollection(MainDB db) : base(db) { // EMPTY }
public RoleCollection_Base(MainDB db) { _db = db; }
public StoreProcedure(MainDB db) { _db = db; }
public User_CategoryCollection_Base(MainDB db) { _db = db; }
public User_PermissionCollection_Base(MainDB db) { _db = db; }
internal User_PermissionCollection(MainDB db) : base(db) { // EMPTY }