Beispiel #1
0
    public void pDatoInicial()
    {
        BL_Paciente oPacienteBL = new BL_Paciente();
        BE_Paciente oPacienteBE = null;
        BE_Cita     oCitaBE     = null;

        int IdPaciente = Int32.Parse(Request.QueryString["id"]);
        int IdCita     = Int32.Parse(Request.QueryString["Cita"]);

        oPacienteBE = oPacienteBL.fn_ConsultarPaciente(IdPaciente, "", 0);

        if (oPacienteBE != null)
        {
            txtNombre.Text        = oPacienteBE.Nombres;
            txtApMat.Text         = oPacienteBE.ApellidoMat;
            txtApPat.Text         = oPacienteBE.ApellidoPat;
            txtCorreo.Text        = oPacienteBE.correo;
            txtFecNac.Text        = oPacienteBE.FechaNacimiento.ToString();
            txtNroDoc.Text        = oPacienteBE.dni_paciente;
            txtSexo.Text          = oPacienteBE.SexoDescripcion;
            txtTelefono.Text      = oPacienteBE.TelefonoDomicilio;
            txtTipoDocumento.Text = oPacienteBE.TipoDocumentoNombre;
        }

        oCitaBE = oPacienteBL.fn_ObtenerCitaActiva(IdCita);

        if (oCitaBE != null)
        {
            txtFechaCita.Text          = oCitaBE.FechaHoraCita != DateTime.MinValue ? oCitaBE.FechaHoraCita.ToString("dd/MM/yyyy") : "";
            txtHoraCita.Text           = oCitaBE.FechaHoraCita != DateTime.MinValue ? oCitaBE.FechaHoraCita.ToString("HH:mm") : "";
            btnComprobantePago.Visible = (oCitaBE.ID_EstadoCita == 1);
        }
    }
Beispiel #2
0
    protected void btnAceptar_Click(object sender, EventArgs e)
    {
        BL_Paciente oPacienteBL = new BL_Paciente();
        BE_Paciente oPacienteBE = null;

        oPacienteBE = oPacienteBL.fn_ConsultarPaciente(0, txtNroDoc.Text.Trim(), Int32.Parse(ddlTipoDoc.SelectedValue));

        if (oPacienteBE != null)
        {
            //PacienteBL oPacienteBL = new PacienteBL();
            BE_Cita oCitaBE = null;

            oCitaBE = oPacienteBL.fn_ObtenerCitaActiva(oPacienteBE.ID_Paciente, DateTime.Now);

            if (oCitaBE != null)
            {
                Server.Transfer("GcAdmAmbulatoria.aspx?id=" + oPacienteBE.ID_Paciente.ToString() + "&Cita=" + oCitaBE.ID_Cita.ToString());
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AlertaCita", "alert('No existe una cita activa, por favor registreló como un nueva cita');", true);
            }
        }
        else
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AlertaCliente", "alert('No existe el cliente, por favor registreló como un nuevo cliente');", true);
        }
    }
    public void pDataInicial()
    {
        //pr_CargarCboEstadoCivil();
        pr_CargarCboTipoDocumento();
        pr_CargarCboPais();
        pr_CargarCboSexo();

        string      strPacienteId = Request.QueryString["PacienteId"];
        BL_Paciente oPacienteBL   = new BL_Paciente();
        BE_Paciente oPacienteBE   = null;

        if (strPacienteId != null)
        {
            BL_Paciente BL_Paciente = new BL_Paciente();

            oPacienteBE = oPacienteBL.fn_ConsultarPaciente(Int32.Parse(strPacienteId), "", 0);

            if (oPacienteBE != null)
            {
                txtApellidoM.Text     = oPacienteBE.ApellidoMat;
                txtApellidoP.Text     = oPacienteBE.ApellidoPat;
                txtCelular.Text       = oPacienteBE.Celular;
                txtDireccionN.Text    = oPacienteBE.Direccion;
                txtFechaNac.Text      = oPacienteBE.FechaNacimiento.ToString("dd/MM/yyyy");
                txtNombre.Text        = oPacienteBE.Nombres;
                txtNroDocumento.Text  = oPacienteBE.dni_paciente;
                txtObservacion.Text   = oPacienteBE.Observacion;
                txtTelefono.Text      = oPacienteBE.TelefonoDomicilio;
                ddlPais.SelectedValue = oPacienteBE.ID_Pais.ToString();

                //if (oPacienteBE.ID_EstadoCivil != 0){
                //    ddlEstadoCivil.SelectedValue = oPacienteBE.ID_EstadoCivil.ToString();
                //}

                if (ddlPais.SelectedValue != "")
                {
                    pr_CargarCboDpto(ddlPais.SelectedValue);
                    ddlDepartamento.SelectedValue = oPacienteBE.ID_Departamento.ToString();
                }

                if (ddlDepartamento.SelectedValue != "")
                {
                    pr_CargarCboProv(ddlDepartamento.SelectedValue);
                    ddlProvincia.SelectedValue = oPacienteBE.ID_Provincia.ToString();
                }

                if (ddlProvincia.SelectedValue != "")
                {
                    pr_CargarCboDist(ddlProvincia.SelectedValue);
                    ddDistrito.SelectedValue = oPacienteBE.ID_Distrito.ToString();
                }

                ddlSexo.SelectedValue           = oPacienteBE.ID_Sexo.ToString();
                ddlTipoDocumentoN.SelectedValue = oPacienteBE.ID_TipoDocumento.ToString();
            }
        }
    }
    protected void btnGetOrden_Click(object sender, EventArgs e)
    {
        BL_Paciente oPacienteBL = new BL_Paciente();
        BE_Paciente oPacienteBE = null;

        int intIdTipoDocumento = 0;

        intIdTipoDocumento = Int32.Parse(ddlTipoDocumento.SelectedValue);

        oPacienteBE = oPacienteBL.fn_ConsultarPaciente(0, txtNroDocBus.Text.Trim(), intIdTipoDocumento);

        if (oPacienteBE != null)
        {
            txtNombre.Text        = oPacienteBE.Nombres;
            txtApMat.Text         = oPacienteBE.ApellidoMat;
            txtApPat.Text         = oPacienteBE.ApellidoPat;
            txtNroDoc.Text        = oPacienteBE.dni_paciente;
            txtTipoDocumento.Text = oPacienteBE.ID_TipoDocumento.ToString();

            hdfPacienteId.Value = oPacienteBE.ID_Paciente.ToString();
        }
    }