public void GenerateSubmissionView(int numSubs) { SubmissionManagementBO bo = new SubmissionManagementBO(); UserManagementBO userBO = new UserManagementBO(); List <SubmissionVO> subList; string sortType = Request.QueryString["sort"]; if (sortType == "top") { subList = bo.GetListOfSubmissionsTop(NUMBER_OF_SUBMISSIONS); } if (sortType == "popular") { subList = bo.GetListOfSubmissionsPopular(NUMBER_OF_SUBMISSIONS); } else { subList = bo.GetListOfSubmissionsNew(NUMBER_OF_SUBMISSIONS); } foreach (SubmissionVO sub in subList) { Submission submission = new Submission(); submission.ID = "submission" + sub.SubmissionID; submission.submissionID = sub.SubmissionID; subPanel.Controls.Add(submission); } }
protected void GenerateSubmissionView(int numSubs) { SubmissionManagementBO bo = new SubmissionManagementBO(); List <SubmissionVO> subList; string sortType = Request.QueryString["sort"]; if (sortType == "top") { subList = bo.GetListOfSubmissionsTop(NUMBER_OF_SUBMISSIONS); submissionViewTitle.Text = "<h1>See what's on top</h1>"; } else if (sortType == "popular") { subList = bo.GetListOfSubmissionsPopular(NUMBER_OF_SUBMISSIONS); submissionViewTitle.Text = "<h1>See what's popular</h1>"; } else { submissionViewTitle.Text = "<h1>See what's new</h1>"; subList = bo.GetListOfSubmissionsNew(NUMBER_OF_SUBMISSIONS); } foreach (SubmissionVO sub in subList) { Submission submission = (Submission)Page.LoadControl("~/Controls/Submission.ascx"); submission.ID = "submission" + sub.SubmissionID; submission.submissionID = sub.SubmissionID; submissionsPanel.Controls.Add(submission); } }