protected void Page_Load(object sender, EventArgs e) { RedirectUtil.RedirectUnauthenticatedUserToLoginPage(); RedirectUtil.RedirectNonAdminUserToHomePage(); BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>() { new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"), new BreadCrumb(NavUtil.GetShowsPageUrl(), "Shows"), new BreadCrumb(NavUtil.GetShowPageUrl(GetShowId()), "Show"), new BreadCrumb(NavUtil.GetShowReportPageUrl(GetShowId()), "Judge Sheet Report", IsActive: true), }); var showId = GetShowId(); var show = ServiceFactory.ShowService.Get(showId); labelPageTitle.Text = show.Name; labelPageDescription.Text = show.Description; int contestId = Convert.ToInt32(Request.QueryString["contestId"]); if (contestId > 0) { contests = ServiceFactory.ContestService.GetShowContests(showId).Where(c => c.Id == contestId); } else { contests = ServiceFactory.ContestService.GetShowContests(showId); } }
protected void Page_Load(object sender, EventArgs e) { RedirectUtil.RedirectUnauthenticatedUserToLoginPage(); BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>() { new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"), new BreadCrumb(NavUtil.GetShowsPageUrl(), "Shows"), new BreadCrumb(NavUtil.GetShowPageUrl(GetShowId()), "Show", IsActive: true), }); var items = new List <HyperlinkListPanelItem>(); var showId = GetShowId(); var show = ServiceFactory.ShowService.Get(showId); labelPageTitle.Text = show.Name; labelPageDescription.Text = show.Description; this.contests = ServiceFactory.ContestService.GetShowContests(showId); if (!IsUserAnAdmin()) { var currentUserId = Context.User.Identity.GetUserId(); contests = contests.Where(c => (c.Judges.Any(j => j.UserId == currentUserId) || c.TimeKeeperId == currentUserId) && c.Status == "In Progress").ToList(); } foreach (var contest in contests) { items.Add(new HyperlinkListPanelItem(URL: NavUtil.GetContestPageUrl(showId, contest.Id), Heading: contest.Name + " (" + contest.Status + ")", Text: contest.Description)); } HyperlinkListPanelRenderer.Render(contestsList, new HyperlinkListPanelConfig("Contests", items, ButtonAddContestClick)); }
protected void Page_Load(object sender, EventArgs e) { RedirectUtil.RedirectUnauthenticatedUserToLoginPage(); RedirectUtil.RedirectNonAdminUserToHomePage(); BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>() { new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"), new BreadCrumb(NavUtil.GetShowsPageUrl(), "Shows"), new BreadCrumb(NavUtil.GetShowPageUrl(GetShowId()), "Show"), new BreadCrumb(NavUtil.GetAddContestPageUrl(GetShowId()), "Add Contest", IsActive: true), }); labelPageTitle.Text = "Add a Contest"; labelPageDescription.Text = "Use the form below to create a new contest."; contestForm.GetSubmitButton().Click += new EventHandler(btnAddContest_Click); contestForm.GetCancelButton().Click += new EventHandler(btnCancel_Click); }
protected void Page_Load(object sender, EventArgs e) { RedirectUtil.RedirectUnauthenticatedUserToLoginPage(); RedirectUtil.RedirectNonAdminUserToHomePage(); BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>() { new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"), new BreadCrumb(NavUtil.GetShowsPageUrl(), "Shows"), new BreadCrumb(NavUtil.GetShowPageUrl(GetShowId()), "Show"), new BreadCrumb(NavUtil.GetContestPageUrl(GetShowId(), GetContestId()), "Contest"), new BreadCrumb(NavUtil.GetUpdateScoreCriterionPageUrl(GetShowId(), GetContestId(), GetScoreCriterionId()), "Update Score Criterion", IsActive: true), }); labelPageTitle.Text = "Update the Score Criterion"; labelPageDescription.Text = "Use the form below to update the score criterion."; scoreCriterionForm.GetSubmitButton().Click += new EventHandler(btnUpdateScoreCriterion_Click); scoreCriterionForm.GetCancelButton().Click += new EventHandler(btnCancel_Click); }
protected void Page_Load(object sender, EventArgs e) { RedirectUtil.RedirectUnauthenticatedUserToLoginPage(); BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>() { new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"), new BreadCrumb(NavUtil.GetShowsPageUrl(), "Shows"), new BreadCrumb(NavUtil.GetShowPageUrl(GetShowId()), "Show"), new BreadCrumb(NavUtil.GetContestPageUrl(GetShowId(), GetContestId()), "Contest"), new BreadCrumb(NavUtil.GetContestantPageUrl(GetShowId(), GetContestId(), GetContestantId()), "Contestant", IsActive: true), }); var contestantId = GetContestantId(); this.contestant = ServiceFactory.ContestantService.Get(contestantId); this.contest = ServiceFactory.ContestService.Get(GetContestId()); this.scoreCards = ServiceFactory.ScoreCardService.GetContestantScoreCards(contestantId); var performers = ServiceFactory.PerformerService.GetContestantPerformers(contestantId); labelPageTitle.Text = GetContestantHeadingText(performers); labelPageDescription.Text = GetContestantDescriptionText(contestant); if (!IsUserAnAdmin()) { return; } var performerItems = new List <HyperlinkListPanelItem>(); foreach (var performer in performers) { var url = NavUtil.GetUpdatePerformerPageUrl(GetShowId(), GetContestId(), GetContestantId(), performer.Id); var heading = GetPerformerHeadingText(performer); var text = GetPerformerDescriptionText(performer); performerItems.Add(new HyperlinkListPanelItem(url, heading, text)); } HyperlinkListPanelRenderer.Render(performersList, new HyperlinkListPanelConfig("Performers", performerItems, ButtonAddPerformerClick)); }
protected void Page_Load(object sender, EventArgs e) { RedirectUtil.RedirectUnauthenticatedUserToLoginPage(); RedirectUtil.RedirectNonAdminUserToHomePage(); BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>() { new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"), new BreadCrumb(NavUtil.GetShowsPageUrl(), "Shows"), new BreadCrumb(NavUtil.GetShowPageUrl(GetShowId()), "Show"), new BreadCrumb(NavUtil.GetShowReportPageUrl(GetShowId()), "Report", IsActive: true), }); var showId = GetShowId(); var show = ServiceFactory.ShowService.Get(showId); labelPageTitle.Text = show.Name; labelPageDescription.Text = show.Description; this.contests = ServiceFactory.ContestService.GetShowContests(showId).Where(c => c.Status == "Complete"); }
protected void Page_Load(object sender, EventArgs e) { RedirectUtil.RedirectUnauthenticatedUserToLoginPage(); BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>() { new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"), new BreadCrumb(NavUtil.GetShowsPageUrl(), "Shows", IsActive: true), }); var items = new List <HyperlinkListPanelItem>(); var showService = ServiceFactory.ShowService; foreach (var show in showService.GetAll().OrderByDescending(s => s.Id)) { items.Add(new HyperlinkListPanelItem(URL: NavUtil.GetShowPageUrl(show.Id), Heading: show.Name, Text: show.Description)); } HyperlinkListPanelRenderer.Render(showsList, new HyperlinkListPanelConfig("Talent Shows", items, ButtonAddShowClick)); }
protected void Page_Load(object sender, EventArgs e) { RedirectUtil.RedirectUnauthenticatedUserToLoginPage(); RedirectUtil.RedirectNonAdminUserToHomePage(); BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>() { new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"), new BreadCrumb(NavUtil.GetShowsPageUrl(), "Shows"), new BreadCrumb(NavUtil.GetShowPageUrl(GetShowId()), "Show"), new BreadCrumb(NavUtil.GetShowReportPageUrl(GetShowId()), "Report", IsActive: true), }); if (Page.IsPostBack) { var refreshRate = (Convert.ToInt32(dropDownListRefreshRate.SelectedValue) * 60) * 1000; refreshTimer.Interval = refreshRate; } else { dropDownListRefreshRate.SelectedValue = "5"; refreshTimer.Interval = 300000; dropDownListStatus.SelectedValue = "In Progress"; } var showId = GetShowId(); var show = ServiceFactory.ShowService.Get(showId); labelPageTitle.Text = show.Name; labelPageDescription.Text = show.Description; this.contests = ServiceFactory.ContestService.GetShowContests(showId); var status = dropDownListStatus.SelectedValue; if (status != "Any") { this.contests = this.contests.Where(c => c.Status == status); } }
protected void Page_Load(object sender, EventArgs e) { RedirectUtil.RedirectUnauthenticatedUserToLoginPage(); BreadCrumbUtil.DataBind(Page, new List <BreadCrumb>() { new BreadCrumb(NavUtil.GetHomePageUrl(), "Home"), new BreadCrumb(NavUtil.GetShowsPageUrl(), "Shows"), new BreadCrumb(NavUtil.GetShowPageUrl(GetShowId()), "Show"), new BreadCrumb(NavUtil.GetContestPageUrl(GetShowId(), GetContestId()), "Contest", IsActive: true), }); var showId = GetShowId(); var show = ServiceFactory.ShowService.Get(showId); var contestId = GetContestId(); this.contest = ServiceFactory.ContestService.Get(contestId); labelPageTitle.Text = contest.Name + " (" + contest.Status + ")"; labelPageDescription.Text = contest.Description; if (IsAllowedToViewContestantsList()) { var contestantItems = new List <HyperlinkListPanelItem>(); foreach (var contestant in contest.Contestants) { var url = NavUtil.GetContestantPageUrl(showId, contestId, contestant.Id); var heading = GetContestantHeadingText(contestant); var text = GetContestantDescriptionText(contestant); contestantItems.Add(new HyperlinkListPanelItem(url, heading, text)); } HyperlinkListPanelRenderer.Render(contestantsList, new HyperlinkListPanelConfig("Contestants", contestantItems, ButtonAddContestantClick)); } if (!IsUserAnAdmin()) { return; } var judgeItems = new List <HyperlinkListPanelItem>(); foreach (var judge in contest.Judges) { var url = NavUtil.GetUpdateJudgePageUrl(showId, contestId, judge.Id); var heading = GetJudgeHeadingText(judge); var text = GetJudgeDescriptionText(judge); judgeItems.Add(new HyperlinkListPanelItem(url, heading, text)); } HyperlinkListPanelRenderer.Render(judgesList, new HyperlinkListPanelConfig("Judges", judgeItems, ButtonAddJudgeClick)); var scoreCriterionItems = new List <HyperlinkListPanelItem>(); foreach (var scoreCriterion in contest.ScoreCriteria) { var url = NavUtil.GetUpdateScoreCriterionPageUrl(showId, contestId, scoreCriterion.Id); var heading = GetScoreCriterionHeadingText(scoreCriterion); var text = GetScoreCriterionDescriptionText(scoreCriterion); scoreCriterionItems.Add(new HyperlinkListPanelItem(url, heading, text)); } HyperlinkListPanelRenderer.Render(scoreCriteriaList, new HyperlinkListPanelConfig("Score Criteria", scoreCriterionItems, ButtonAddScoreCriterionClick)); }