Ejemplo n.º 1
0
 public AttendanceItem(JObject data)
 {
     Code                = data["code"].ToString();
     Description         = data["description"].ToString();
     Date                = data["date"].ToString();
     Date                = Date.Substring(0, Date.IndexOf(" "));
     Peroid              = data["period"].ToString();
     Name                = data["name"].ToString();
     DisplayName         = Name;
     Color               = StudentData.GetColor(Code);
     SmallTextFontWeight = FontWeights.Normal;
 }
Ejemplo n.º 2
0
 public AssignmentItem(JObject data)
 {
     Name                = data["name"].ToString();
     DisplayName         = data["name"].ToString();
     Date                = data["date"].ToString();
     Date                = Date.Substring(0, Date.IndexOf(" "));
     Percentage          = data["percent"].ToString();
     Score               = data["score"].ToString();
     MaximumScore        = data["pointsPossible"].ToString();
     MaximumScore        = MaximumScore.Substring(0, MaximumScore.IndexOf("."));
     LetterGrade         = data["letterGrade"].ToString();
     Category            = data["category"].ToString();
     IncludeInFinalGrade = data["includeInFinalGrade"].ToString();
     Weight              = data["weight"].ToString();
     Terms               = data["terms"].ToObject <string[]>();
     IsNew               = false;
     LargeTextFontWeight = FontWeights.SemiLight;
     SmallTextFontWeight = FontWeights.Normal;
     Color               = StudentData.GetColor(LetterGrade);
 }
Ejemplo n.º 3
0
        public Peroid(string time, JObject data)
        {
            Time        = time;
            Percent     = data["percent"].ToString();
            Percent     = Percent.Substring(0, Percent.IndexOf("."));
            LetterGrade = data["letter"].ToString();
            Eval        = data["eval"].ToString();
            IsActive    = false;
            Color       = StudentData.GetColor(LetterGrade);

            DateTime Genesis = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);

            Date = Genesis.AddSeconds((double)data["startDate"]).ToLocalTime();

            if (data["comment"].ToString() == null)
            {
                Comment = "--";
            }
            else
            {
                Comment = data["comment"].ToString();
            }
        }