예제 #1
0
        public LocalReport getReporteHorarios(string reportPath)
        {
            LocalReport rptHorarioAcademico = new LocalReport();

            try
            {
                WSGestorDeReportesMatriculacion.dtstHorario he = (_strCodNivel == "-2")
                                                                    ? _horarioEstudiante()
                                                                    : _horarioCursoParalelo(_strCodNivel, _strCodParalelo);

                ReportDataSource rds = new ReportDataSource();
                rds.Name  = "dsHorarioAcademico";
                rds.Value = he.Horario;

                rptHorarioAcademico.DataSources.Clear();
                rptHorarioAcademico.DataSources.Add(rds);
                rptHorarioAcademico.ReportPath = reportPath;

                rptHorarioAcademico.SetParameters(_getParametrosGeneralesReporte());
                rptHorarioAcademico.Refresh();
            }
            catch (Exception ex)
            {
                Errores err = new Errores();
                err.SetError(ex, "getReporteHorarios");
            }

            return(rptHorarioAcademico);
        }
예제 #2
0
        private WSGestorDeReportesMatriculacion.dtstHorario _limpiarHorarioCurso(WSGestorDeReportesMatriculacion.dtstHorario hcp)
        {
            try
            {
                foreach (DataRow item in hcp.Horario)
                {
                    if (string.IsNullOrEmpty(item["strLunes"].ToString()) &&
                        string.IsNullOrEmpty(item["strMartes"].ToString()) &&
                        string.IsNullOrEmpty(item["strMiercoles"].ToString()) &&
                        string.IsNullOrEmpty(item["strJueves"].ToString()) &&
                        string.IsNullOrEmpty(item["strViernes"].ToString()) &&
                        string.IsNullOrEmpty(item["strSabado"].ToString()) &&
                        string.IsNullOrEmpty(item["strDomingo"].ToString()))
                    {
                        item.Delete();
                    }
                }

                hcp.AcceptChanges();
            }catch (Exception ex) {
                Errores err = new Errores();
                err.SetError(ex, "_limpiarHorarioCurso");
            }

            return(hcp);
        }
예제 #3
0
        private WSGestorDeReportesMatriculacion.dtstHorario _horarioEstudiante()
        {
            WSGestorDeReportesMatriculacion.dtstHorario dsHorario      = new WSGestorDeReportesMatriculacion.dtstHorario();
            WSGestorDeReportesMatriculacion.dtstHorario rstServicioWeb = new WSGestorDeReportesMatriculacion.dtstHorario();

            try
            {
                if (!string.IsNullOrEmpty(_ultimoPeriodoEstudiante))
                {
                    ProxySeguro.GestorDeReportesMatriculacion rm = new ProxySeguro.GestorDeReportesMatriculacion();
                    rm.CookieContainer = new System.Net.CookieContainer();
                    rm.SetCodCarrera(UsuarioActual.CarreraActual.Codigo.ToString());

                    //  El servicio web retorna no registra la excepcion y retorna null
                    rstServicioWeb = rm.GetReporteHorarioEstudiante(UsuarioActual.Cedula.ToString(),
                                                                    UsuarioActual.CarreraActual.Codigo.ToString(),
                                                                    _ultimoPeriodoEstudiante);

                    dsHorario = (rstServicioWeb != null)
                                    ? this._limpiarHorarioCurso(rstServicioWeb)
                                    : new WSGestorDeReportesMatriculacion.dtstHorario();
                }
            }catch (Exception ex)
            {
                Errores err = new Errores();
                err.SetError(ex, "_horarioEstudiante");
            }

            return(dsHorario);
        }
예제 #4
0
        public string HTMLHorarioCarrera()
        {
            string rst = string.Empty;

            rst += " <tr role='row'>";
            rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;' colspan='9'>" + Language.es_ES.EST_LBL_SIN_REGISTROS.ToUpper() + "</td>";
            rst += " </tr>";

            try{
                WSGestorDeReportesMatriculacion.dtstHorario he = (_strCodNivel == "-2")
                                                                    ? _horarioEstudiante()
                                                                    : _horarioCursoParalelo(_strCodNivel, _strCodParalelo);

                if (he != null && he.Horario.Rows.Count > 0)
                {
                    rst = string.Empty;
                    foreach (DataRow item in he.Horario)
                    {
                        rst += " <tr role='row' class='even'>";
                        rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;'>" + item["strDescripcionHora"].ToString() + "</td>";
                        rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;'>" + item["strInicioFinHora"].ToString() + "</ td >";
                        rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;'>" + item["strLunes"].ToString() + "</td>";
                        rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;'>" + item["strMartes"].ToString() + "</td>";
                        rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;'>" + item["strMiercoles"].ToString() + "</td>";
                        rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;'>" + item["strJueves"].ToString() + "</td>";
                        rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;'>" + item["strViernes"].ToString() + "</td>";
                        rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;'>" + item["strSabado"].ToString() + "</td>";
                        rst += "     <td style='align-content: center; vertical-align: middle; text-align: center;'>" + item["strDomingo"].ToString() + "</td>";
                        rst += " </tr>";
                    }
                }
            }catch (Exception ex) {
                Errores err = new Errores();
                err.SetError(ex, "HTMLHorarioCarrera");
            }

            return(rst);
        }
