Пример #1
0
        /// <summary>
        /// Επιστρέφει το absolutepath του συγκεκριμένου συλλέκτη/survey.
        /// <para>O συλλέκτης πρέπει να είναι τύπου WebLink</para>
        /// </summary>
        /// <param name="survey"></param>
        /// <param name="collector"></param>
        /// <param name="manualEntry"></param>
        /// <returns></returns>
        internal static string GetSurveyRuntimeAbsolutePath(VLSurvey survey, VLCollector collector, bool manualEntry)
        {
            if (collector.CollectorType != CollectorType.WebLink)
            {
                throw new VLException(string.Format("Collector '{0}', has wrong type!", collector.Name));
            }

            if (manualEntry == false)
            {
                var absolutePath = string.Format(@"/w/{0}/{1}/", collector.WebLink, BuiltinLanguages.GetTwoLetterISOCode(collector.TextsLanguage));
                return(absolutePath);
            }
            else
            {
                var absolutePath = string.Format(@"/wm/{0}/{1}/", collector.WebLink, BuiltinLanguages.GetTwoLetterISOCode(collector.TextsLanguage));
                return(absolutePath);
            }
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="survey"></param>
        /// <returns></returns>
        internal static string GetSurveyPreviewAbsolutePath(VLSurvey survey)
        {
            var absolutePath = string.Format(@"/s/{0}/{1}/", survey.PublicId, BuiltinLanguages.GetTwoLetterISOCode(survey.TextsLanguage));

            return(absolutePath);
        }
Пример #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="survey"></param>
        /// <param name="collector"></param>
        /// <param name="recipient"></param>
        /// <param name="manualEntry"></param>
        /// <returns></returns>
        internal static string GetSurveyRuntimeAbsolutePath(VLSurvey survey, VLCollector collector, VLRecipient recipient, bool manualEntry)
        {
            if (collector.CollectorType != CollectorType.Email)
            {
                throw new VLException(string.Format("Collector '{0}', has wrong type!", collector.Name));
            }

            if (manualEntry == false)
            {
                var absolutePath = string.Format(@"/em/{0}/{1}/{2}/{3}/", survey.PublicId, recipient.RecipientKey, collector.CollectorId, BuiltinLanguages.GetTwoLetterISOCode(collector.TextsLanguage));
                return(absolutePath);
            }
            else
            {
                var absolutePath = string.Format(@"/emm/{0}/{1}/{2}/{3}/", survey.PublicId, recipient.RecipientKey, collector.CollectorId, BuiltinLanguages.GetTwoLetterISOCode(collector.TextsLanguage));
                return(absolutePath);
            }
        }