/// <summary> /// 会员登录 /// </summary> /// <param name="p_LoginCode">登录代码(会员卡号、会员编号、手机号)</param> /// <param name="p_Password">登录密码</param> /// <param name="p_MemberLoginType">登录方式</param> /// <returns>会员对象(成功返回实例,失败返回null)</returns> public static BGRBMember LoginMember(string p_LoginCode, string p_Password, MemberLoginType p_MemberLoginType) { BGRBMember m_MemberResult = null; m_MemberResult = GetMemberByLoginCodeAndPassword(p_LoginCode, p_Password, p_MemberLoginType); if (m_MemberResult != null) { m_MemberResult.LastLoginTime = DateTime.Now; m_MemberResult.LoginCount++; m_MemberResult.SaveData(); } return(m_MemberResult); }
/// <summary> /// 重置用户的密码 /// </summary> /// <param name="p_LoginCode">登录代码(会员卡号、会员编号、手机号)</param> /// <param name="p_OldPassword">旧密码</param> /// <param name="p_NewPassword">新密码</param> /// <param name="p_MemberLoginType">登录方式</param> /// <returns>是否重置成功</returns> public static bool ResetMemberPassword(string p_LoginCode, string p_OldPassword, string p_NewPassword, MemberLoginType p_MemberLoginType) { bool m_Result = true; BGRBMember m_Member = GetMemberByLoginCodeAndPassword(p_LoginCode, p_OldPassword, p_MemberLoginType); if (m_Member != null) { m_Member.Password = p_NewPassword; m_Member.SaveData(); } else { m_Result = false; } return(m_Result); }