Exemplo n.º 1
0
        public string Register(Member member)
        {
            var getMember = MemberRepo.GetMemberByAcc(member.m_account);

            if (getMember != null)
            {
                return("帳號已存在");
            }
            var getMemberByEmail = MemberRepo.GetMemberByEmail(member.m_email);

            if (getMemberByEmail != null)
            {
                return("此信箱已註冊過");
            }
            member.m_password = HashPassword(member.m_password);
            return(MemberRepo.Register(member));
        }