<%@ Control Language="C#" AutoEventWireup="true" Inherits="AVA.ResourcesPlatform.WebUI.Control.My.MySTVideoScore" %>
我的优课评比:评分
<% if (this.ListSTUser != null && this.ListSTUser.Count > 0) { var listVideo = CreateInstance.SubjectVideoDao.Where(l => l.ParentSubject == this.Subject) .ToList(); %> <% foreach (var itemVideo in listVideo) { %> <% } %> <% foreach (var stUser in ListSTUser) { %> <% double total = 0; foreach (var itemVideo in listVideo) { //这里取每一个视频的总分 var stVideoScore = CreateInstance.STVideoScoreDao.Where(l => l.ParentSTUser == stUser && l.ParentVideo == itemVideo.ParentVideo) .Take(1) .ToList() .FirstResult(); if (stVideoScore == null) { //没评 %> <% } else { total += stVideoScore.AllScore; %> <%= stVideoScore.AllScore %> <% //有评的话,判断是否已经评完了 int videoCount; int scoreVideoCount; int scoreVideoPartCount; CreateInstance.STUserDao.UserScore(stUser, out videoCount, out scoreVideoCount, out scoreVideoPartCount); if (scoreVideoPartCount > 0) { %> 已评:<%= scoreVideoCount %> 未评<%= scoreVideoPartCount %> <% } } } %> <% } %>
  <%= new HtmlAnchor(itemVideo.ParentVideo.Name) { Href = WebUrl.SubjectPlay(this.Subject.Guid,itemVideo.ParentVideo.Guid),Target="_blank" }%> 总分
<%= new HtmlAnchor(stUser.ParentUser.TrueName) { Href=WebUrl.Show(stUser.ParentUser.ParentUserType.ParentDomain.Code,stUser.ParentUser.UserName) }%> 未评 <%= total %>
<% } %>