public async Task LoadAttendances() { //var playerMgr = new PlayerManager(); //this.PlayerList = await playerMgr.GetPlayers(this.SelectedTerm.TermID); //// If no attendance is loaded, means new attendances //if (!(this.Attendance.AttendanceID > 0)) //{ // await this.LoadAllPlayers(); //} //else //{ // await this.LoadTermPlayerAttendances(); //} var attendanceMgr = new AttendanceManager(); //this.Attendance = new AttendanceSummary(); this.ModelResult = await attendanceMgr.GetAttendanceEditorModel(this.Attendance); // Bind data... this.PlayerList = this.ModelResult.PlayerList; foreach (var attendance in this.ModelResult.TermPlayerAttendances) { this.TermPlayerAttendances.Add((attendance)); } foreach (var attendance in this.ModelResult.CasualPlayerAttendances) { this.CasualPlayerAttendances.Add((attendance)); } //this.CasualPlayerAttendances = this.ModelResult.CasualPlayerAttendances; //if (!(this.Attendance.AttendanceID > 0)) await this.LoadAllPlayers(); }