Exemple #1
0
        public static propStudent Get(string username)
        {
            propStudent student = new propStudent();
            var         data    = Students.Get(username);

            if (data == null)
            {
                return(null);
            }
            while (data.Read())
            {
                student.id       = int.Parse(data["Id"].ToString());
                student.fullName = data["FullName"].ToString();
                student.email    = data["Email"].ToString();
                student.college  = data["College"].ToString();
                student.username = data["Username"].ToString();
                student.password = data["Password"].ToString();
                student.subject  = data["Subject"].ToString();
                student.birthday = DateTime.Parse(data["Birthday"].ToString());
                student.age      = int.Parse(data["Age"].ToString());
                student.assigned = bool.Parse(data["Assigned"].ToString());
            }
            data.Close();
            return(student);
        }
Exemple #2
0
 public propScoreBoard(propStudent student, propOnlineTest onlineTest)
 {
     this.id       = student.id; this.fullName = student.fullName; this.college = student.college;
     this.subject  = student.subject; this.age = student.age; this.birthday = student.birthday; this.score = onlineTest.score; this.submitAt = onlineTest.submitAt;
     this.assigned = student.assigned; this.email = student.email;
 }