Example #1
0
    protected void btnProgramar_Click(object sender, EventArgs e)
    {
        if (txtId_orden_examen.Text.Trim() == "")
        {
            lblMensaje.Text = "Ingrese Orden de Examen";
            txtId_orden_examen.Focus();
            return;
        }

        if (cboLocal.SelectedValue == "" || cboLocal.SelectedValue == "0")
        {
            lblMensaje.Text = "Seleccione Local";
            cboLocal.Focus();
            return;
        }
        if (cboConsultorio.SelectedValue == "" || cboConsultorio.SelectedValue == "0")
        {
            lblMensaje.Text = "Seleccione Consultorio";
            cboConsultorio.Focus();
            return;
        }
        if (cboHorario.SelectedValue == "" || cboHorario.SelectedValue == "0")
        {
            lblMensaje.Text = "Seleccione Horario";
            cboHorario.Focus();
            return;
        }
        if (txtEstado_programacion.Text != "")
        {
            lblMensaje.Text = "Ya se ha programado Examen";
            return;
        }

        Programacion_ExamenBL oProgramacion_Examen = new Programacion_ExamenBL();
        Programacion_ExamenBE eProgramacion_Examen = new Programacion_ExamenBE();

        eProgramacion_Examen.Id_orden_examen = Convert.ToInt32(txtId_orden_examen.Text);
        eProgramacion_Examen.Id_horario      = Convert.ToInt32(cboHorario.SelectedValue);
        eProgramacion_Examen.Estado          = "G";

        if (oProgramacion_Examen.Nuevo(eProgramacion_Examen) == true)
        {
            string vmensaje = "Se registró la programación.";
            ClientScript.RegisterStartupScript(GetType(), "MostrarMensaje", "fnMensaje('" + vmensaje + "');", true);
            Response.Redirect("gestionImagenes.aspx");
        }
        else
        {
            lblMensaje.Text = "No se pudo registrar Programación";
        }
    }
Example #2
0
    protected void btnProgramar_Click(object sender, EventArgs e)
    {
        if (txtId_orden_examen.Text.Trim() == "")
        {
            lblMensaje.Text = "Ingrese Orden de Examen";
            txtId_orden_examen.Focus();
            return;
        }

        if (cboLocal.SelectedValue == "")
        {
            lblMensaje.Text = "Seleccione Local";
            cboLocal.Focus();
            return;
        }
        if (cboConsultorio.SelectedValue == "")
        {
            lblMensaje.Text = "Seleccione Consultorio";
            cboConsultorio.Focus();
            return;
        }
        if (cboHorario.SelectedValue == "")
        {
            lblMensaje.Text = "Seleccione Horario";
            cboHorario.Focus();
            return;
        }
        if (txtEstado_programacion.Text != "")
        {
            lblMensaje.Text = "Ya se ha programado Examen";
            return;
        }

        Programacion_ExamenBL oProgramacion_Examen = new Programacion_ExamenBL();
        Programacion_ExamenBE eProgramacion_Examen = new Programacion_ExamenBE();

        eProgramacion_Examen.Id_orden_examen = Convert.ToInt32(txtId_orden_examen.Text);
        eProgramacion_Examen.Id_horario      = Convert.ToInt32(cboHorario.SelectedValue);
        eProgramacion_Examen.Estado          = "G";

        if (oProgramacion_Examen.Nuevo(eProgramacion_Examen) == true)
        {
            Response.Redirect("programacionImagenes.aspx");
        }
        else
        {
            lblMensaje.Text = "No se pudo registrar Programación";
        }
    }
Example #3
0
    protected void btnAnular_Click(object sender, EventArgs e)
    {
        Programacion_ExamenBL oProgramacion_Examen = new Programacion_ExamenBL();
        Programacion_ExamenBE eProgramacion_Examen = new Programacion_ExamenBE();

        eProgramacion_Examen.Id_orden_examen = Convert.ToInt32(txtId_orden_examen.Text);
        eProgramacion_Examen.Id_horario      = Convert.ToInt32(cboHorario.SelectedValue);
        eProgramacion_Examen.Estado          = "G";

        if (oProgramacion_Examen.Nuevo(eProgramacion_Examen) == true)
        {
            Response.Redirect("programacionImagenes.aspx");
        }
        else
        {
            lblMensaje.Text = "No se pudo registrar Programación";
        }
    }