public string SignIn(CMember m, CNotice c) { List <CMember> SELECTMember = CMemberFactory.fn會員查詢(); CMember member = SELECTMember.FirstOrDefault(n => n.fAccount == m.fAccount); var data = ""; if (member == null) { string str = m.fPassword + "QAQ"; var md5 = CMemberFactory.MD5驗證碼新增(str); m.fMoneyPoint = 100; m.fPhoto = "../Image/MemberImage/Member.jpg"; m.fRegisterDateTime = DateTime.UtcNow.AddHours(08); m.fLastLoginDateTime = DateTime.UtcNow.AddHours(08); m.fIsVIP = false; m.fIsBanned = false; m.fThePasswordURL = md5; m.fTheAddress = m.fCity + m.fTown + m.fTheAddress; CMemberFactory.fn會員新增(m); //會員註冊訊息新增---------------------------------------------------------------\\ List <CMember> SELECTMember2 = CMemberFactory.fn會員查詢(); CMember member2 = SELECTMember2.FirstOrDefault(n => n.fAccount == m.fAccount); c.fNoticeDatetime = DateTime.UtcNow.AddHours(08); c.fNoticeContent = m.fFirstName + m.fLastName + "歡迎加入Notedge!"; c.fCategoryType = "系統"; c.fLink = "我是超連結"; c.fMemberId = member2.fMemberId; CNoticeFactory.fn通知訊息新增(member2, c); //會員註冊新增未分類筆記----------------------------------------------------------\\ CNoteFolderFactory.fn建立預設筆記資料夾(member2); data = "新增成功"; return(data); } else { data = "新增失敗"; ViewBag.Message = "信箱與人重複,請重新輸入"; return(data); } }