}//End SendVerifyMail

        #endregion

        #region 開通驗證碼
        /// <summary>
        /// 完成驗證動作
        /// </summary>
        /// <param name="strMemberID">會員編號</param>
        /// <param name="strActivateCode">驗證碼</param>
        /// <returns>導至"完成驗證頁"</returns>
        public ActionResult RunFinishVerify(string strMemberID, string strActivateCode)
        {
            //若未取得會員資料,則導至首頁
            if (strMemberID == null || strActivateCode == null)
            {
                return(RedirectToAction("Index", "Home", new { area = "" }));
            }

            //載入該會員驗證相關資料
            VerifyMemberModel MemberData = RegisterHelper.GetVerifyDataByID(strMemberID);

            //若未取得會員資料,則導至首頁
            if (MemberData == null)
            {
                return(RedirectToAction("Index", "Home", new { area = "" }));
            }

            //若該會員為未激活狀態,則進行激活。並新增SE_MemberLifeCycle
            if (MemberData.strActivateCode == strActivateCode && //驗證碼相符
                !MemberData.ysnActivate &&                       //為未開通
                MemberData.strMemberType == "Guest"              //會籍為未開通會員
                )
            {
                //更新會員主檔為已開通
                RegisterHelper.ActivateMember(strMemberID);
                //插入Log
                RegisterHelper.InsertLogMember(strMemberID, "U", "TECRM");
                //新增初始會籍歷程
                RegisterHelper.NewMemberLifeCycle(strMemberID);
                //更新驗證信寄送Log為已開通驗證
                RegisterHelper.UpdateLogEmailSend(strMemberID, 0, 1);

                //完成開通驗證頁
                return(RedirectToAction("VerifyFinished", "Register", new { area = "Register" }));
            }
            else  //若該會員為已激活狀態則跳至首頁
            {
                return(RedirectToAction("Index", "Home", new { area = "" }));
            }
        }
        } // IsExistMember()

        /// <summary>
        /// 查詢E-mail是否已開通驗證碼
        /// </summary>
        /// <param name="inputEmail">信箱</param>
        /// <returns>是否存在此信箱、是否已開通、是否失效、會員驗證相關資料</returns>
        public ActionResult CheckEmail(String inputEmail)
        {
            Boolean Exist    = false;
            Boolean Activate = false;
            Boolean Active   = false;


            VerifyMemberModel objMember = RegisterHelper.GetVerifyDataByEmail(inputEmail);

            if (objMember == null)
            {
                return(Json(new
                {
                    isExist = Exist,
                    isActivate = Activate,
                    isActive = Active,
                    strEMail = "NO",
                    strName = "NO",
                    strMemberID = "NO",
                    strActivateCode = "NO",
                }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                Exist    = true;
                Activate = objMember.ysnActivate;
                Active   = objMember.ysnActive;

                return(Json(new
                {
                    isExist = Exist,
                    isActivate = Activate,
                    isActive = Active,
                    strEMail = objMember.strEMail,
                    strName = objMember.strName,
                    strMemberID = objMember.strMemberID,
                    strActivateCode = objMember.strActivateCode
                }, JsonRequestBehavior.AllowGet));
            }
        }//End actGetMemberByEmail