示例#1
0
 public static Standard Map(AcademicBenchmarkConnector.Models.Standard model)
 {
     return(new Standard
     {
         Id = model.Id,
         Description = model.Description,
         IsActive = model.IsActive,
         DocumentRef = model.Document.Id,
         CourseRef = model.Course.Id,
         IsDeepest = model.IsDeepest,
         AuthorityRef = model.Authority.Id,
         ParentRef = model.Parent?.Id,
         AdoptYear = int.Parse(model.AdoptYear),
         DateModified = model.DateModified,
         GradeLevelHiRef = model.GradeLevel.High,
         GradeLevelLoRef = model.GradeLevel.Low,
         Label = model.Label,
         Level = model.Level,
         Number = model.Number,
         Seq = model.Seq,
         SubjectDocRef = model.SubjectDocument.Id,
         // We need broad, because subjects have sub tree, and we don't
         // know about child subjects anything. So we take parent subject
         SubjectRef = model.Subject.Broad, //!!!
         Version = model.Version
     });
 }
示例#2
0
 protected Standard(AcademicBenchmarkConnector.Models.Standard standard) : base(standard)
 {
     if (standard.Authority != null)
     {
         Authority = new Authority
         {
             Id          = standard.Authority.Id,
             Code        = standard.Authority.Code,
             Description = standard.Authority.Description
         }
     }
     ;
     if (standard.Document != null)
     {
         Document = new Document
         {
             Id          = standard.Document.Id,
             Description = standard.Document.Title,
             Code        = standard.Document.Code
         }
     }
     ;
 }
示例#3
0
 public static Standard Create(AcademicBenchmarkConnector.Models.Standard standard)
 {
     return(new Standard(standard));
 }