void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { var conferenceInfo = new ConferenceInfo(e.Item.DataItem); var ltlItemIndex = e.Item.FindControl("ltlItemIndex") as Literal; var ltlTitle = e.Item.FindControl("ltlTitle") as Literal; var ltlKeywords = e.Item.FindControl("ltlKeywords") as Literal; var ltlStartDate = e.Item.FindControl("ltlStartDate") as Literal; var ltlEndDate = e.Item.FindControl("ltlEndDate") as Literal; var ltlUserCount = e.Item.FindControl("ltlUserCount") as Literal; var ltlPVCount = e.Item.FindControl("ltlPVCount") as Literal; var ltlIsEnabled = e.Item.FindControl("ltlIsEnabled") as Literal; var ltlLogUrl = e.Item.FindControl("ltlLogUrl") as Literal; var ltlPreviewUrl = e.Item.FindControl("ltlPreviewUrl") as Literal; var ltlEditUrl = e.Item.FindControl("ltlEditUrl") as Literal; ltlItemIndex.Text = (e.Item.ItemIndex + 1).ToString(); ltlTitle.Text = conferenceInfo.Title; ltlKeywords.Text = DataProviderWX.KeywordDAO.GetKeywords(conferenceInfo.KeywordID); ltlStartDate.Text = DateUtils.GetDateAndTimeString(conferenceInfo.StartDate); ltlEndDate.Text = DateUtils.GetDateAndTimeString(conferenceInfo.EndDate); ltlUserCount.Text = conferenceInfo.UserCount.ToString(); ltlPVCount.Text = conferenceInfo.PVCount.ToString(); ltlIsEnabled.Text = StringUtils.GetTrueOrFalseImageHtml(!conferenceInfo.IsDisabled); var urlContent = BackgroundConferenceContent.GetRedirectUrl(PublishmentSystemID, conferenceInfo.ID, GetRedirectUrl(PublishmentSystemID)); ltlLogUrl.Text = $@"<a href=""{urlContent}"">申请参会列表</a>"; var urlPreview = ConferenceManager.GetConferenceUrl(conferenceInfo, string.Empty); urlPreview = BackgroundPreview.GetRedirectUrlToMobile(urlPreview); ltlPreviewUrl.Text = $@"<a href=""{urlPreview}"" target=""_blank"">预览</a>"; var urlEdit = BackgroundConferenceAdd.GetRedirectUrl(PublishmentSystemID, conferenceInfo.ID); ltlEditUrl.Text = $@"<a href=""{urlEdit}"">编辑</a>"; } }