예제 #1
0
        // 建立一管理者
        public void Create(int MemberID, string MemberAccount, string MemberPassword, string NickName, int MemberLevel, int?UpMemberID = null)
        {
            t_Member ta = new t_Member();

            ta.MemberId       = MemberID;
            ta.MemberAccount  = MemberAccount;
            ta.MemberPassword = HashPassword(MemberPassword);
            ta.NickName       = NickName;
            ta.UpMemberID     = UpMemberID;
            ta.MemberLevelId  = MemberLevel;
            cae.t_Member.Add(ta);
        }
예제 #2
0
        // 更新密碼
        public void UpdatePassword(string MemberAccount, string MemberPassword)
        {
            t_Member tm = cae.t_Member.FirstOrDefault(m => m.MemberAccount == MemberAccount);

            tm.MemberPassword = HashPassword(MemberPassword);
        }