public void CreateRatingItem(EntryScore eachScore, ResultPlace eachPlace) { if (_has_data == false) { _data.CreateStartElement("Rating"); _data.CreateAttribute("範圍人數", eachPlace.RatingBase.ToString()); } _has_data = true; _data.CreateStartElement("Item"); _data.CreateAttribute("分項", eachScore.ScoreName); _data.CreateAttribute("成績", eachScore.Score.ToString()); _data.CreateAttribute("排名", eachPlace.Place.ToString()); _data.CreateAttribute("成績人數", eachPlace.ActualBase.ToString()); _data.CreateEndElement(); }
public ResultPlace GetPlace(Student student, ScopeType type) { if (!ContainsScore(student)) { return(null); } EntryScore score = student.SemsScore; ResultPlace place; if (score.RatingResults.TryGetValue(type, out place)) { return(place); } else { return(null); } }