Esempio n. 1
0
 public static string SELECT(PromocionInfo item)
 {
     return(Sesion_Promocion.SELECT(new QueryConditions()
     {
         Promocion = item, ESesionPromocion = ESesionPromocion.Promocion
     }, false));
 }
Esempio n. 2
0
        public ClasesPracticasDisponiblesRpt GetDetailReport(CompanyInfo empresa,
                                                             PromocionInfo promocion,
                                                             SortedBindingList <ClasePracticaInfo> registros)
        {
            if (registros == null)
            {
                return(null);
            }
            ClasesPracticasDisponiblesRpt doc = new ClasesPracticasDisponiblesRpt();

            List <PromocionInfo>     pList  = new List <PromocionInfo>();
            List <ClasePracticaInfo> clases = new List <ClasePracticaInfo>();

            foreach (ClasePracticaInfo info in registros)
            {
                clases.Add(info);
            }

            //Si no existen conceptos, no tiene sentido un informe detallado. Además, falla en Crystal Reports
            if (clases.Count <= 0)
            {
                return(null);
            }

            pList.Add(promocion);

            doc.SetDataSource(pList);
            ((TextObject)doc.Section5.ReportObjects["Empresa"]).Text = empresa.Name;

            doc.Subreports["PracticasNoImpartidasListSubRpt"].SetDataSource(registros);

            //FormatReport(doc);

            return(doc);
        }
        public ResumenAgrupadoExamenRpt GetDetailResumenExamenReport(ExamenInfo item,
                                                                     List <RegistroResumen> registros,
                                                                     PromocionInfo promocion,
                                                                     CompanyInfo empresa)
        {
            if (item == null)
            {
                return(null);
            }
            ResumenAgrupadoExamenRpt doc = new ResumenAgrupadoExamenRpt();

            List <ExamenPrint> pList = new List <ExamenPrint>();

            if (promocion == null)
            {
                pList.Add(item.GetPrintObject(empresa, string.Empty));
            }
            else
            {
                pList.Add(item.GetPrintObject(empresa, promocion.Nombre, string.Empty));
            }

            doc.SetDataSource(pList);
            doc.Subreports["RegistroResumenListSubRpt"].SetDataSource(registros);

            return(doc);
        }
        public CronogramaPrint GetPrintObject(CompanyInfo empresa)
        {
            PromocionInfo    promocion = PromocionInfo.Get(this.OidPromocion, false);
            PlanEstudiosInfo plan      = PlanEstudiosInfo.Get(this.OidPlan, false);

            return(CronogramaPrint.New(this, empresa, plan, promocion));
        }
Esempio n. 5
0
        /// <summary>
        /// Copia los atributos del objeto
        /// </summary>
        /// <param name="source">Objeto origen</param>
        protected void CopyValues(Instructor_PromocionInfo source)
        {
            if (source == null)
            {
                return;
            }

            Oid = source.Oid;
            _base.Record.OidInstructor = source.OidInstructor;
            _base.Record.OidPromocion  = source.OidPromocion;

            InstructorInfo instructor = InstructorInfo.Get(OidInstructor, false);

            if (instructor != null && instructor.Oid > 0)
            {
                _instructor = instructor.Nombre;
            }

            PromocionInfo promocion = PromocionInfo.Get(OidPromocion, false);

            if (promocion != null && promocion.Oid > 0)
            {
                _curso = promocion.Nombre;
            }
        }
        /// <summary>
        /// Copia los atributos del objeto
        /// </summary>
        /// <param name="source">Objeto origen</param>
        protected void CopyValues(HorarioInfo source, InstructorList instructores, ModuloList modulos)
        {
            if (source == null)
            {
                return;
            }

            Oid = source.Oid;
            _base.Record.OidPlan       = source.OidPlan;
            _base.Record.OidPromocion  = source.OidPromocion;
            _base.Record.FechaInicial  = source.FechaInicial;
            _base.Record.FechaFinal    = source.FechaFinal;
            _base.Record.Observaciones = source.Observaciones;

            _lunes     = _base.Record.FechaInicial.Day;
            _martes    = _base.Record.FechaInicial.AddDays(1).Day;
            _miercoles = _base.Record.FechaInicial.AddDays(2).Day;
            _jueves    = _base.Record.FechaInicial.AddDays(3).Day;
            _viernes   = _base.Record.FechaInicial.AddDays(4).Day;
            _sabado    = _base.Record.FechaFinal.Day;

            PromocionInfo promo = moleQule.Library.Instruction.PromocionInfo.Get(_base.Record.OidPromocion, true);

            _n_alumnos      = promo.Alumnos.Count;
            _base.Promocion = promo.Nombre;

            CultureInfo cultura = new CultureInfo("es-ES");

            _fecha_titulo = cultura.TextInfo.ToTitleCase(cultura.DateTimeFormat.MonthNames[FechaInicial.Month - 1]) +
                            " de " + FechaInicial.Year.ToString();
        }
