Beispiel #1
0
        /// <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();
            }
        }
Beispiel #2
0
 private void Model_StudentsUpdated(object sender, EventArgs e)
 {
     Model = sender as IAttendanceModel;
     lock (views)
     {
         views
         .ToList()
         .ForEach((x) =>
         {
             x.Update(Model);
         });
     }
 }
Beispiel #3
0
        public AttendancePresenter(IAttendanceModel model)
        {
            Model = model;

            Model.StudentsUpdated += Model_StudentsUpdated;
        }