protected override void OnAppointmentAdded(AppointmentActionEventArgs e) { if (_table == null) { return; } var rows = _table.Select("Id='" + e.Appointment.Key[0].ToString() + "'"); if (rows == null || rows.Length == 0) { AddDataRow(e.Appointment); _source.View.Refresh(); } }
protected override void OnAppointmentDeleted(AppointmentActionEventArgs e) { if (_deleting || _table == null) { return; } _deleting = true; var rows = _table.Select("Id='" + e.Appointment.Key[0].ToString() + "'"); if (rows != null && rows.Length > 0) { _table.Rows.Remove(rows[0]); } _deleting = false; OnSelectionChanged(null); }
protected override void OnAppointmentChanged(AppointmentActionEventArgs e) { if (_table == null) { return; } var rows = _table.Select("Id='" + e.Appointment.Key[0].ToString() + "'"); if (rows != null && rows.Length > 0) { SetRow(e.Appointment, rows[0]); if (((BindingListCollectionView)_source.View).IsEditingItem) { // finish editing and update UI if appointment has been edited in EditAppointmentDialog this.FinishEditing(true); this.Invalidate(); } else { _source.View.Refresh(); } } }
protected virtual void OnAppointmentChanged(AppointmentActionEventArgs e) { RefreshView(); }
private void _schedule_AppointmentAdded(object sender, AppointmentActionEventArgs e) { OnAppointmentAdded(e); }