Esempio n. 7
0
        public static string SELECT_BY_PROMOCION(long oid_promocion)
        {
            QueryConditions conditions = new QueryConditions()
            {
                Promocion = PromocionInfo.New()
            };

            conditions.Promocion.Oid = oid_promocion;

            return Alumno_Promocion.SELECT(conditions, true);
        }
        public HojaFirmasPracticaRpt GetDetailPracticasReport(SesionInfo item, AlumnoList lista, string duracion,
                                                              ClaseTeoricaList teoricas, ClasePracticaList practicas, ClaseExtraList extras, string clases, long oidPromocion, bool print_alumno)
        {
            if (item == null)
            {
                return(null);
            }

            HojaFirmasPracticaRpt doc   = new HojaFirmasPracticaRpt();
            List <SesionPrint>    pList = new List <SesionPrint>();

            long grupo = 0;
            List <AlumnoInfo> alumnos = new List <AlumnoInfo>();

            foreach (AlumnoInfo alumno in lista)
            {
                if (alumno.Grupo != grupo && grupo < 3)
                {
                    grupo += alumno.Grupo;
                }
                alumnos.Add(alumno.GetPrintObject());
            }

            pList.Add(item.GetPrintObject(teoricas, practicas, extras, clases, grupo, print_alumno));

            //Si no existen conceptos, no tiene sentido un informe detallado. Además, falla en Crystal Reports
            if (alumnos.Count <= 0)
            {
                return(null);
            }

            PromocionInfo promo = PromocionInfo.Get(oidPromocion, false);


            doc.SetDataSource(pList);
            ((TextObject)(doc.Section1.ReportObjects["Duracion_TB"])).Text = duracion;
            if (promo != null)
            {
                ((TextObject)(doc.Section1.ReportObjects["Promocion_TB"])).Text = promo.Nombre;
            }
            doc.Subreports["AlumnosListSubRpt.rpt"].SetDataSource(alumnos);

            return(doc);
        }
        public ResumenExamenRpt GetDetailResumenExamenReport(ExamenInfo item,
                                                             PreguntaList preguntas,
                                                             PromocionInfo promocion,
                                                             CompanyInfo empresa)
        {
            if (item == null)
            {
                return(null);
            }
            ResumenExamenRpt doc = new ResumenExamenRpt();

            List <ExamenPrint>   pList      = new List <ExamenPrint>();
            List <PreguntaPrint> _preguntas = new List <PreguntaPrint>();

            if (promocion == null)
            {
                pList.Add(item.GetPrintObject(empresa, string.Empty));
            }
            else
            {
                pList.Add(item.GetPrintObject(empresa, promocion.Nombre, string.Empty));
            }

            int i = 1;

            foreach (PreguntaInfo info in preguntas)
            {
                _preguntas.Add(info.GetPrintObject(i++));
            }

            //Si no existen conceptos, no tiene sentido un informe detallado. Además, falla en Crystal Reports
            if (_preguntas.Count <= 0)
            {
                return(null);
            }

            doc.SetDataSource(pList);
            doc.Subreports["ListadoPreguntasExamenListSubRpt"].SetDataSource(_preguntas);

            return(doc);
        }
        public ComparativaCronogramaRpt  GetComparativaClases(PromocionInfo promocion, DateTime fecha, List <RegistroResumenPlanDocente> lista, long grupo = 0)
        {
            if (lista.Count == 0)
            {
                return(null);
            }

            ComparativaCronogramaRpt doc = new ComparativaCronogramaRpt();

            doc.SetDataSource(lista);
            doc.SetParameterValue("Promocion", promocion.Nombre);
            doc.SetParameterValue("Fecha", fecha.ToString("dd/MM/yyyy"));
            if (grupo > 0)
            {
                doc.SetParameterValue("Grupo", grupo.ToString());
            }
            else
            {
                doc.SetParameterValue("Grupo", "");
            }

            return(doc);
        }
