protected void Page_Load(object sender, EventArgs e) { ((Secure)Master).PageTitle = "Issue Details"; _VolumeIssueId = ValidateQryParamInt32("VolumeIssueId"); if (_VolumeIssueId == null) { Response.Redirect(Pages.Home); } else { IssueFacade issueFacade = new IssueFacade(); dto.Issue issueDto = new dto.Issue(); issueDto.VolumeIssueId = Convert.ToInt32(_VolumeIssueId); issueDto = issueFacade.GetUserArticles(UserInfo.UserDto, issueDto); if (issueDto == null) { Response.Redirect(Pages.Home, true); } else { LoadPageValues(issueDto); } } }
private void SetSessionValues() { //If the value in the page is null then init if (IssueBF.IssueDto == null) { Session[issueSessKey] = new dto.Issue(); } else { Session[issueSessKey] = IssueBF.IssueDto; } }
private void LoadPageValues(dto.Issue issueDto) { HdrVolume.InnerText = string.Format("Volume {0} {1}", issueDto.ParentVolume.VolumeName, issueDto.ParentVolume.VolumeYear); HdrIssue.InnerText = issueDto.IssueName; rptrIssueDocs.DataSource = issueDto.Documents; rptrIssueDocs.DataBind(); rptrArticles.DataSource = issueDto.Articles; rptrArticles.DataBind(); }
private void GetSessionValues() { //Get item from session dto.Issue issueDto = Session[issueSessKey] as dto.Issue; //If empty then init if (issueDto == null) { IssueBF.IssueDto = new dto.Issue(); } else { IssueBF.IssueDto = issueDto; } }
protected void rptrIssues_ItemDataBound(object sender, RepeaterItemEventArgs e) { //If the item bound is a list item if (e.Item.ItemType.Equals(ListItemType.Item) || e.Item.ItemType.Equals(ListItemType.AlternatingItem)) { HyperLink lnkIssuePage = (HyperLink)e.Item.FindControl("lnkIssuePage"); //Get the bound data item dto.Issue issue = (dto.Issue)e.Item.DataItem; if (!(lnkIssuePage == null || issue == null)) { lnkIssuePage.Text = string.Format("{0} {1}", "Issue", issue.IssueName); lnkIssuePage.NavigateUrl = string.Format("{0}?volumeissueid={1}", Pages.Issue, issue.VolumeIssueId); } } }