Пример #1
0
    protected void btnEliminarCargoNoAcademicoP_Click(object sender, EventArgs e)
    {
        if (grdCargosNoAcademicosABMP.FocusedRowIndex < 0)
        {
            return;
        }
        sgwMulticapa.Gestor.Gestor FGestor          = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        CargoNoDocente             FCargoNoDocenteP = new CargoNoDocente();

        FGestor.ObtenerObjeto(FCargoNoDocenteP, grdCargosNoAcademicosABMP);
        FGestor.EliminarObjeto(FCargoNoDocenteP);
        actualizarDatosCargoNoAcademicoP();
    }
Пример #2
0
    protected void btnModificarCargoNoAcademico_Click(object sender, EventArgs e)
    {
        if (grdCargosNoAcademicosABM.FocusedRowIndex < 0)
        {
            return;
        }
        sgwMulticapa.Gestor.Gestor FGestor         = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        CargoNoDocente             FCargoNoDocente = new CargoNoDocente();

        FGestor.ObtenerObjeto(FCargoNoDocente, grdCargosNoAcademicosABM);
        Session["OperacionDetalle"]                 = "M";
        edtCargosNoAcademicosCargoFuncion.Text      = FCargoNoDocente.CARGO;
        edtCargosNoAcademicosHsRelojSemanales.Text  = FCargoNoDocente.DEDICACION_SEMANAL.ToString();
        edtCargosNoAcademicosFechaInicio.Text       = FCargoNoDocente.LeerFecha("FECHA_INICIO");
        edtCargosNoAcademicosFechaFinalizacion.Text = "";
        edtCargosNoAcademicosFunciones.Text         = FCargoNoDocente.FUNCIONES;
        if (FCargoNoDocente.INSTITUCION_UNIV)
        {
            cmbCargoNoAcademicoInstitucion.SelectedValue = FCargoNoDocente.ID_INSTITUCIONES.ToString();
            edtOtraCargoNoAcademicoInstitucion.Text      = "";
        }
        else
        {
            cmbCargoNoAcademicoInstitucion.SelectedValue = "-1";
            edtOtraCargoNoAcademicoInstitucion.Text      = FCargoNoDocente.OTRA_INSTITUCION;
        }
        cmbCargoNoAcademicoInstitucion_SelectedIndexChanged(sender, e);
        cmbCargosNoAcademicosSemanasAnual.Text = FCargoNoDocente.ID_TIPOS_DURACIONES_DED.ToString();
        if (FCargoNoDocente.ID_SUBDISCIPLINAS != 0)
        {
            DataSet FData = FGestor.LeerSQL("SELECT ID_DISCIPLINAS FROM SIS_CONEAU.SUBDISCIPLINAS " +
                                            "WHERE ID_SUBDISCIPLINAS = " + FCargoNoDocente.ID_SUBDISCIPLINAS.ToString());
            if (FData.Tables[0].Rows.Count < 1)
            {
                cmbCargosNoAcademicosDisciplina.SelectedIndex = 0;
            }
            else
            {
                cmbCargosNoAcademicosDisciplina.SelectedValue = FData.Tables[0].Rows[0].ItemArray[0].ToString();
            }
            cmbCargosNoAcademicosDisciplina_SelectedIndexChanged(null, null);

            cmbCargosNoAcademicosSubdisciplina.SelectedValue = FCargoNoDocente.ID_SUBDISCIPLINAS.ToString();
            cmbCargosNoAcademicosSubdisciplina_SelectedIndexChanged(null, null);
        }
        else
        {
            cmbCargosNoAcademicosDisciplina.SelectedIndex = 0;
            cmbCargosNoAcademicosDisciplina_SelectedIndexChanged(null, null);
            cmbCargosNoAcademicosSubdisciplina_SelectedIndexChanged(null, null);
        }
        if (pnlCargosNoAcademicosOtraDisciplina.Visible)
        {
            edtCargosNoAcademicosOtraDisciplina.Text = FCargoNoDocente.OTRA_DISCIPLINA;
        }
        if (pnlCargosNoAcademicosOtraSubdisciplina.Visible)
        {
            edtCargosNoAcademicosOtraSubdisciplina.Text = FCargoNoDocente.OTRA_SUBDISCIPLINA;
        }
        popCargosNoAcademicos.ShowOnPageLoad = true;
    }
