protected override void PopulateFromDataItemOverride(BaseDataItem dataItem)
        {
            base.PopulateFromDataItemOverride(dataItem);

            BaseDataItemHomeworkExamGrade i = dataItem as BaseDataItemHomeworkExamGrade;

            Date             = DateTime.SpecifyKind(i.Date, DateTimeKind.Local);
            GradeReceived    = i.GradeReceived;
            GradeTotal       = i.GradeTotal;
            IsDropped        = i.IsDropped;
            IndividualWeight = i.IndividualWeight;
        }
 private bool IsChild(BaseDataItemHomeworkExamGrade dataItem)
 {
     if (dataItem is DataItemGrade)
     {
         return(dataItem.UpperIdentifier == Identifier);
     }
     else if (dataItem is DataItemMegaItem)
     {
         return((dataItem as DataItemMegaItem).WeightCategoryIdentifier == Identifier);
     }
     else
     {
         return(false);
     }
 }
 public static BaseViewItemMegaItem CreateGradeHelper(BaseDataItemHomeworkExamGrade dataItem)
 {
     if (dataItem is DataItemMegaItem)
     {
         var type = (dataItem as DataItemMegaItem).MegaItemType;
         if (type == MegaItemType.Homework)
         {
             return(new ViewItemTaskOrEvent(dataItem as DataItemMegaItem));
         }
         else if (type == MegaItemType.Exam)
         {
             return(new ViewItemTaskOrEvent(dataItem as DataItemMegaItem));
         }
     }
     else if (dataItem is DataItemGrade)
     {
         return(new ViewItemGrade(dataItem as DataItemGrade));
     }
     throw new NotImplementedException("Unknown type");
 }
Exemple #4
0
 public ViewItemHoliday(BaseDataItemHomeworkExamGrade dataItem) : base(dataItem)
 {
 }
 public BaseViewItemHomeworkExamGrade(BaseDataItemHomeworkExamGrade dataItem) : base(dataItem)
 {
 }