protected void Page_Load(object sender, EventArgs e) { objPeriodoDC = (PeriodoWS.PeriodoDC)Session["Periodo"]; objInformeDC = (InformeFinCicloWS.InformeFinCicloDC)Session["Informe"]; objCursoxProfesorDC = (CursoWS.CursoxProfesorDC)Session["CursoxProfesor"]; if (!Page.IsPostBack) { texto_PeriodoActual.Text = objPeriodoDC.Descripcion; texto_FechaLimite.Text = objPeriodoDC.FechaFin; texto_DescripcionCurso.Text = objCursoxProfesorDC.Codigo + " - " + objCursoxProfesorDC.Nombre; //SETEANDO DATOS DE INFORME DE FIN DE CICLO txt_DesarrolloAprendizaje.Text = objInformeDC.DesarrolloUnidades; txt_Infraestructura.Text = objInformeDC.ComentarioInfraestructura; txt_Alumnos.Text = objInformeDC.ComentarioAlumnos; txt_Delegados.Text = objInformeDC.ComentarioDelegados; txt_EncuestaAcademica.Text = objInformeDC.ComentarioEncuesta; //OBTENIENDO PERIODOS setearPeriodos(); } //OBTENIENDO LOGRO TERMINAL setearLogros(); //OBTENIENDO STUDENT OUTCOMES grdOutcomesDataBind(); //OBTENIENDO HALLAZGOS grdHallazgosDataBind(); //OBTENER ACCIONES DE MEJORA grdAccionesMejoraDataBind(); //OBTENER ACCIONES PREVIAS grdAccionesPreviasDataBind(); //OBTENER ANTECEDENTES reporteInformeFinCicloDataBind(); }
public void OnConfirm(object sender, EventArgs e) { InformeFinCicloWS.InformeFinCicloClient client = null; HallazgoWS.HallazgoClient hallazgoClient = null; HallazgoWS.HallazgoCollectionDC objHallazgoCollection = null; String sEstado = "EN PROCESO"; int informeID = objInformeDC.InformeFinCicloId; String sUnidades = txt_DesarrolloAprendizaje.Text.ToString().Trim(); String sInfraestructura = txt_Infraestructura.Text.ToString().Trim(); String sAlumnos = txt_Alumnos.Text.ToString().Trim(); String sDelegados = txt_Delegados.Text.ToString().Trim(); String sEncuesta = txt_EncuestaAcademica.Text.ToString().Trim(); try { client = new InformeFinCicloWS.InformeFinCicloClient(); hallazgoClient = new HallazgoWS.HallazgoClient(); objHallazgoCollection = hallazgoClient.WSListarHallazgosxInformeFinCiclo(informeID); string confirmValue = Request.Form["confirm_value"]; if (confirmValue == "YES") { if (!existenCamposVacios() && objHallazgoCollection.LstHallazgos.Count() > 0) { sEstado = "FINALIZADO"; objInformeDC = client.WSEditarInformeFinCiclo(informeID, sEstado, sUnidades, sInfraestructura, sAlumnos, sDelegados, sEncuesta); this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Usted ha finalizado el Informe de Fin de Ciclo satisfactorimente.')", true); } else { objInformeDC = client.WSEditarInformeFinCiclo(informeID, sEstado, sUnidades, sInfraestructura, sAlumnos, sDelegados, sEncuesta); this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Usted debe llenar todos los campos para completar el Informe de Fin de Ciclo.')", true); } } else { objInformeDC = client.WSEditarInformeFinCiclo(informeID, sEstado, sUnidades, sInfraestructura, sAlumnos, sDelegados, sEncuesta); this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('La información ha sido almacenada. Para finalizar el Informe de Fin de Ciclo, debe enviar el Informe.')", true); } } catch (Exception ex) { MostrarAlert("GUARDAR INFORME: " + ex.Message); } finally { client = null; } }