コード例 #1
0
        private void LoadSettings()
        {
            surveyGuid     = WebUtils.ParseGuidFromQueryString("SurveyGuid", Guid.Empty);
            surveyPageGuid = WebUtils.ParseGuidFromQueryString("SurveyPageGuid", Guid.Empty);
            pageId         = WebUtils.ParseInt32FromQueryString("pageid", -1);
            moduleId       = WebUtils.ParseInt32FromQueryString("mid", -1);

            currentModule = GetModule(moduleId, Survey.FeatureGuid);

            if (surveyGuid != Guid.Empty)
            {
                survey = new Survey(surveyGuid);
                if (survey.SiteGuid != siteSettings.SiteGuid)
                {
                    surveyGuid = Guid.Empty;
                    survey     = null;
                }
                else
                {
                    if (surveyPageGuid != Guid.Empty)
                    {
                        surveyPage = new SurveyFeature.Business.Page(surveyPageGuid);
                        if (surveyPage.SurveyGuid != survey.SurveyGuid)
                        {
                            surveyPageGuid = Guid.Empty;
                            surveyPage     = null;
                        }
                    }
                }
            }

            AddClassToBody("surveyquestions");
        }
コード例 #2
0
        private void LoadSettings()
        {
            pageId   = WebUtils.ParseInt32FromQueryString("pageid", -1);
            moduleId = WebUtils.ParseInt32FromQueryString("mid", true, -1);

            currentModule = GetModule(moduleId, Survey.FeatureGuid);
            surveyGuid    = Survey.GetModulesCurrentSurvey(ModuleId);

            AddClassToBody("surveys");
        }
コード例 #3
0
ファイル: PollEdit.aspx.cs プロジェクト: zahedbri/mojoportal
        private void LoadSettings()
        {
            timeOffset = SiteUtils.GetUserTimeOffset();
            timeZone   = SiteUtils.GetUserTimeZone();
            pollGuid   = WebUtils.ParseGuidFromQueryString("PollGuid", Guid.Empty);

            pageId   = WebUtils.ParseInt32FromQueryString("pageid", -1);
            moduleId = WebUtils.ParseInt32FromQueryString("mid", -1);


            currentModule = GetModule(moduleId, Poll.FeatureGuid);

            if (!IsPostBack)
            {
                AddClassToBody("polledit");
            }
        }
コード例 #4
0
        private void LoadSettings()
        {
            pageId        = WebUtils.ParseInt32FromQueryString("PageId", pageId);
            questionGuid  = WebUtils.ParseGuidFromQueryString("QuestionGuid", Guid.Empty);
            moduleId      = WebUtils.ParseInt32FromQueryString("mid", moduleId);
            currentModule = GetModule(moduleId, Survey.FeatureGuid);
            question      = new Question(questionGuid);

            if (questionGuid != Guid.Empty)
            {
                surveyPageGuid = question.SurveyPageGuid;
            }
            else
            {
                //we have no question guid so must be a new question
                string questionTypeParam = Request.QueryString["NewQuestionType"];
                questionType = EnumHelper <QuestionType> .Parse(questionTypeParam);

                surveyPageGuid          = WebUtils.ParseGuidFromQueryString("SurveyPageGuid", Guid.Empty);
                question.SurveyPageGuid = surveyPageGuid;
            }

            if (surveyPageGuid != Guid.Empty)
            {
                surveyPage = new SurveyFeature.Business.Page(surveyPageGuid);

                survey     = new Survey(surveyPage.SurveyGuid);
                surveyGuid = survey.SurveyGuid;

                if (survey.SiteGuid != siteSettings.SiteGuid)
                {
                    surveyGuid = Guid.Empty;
                    survey     = null;

                    surveyPageGuid = Guid.Empty;
                    surveyPage     = null;

                    questionGuid = Guid.Empty;
                    question     = null;
                }
            }

            AddClassToBody("surveyquestionedit");
        }
コード例 #5
0
        private void LoadSettings()
        {
            surveyGuid = WebUtils.ParseGuidFromQueryString("SurveyGuid", Guid.Empty);
            pageId     = WebUtils.ParseInt32FromQueryString("pageid", -1);
            moduleId   = WebUtils.ParseInt32FromQueryString("mid", true, -1);

            currentModule = GetModule(moduleId, Survey.FeatureGuid);

            if (surveyGuid != Guid.Empty)
            {
                survey = new Survey(surveyGuid);
                if (survey.SiteGuid != siteSettings.SiteGuid)
                {
                    surveyGuid = Guid.Empty;
                    survey     = null;
                }
            }

            AddClassToBody("surveypages");
        }
