/// <summary> /// Обновить /// </summary> /// <param name="model"></param> public void Update(IAttendanceModel model) { if (model.Date == dateTimePicker.Value.Date && model.Schedule.Id == ScheduleTimes[timeComboBox.SelectedIndex].Id) { StudentsAttendance = model.Students; DisposeAttendancePanel(); FillAttendance(); } }
private void Model_StudentsUpdated(object sender, EventArgs e) { Model = sender as IAttendanceModel; lock (views) { views .ToList() .ForEach((x) => { x.Update(Model); }); } }
public AttendancePresenter(IAttendanceModel model) { Model = model; Model.StudentsUpdated += Model_StudentsUpdated; }