private void uc_AllShiftGrid1_ChangeStatusEvent(object sender, EventArgs e)
 {
     if (((AppoimantsStatus_SP)sender) == AppoimantsStatus_SP.EnAtencion)
     {
         this.Appointment = this.uc_TimeLine1.SelectedAppointment;
         GetPatientRes res = ServiceCalls.GetPatient(this.Appointment.ProfesionalAppointment.PatientId);
         this.Patient      = res.BusinessData.Patient;
         this.DialogResult = System.Windows.Forms.DialogResult.OK;
         this.Close();
     }
 }
Esempio n. 2
0
        void UpdateControls()
        {
            if (State == Fwk.Bases.EntityUpdateEnum.NONE)
            {
                this.txSubject.Enabled = this.btnFindPatient.Enabled = false;
            }

            txtProfesional.Text = Profesional.ApellidoNombre;
            txSubject.Text      = currentApt.Subject;

            lblStatusValue.Text             = ((AppoimantsStatus_SP)currentApt.Status.Value).ToString();
            lblStatusValue.Appearance.Image = imageList1.Images[SchedulerHelper.GetImageStatusKey((AppoimantsStatus_SP)currentApt.Status.Value)];


            dtStart.DateTime = currentApt.Start.Value;
            dtEnd.DateTime   = currentApt.End.Value;

            timeStart.Time = new DateTime(currentApt.Start.Value.Ticks);
            timeEnd.Time   = new DateTime(currentApt.End.Value.Ticks);

            //edLabel.Storage = control.Storage;
            //TODO: Obtener el Patient por id


            ///Se anula a pedido de Dr Renaudo
            //int index = 0;
            if (State == Fwk.Bases.EntityUpdateEnum.NEW)
            {
                currentApt.ProfesionalAppointment = new ProfesionalAppointmentBE();
            }
            //else
            //{
            //    index = cmbMotivoConsulta.Properties.GetDataSourceRowIndex("IdParametro", currentApt.ProfesionalAppointment.IdMotivoConsulta);
            //}

            //cmbMotivoConsulta.ItemIndex = index;

            //if ((AppoimantsStatus_SP)currentApt.Status.Value != AppoimantsStatus_SP.Reservado)
            //    cmbMotivoConsulta.Enabled = false;

            txtPatient.Text = currentApt.ProfesionalAppointment.PatientName;
            if (!String.IsNullOrEmpty(currentApt.ProfesionalAppointment.PatientName))
            {
                SelectedPatientBE = ServiceCalls.GetPatient(currentApt.ProfesionalAppointment.PatientId).BusinessData.Patient;
            }
        }