Esempio n. 11
0
        /// <summary>
        /// Copia los atributos del objeto
        /// </summary>
        /// <param name="source">Objeto origen</param>
        protected void CopyValues(ExamenInfo source, CompanyInfo empresa, string promocion, string observaciones)
        {
            if (source == null)
            {
                return;
            }

            Oid = source.Oid;
            _base.Record.OidPromocion  = source.OidPromocion;
            _base.Record.OidProfesor   = source.OidProfesor;
            _base.Record.OidModulo     = source.OidModulo;
            _base.Record.FechaExamen   = source.FechaExamen;
            _base.Record.FechaCreacion = source.FechaCreacion;
            _base.Record.FechaEmision  = source.FechaEmision;
            _base.Record.Tipo          = source.Tipo;
            _base.Record.Desarrollo    = source.Desarrollo;
            _base.Record.Titulo        = source.Titulo;
            _base.Record.Duracion      = source.Duracion;
            _tiempo = Duracion.ToShortTimeString();
            _base.Record.MemoPreguntas = source.MemoPreguntas;
            _base.Record.Numero        = source.Numero;
            _dia           = _base.Record.FechaExamen.Day.ToString("00");
            _mes           = _base.Record.FechaExamen.Month.ToString("00");
            _año           = _base.Record.FechaExamen.Year.ToString();
            _observaciones = observaciones;

            _base.Promocion  = source.Promocion;
            _base.Modulo     = source.Modulo;
            _n_modulo        = ModuloInfo.Get(source.OidModulo, false).NumeroModulo;
            _base.Instructor = source.Instructor;

            _n_preguntas = source.PreguntaExamenes != null ? source.PreguntaExamenes.Count : 0;

            if (promocion != null)
            {
                //_oid_promocion_alumno = promocion.Oid;
                _base.Promocion = promocion;
            }
            else
            {
                if (source.Promociones != null && source.Promociones.Count > 0)
                {
                    _base.Promocion = string.Empty;

                    foreach (ExamenPromocionInfo ep in source.Promociones)
                    {
                        PromocionInfo pinfo = PromocionInfo.Get(ep.OidPromocion, false);
                        _base.Promocion += pinfo.Nombre + " ";
                    }
                }
            }

            if (empresa == null)
            {
                return;
            }

            string path = CompanyInfo.GetLogoPath(empresa.Oid);

            //Z:\.\Recursos\Logos\Empresas\0002.jpg

            // Cargamos la imagen en el buffer
            if (File.Exists(path))
            {
                //Declaramos fs para poder abrir la imagen.
                FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);

                // Declaramos un lector binario para pasar la imagen a bytes
                BinaryReader br = new BinaryReader(fs);
                _logo_emp = new byte[(int)fs.Length];
                br.Read(LogoEmp, 0, (int)fs.Length);
                br.Close();
                fs.Close();
            }
        }
        public RegistroNotasExamenRpt GetDetailReport(ExamenInfo item,
                                                      List <Alumno_ExamenInfo> _alumnos,
                                                      PromocionInfo promocion,
                                                      CompanyInfo empresa)
        {
            if (item == null)
            {
                return(null);
            }
            RegistroNotasExamenRpt doc = new RegistroNotasExamenRpt();
            string     comentarios     = string.Empty;
            AlumnoList lista           = AlumnoList.GetOrdenAlfabeticoList(true, _alumnos);

            List <ExamenPrint>        pList   = new List <ExamenPrint>();
            List <Alumno_ExamenPrint> alumnos = new List <Alumno_ExamenPrint>();

            int i = 1;

            foreach (AlumnoInfo alumno in lista)
            {
                Alumno_ExamenInfo info = null;
                foreach (Alumno_ExamenInfo ae in _alumnos)
                {
                    if (ae.OidAlumno == alumno.Oid)
                    {
                        info = ae;
                        break;
                    }
                }

                if (info != null)
                {
                    Alumno_ExamenPrint obj = info.GetPrintObject(alumno, i++, true);

                    if (item.Desarrollo && info.Presentado)
                    {
                        obj.NotaTest = string.Empty;
                        foreach (Respuesta_Alumno_ExamenInfo resp in info.Respuestas)
                        {
                            if (obj.NotaTest.Length > 0)
                            {
                                obj.NotaTest += " - ";
                            }
                            obj.NotaTest += resp.Calificacion.ToString() + "%";
                        }
                    }

                    alumnos.Add(obj);
                    if (info.Observaciones != string.Empty)
                    {
                        comentarios += alumno.NExpediente + " - " + alumno.Nombre + " " + alumno.Apellidos + " - " + info.Observaciones + Environment.NewLine;
                    }
                }
            }

            //foreach (Alumno_ExamenInfo info in _alumnos)
            //{
            //    AlumnoInfo alumno = lista.GetItem(info.OidAlumno);
            //    Alumno_ExamenPrint obj = info.GetPrintObject(alumno, i++, true);

            //    if (item.Desarrollo && info.Presentado)
            //    {
            //        obj.NotaTest = string.Empty;
            //        foreach (Respuesta_Alumno_ExamenInfo resp in info.Respuestas)
            //        {
            //            if (obj.NotaTest.Length > 0)
            //                obj.NotaTest += " - ";
            //            obj.NotaTest += resp.Calificacion.ToString() + "%";
            //        }
            //    }

            //    alumnos.Add(obj);
            //    if (info.Observaciones != string.Empty)
            //        comentarios += alumno.NExpediente + " - " + alumno.Nombre + " " + alumno.Apellidos  + " - " + info.Observaciones + Environment.NewLine;
            //}

            pList.Add(item.GetPrintObject(empresa, promocion.Nombre, comentarios));

            //Si no existen conceptos, no tiene sentido un informe detallado. Además, falla en Crystal Reports
            if (alumnos.Count <= 0)
            {
                return(null);
            }

            doc.SetDataSource(pList);
            doc.Subreports["NotasExamenAlumnosListSubRpt"].SetDataSource(alumnos);

            return(doc);
        }
