private void btnBuscarTurno_Click(object sender, EventArgs e)
        {
            using (FrmAgendaConsultar frm = new FrmAgendaConsultar(_profesional, 3))
            {
                frm.ShowDialog(this);
                if (frm.TurnoSeleccionado != null)
                {
                    this._turno = frm.TurnoSeleccionado;
                }
            }
            if (_turno != null)
            {
                tbTurno.Text = _turno.ToString();
                try
                {
                    IResultado <Afiliado> resultadoAfiliado = _afiliadoDomain.Obtener(_turno.IdAfiliado);
                    if (!resultadoAfiliado.Correcto)
                    {
                        throw new ResultadoIncorrectoException <Afiliado>(resultadoAfiliado);
                    }

                    _afiliado       = resultadoAfiliado.Retorno;
                    tbAfiliado.Text = _afiliado.NombreCompleto;

                    this.dpFecha.Enabled             = true;
                    this.btnConfirmarHorario.Enabled = true;
                    this.button1.Enabled             = true;
                }
                catch (Exception ex)
                {
                    MensajePorPantalla.MensajeError(ex.Message);
                    this.Close();
                }
            }
        }
 private void btnBuscarTurno_Click(object sender, EventArgs e)
 {
     using (FrmAgendaConsultar frm = new FrmAgendaConsultar(1))
     {
         frm.ShowDialog(this);
         if (frm.TurnoSeleccionado != null)
         {
             this._turno = frm.TurnoSeleccionado;
             tbTurno.Text = _turno.ToString();
             btnBuscarTurno.Enabled = false;
             this.btnValidarBono.Enabled = true;
         }
     }
 }
Exemplo n.º 3
0
        private void btnBuscarTurno_Click(object sender, EventArgs e)
        {
            using (FrmAgendaConsultar frm = new FrmAgendaConsultar(2))
            {
                frm.ShowDialog(this);

                if (frm.TurnoSeleccionado != null)
                {
                    this._turno             = frm.TurnoSeleccionado;
                    this.textBox1.Text      = _turno.ToString();
                    this.btnAceptar.Enabled = true;
                }
            }
        }
Exemplo n.º 4
0
 private void tsmAgenda_Consultar_Click(object sender, EventArgs e)
 {
     try
     {
         FrmAgendaConsultar frm = (Program.ContextoActual.ProfesionalDelUsuario == null) ? new FrmAgendaConsultar(0) : new FrmAgendaConsultar(Program.ContextoActual.ProfesionalDelUsuario, 0);
         frm.StartPosition = FormStartPosition.CenterParent;
         frm.WindowState   = FormWindowState.Maximized;
         frm.MdiParent     = this;
         frm.Show();
     }
     catch (Exception ex)
     {
         MensajePorPantalla.MensajeError(this, ex.Message);
     }
 }
 private void btnBuscarTurno_Click(object sender, EventArgs e)
 {
     using (FrmAgendaConsultar frm = new FrmAgendaConsultar(1))
     {
         frm.AfiliadoBuscador = _afiliado;
         frm.ShowDialog(this);
         if (frm.TurnoSeleccionado != null)
         {
             this._turno           = frm.TurnoSeleccionado;
             this.tbTurno.Text     = _turno.ToString();
             this.cbTipo.Enabled   = true;
             this.tbMotivo.Enabled = true;
             this.button3.Enabled  = true;
         }
     }
 }