Пример #3
0
    // Botones Popup Cargos Desempeniados
    protected void btnAceptarCargoNoAcademicoP_Click(object sender, EventArgs e)
    {
        // Requeridos
        string FEstado = "";

        if ((pnlCargoNoAcademicoInstitucionP.Visible) && (!sgwNucleo.Funciones.VerificarRequerido(edtOtraCargoNoAcademicoInstitucionP.Text)))
        {
            FEstado = "la institución";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtCargosNoAcademicosCargoFuncionP.Text))
        {
            FEstado = "el cargo";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequeridoInt(edtCargosNoAcademicosHsRelojSemanalesP.Text))
        {
            FEstado = "la dedicación semanal en horas reloj";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtCargosNoAcademicosFechaInicioP.Text))
        {
            FEstado = "la fecha de inicio";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtCargosNoAcademicosFuncionesP.Text))
        {
            FEstado = "las funciones";
        }
        else
        if ((int.Parse(edtCargosNoAcademicosHsRelojSemanalesP.Text) < 1) || (int.Parse(edtCargosNoAcademicosHsRelojSemanalesP.Text) > 60))
        {
            sgwNucleo.Pagina.MostrarEstado("La dedicación semanal ingresada no es válida.", 1);
            return;
        }
        if ((pnlCargosNoAcademicosOtraDisciplinaP.Visible) && (!sgwNucleo.Funciones.VerificarRequerido(edtCargosNoAcademicosOtraDisciplinaP.Text)))
        {
            FEstado = "la disciplina";
        }
        else
        if ((pnlCargosNoAcademicosOtraSubdisciplinaP.Visible) && (!sgwNucleo.Funciones.VerificarRequerido(edtCargosNoAcademicosOtraSubdisciplinaP.Text)))
        {
            FEstado = "la subdisciplina";
        }
        if (FEstado != "")
        {
            sgwNucleo.Pagina.MostrarEstado("Debe completar " + FEstado + ".", 1);
            return;
        }
        sgwMulticapa.Gestor.Gestor FGestor          = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        CargoNoDocente             FCargoNoDocenteP = new CargoNoDocente();

        if (Session["OperacionDetalle"].ToString() == "M")
        {
            FGestor.ObtenerObjeto(FCargoNoDocenteP, int.Parse(grdCargosNoAcademicosABMP.GetRowValues(grdCargosNoAcademicosABMP.FocusedRowIndex, "ID_CARGOS_NO_DOCENTES").ToString()));
        }
        else
        {
            FCargoNoDocenteP.ID_DOCENTES = int.Parse(Session["ID_DOCENTES"].ToString());
        }
        FCargoNoDocenteP.ID_INSTITUCIONES = int.Parse(cmbCargoNoAcademicoInstitucionP.SelectedValue.ToString());
        FCargoNoDocenteP.GuardarFecha("FECHA_INICIO", edtCargosNoAcademicosFechaInicioP.Text);
        FCargoNoDocenteP.GuardarFecha("FECHA_FINALIZACION", edtCargosNoAcademicosFechaFinalizacionP.Text);
        FCargoNoDocenteP.CARGO = edtCargosNoAcademicosCargoFuncionP.Text;
        FCargoNoDocenteP.DEDICACION_SEMANAL      = int.Parse(edtCargosNoAcademicosHsRelojSemanalesP.Text);
        FCargoNoDocenteP.FUNCIONES               = edtCargosNoAcademicosFuncionesP.Text;
        FCargoNoDocenteP.ID_TIPOS_DURACIONES_DED = int.Parse(cmbCargosNoAcademicosSemanasAnualP.SelectedValue);
        FCargoNoDocenteP.ID_SUBDISCIPLINAS       = int.Parse(cmbCargosNoAcademicosSubdisciplinaP.SelectedValue);
        if (pnlCargosNoAcademicosOtraDisciplinaP.Visible)
        {
            FCargoNoDocenteP.OTRA_DISCIPLINA = edtCargosNoAcademicosOtraDisciplinaP.Text;
        }
        if (pnlCargosNoAcademicosOtraSubdisciplinaP.Visible)
        {
            FCargoNoDocenteP.OTRA_SUBDISCIPLINA = edtCargosNoAcademicosOtraSubdisciplinaP.Text;
        }
        if (cmbCargoNoAcademicoInstitucionP.SelectedValue == "-1")
        {
            FCargoNoDocenteP.INSTITUCION_UNIV = false;
            FCargoNoDocenteP.ID_INSTITUCIONES = 0;
            FCargoNoDocenteP.OTRA_INSTITUCION = edtOtraCargoNoAcademicoInstitucionP.Text;
        }
        else
        {
            FCargoNoDocenteP.INSTITUCION_UNIV = true;
            FCargoNoDocenteP.ID_INSTITUCIONES = int.Parse(cmbCargoNoAcademicoInstitucionP.SelectedValue);
            FCargoNoDocenteP.OTRA_INSTITUCION = "";
        }
        FGestor.GuardarObjeto(FCargoNoDocenteP);
        actualizarDatosCargoNoAcademico();
        actualizarDatosCargoNoAcademicoP();
        sgwNucleo.Pagina.CerrarPopup(popCargosNoAcademicosP);
    }