示例#1
0
        public SubmittedSessionsViewModel GetSubmittedSessions()
        {
            var tableClient  = GetTableClient();
            var sessionTable = tableClient.GetTableReference(_sessionsTableName);
            var sessionQuery = (new TableQuery <SessionSubmission>()).Where(TableQuery.GenerateFilterConditionForInt("Status", QueryComparisons.Equal, 1));

            var sessions = sessionTable.ExecuteQuery(sessionQuery).ToList();

            var viewModel = new SubmittedSessionsViewModel();

            foreach (var sessionSubmission in sessions)
            {
                var session = new SessionSubmissionViewModel
                {
                    SessionTitle          = sessionSubmission.SessionTitle,
                    SessionAbstract       = sessionSubmission.SessionAbstract.FormatForHtml(),
                    PresenterName         = AbbreviatePresenterName(sessionSubmission.PresenterName),
                    PresenterTwitterAlias = sessionSubmission.PresenterTwitterAlias,
                    PresenterWebsite      = sessionSubmission.PresenterWebsite,
                    PresenterBio          = sessionSubmission.PresenterBio,
                    RecommendedAudience   = sessionSubmission.RecommendedAudience
                };

                viewModel.Sessions.Add(session);
            }
            return(viewModel);
        }
示例#2
0
        public ActionResult SessionsToVoteFor()
        {
            var model = new SubmittedSessionsViewModel()
            {
                ValidateWithEventbrite = FeatureFlags.ValiateEventbriteVotes
            };

            return(View(model));
        }