/// <summary>
        ///
        /// </summary>
        /// <param name="pRequestMessage"></param>
        /// <returns></returns>
        public PublishResponse PublishSurvey(PublishRequest pRequest)
        {
            try
            {
                PublishResponse result = new PublishResponse(pRequest.RequestId);
                Epi.Web.Enter.Interfaces.DataInterfaces.ISurveyInfoDao   SurveyInfoDao   = new EFwcf.EntitySurveyInfoDao();
                Epi.Web.Enter.Interfaces.DataInterfaces.IOrganizationDao OrganizationDao = new EFwcf.EntityOrganizationDao();


                Epi.Web.BLL.Publisher Implementation        = new Epi.Web.BLL.Publisher(SurveyInfoDao, OrganizationDao);
                SurveyInfoBO          surveyInfoBO          = Mapper.ToBusinessObject(pRequest.SurveyInfo);
                SurveyRequestResultBO surveyRequestResultBO = Implementation.PublishSurvey(surveyInfoBO);
                result.PublishInfo = Mapper.ToDataTransferObject(surveyRequestResultBO);

                return(result);
            }
            catch (Exception ex)
            {
                CustomFaultException customFaultException = new CustomFaultException();
                customFaultException.CustomMessage = ex.Message;
                customFaultException.Source        = ex.Source;
                customFaultException.StackTrace    = ex.StackTrace;
                customFaultException.HelpLink      = ex.HelpLink;
                throw new FaultException <CustomFaultException>(customFaultException);
            }
        }
        /// <summary>
        /// Publish MetaData to Cloud
        /// </summary>
        /// <param name="pRequestMessage"></param>
        /// <returns></returns>
        public PublishResponse MetaDataToCloud(PublishRequest pRequest)
        {
            bool            pCloud = true;
            MetaDataToCloud _publishMetaDataToCloud = new MetaDataToCloud();

            try
            {
                //pRequest.RequestId = "2";
                PublishResponse result = new PublishResponse(pRequest.RequestId);

                if (pCloud)
                {
                    //Stop Web Job
                    if (_publishMetaDataToCloud.StartAndStopWebJob(Constant.WebJob.Stop))
                    {
                        //Update SurveyMetaData table in Cloud
                        Epi.Web.Enter.Interfaces.DataInterfaces.ISurveyInfoDao   SurveyInfoDao   = new EFwcf.EntitySurveyInfoDao();
                        Epi.Web.Enter.Interfaces.DataInterfaces.IOrganizationDao OrganizationDao = new EFwcf.EntityOrganizationDao();
                        Epi.Web.BLL.Publisher Implementation        = new Epi.Web.BLL.Publisher(SurveyInfoDao, OrganizationDao);
                        SurveyInfoBO          surveyInfoBO          = Mapper.ToBusinessObject(pRequest.SurveyInfo);
                        SurveyRequestResultBO surveyRequestResultBO = Implementation.PublishSurvey(surveyInfoBO);
                        result.PublishInfo = Mapper.ToDataTransferObject(surveyRequestResultBO);
                        EpiCloudOperation();
                    }
                }
                else
                {
                }
                return(result);
            }
            catch (Exception ex)
            {
                CustomFaultException customFaultException = new CustomFaultException();
                customFaultException.CustomMessage = ex.Message;
                customFaultException.Source        = ex.Source;
                customFaultException.StackTrace    = ex.StackTrace;
                customFaultException.HelpLink      = ex.HelpLink;
                throw new FaultException <CustomFaultException>(customFaultException);
            }
        }