예제 #5
0
        private WSGestorDeReportesMatriculacion.dtstHorario _horarioCursoParalelo(string strCodNivel, string strCodParalelo)
        {
            WSGestorDeReportesMatriculacion.dtstHorario hcp            = new WSGestorDeReportesMatriculacion.dtstHorario();
            WSGestorDeReportesMatriculacion.dtstHorario dsHorarioCurso = new WSGestorDeReportesMatriculacion.dtstHorario();

            try
            {
                ProxySeguro.GestorDeReportesMatriculacion rm = new ProxySeguro.GestorDeReportesMatriculacion();
                rm.CookieContainer = new System.Net.CookieContainer();
                rm.SetCodCarrera(UsuarioActual.CarreraActual.Codigo.ToString());

                hcp = rm.GetReporteHorarioCurso(strCodParalelo,
                                                _dsPeriodoVigente.Periodos[0]["strCodigo"].ToString(),
                                                strCodNivel);

                dsHorarioCurso = this._limpiarHorarioCurso(hcp);
            }
            catch (Exception ex) {
                Errores err = new Errores();
                err.SetError(ex, "_horarioCursoParalelo");
            }

            return(dsHorarioCurso);
        }
        public LocalReport getReporteHorarios(string reportPath)
        {
            LocalReport rptHorarioDocente = new LocalReport();

            try
            {
                if (this.strTipoHorario.Equals("Clase"))
                {
                    WSGestorDeReportesMatriculacion.dtstHorario dtsHorario = _dsHorarioClase();
                    List <HorarioClaseDocente> lstHorarioDocente           = new List <HorarioClaseDocente>();
                    foreach (DataRow item in dtsHorario.Tables["Horario"].Rows)
                    {
                        HorarioClaseDocente objHorarioClase = new HorarioClaseDocente
                        {
                            StrCodHora         = item.ItemArray[0].ToString(),
                            StrDescripcionHora = item.ItemArray[1].ToString(),
                            StrInicioFinHora   = item.ItemArray[2].ToString(),
                            StrLunes           = item.ItemArray[3].ToString(),
                            StrMartes          = item.ItemArray[4].ToString(),
                            StrMiercoles       = item.ItemArray[5].ToString(),
                            StrJueves          = item.ItemArray[6].ToString(),
                            StrViernes         = item.ItemArray[7].ToString(),
                            StrSabado          = item.ItemArray[8].ToString(),
                            StrDomingo         = item.ItemArray[9].ToString()
                        };
                        lstHorarioDocente.Add(objHorarioClase);
                    }
                    ReportDataSource rds = new ReportDataSource();
                    rds.Name  = "dsHorarioClaseDocente";
                    rds.Value = lstHorarioDocente;
                    rptHorarioDocente.DataSources.Clear();
                    rptHorarioDocente.DataSources.Add(rds);
                    rptHorarioDocente.ReportPath = reportPath;
                    rptHorarioDocente.SetParameters(_getParametrosGeneralesReporte());
                    rptHorarioDocente.Refresh();
                }
                else
                {
                    WSGestorDeReportesEvaluacion.dtstHorarioExamenes dsHorarioExamenes = _dsHorarioExamenes();
                    List <HorarioExamenDocente> lstHorarioExDocente = new List <HorarioExamenDocente>();
                    foreach (DataRow item in dsHorarioExamenes.Tables["Materias"].Rows)
                    {
                        HorarioExamenDocente objHorarioExamen = new HorarioExamenDocente
                        {
                            StrCodMateria       = item.ItemArray[0].ToString(),
                            StrCodParalelo      = item.ItemArray[1].ToString(),
                            StrCodNivel         = item.ItemArray[2].ToString(),
                            StrDescripcionNivel = item.ItemArray[3].ToString(),
                            StrNombreMateria    = item.ItemArray[4].ToString(),
                            DtFechaExPrinc      = item.ItemArray[5].ToString(),
                            DtFechaExSusp       = item.ItemArray[6].ToString(),
                            StrCedula           = item.ItemArray[7].ToString(),
                            StrKeyMateria       = item.ItemArray[8].ToString()
                        };
                        lstHorarioExDocente.Add(objHorarioExamen);
                    }
                    ReportDataSource rds = new ReportDataSource();
                    rds.Name  = "dsHorarioExamenDocente";
                    rds.Value = lstHorarioExDocente;
                    rptHorarioDocente.DataSources.Clear();
                    rptHorarioDocente.DataSources.Add(rds);
                    rptHorarioDocente.ReportPath = reportPath;
                    rptHorarioDocente.SetParameters(_getParametrosGeneralesReporte());
                    rptHorarioDocente.Refresh();
                }
            }
            catch (Exception ex)
            {
                Errores err = new Errores();
                err.SetError(ex, "getReporteHorarios");
            }
            return(rptHorarioDocente);
        }