public object Clone() { DomainScore cloneDomainScore = new DomainScore(); cloneDomainScore.Domain = this.Domain; cloneDomainScore.Period = this.Period; cloneDomainScore.Credit = this.Credit; cloneDomainScore.Score = this.Score; cloneDomainScore.Effort = this.Effort; cloneDomainScore.Text = this.Text; cloneDomainScore.Comment = this.Comment; return(cloneDomainScore); }
internal SemesterScoreRecord(XmlElement element) { XmlHelper helper = new XmlHelper(element); RefStudentID = helper.GetString("RefStudentId"); ID = helper.GetString("@ID"); SchoolYear = helper.GetInteger("SchoolYear", 0); Semester = helper.GetInteger("Semester", 0); GradeYear = helper.GetInteger("GradeYear", 0); Subjects = new Dictionary <string, SubjectScore>(); foreach (var subjectElement in helper.GetElements("ScoreInfo/SemesterSubjectScoreInfo/Subject")) { SubjectScore subjectScore = new SubjectScore(subjectElement); Subjects.Add(subjectScore.Subject, subjectScore); } Domains = new Dictionary <string, DomainScore>(); foreach (var domainElement in helper.GetElements("ScoreInfo/Domains/Domain")) { DomainScore domainScore = new DomainScore(domainElement); Domains.Add(domainScore.Domain, domainScore); } decimal score; if (decimal.TryParse(helper.GetString("ScoreInfo/LearnDomainScore"), out score)) { LearnDomainScore = score; } if (decimal.TryParse(helper.GetString("ScoreInfo/CourseLearnScore"), out score)) { CourseLearnScore = score; } }