public ActionResult RegisterMember(RegisterViewModel registerData) { bool IsInsert = false; MailService mailSercice = new MailService(); string strActivateCode = mailSercice.GenerateEmailToken(); string strMemberID = memberService.RegisterNewMember(registerData, strActivateCode); if (strMemberID != "") { IsInsert = true; logService.InsertLogInsertLogMember(strMemberID, "I", "TECRM", registerData); if (!logService.CheckMailExisted(strMemberID)) { logService.InsertLogEmailSent(strMemberID, registerData.strEMail); } if (SendVerifyMail(registerData.strEMail, registerData.strName, strMemberID, strActivateCode)) { logService.UpdateLogEmailSend(strMemberID, 1, 0); } else { logService.UpdateLogEmailSend(strMemberID, 0, 0); } } return(Json(IsInsert, JsonRequestBehavior.AllowGet)); }
public ActionResult RegisterMember(RegisterViewModel registerData) { bool IsInsert = memberService.RegisterNewMember(registerData); if (IsInsert) { string strMemberID = strMemberID = memberService.GetStrMemberID(registerData.strEMail); logService.InsertLogInsertLogMember(strMemberID, "I", "TECRM", registerData); if (logService.CheckMailExisted(strMemberID)) { logService.InsertLogEmailSent(strMemberID, registerData.strEMail); } if (SendVerifyMail(registerData.strEMail, registerData.strName, strMemberID)) { logService.UpdateLogEmailSend(strMemberID, 1, 0); } else { logService.UpdateLogEmailSend(strMemberID, 0, 0); } } return(Json(IsInsert, JsonRequestBehavior.AllowGet)); }