Пример #1
0
        private void btnAusente_Click(object sender, EventArgs e)
        {
            if (this.row < 0)
            {
                MessageBox.Show("Seleccione un turno");
                return;
            }
            try
            {
                string   idpaciente = this.tabla.Rows[this.row].ItemArray[3].ToString();
                DateTime D          = new DateTime(dtpFecha.Value.Year, dtpFecha.Value.Month, dtpFecha.Value.Day);

                if (turnos.CambiarEstadoTurno(idpaciente, medico.dni, D, 5) == false)
                {
                    MessageBox.Show("Error");
                }
                this.tabla.Clear();



                this.tabla = turnos.TurnosPorMedico(medico.dni, D);

                dgvTurnos.DataSource = this.tabla;
            }catch (Exception ex)
            {
                return;
            }
        }