Exemplo n.º 1
0
        private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
        {
            e.Cancel = true;

            try
            {
                if (e.Appointment.DataItem != null)
                {
                    //cs_reservar.Start = e.Appointment.Start;
                    //cs_reservar.End = e.Appointment.End;
                    //cs_reservar.ResourceId = e.Appointment.ResourceId.KeyValue.ToString();
                    //cs_reservar.NewDocEntry = int.Parse(e.Appointment.UniqueId.KeyValue.ToString());

                    //frm_AddAppointment frm = new frm_AddAppointment();
                    //frm.ShowDialog();
                    //frm = null;
                }
                else
                {
                    //if (txt_salas.Text == "")
                    //{
                    //    MessageBox.Show("Debe de seleccionar una Sala.");
                    //    txt_salas.Focus();
                    //}
                    //else
                    //{
                    if (this.AppointmentNuevaCita(e) == true)
                    {
                        cs_reservar.Start         = e.Appointment.Start;
                        cs_reservar.End           = e.Appointment.End;
                        cs_reservar.Estado        = "RESERVADO";
                        cs_reservar.ResourceId    = e.Appointment.ResourceId.KeyValue.ToString();
                        cs_reservar.UnidadNegocio = int.Parse(txt_unidad_negocio.SelectedValue.ToString());
                        cs_reservar.NewDocEntry   = _NewDocEntry;

                        this.InitializeRadSchedulerDataBinding();     // primero carga los datos de la base de datos
                        if (txt_salas.Text != "")
                        {
                            this.InitializeRadSchedulerResource();
                        }
                        else
                        {
                            this.InitializeRadSchedulerResources();
                        }

                        frm_AddAppointment frm = new frm_AddAppointment();
                        frm.ShowDialog();
                        frm = null;

                        this.InitializeRadSchedulerDataBinding();     // primero carga los datos de la base de datos
                        if (txt_salas.Text != "")
                        {
                            this.InitializeRadSchedulerResource();
                        }
                        else
                        {
                            this.InitializeRadSchedulerResources();
                        }
                    }
                    else
                    {
                        return;
                    }
                    //}
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemplo n.º 2
0
 private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
 {
     e.AppointmentEditDialog = new MultipleResourcesDialog();
 }
Exemplo n.º 3
0
 private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
 {
     e.Cancel = true;
 }
Exemplo n.º 4
0
 private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
 {
     this.radTxtEventList.Text          += "AppointmentEditDialogShowing\r\n";
     this.radTxtEventList.SelectionStart = this.radTxtEventList.TextLength;
     this.radTxtEventList.ScrollToCaret();
 }