Beispiel #1
0
 private void txtEditCedula_Leave(object sender, EventArgs e)
 {
     if (pc.exist(txtCedula.Text))
     {
         Persona p = pc.Get(txtCedula.Text);
         txteditNombre.Text   = p.nombre;
         txteditApellido.Text = p.apellido;
         txtEditDir.Text      = p.direccion;
         txtEditEdad.Text     = p.edad + "";
         txteditTel.Text      = p.telefono;
         txtEditDir.Text      = p.direccion;
         txtEditEmail.Text    = p.email;
     }
 }
Beispiel #2
0
        private void txtCedulaPac_Leave_1(object sender, EventArgs e)
        {
            if (txtCedulaPac.Text == "")
            {
                return;
            }

            if (pc.exist(txtCedulaPac.Text))
            {
                Persona p = pc.Get(txtCedulaPac.Text);
                txtCedulaPac.Text    = p.dni;
                txtNombrePac.Text    = p.nombre;
                txtApellidosPac.Text = p.apellido;
                txtEdadPac.Text      = p.edad + "";
                txtTelPac.Text       = p.telefono;
                id_pacient           = Convert.ToInt32(p.id_person);
            }
        }
        private void tbSearchCita_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            cita = listaCitas[tbSearchCita.CurrentRow.Index];
            if (cita != null)
            {
                if (DateTime.Parse(cita.fecha.Value.ToString("dd/MM/yyy")) != DateTime.Parse(DateTime.Now.ToString("dd/MM/yyyy")))
                {
                    Notification.Show("La cita debe ser atendida en la fecha espeficada", AlertType.warm);
                    return;
                }
                Persona p = pc.Get(tbSearchCita.CurrentRow.Cells[1].Value.ToString());
                selectPaciente = p.id_person;
                txtCedula.Text = p.dni;
                txtNombre.Text = p.nombre + " " + p.apellido;
                txtEdad.Text   = p.edad + "";
                txtTel.Text    = p.telefono;

                tabControlConsultas.SelectedIndex = 1;
            }
        }