protected void Cargar() { Catalogo_ExamenBL oCatalogo_examen = new Catalogo_ExamenBL(); Orden_ExamenBL oOrden_examen = new Orden_ExamenBL(); Orden_ExamenBE eOrden_examen; eOrden_examen = oOrden_examen.Registro(Convert.ToInt32(txtId_orden_examen.Text)); txtFecha_examen.Text = ""; txtId_orden_atencion.Text = ""; txtId_historia.Text = ""; txtPaciente.Text = ""; txtMedico.Text = ""; cboTipo_examen.SelectedValue = "1"; txtExamen.Text = ""; txtTipo_atencion.Text = ""; if (eOrden_examen != null) { txtFecha_examen.Text = eOrden_examen.Fecha.ToString("dd/MM/yyyy"); txtId_orden_atencion.Text = eOrden_examen.Id_orden_atencion.ToString(); txtId_historia.Text = eOrden_examen.Id_historia.ToString(); txtPaciente.Text = eOrden_examen.Paciente; txtMedico.Text = eOrden_examen.Medico; cboTipo_examen.SelectedValue = eOrden_examen.Id_tpo_examen.ToString(); txtExamen.Text = eOrden_examen.Examen; txtTipo_atencion.Text = eOrden_examen.Tipo_atencion; grvListado.Visible = true; grvListado.DataSource = oCatalogo_examen.ListadoRequisitos(eOrden_examen.Id_examen); grvListado.DataBind(); if (grvListado.Rows.Count == 0) { lblMensaje.Text = "No hay requisitos para este examen"; } } else { grvListado.Visible = false; lblMensaje.Text = "Orden de examen no existe"; cboLocal.SelectedValue = "0"; cboConsultorio.SelectedValue = "0"; cboHorario.SelectedValue = "0"; txtEstado_programacion.Text = ""; txtEspecialista.Text = ""; btnVerificar.Visible = false; } }
protected void CargaProgramacion() { Programacion_ExamenBL oProgramacion = new Programacion_ExamenBL(); Programacion_ExamenBE eProgramacion; eProgramacion = oProgramacion.Registro(0, txtId_orden_examen.Text == "" ? 0 : Convert.ToInt32(txtId_orden_examen.Text)); if (eProgramacion != null) { hidProgramacion.Value = eProgramacion.Id_programacion.ToString(); cboLocal.SelectedValue = eProgramacion.Id_local.ToString(); Carga_Consultorio(); cboConsultorio.SelectedValue = eProgramacion.Id_consultorio.ToString(); Carga_Horario(); cboHorario.SelectedValue = eProgramacion.Id_horario.ToString(); txtEstado_programacion.Text = eProgramacion.Estado; txtEspecialista.Text = eProgramacion.Especialista; btnVerificar.Visible = true; Catalogo_ExamenBL oCatalogo_examen = new Catalogo_ExamenBL(); grvListado.Visible = true; grvListado.DataSource = oCatalogo_examen.ListadoRequisitos(Convert.ToInt32(txtId_orden_examen.Text)); grvListado.DataBind(); if (grvListado.Rows.Count == 0) { lblMensaje.Text = "No hay requisitos para este examen"; } } else { cboLocal.SelectedValue = "0"; cboConsultorio.SelectedValue = "0"; cboHorario.SelectedValue = "0"; txtEstado_programacion.Text = ""; txtEspecialista.Text = ""; btnVerificar.Visible = false; lblMensaje.Text = "La Orden de Examen aún no se ha programado"; } }