コード例 #6
0
ファイル: PollEdit.aspx.cs プロジェクト: saiesh86/TravelBlog
        private void LoadSettings()
        {
            timeOffset = SiteUtils.GetUserTimeOffset();
            timeZone = SiteUtils.GetUserTimeZone();
            pollGuid = WebUtils.ParseGuidFromQueryString("PollGuid", Guid.Empty);

            pageId = WebUtils.ParseInt32FromQueryString("pageid", -1);
            moduleId = WebUtils.ParseInt32FromQueryString("mid", -1);

            currentModule = GetModule(moduleId, Poll.FeatureGuid);

            if (!IsPostBack)
            {
                AddClassToBody("polledit");
            }
        }
コード例 #7
0
        private void LoadSettings()
        {
            surveyGuid = WebUtils.ParseGuidFromQueryString("SurveyGuid", Guid.Empty);
            pageId = WebUtils.ParseInt32FromQueryString("pageid", -1);
            moduleId = WebUtils.ParseInt32FromQueryString("mid", true, -1);

            currentModule = GetModule(moduleId, Survey.FeatureGuid);

            if(surveyGuid != Guid.Empty)
            {
                survey = new Survey(surveyGuid);
                if(survey.SiteGuid != siteSettings.SiteGuid)
                {
                    surveyGuid = Guid.Empty;
                    survey = null;
                }
            }

            AddClassToBody("surveypages");
        }
コード例 #8
0
        private void LoadSettings()
        {
            pageId = WebUtils.ParseInt32FromQueryString("PageId", pageId);
            questionGuid = WebUtils.ParseGuidFromQueryString("QuestionGuid", Guid.Empty);
            moduleId = WebUtils.ParseInt32FromQueryString("mid", moduleId);
            currentModule = GetModule(moduleId, Survey.FeatureGuid);
            question = new Question(questionGuid);

            if (questionGuid != Guid.Empty)
            {

                surveyPageGuid = question.SurveyPageGuid;

            }
            else
            {
                //we have no question guid so must be a new question
                string questionTypeParam = Request.QueryString["NewQuestionType"];
                questionType = EnumHelper<QuestionType>.Parse(questionTypeParam);
                surveyPageGuid = WebUtils.ParseGuidFromQueryString("SurveyPageGuid", Guid.Empty);
                question.SurveyPageGuid = surveyPageGuid;

            }

            if (surveyPageGuid != Guid.Empty)
            {
                surveyPage = new SurveyFeature.Business.Page(surveyPageGuid);

                survey = new Survey(surveyPage.SurveyGuid);
                surveyGuid = survey.SurveyGuid;

                if (survey.SiteGuid != siteSettings.SiteGuid)
                {
                    surveyGuid = Guid.Empty;
                    survey = null;

                    surveyPageGuid = Guid.Empty;
                    surveyPage = null;

                    questionGuid = Guid.Empty;
                    question = null;

                }
            }

            AddClassToBody("surveyquestionedit");
        }
コード例 #9
0
        private void LoadSettings()
        {
            surveyGuid = WebUtils.ParseGuidFromQueryString("SurveyGuid", Guid.Empty);
            surveyPageGuid = WebUtils.ParseGuidFromQueryString("SurveyPageGuid", Guid.Empty);
            pageId = WebUtils.ParseInt32FromQueryString("pageid", -1);
            moduleId = WebUtils.ParseInt32FromQueryString("mid", -1);

            currentModule = GetModule(moduleId, Survey.FeatureGuid);

            if (surveyGuid != Guid.Empty)
            {
                survey = new Survey(surveyGuid);
                if (survey.SiteGuid != siteSettings.SiteGuid)
                {
                    surveyGuid = Guid.Empty;
                    survey = null;
                }
                else
                {
                    if (surveyPageGuid != Guid.Empty)
                    {
                        surveyPage = new SurveyFeature.Business.Page(surveyPageGuid);
                        if (surveyPage.SurveyGuid != survey.SurveyGuid)
                        {
                            surveyPageGuid = Guid.Empty;
                            surveyPage = null;

                        }
                    }
                }
            }

            AddClassToBody("surveyquestions");
        }
コード例 #10
0
ファイル: Surveys.aspx.cs プロジェクト: saiesh86/TravelBlog
        private void LoadSettings()
        {
            pageId = WebUtils.ParseInt32FromQueryString("pageid", -1);
            moduleId = WebUtils.ParseInt32FromQueryString("mid", true, -1);

            currentModule = GetModule(moduleId, Survey.FeatureGuid);
            surveyGuid = Survey.GetModulesCurrentSurvey(ModuleId);

            AddClassToBody("surveys");
        }