private void c1Schedule1_BeforeAppointmentShow(object sender, CancelAppointmentEventArgs e) { if (e.Appointment.BusyStatus == null) { e.Appointment.BusyStatus = c1Schedule1.DataStorage.StatusStorage.Statuses[2]; } }
private void c1Schedule1_BeforeAppointmentShow(object sender, CancelAppointmentEventArgs e) { // Don't show built-in form e.Cancel = true; // Create ExcerciseForm for selected Appointment ExcerciseForm form = new ExcerciseForm(c1Schedule1, e.Appointment); // Show form form.ShowDialog(); }
private void c1Schedule1_BeforeAppointmentShow(object sender, CancelAppointmentEventArgs e) { // Don't show built-in form e.Cancel = true; Appointment appointment = e.Appointment; foreach (Form f in Application.OpenForms) { if (f is AppointmentForm && ((AppointmentForm)f).Appointment == appointment) { // if form is already opened, just bring it to front f.BringToFront(); return; } } if (appointment.RecurrenceState == RecurrenceStateEnum.Exception || appointment.RecurrenceState == RecurrenceStateEnum.Occurrence) { // show Series dialog SeriesDialog dial = new SeriesDialog(appointment.Subject); if (dial.ShowDialog() == DialogResult.OK) { if (dial.Series) { // if customer selected Series, switch to the master appointment appointment = appointment.ParentRecurrence; foreach (Form f in Application.OpenForms) { if (f is AppointmentForm && ((AppointmentForm)f).Appointment == appointment) { // if form is already opened, just bring it to front f.BringToFront(); return; } } } } else { // do nothing return; } } // Create AppointmentForm for selected Appointment if (_createRecurrenceFlag) { _createRecurrenceFlag = false; appointment.Tag = "Create recurrence"; } AppointmentForm form = new AppointmentForm(c1Schedule1, appointment); form.Show(this); }
private void c1Schedule1_BeforeAppointmentCreate(object sender, CancelAppointmentEventArgs e) { // Don't show built-in form e.Cancel = true; // Create new Appointment object with currently selected DateTime and default // exercise duration (45 minutes) Appointment app = c1Schedule1.DataStorage.AppointmentStorage.Appointments.Add( c1Schedule1.CurrentDate, TimeSpan.FromMinutes(45)); // Create ExcerciseForm for the new appointment ExcerciseForm form = new ExcerciseForm(c1Schedule1, app); // Show form if (form.ShowDialog() != DialogResult.OK) { // If user closes form without saving, remove appointment app.Delete(); } }
private void c1Schedule1_Create(object sender, CancelAppointmentEventArgs e) { //スタッフだったらreturn var staff = DB.m_staff.getSingleName(storeList[d_tenpomei.SelectedItem.ToString()], e.Appointment.Links[0].Text); if (staff != null) { return; } //受付未選択で施設予約だったらreturn if (e.Appointment.Links[0].Text != scheduleLabel && MainForm.session_t_reception == null) { Utile.Message.showMessageOK("I03007"); return; } //画面遷移情報格納 MainForm.Facility_reservation.facility_reservation = new DB.t_facility_reservation(); MainForm.Facility_reservation.facility_reservation.start_date = e.Appointment.Start.Date; MainForm.Facility_reservation.facility_reservation.start_time = e.Appointment.Start.TimeOfDay; MainForm.Facility_reservation.facility_reservation.end_date = e.Appointment.End.Date; MainForm.Facility_reservation.facility_reservation.end_time = e.Appointment.End.TimeOfDay; MainForm.Facility_reservation.facility_reservation.selection_start_date = e.Appointment.Start.Date; MainForm.Facility_reservation.facility_reservation.selection_end_date = e.Appointment.Start.Date; MainForm.Facility_reservation.facility_reservation.store_code = storeList[d_tenpomei.SelectedItem.ToString()]; if (e.Appointment.Links[0].Text == scheduleLabel) { MainForm.Facility_reservation.facility_reservation.facility_code = scheduleLabel; } else { MainForm.Facility_reservation.facility_reservation.facility_code = DB.m_facility.getSingleName(storeList[d_tenpomei.SelectedItem.ToString()], e.Appointment.Links[0].Text).facility_code; } MainForm.Facility_reservation.facility_reservation.photographer = MainForm.session_m_staff.staff_name; MainForm.Facility_reservation.facility_reservation.selector = MainForm.session_m_staff.staff_name; //ポップアップイベントキャンセル e.Cancel = true; //コントロールリフレッシュ MainForm.Facility_reservation.PageRefresh(); //画面遷移 MainForm.sendPage(this, MainForm.Facility_reservation); }
// Replace built-in AppointmentForm with the ExerciseForm private void c1Schedule1_BeforeAppointmentShow(object sender, CancelAppointmentEventArgs e) { // Don't show built-in form e.Cancel = true; foreach (Form f in Application.OpenForms) { // activate form if it is already opened if (f is ExerciseForm && ((ExerciseForm)f).Appointment == e.Appointment) { f.BringToFront(); return; } } // Create ExerciseForm for selected Appointment ExerciseForm form = new ExerciseForm(c1Schedule1, e.Appointment); // Show form form.Show(); }
private void c1Schedule1_Edit(object sender, CancelAppointmentEventArgs e) { if (!scheduleList.ContainsKey(e.Appointment.Key[0].ToString())) { return; } //受付未選択で施設予約だったらreturn if (e.Appointment.Links[0].Text != scheduleLabel && MainForm.session_t_reception == null) { Utile.Message.showMessageOK("I03007"); return; } //画面遷移情報格納 MainForm.Facility_reservation.facility_reservation = DB.t_facility_reservation.getSingle(scheduleList[e.Appointment.Key[0].ToString()]); //ポップアップイベントキャンセル e.Cancel = true; //コントロールリフレッシュ MainForm.Facility_reservation.PageRefresh(); //画面遷移 MainForm.sendPage(this, MainForm.Facility_reservation); }
private void c1Schedule1_BeforeAppointmentShow(object sender, CancelAppointmentEventArgs e) { //ポップアップイベントキャンセル e.Cancel = true; }
private void c1Schedule1_BeforeAppointmentCreate(object sender, CancelAppointmentEventArgs e) { // set default status and label e.Appointment.BusyStatus = c1Schedule1.DataStorage.StatusStorage.Statuses[new Guid("{E6569EEF-845E-41FE-8772-C7A252D467F9}")]; // unknown status e.Appointment.Label = c1Schedule1.DataStorage.LabelStorage.Labels[new Guid("{D3F876F9-881B-478C-8594-4941B92D6424}")]; // none }
private void c1Schedule1_BeforeAppointmentCreate(object sender, CancelAppointmentEventArgs e) { // set default exercise duration (45 minutes) e.Appointment.Duration = TimeSpan.FromMinutes(45); }