コード例 #1
0
    protected void btnGuardarCargoActualCursoPosgrado_Click(object sender, EventArgs e)
    {
        // Requeridos
        string FEstado = "";

        if ((pnlCargoActualCursoPosgradoOtraCarrera.Visible) && (!sgwNucleo.Funciones.VerificarRequerido(edtCargoActualCursoPosgradoOtraCarrera.Text)))
        {
            FEstado = "la carrera";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequerido(edtCargoActualCursoPosgradoActividadCurricular.Text))
        {
            FEstado = "la(s) actividad(es) curricular(es)";
        }
        else
        if ((pnlCargoActualOtroCargo.Visible) && (!sgwNucleo.Funciones.VerificarRequerido(edtCargosDocentesActualOtroCargo.Text)))
        {
            FEstado = "el tipo de cargo";
        }
        else
        if (!sgwNucleo.Funciones.VerificarRequeridoInt(edtCargoActualCursoPosgradoAnioInicio.Text))
        {
            FEstado = "el año de inicio";
        }
        if (FEstado != "")
        {
            sgwNucleo.Pagina.MostrarEstado("Debe completar " + FEstado + ".", 1);
            return;
        }
        sgwMulticapa.Gestor.Gestor FGestor         = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        CargoActCurric             FCargoActCurric = new CargoActCurric();

        if (Session["OperacionDetalle3"].ToString() == "1")
        {
            FCargoActCurric.ID_CARGOS_DOCENTES = int.Parse(Session["ID_CARGOS_DOCENTES"].ToString());
        }
        else
        {
            FGestor.ObtenerObjeto(FCargoActCurric, grdCursosPosgrado);
        }
        FCargoActCurric.ID_TIPOS_CARRERAS = int.Parse(cmbCargoActualCursoPosgradoTipo.SelectedValue);
        if (cmbCargoActualCursoPosgradoCarrera.SelectedValue != "-1")
        {
            FCargoActCurric.CARRERA_UNIV = true;
            FCargoActCurric.ID_CARRERAS  = int.Parse(cmbCargoActualCursoPosgradoCarrera.SelectedValue);
            FCargoActCurric.OTRA_CARRERA = "";
        }
        else
        {
            FCargoActCurric.CARRERA_UNIV = false;
            FCargoActCurric.ID_CARRERAS  = 0;
            FCargoActCurric.OTRA_CARRERA = edtCargoActualCursoPosgradoOtraCarrera.Text;
        }
        FCargoActCurric.ACTIVIDAD_CURRICULAR = edtCargoActualCursoPosgradoActividadCurricular.Text;
        FCargoActCurric.ANIO_INICIO          = int.Parse(edtCargoActualCursoPosgradoAnioInicio.Text);
        FCargoActCurric.PLAN_ESTUDIOS        = int.Parse(edtCargoActualCursoPosgradoPlanEstudios.Text);
        FGestor.GuardarObjeto(FCargoActCurric);
        actualizarDatosCargosCarrerasPosgrado();
        sgwNucleo.Pagina.CerrarPopup(popCargoActualCursoPosgrado);
    }
コード例 #2
0
    protected void btnModificarCursosPosgrado_Click(object sender, EventArgs e)
    {
        if (grdCursosPosgrado.FocusedRowIndex < 0)
        {
            return;
        }
        sgwMulticapa.Gestor.Gestor FGestor         = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        CargoActCurric             FCargoActCurric = new CargoActCurric();

        FGestor.ObtenerObjeto(FCargoActCurric, grdCursosPosgrado);
        Session["OperacionDetalle3"] = "2";
        if (FCargoActCurric.CARRERA_UNIV)
        {
            cmbCargoActualCursoPosgradoCarrera.SelectedValue = FCargoActCurric.ID_CARRERAS.ToString();
            edtCargoActualCursoPosgradoOtraCarrera.Text      = "";
        }
        else
        {
            cmbCargoActualCursoPosgradoCarrera.SelectedValue = "-1";
            edtCargoActualCursoPosgradoOtraCarrera.Text      = FCargoActCurric.OTRA_CARRERA;
        }
        cmbCargoActualCursoPosgradoCarrera_SelectedIndexChanged(sender, e);
        edtCargoActualCursoPosgradoActividadCurricular.Text = FCargoActCurric.ACTIVIDAD_CURRICULAR;
        cmbCargoActualCursoPosgradoTipo.SelectedValue       = FCargoActCurric.ID_TIPOS_CARRERAS.ToString();
        edtCargoActualCursoPosgradoAnioInicio.Text          = FCargoActCurric.ANIO_INICIO.ToString();
        edtCargoActualCursoPosgradoPlanEstudios.Text        = FCargoActCurric.PLAN_ESTUDIOS.ToString();
        popCargoActualCursoPosgrado.ShowOnPageLoad          = true;
    }
コード例 #3
0
    protected void btnEliminarCursosPosgrado_Click(object sender, EventArgs e)
    {
        if (grdCursosPosgrado.FocusedRowIndex < 0)
        {
            return;
        }
        sgwMulticapa.Gestor.Gestor FGestor         = sgwMulticapa.Gestor.Gestor.GestorGlobal();
        CargoActCurric             FCargoActCurric = new CargoActCurric();

        FGestor.ObtenerObjeto(FCargoActCurric, grdCursosPosgrado);
        FGestor.EliminarObjeto(FCargoActCurric);
        actualizarDatosCargosCarrerasPosgrado();
    }