public static List <propGroupMember> Get(string code) { var listGroup = new List <propGroupMember>(); var data = DataAccess.GroupMember.Get(code); if (data == null) { return(null); } while (data.Read()) { var groupMember = new propGroupMember(); groupMember.id = int.Parse(data["Id"].ToString()); groupMember.fullName = data["FullName"].ToString(); groupMember.email = data["Email"].ToString(); groupMember.college = data["College"].ToString(); groupMember.username = data["Username"].ToString(); groupMember.password = data["Password"].ToString(); groupMember.subject = data["Subject"].ToString(); groupMember.birthday = DateTime.Parse(data["Birthday"].ToString()); groupMember.birthdayStr = groupMember.birthday.ToString("dd/MM/yyyy"); groupMember.age = int.Parse(data["Age"].ToString()); groupMember.assigned = bool.Parse(data["Assigned"].ToString()); groupMember.joinAt = DateTime.Parse(data["JoinAt"].ToString()); groupMember.joinAtStr = groupMember.joinAt.ToString("dd/MM/yyyy"); listGroup.Add(groupMember); } data.Close(); return(listGroup); }
public propScoreBoard(propGroupMember 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; }