Esempio n. 13
0
        /// <summary>
        /// Copia los atributos del objeto
        /// </summary>
        /// <param name="source">Objeto origen</param>
        protected void CopyValues(CronogramaInfo source, CompanyInfo empresa, PlanEstudiosInfo plan, PromocionInfo promocion)
        {
            if (source == null)
            {
                return;
            }

            Oid = source.Oid;
            _base.Record.OidPlan       = source.OidPlan;
            _base.Record.OidPromocion  = source.OidPromocion;
            _base.Record.FechaCreacion = source.FechaCreacion;
            _base.Record.Observaciones = source.Observaciones;

            if (plan != null)
            {
                _plan = plan.Nombre;
            }
            if (promocion != null)
            {
                _promocion = promocion.Nombre;
            }

            if (empresa == null)
            {
                return;
            }

            string path = CompanyInfo.GetLogoPath(AppContext.ActiveSchema.Oid);

            // Cargamos la imagen en el buffer
            if (File.Exists(path))
            {
                //Declaramos fs para poder abrir la imagen.
                FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);

                // Declaramos un lector binario para pasar la imagen a bytes
                BinaryReader br = new BinaryReader(fs);
                _logo_emp = new byte[(int)fs.Length];
                br.Read(LogoEmp, 0, (int)fs.Length);
                br.Close();
                fs.Close();
            }
        }
Esempio n. 14
0
 public static string SELECT(PromocionInfo item) { return Alumno_Promocion.SELECT(new QueryConditions() { Promocion = item }, true); }