public void ActiveEmail(Member member, int Status) { DB_Service.Attach<Member>(member); member.Status = Status; DB_Service.Commit(); SetLoginCookie(member); }
public Member_Action Create(Member member, int memberAction, string description) { Member_Action member_Action = new Member_Action() { MemberID = member.MemberID, ActionType = memberAction, AddTime = DateTime.Now, Description = description, IP = HttpHelper.IP }; DB_Service.Add<Member_Action>(member_Action); DB_Service.Commit(); return member_Action; }
public Member Create(RegisterModel model) { Member mb = new Member(); mb.Email = model.Email; mb.NickName = model.NickName; mb.OpenID = model.OpenID; mb.OpenType = model.OpenType; mb.Status = (int)MemberStatus.Registered;//注册未激活,0为禁用 mb.Password = CheckHelper.StrToMd5(model.Password); mb.GroupID = 1; mb.AddTime = DateTime.Now; mb.LastTime = DateTime.Now; mb.AddIP = HttpHelper.IP; mb.LastIP = HttpHelper.IP; mb.LoginCount = 1; DB_Service.Add<Member>(mb); DB_Service.Commit(); return mb; }
public Member Create(DetailsModel model) { Member member = new Member(); member.Email = model.Email; member.NickName = model.NickName; member.AvtarUrl = model.AvtarUrl; member.GroupID = model.GroupID; member.Password = CheckHelper.StrToMd5(model.Password); member.Status = 1;//注册未激活,0为禁用 member.AddTime = DateTime.Now; member.LastTime = DateTime.Now; member.AddIP = HttpHelper.IP; member.LastIP = HttpHelper.IP; member.Member_Profile = new Member_Profile(); member.Member_Profile.Borthday = model.Borthday; member.Member_Profile.CityCode = model.CityCode; member.Member_Profile.Description = model.Description; member.Member_Profile.Sex = model.Sex; DB_Service.Add<Member>(member); DB_Service.Commit(); return member; }
public void SetLoginCookie(Member member) { CookieHelper.LoginCookieSave(member.MemberID.ToString(), member.Email, member.NickName, member.AvtarUrl, member.GroupID.ToString(), member.Status.ToString(), member.Password, "1"); }
public void ResetPassword(Member member, string newpassword) { DB_Service.Attach<Member>(member); member.Password = CheckHelper.StrToMd5(newpassword); DB_Service.Commit(); }