private void xtraTabControlIngressi_SelectedPageChanged(object sender, TabPageChangedEventArgs e) { if (e.Page == null) { return; } // notifico di visualizzare solo la pagina corrente foreach (XtraTabPage xtraTabPage in this.xtraTabControlIngressi.TabPages) { if (xtraTabPage.Controls.Count == 0) { continue; } XtraUserControlCalendario2 ucal = xtraTabPage.Controls[0] as XtraUserControlCalendario2; if (ucal != null) { if (ucal.NotificaAttivazione(e.Page)) { m_ActiveControl = ucal; } } } this.schedulerControlPrenotazioni.Refresh(); }
private void schedulerControlPrenotazioni_EditAppointmentFormShowing(object sender, DevExpress.XtraScheduler.AppointmentFormEventArgs e) { Prenotazione prenotazione = e.Appointment.GetSourceObject(this.schedulerStoragePrenotazioni) as Prenotazione; if (prenotazione != null && prenotazione.Label != Prenotazione.LabelDisabled) { XtraFormEditPrenotazione formpre = new XtraFormEditPrenotazione(); formpre.Init(prenotazione); if (formpre.ShowDialog(this) == DialogResult.OK) { XtraUserControlCalendario2 ucal = this.xtraTabControlIngressi.SelectedTabPage.Controls[0] as XtraUserControlCalendario2; ucal.NotificaAttivazione(this.xtraTabControlIngressi.SelectedTabPage); } } this.schedulerControlPrenotazioni.Refresh(); e.Handled = true; }