public JsonResult Notify(string emailAddress, string redirectUrl, string surveyName, string passCode, string EmailSubject)
        {
            try
            {
                Epi.Web.Enter.Common.Email.Email EmailObj = new Enter.Common.Email.Email();
                EmailObj.Body    = redirectUrl + " and Pass Code is: " + passCode;
                EmailObj.From    = ConfigurationManager.AppSettings["EMAIL_FROM"].ToString();
                EmailObj.Subject = "Link for Survey: " + surveyName;// EmailSubject;
                List <string> tempList = new List <string>();
                tempList.Add(emailAddress);
                EmailObj.To = tempList;

                if (Epi.Web.Enter.Common.Email.EmailHandler.SendMessage(EmailObj))
                {
                    return(Json(true));
                }
                else
                {
                    return(Json(false));
                }
            }
            catch (Exception ex)
            {
                return(Json(false));
            }
        }
        public ActionResult Notify(String ResponseId)
        {
            int UserId = SurveyHelper.GetDecryptUserId(Session["UserId"].ToString());

            //Get current user info
            int CurrentOrgId = int.Parse(Session["SelectedOrgId"].ToString());
            var UserInfo     = _isurveyFacade.GetUserInfo(UserId);

            //Get Organization admin info
            Epi.Web.Enter.Common.DTO.SurveyAnswerDTO surveyAnswerDTO = GetSurveyAnswer(ResponseId, Session["RootFormId"].ToString());
            SurveyInfoModel surveyInfoModel = GetSurveyInfo(surveyAnswerDTO.SurveyId);

            var OwnerInfo = _isurveyFacade.GetUserInfo(surveyAnswerDTO.FormOwnerId);;


            Epi.Web.Enter.Common.Email.Email EmilObj = new Enter.Common.Email.Email();
            //ResponseId;

            EmilObj.Subject = "Record locked notification.";
            EmilObj.Body    = " A user was unable to edit/delete a Epi Info™ Cloud Data Capture recored. \n \n Please login to Epi Info™ Cloud Data Capture system to Unlock this record.\n \n Below are the needed info to unlock the record.\n \n Response id: " + ResponseId + "\n\n User email: " + UserInfo.User.EmailAddress + "\n\n";
            EmilObj.From    = ConfigurationManager.AppSettings["EMAIL_FROM"];
            EmilObj.To      = new List <string>();
            EmilObj.To.Add(OwnerInfo.User.EmailAddress);

            var success = Epi.Web.Enter.Common.Email.EmailHandler.SendMessage(EmilObj);


            return(Json(1));
        }