示例#1
0
        private void schedulerControl_EditAppointmentFormShowing(object sender, AppointmentFormEventArgs e)
        {
            Appointment app = e.Appointment;

            //if (app.Description == "") app.StatusId = 0;
            if (app.Description == "")
            {
                app.CustomFields["IdVisita"] = "0";
            }

            FrmNuevaVisita myForm = FrmNuevaVisita.Instancia;

            if (schedulerStorage.Appointments.IsNewAppointment(app))
            {
                myForm.Accion = Enums.TipoAccionFormulario.Nuevo;
            }
            else
            {
                myForm.Accion = Enums.TipoAccionFormulario.Editar;
            }


            myForm.ControlParam          = (SchedulerControl)sender;
            myForm.AppointmentCalendario = app;

            //myForm.frmLoad();

            //if(!schedulerControl1.Storage.Appointments.IsNewAppointment(app))
            //myForm.CargarFormulario();

            e.DialogResult = myForm.ShowDialog();

            schedulerControl1.Refresh();
            e.Handled = true;
        }
示例#2
0
 private void CargarVisita(Entidades.Calendario.clsVisita visita)
 {
     if (visita != null)
     {
         FrmNuevaVisita form = FrmNuevaVisita.Instancia;
         form.IdVisitaConsulta = visita.Id;
         form.Accion           = Enums.TipoAccionFormulario.Consultar;
         form.EsInforme        = true;
         form.ShowDialog();
     }
 }
示例#3
0
        private void contextMenuStrip1_Click(object sender, EventArgs e)
        {
            FrmNuevaVisita form = new FrmNuevaVisita();

            form.ShowDialog();
        }