Ejemplo n.º 1
0
        public override void RefreshSecondaryData()
        {
            ModuloList modulos = ModuloList.GetList(false);

            _combo_modulos = new Library.Instruction.HComboBoxSourceList(modulos);
            PgMng.Grow();

            _submodulos = SubmoduloList.GetList(false);
            Library.Instruction.HComboBoxSourceList _combo_submodulos = new Library.Instruction.HComboBoxSourceList(_submodulos);
            _combo_modulos.Childs    = _combo_submodulos;
            Datos_Modulos.DataSource = _combo_modulos;
            PgMng.Grow();

            _temas = TemaList.GetList(false);
            Library.Instruction.HComboBoxSourceList _combo_temas = new Library.Instruction.HComboBoxSourceList(_temas);
            _combo_modulos.Childs = _combo_temas;
            PgMng.Grow();

            //_combo_tipo = new Library.Instruction.HComboBoxSourceList();
            //_combo_tipo.Add(new ComboBoxSource(1,"Desarrollo"));
            //_combo_tipo.Add(new ComboBoxSource(2,"Test"));
            Datos_Tipos.DataSource = Library.Instruction.EnumText <ETipoPregunta> .GetList();//_combo_tipo;

            PgMng.Grow();

            //Library.Instruction.HComboBoxSourceList _combo_idiomas = new Library.Instruction.HComboBoxSourceList();
            //_combo_idiomas.Add(new ComboBoxSource(1, "Español"));
            //_combo_idiomas.Add(new ComboBoxSource(2, "Inglés"));
            Datos_Idiomas.DataSource = Library.Common.EnumText <EIdioma> .GetList();//_combo_idiomas;

            PgMng.Grow();
        }
Ejemplo n.º 2
0
        public override void RefreshSecondaryData()
        {
            if (_propuesto == 0)
            {
                _modulos = ModuloList.GetList(false);
                Library.Instruction.HComboBoxSourceList _combo_modulos = new Library.Instruction.HComboBoxSourceList(_modulos);
                Datos_Modulos.DataSource = _combo_modulos;
            }
            else
            {
                Library.Instruction.HComboBoxSourceList _combo_modulos = new Library.Instruction.HComboBoxSourceList();
                _combo_modulos.Add(new ComboBoxSource(_propuesto, ModuloInfo.Get(_propuesto, false).Texto));
                Datos_Modulos.DataSource = _combo_modulos;
                ((ComboBoxSource)Modulo_CB.SelectedItem).Oid = _propuesto;
                _entity.OidModulo = _propuesto;
                Modulo_CB.Enabled = false;
            }
            PgMng.Grow(string.Empty, "Modulos");

            //Library.Instruction.HComboBoxSourceList _combo_idiomas = new Library.Instruction.HComboBoxSourceList();
            //_combo_idiomas.Add(new ComboBoxSource(0, ""));
            //_combo_idiomas.Add(new ComboBoxSource(1, "Español"));
            //_combo_idiomas.Add(new ComboBoxSource(2, "Inglés"));
            Datos_Idiomas.DataSource = Library.Common.EnumText <EIdioma> .GetList(false);

            PgMng.Grow(string.Empty, "Idiomas");
        }
 public ModuloSelectForm(Form parent, ModuloList list)
     : base(true, parent, list)
 {
     InitializeComponent();
     _view_mode   = molView.Select;
     DialogResult = DialogResult.Cancel;
 }
 /// <summary>
 /// Asigna los datos de origen para controles que dependen de otros
 /// </summary>
 /// <param name="controlName"></param>
 protected override void SetDependentControlSource(string controlName)
 {
     switch (controlName)
     {
     case "Tipo_CB":
     {
         if (Datos_Tipo.Current != null)
         {
             if (((ComboBoxSource)Tipo_CB.SelectedItem).Oid == 1)
             {
                 long      oid    = EntityInfo.OidCurso;
                 CursoList cursos = CursoList.GetList(false);
                 Library.Instruction.HComboBoxSourceList _combo_cursos = new Library.Instruction.HComboBoxSourceList(cursos);
                 Datos_Curso.DataSource  = _combo_cursos;
                 Nombre_CB.SelectedIndex = Datos_Curso.IndexOf(_combo_cursos.Buscar(oid));
             }
             if (((ComboBoxSource)Tipo_CB.SelectedItem).Oid == 2)
             {
                 long       oid     = EntityInfo.OidModulo;
                 ModuloList modulos = ModuloList.GetList(false);
                 Library.Instruction.HComboBoxSourceList _combo_modulos = new Library.Instruction.HComboBoxSourceList(modulos);
                 Datos_Curso.DataSource  = _combo_modulos;
                 Nombre_CB.SelectedIndex = Datos_Curso.IndexOf(_combo_modulos.Buscar(oid));
             }
         }
     } break;
     }
 }
Ejemplo n.º 5
0
        public override void RefreshSecondaryData()
        {
            ModuloList modulos = ModuloList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_modulos = new Library.Instruction.HComboBoxSourceList(modulos);
            Datos_Modulos.DataSource = _combo_modulos;
            PgMng.Grow(string.Empty, "_combo_modulos");

            InstructorList instructores = InstructorList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_instructores = new Library.Instruction.HComboBoxSourceList(instructores);
            Datos_Instructores.DataSource = _combo_instructores;
            PgMng.Grow(string.Empty, "_combo_instructores");

            PromocionList promociones = PromocionList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_promociones = new Library.Instruction.HComboBoxSourceList(promociones);
            ComboBoxSource combo = new ComboBoxSource(-1, "No especificado");

            _combo_promociones.Add(combo);
            Datos_Promociones.DataSource = _combo_promociones;
            PgMng.Grow(string.Empty, "_combo_promociones");

            //_respuestas = RespuestaList.GetList();
        }
        /// <summary>
        ///Asigna los valores del grid que no están asociados a propiedades
        /// </summary>
        private void SetUnlinkedGridValues(string gridName)
        {
            switch (gridName)
            {
            case "Tabla":
            {
                PlantillaExamenInfo item;
                ModuloList          modulos = ModuloList.GetList(false);

                foreach (DataGridViewRow row in Tabla.Rows)
                {
                    item = (PlantillaExamenInfo)row.DataBoundItem;
                    if (item.OidModulo != 0)
                    {
                        row.Cells[Modulo.Name].Value = modulos.GetItem(item.OidModulo).Texto;
                    }
                    row.DefaultCellStyle.BackColor = System.Drawing.Color.LightBlue;
                    //if (item.Idioma == "Espanol")
                    //    row.Cells[Idioma.Name].Value = "Español";
                    //else
                    //{
                    //    if (item.Idioma == "Ingles")
                    //        row.Cells[Idioma.Name].Value = "Inglés";
                    //    else
                    //        row.Cells[Idioma.Name].Value = item.Idioma;
                    //}
                    //Datos.MoveNext();
                }
            } break;
            }
        }
        protected override void LoadChildsAction(Type type)
        {
            if (type == typeof(Submodulo_Instructor_Promocion))
            {
                Datos_Promociones.DataSource = _entity.Promociones;

                if (Datos_Promociones.Current != null && ((Instructor_Promocion)Datos_Promociones.Current).OidPromocion > 0)
                {
                    _modulos                 = ModuloList.GetListByPromocion(false, ((Instructor_Promocion)Datos_Promociones.Current).OidPromocion);
                    _combo_modulos           = new Library.Instruction.HComboBoxSourceList(ModuloList.SortList(_modulos, "NumeroOrden", ListSortDirection.Ascending));
                    Datos_Modulos.DataSource = _combo_modulos;

                    //_submodulos = SubmoduloList.GetList(false);
                    _combo_modulos.Childs       = new Library.Instruction.HComboBoxSourceList(SubmoduloList.SortList(_submodulos, "CodigoOrden", ListSortDirection.Ascending));
                    Datos_Submodulos.DataSource = _combo_modulos.Childs;

                    Instructor_Promocion promo = Datos_Promociones.Current as Instructor_Promocion;
                    Datos_Submodulo_Instructor_Promocion.DataSource = promo.Submodulos;
                    SetCellsDataSource(Submodulo_Instructor_Grid.Name);
                }
            }
            //if (type == typeof(Submodulo_Instructor))
            //{
            //    Datos_Submodulo_Instructor.DataSource = _entity.Submodulos;
            //    PgMng.Grow(string.Empty, "Datos_Submodulo_Instructor");
            //}
        }
Ejemplo n.º 8
0
        public override void RefreshSecondaryData()
        {
            ModuloList modulos = ModuloList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_modulos = new Library.Instruction.HComboBoxSourceList(modulos);
            Datos_Modulos.DataSource = _combo_modulos;
            PgMng.Grow(string.Empty, "_combo_modulos");

            InstructorList instructores = InstructorList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_instructores = new Library.Instruction.HComboBoxSourceList(instructores);
            Datos_Instructores.DataSource = _combo_instructores;
            PgMng.Grow(string.Empty, "_combo_instructores");

            PromocionList promociones = PromocionList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_promociones = new Library.Instruction.HComboBoxSourceList(promociones);
            ComboBoxSource combo = new ComboBoxSource(-1, "No especificado");

            _combo_promociones.Add(combo);
            Datos_Promociones.DataSource = _combo_promociones;
            PgMng.Grow(string.Empty, "_combo_promociones");

            _lista_preguntas = PreguntaList.GetPreguntasModulo(Entity.OidModulo);
            PgMng.Grow(string.Empty, "Preguntas del Módulo");
            //_submodulos = SubmoduloList.GetList(false);
            //_temas = TemaList.GetList(false);
        }
Ejemplo n.º 9
0
        public override void RefreshSecondaryData()
        {
            Datos_Modulos.DataSource = new Library.Instruction.HComboBoxSourceList(ModuloList.GetOrderedList(false));
            PgMng.Grow(string.Empty, "Modulos");

            Datos_Promociones.DataSource = new Library.Instruction.HComboBoxSourceList(PromocionList.GetList(false));
            PgMng.Grow(string.Empty, "Promociones");
        }
        protected override void RefreshMainData()
        {
            _practicas = ClasePracticaList.GetClasesPlanList(EntityInfo.OidPlan);
            PgMng.Grow();

            _teoricas = ClaseTeoricaList.GetClasesPlanList(EntityInfo.OidPlan);
            PgMng.Grow();

            _modulos = ModuloList.GetList(false);
            PgMng.FillUp();
        }
        private void Modulo_BT_Click(object sender, EventArgs e)
        {
            ModuloList       modulos = ModuloList.GetList(false);
            ModuloSelectForm form    = new ModuloSelectForm(this, modulos);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                _modulo        = form.Selected as ModuloInfo;
                Modulo_TB.Text = _modulo.Texto;
            }
        }
        protected override bool DoFilter()
        {
            if (_lista == null)
            {
                MessageBox.Show(Resources.Messages.NO_RESULTS);
                return(false);
            }

            FCriteria criteria = null;

            foreach (Control ctl in this.Campos_Groupbox.Controls)
            {
                if (((System.Windows.Forms.RadioButton)ctl).Checked)
                {
                    switch (ctl.Name)
                    {
                    case "Modulo_RB":
                    {
                        criteria = new FCriteria <string>("Texto", Valor_TB.Text);
                        break;
                    }

                    case "Codigo_RB":
                    {
                        criteria = new FCriteria <string>("Codigo", Valor_TB.Text);
                        break;
                    }
                    }
                }
            }

            // Consulta en la bd
            ModuloList lista = null;

            lista = ModuloList.GetList(_lista.GetSubList(criteria));

            Datos.DataSource = lista;

            if (lista.Count == 0)
            {
                MessageBox.Show(Resources.Messages.NO_RESULTS);
                return(false);
            }

            Datos.MoveFirst();

            _filtered_list = lista;

            return(true);
        }
Ejemplo n.º 13
0
        public override void RefreshSecondaryData()
        {
            _instructores = InstructorList.GetList(false);
            PgMng.Grow();

            _modulos = ModuloList.GetSortedList("Codigo", ListSortDirection.Ascending);
            PgMng.Grow();

            _submodulos = SubmoduloList.GetSortedList("CodigoOrden", ListSortDirection.Ascending);
            PgMng.Grow();

            _promociones = PromocionList.GetSortedList("Numero", ListSortDirection.Ascending);
            PgMng.Grow();
        }
Ejemplo n.º 14
0
        public ModuloMngForm(bool isModal, Form parent, ModuloList list)
            : base(isModal, parent, list)
        {
            InitializeComponent();
            SetView(molView.Normal);
            _sort_property = NumeroModulo.DataPropertyName;

            // Parche para poder abrir el formulario en modo diseño y no perder la configuracion de columnas
            DatosLocal_BS    = Datos;
            Tabla.DataSource = DatosLocal_BS;

            SetMainDataGridView(Tabla);
            Datos.DataSource  = ModuloList.NewList().GetSortedList();
            base.SortProperty = NumeroModulo.DataPropertyName;
        }
        public override void RefreshSecondaryData()
        {
            ModuloList modulos = ModuloList.GetList(false);

            _combo_modulos = new Library.Instruction.HComboBoxSourceList(modulos);

            Datos_Modulos.DataSource = _combo_modulos;
            PgMng.Grow();

            PromocionList promociones = PromocionList.GetList(false);

            _combo_promociones = new Library.Instruction.HComboBoxSourceList(promociones);
            PgMng.Grow();

            Datos_Promociones.DataSource = _combo_promociones;
        }
        public override void RefreshSecondaryData()
        {
            _modulos                 = ModuloList.GetOrderedList(false);
            _combo_modulos           = new Library.Instruction.HComboBoxSourceList(_modulos, false);
            Datos_Modulos.DataSource = _combo_modulos;
            PgMng.Grow(string.Empty, "Modulos");

            _submodulos           = SubmoduloList.GetList(false);
            _combo_modulos.Childs = new Library.Instruction.HComboBoxSourceList(_submodulos);
            PgMng.Grow(string.Empty, "Submodulos");

            if (_combo_modulos.Count > 1)
            {
                Modulo_CB.SelectedItem = _combo_modulos[0];
            }
        }
        public override void RefreshSecondaryData()
        {
            ModuloList modulos = ModuloList.GetList(false);

            _combo_modulos = new Library.Instruction.HComboBoxSourceList(modulos);

            Datos_Modulos.DataSource = _combo_modulos;
            PgMng.Grow();

            SubmoduloList submodulos = SubmoduloList.GetList(false);

            _combo_submodulos     = new Library.Instruction.HComboBoxSourceList(submodulos);
            _combo_modulos.Childs = _combo_submodulos;
            PgMng.Grow();

            Datos_Submodulos.DataSource = _combo_submodulos;
        }
Ejemplo n.º 18
0
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    ModuloList listA = ModuloList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.Lock:
            case molAction.Unlock:
                if (_entity == null)
                {
                    return;
                }
                ActiveItem.CopyFrom(_entity);
                break;

            case molAction.Delete:
                if (ActiveItem == null)
                {
                    return;
                }
                List.RemoveItem(ActiveOID);
                if (FilterType == IFilterType.Filter)
                {
                    ModuloList listD = ModuloList.GetList(_filter_results);
                    listD.RemoveItem(ActiveOID);
                    _filter_results = listD.GetSortedList();
                }
                break;
            }

            _entity = null;
            RefreshSources();
        }
        public override void RefreshSecondaryData()
        {
            ModuloList modulos = ModuloList.GetList(false);

            _combo_modulos = new HComboBoxSourceList(modulos);

            _submodulos              = SubmoduloList.GetList(false);
            _combo_modulos.Childs    = new HComboBoxSourceList(_submodulos);
            Datos_Modulos.DataSource = _combo_modulos;

            HComboBoxSourceList _combo_idiomas = new HComboBoxSourceList();

            _combo_idiomas.Add(new ComboBoxSource(0, ""));
            _combo_idiomas.Add(new ComboBoxSource(1, "Español"));
            _combo_idiomas.Add(new ComboBoxSource(2, "Inglés"));
            Datos_Idiomas.DataSource = _combo_idiomas;
        }
Ejemplo n.º 20
0
        public override void RefreshSecondaryData()
        {
            _productos = ProductList.GetList(false);
            _series    = SerieList.GetList(false, ETipoSerie.Compra);
            _modulos   = ModuloList.GetList(false);
            Library.Instruction.HComboBoxSourceList comboModulosT = new Library.Instruction.HComboBoxSourceList(_modulos);
            Library.Instruction.HComboBoxSourceList comboModulosP = new Library.Instruction.HComboBoxSourceList(_modulos);
            PgMng.Grow();

            _submodulos          = SubmoduloList.GetList(false);
            comboModulosT.Childs = new Library.Instruction.HComboBoxSourceList(_submodulos);
            comboModulosP.Childs = new Library.Instruction.HComboBoxSourceList(_submodulos);
            PgMng.Grow();

            _source_list             = new DataSourceList(comboModulosT);
            Datos_Modulos.DataSource = _source_list.CBList;
            PgMng.Grow();
        }
Ejemplo n.º 21
0
        protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "Modulo");

            _selectedOid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                List = ModuloList.GetList(false);
                break;

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }
            PgMng.Grow(string.Empty, "Lista de Módulos");
        }
Ejemplo n.º 22
0
        public override void PrintObject()
        {
            PrintSource seleccion = PrintSource.All;
            bool        alumno    = false;

            HorarioPrintSelectForm form   = new HorarioPrintSelectForm(seleccion);
            DialogResult           result = form.ShowDialog();

            if (result != DialogResult.Cancel)
            {
                if (form.Source == PrintSource.Selection)
                {
                    alumno = true;
                }
                CronogramaReportMng      reportMng = new CronogramaReportMng(AppContext.ActiveSchema);
                Library.Reports.CRViewer viewer    = new Library.Reports.CRViewer();
                ModuloList modulos = ModuloList.GetList(false);
                viewer.SetReport(reportMng.GetHorarioReport(EntityInfo, alumno, _teoricas, _practicas, _extras, _profesores, modulos, _lista_sesiones, form.PrintTimestamp, form.Timestamp));
                viewer.ShowDialog();
            }
        }
        protected override void ChangeFicha()
        {
            if (Ficha_TP.SelectedTab == Capacitacion_TP)
            //||
            //   (Ficha_TP.SelectedTab == Autorizados_TP))
            {
                if (_modulos == null)
                {
                    PgMng.Reset(4, 1, Resources.Messages.LOADING_DATA, this);

                    _modulos                 = ModuloList.GetList(false);
                    _combo_modulos           = new Library.Instruction.HComboBoxSourceList(ModuloList.SortList(_modulos, "NumeroOrden", ListSortDirection.Ascending));
                    Datos_Modulos.DataSource = _combo_modulos;
                    PgMng.Grow(string.Empty, "Modulos");

                    _submodulos                 = SubmoduloList.GetList(false);
                    _combo_modulos.Childs       = new Library.Instruction.HComboBoxSourceList(SubmoduloList.SortList(_submodulos, "CodigoOrden", ListSortDirection.Ascending));
                    Datos_Submodulos.DataSource = _combo_modulos.Childs;
                    PgMng.Grow(string.Empty, "Submodulos");

                    _promociones = PromocionList.GetList(false);
                    Library.Instruction.HComboBoxSourceList _combo_promociones = new Library.Instruction.HComboBoxSourceList(PromocionList.SortList(_promociones, "Nombre", ListSortDirection.Ascending));
                    Datos_Promociones_CB.DataSource = _combo_promociones;
                    PgMng.Grow(string.Empty, "Promociones");

                    _instructores = InstructorList.GetList(false);
                    Library.Instruction.HComboBoxSourceList _combo_instructores = new Library.Instruction.HComboBoxSourceList(InstructorList.SortList(_instructores, "Apellidos", ListSortDirection.Ascending));
                    Datos_Instructores.DataSource = _combo_instructores;
                    PgMng.FillUp(string.Empty, "Instructores");
                }

                if (Ficha_TP.SelectedTab == Capacitacion_TP)
                {
                    LoadChildsAction(typeof(Submodulo_Instructor_Promocion));
                }
                //if (Ficha_TP.SelectedTab == Autorizados_TP) LoadChildsAction(typeof(Submodulo_Instructor));
            }
        }
Ejemplo n.º 24
0
        public override void RefreshSecondaryData()
        {
            _productos = ProductList.GetList(false);
            _series    = SerieList.GetList(false, ETipoSerie.Compra);
            _modulos   = ModuloList.GetList(false);
            Library.Instruction.HComboBoxSourceList comboModulosT = new Library.Instruction.HComboBoxSourceList(_modulos);
            Library.Instruction.HComboBoxSourceList comboModulosP = new Library.Instruction.HComboBoxSourceList(_modulos);
            PgMng.Grow();

            _submodulos          = SubmoduloList.GetList(false);
            comboModulosT.Childs = new Library.Instruction.HComboBoxSourceList(_submodulos);
            comboModulosP.Childs = new Library.Instruction.HComboBoxSourceList(_submodulos);
            PgMng.Grow();

            _source_list_t           = new DataSourceList(comboModulosT);
            _source_list_p           = new DataSourceList(comboModulosP);
            Datos_Modulos.DataSource = _source_list_t.CBList;
            PgMng.Grow();

            Library.Instruction.HComboBoxSourceList _incompatibles = new Library.Instruction.HComboBoxSourceList();
            ComboBoxSource _compatible = new ComboBoxSource(0, "");
            ComboBoxSource _inc_1      = new ComboBoxSource(1, "1");
            ComboBoxSource _inc_2      = new ComboBoxSource(2, "2");
            ComboBoxSource _inc_3      = new ComboBoxSource(3, "3");
            ComboBoxSource _inc_4      = new ComboBoxSource(4, "4");
            ComboBoxSource _inc_5      = new ComboBoxSource(5, "5");

            _incompatibles.Add(_compatible);
            _incompatibles.Add(_inc_1);
            _incompatibles.Add(_inc_2);
            _incompatibles.Add(_inc_3);
            _incompatibles.Add(_inc_4);
            _incompatibles.Add(_inc_5);
            Datos_Incompatible.DataSource = _incompatibles;
            PgMng.Grow();
        }
Ejemplo n.º 25
0
        protected override void SelectEntities(EntidadInfo entidad)
        {
            _tipo            = entidad.Tipo;
            _entity_type_oid = entidad.Oid;
            switch (_tipo)
            {
            case "Cliente":
            {
                ClienteList        clientes = ClienteList.GetList(false);
                List <ClienteInfo> lista    = new List <ClienteInfo>();

                foreach (ClienteInfo obj in clientes)
                {
                    if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null)
                    {
                        lista.Add(obj);
                    }
                }
                Datos_Agentes.DataSource = lista;
            }
            break;

            case "Alumno":
            {
                AlumnoList        alumnos = AlumnoList.GetList(false);;
                List <AlumnoInfo> lista   = new List <AlumnoInfo>();

                foreach (AlumnoInfo obj in alumnos)
                {
                    if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null)
                    {
                        lista.Add(obj);
                    }
                }

                Datos_Agentes.DataSource = lista;
            }
            break;

            case "Empleado":
            {
                InstructorList        empleados = InstructorList.GetList(false);
                List <InstructorInfo> lista     = new List <InstructorInfo>();

                foreach (InstructorInfo obj in empleados)
                {
                    if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null)
                    {
                        lista.Add(obj);
                    }
                }

                Datos_Agentes.DataSource = lista;
            }
            break;
            //case "Factura":
            //    {
            //        FacturaList facturas = FacturaList.GetList(false);
            //        List<FacturaInfo> lista = new List<FacturaInfo>();

            //        foreach (FacturaInfo obj in facturas)
            //        {
            //            if (!entidad.Agentes.ContainsAgent(obj.Oid))
            //                lista.Add(obj);
            //        }

            //        Datos_Agentes.DataSource = lista;
            //    }
            //    break;
            case "Auditoria":
            {
                AuditoriaList        auditorias = AuditoriaList.GetList();
                List <AuditoriaInfo> lista      = new List <AuditoriaInfo>();

                foreach (AuditoriaInfo obj in auditorias)
                {
                    if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null)
                    {
                        lista.Add(obj);
                    }
                }

                Datos_Agentes.DataSource = lista;
            }
            break;

            case "Proveedor":
            {
                ProveedorList        proveedores = ProveedorList.GetList(false);
                List <ProveedorInfo> lista       = new List <ProveedorInfo>();

                foreach (ProveedorInfo obj in proveedores)
                {
                    if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null)
                    {
                        lista.Add(obj);
                    }
                }

                Datos_Agentes.DataSource = lista;
            }
            break;

            case "Promocion":
            {
                PromocionList        promociones = PromocionList.GetList(false);
                List <PromocionInfo> lista       = new List <PromocionInfo>();

                foreach (PromocionInfo obj in promociones)
                {
                    if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null)
                    {
                        lista.Add(obj);
                    }
                }

                Datos_Agentes.DataSource = lista;
            }
            break;

            case "Curso":
            {
                CursoList        cursos = CursoList.GetList(false);
                List <CursoInfo> lista  = new List <CursoInfo>();

                foreach (CursoInfo obj in cursos)
                {
                    if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null)
                    {
                        lista.Add(obj);
                    }
                }

                Datos_Agentes.DataSource = lista;
            }
            break;

            case "Modulo":
            {
                ModuloList        modulos = ModuloList.GetList(false);
                List <ModuloInfo> lista   = new List <ModuloInfo>();

                foreach (ModuloInfo obj in modulos)
                {
                    if (entidad.Agentes.GetItemByProperty("Oid", obj.Oid) == null)
                    {
                        lista.Add(obj);
                    }
                }

                Datos_Agentes.DataSource = lista;
            }
            break;
                //default:
                //    _tipo = "";
                //    throw new iQException("No se ha encontrado el tipo de entidad " + entidad.Tipo);
            }
            Format();
        }
        /// <summary>Imprime la lista del objetos
        /// <returns>void</returns>
        /// </summary>
        public override void PrintList()
        {
            ETipoImpresionCronograma tipo = ETipoImpresionCronograma.Lista;
            SelectEnumInputForm      form = new SelectEnumInputForm(true);

            form.SetDataSource(Library.Instruction.EnumText <ETipoImpresionCronograma> .GetList(false, false, false));
            form.ShowDialog(this);

            if (form.ActionResult == DialogResult.OK)
            {
                ComboBoxSource combo = form.Selected as ComboBoxSource;
                tipo = (ETipoImpresionCronograma)combo.Oid;
            }

            ClaseTeoricaList         teoricas        = ClaseTeoricaList.GetList();
            ClasePracticaList        practicas       = ClasePracticaList.GetList(false);
            List <ClasePracticaList> lista_practicas = new List <ClasePracticaList>();

            lista_practicas.Add(null);
            lista_practicas.Add(practicas);
            lista_practicas.Add(practicas);
            ModuloList modulos = ModuloList.GetList(false);

            CronogramaReportMng reportMng = new CronogramaReportMng(AppContext.ActiveSchema);
            CronogramaRpt       report    = null;

            switch (FilterType)
            {
            case IFilterType.None:
                if (tipo == ETipoImpresionCronograma.Lista)
                {
                    bool        defecto = moleQule.Library.Instruction.ModulePrincipal.GetImpresionEmpresaDefaultBoolSetting();
                    CompanyInfo empresa = null;

                    if (defecto)
                    {
                        empresa = CompanyInfo.Get(moleQule.Library.Instruction.ModulePrincipal.GetImpresionEmpresaDefaultOidSetting(), false);
                    }
                    while (empresa == null)
                    {
                        moleQule.Face.Common.CompanySelectForm sform = new Common.CompanySelectForm(this);
                        DialogResult result = sform.ShowDialog();

                        try
                        {
                            if (result == DialogResult.OK)
                            {
                                empresa = form.Selected as CompanyInfo;
                            }
                        }
                        catch
                        { empresa = null; }
                    }

                    report = reportMng.GetCronogramaReport(_cronograma, empresa, modulos, teoricas, practicas, _sorted_list);

                    if (report != null)
                    {
                        report.SetParameterValue("Empresa", empresa.Name);
                        if (empresa.Oid == 2)
                        {
                            ((CrystalDecisions.CrystalReports.Engine.TextObject)(report.Section5.ReportObjects["Text1"])).Color = System.Drawing.Color.FromArgb(13, 176, 46);
                        }
                        ReportViewer.SetReport(report);
                        ReportViewer.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show(Resources.Messages.NO_DATA_REPORTS,
                                        moleQule.Face.Resources.Labels.ADVISE_TITLE,
                                        MessageBoxButtons.OK,
                                        MessageBoxIcon.Exclamation);
                    }
                }
                else
                {
                    Dictionary <Horario, ListaSesiones> horarios = Cronograma.GetHorarios(_sorted_list, teoricas, practicas);

                    if (horarios.Count > 0)
                    {
                        PgMng.Reset(horarios.Count + 5, 1, Resources.Messages.LOADING_DATA, this);

                        try
                        {
                            InstructorList instructores = InstructorList.GetList(false);
                            PgMng.Grow();

                            //EntidadInfo entidad = EntidadInfo.Get(typeof(Promocion), true);
                            //Agente agente = null;

                            //PromocionInfo promocion = PromocionInfo.Get(_cronograma.OidPromocion, true);

                            //if (entidad.Agentes.GetItemByProperty("OidAgenteExt", promocion.Oid) != null)
                            //    agente = Agente.Get(typeof(Promocion), promocion);
                            //else
                            //{
                            //    agente = Agente.New();
                            //    agente.CopyFrom(entidad, promocion);
                            //    agente.Codigo = agente.GetCode();
                            //}

                            PgMng.Grow();

                            string       sFile = "C:\\cronograma.pdf";
                            FileStream   fs    = new FileStream(sFile, FileMode.Create, FileAccess.Write, FileShare.None);
                            Document     doc   = new Document();
                            PdfSmartCopy copy  = new PdfSmartCopy(doc, fs);

                            doc.Open();

                            foreach (KeyValuePair <Horario, ListaSesiones> item in horarios)
                            {
                                item.Key.OidPlan      = _cronograma.OidPlan;
                                item.Key.OidPromocion = _cronograma.OidPromocion;
                                HorarioRpt rpt    = reportMng.GetHorarioReport(item.Key.GetInfo(false), true, teoricas, lista_practicas, null, instructores, modulos, item.Value, false, DateTime.Now);
                                PdfReader  reader = new PdfReader(rpt.ExportToStream(ExportFormatType.PortableDocFormat));
                                copy.AddPage(copy.GetImportedPage(reader, 1));
                                rpt.Close();
                                rpt.Dispose();
                                PgMng.Grow();
                            }

                            doc.Close();

                            System.Diagnostics.Process process = new System.Diagnostics.Process();
                            process.StartInfo.FileName = sFile;
                            process.Start();
                            try
                            {
                                process.WaitForExit();
                            }
                            catch { }
                            PgMng.Grow();

                            //Documento documento = Documento.New();
                            //documento.Fecha = DateTime.Now;
                            //documento.FechaAlta = DateTime.Now;
                            //documento.Nombre = documento.Fecha.ToString("yyyyMMdd") + "_CRONOGRAMA";
                            //documento.Ruta = "C:\\";
                            //documento.Tipo = "PDF";


                            //AgenteDocumento agente_documento = agente.Documentos.NewItem(agente);
                            //agente_documento.OidDocumento = documento.Oid;

                            //agente.Save();
                        }
                        catch (Exception ex) { throw ex; }
                        finally { PgMng.FillUp(); }
                    }
                }
                break;

            case IFilterType.Filter:
                if (tipo == ETipoImpresionCronograma.Lista)
                {
                    bool        defecto = moleQule.Library.Instruction.ModulePrincipal.GetImpresionEmpresaDefaultBoolSetting();
                    CompanyInfo empresa = null;

                    if (defecto)
                    {
                        empresa = CompanyInfo.Get(moleQule.Library.Instruction.ModulePrincipal.GetImpresionEmpresaDefaultOidSetting(), false);
                    }
                    while (empresa == null)
                    {
                        moleQule.Face.Common.CompanySelectForm sform = new Common.CompanySelectForm(this);
                        DialogResult result = sform.ShowDialog();

                        try
                        {
                            if (result == DialogResult.OK)
                            {
                                empresa = form.Selected as CompanyInfo;
                            }
                        }
                        catch
                        { empresa = null; }
                    }

                    report = reportMng.GetCronogramaReport(_cronograma, empresa, modulos, teoricas, practicas, _filter_results);

                    if (report != null)
                    {
                        report.SetParameterValue("Empresa", empresa.Name);
                        if (empresa.Oid == 2)
                        {
                            ((CrystalDecisions.CrystalReports.Engine.TextObject)(report.Section5.ReportObjects["Text1"])).Color = System.Drawing.Color.FromArgb(13, 176, 46);
                        }
                        ReportViewer.SetReport(report);
                        ReportViewer.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show(Resources.Messages.NO_DATA_REPORTS,
                                        moleQule.Face.Resources.Labels.ADVISE_TITLE,
                                        MessageBoxButtons.OK,
                                        MessageBoxIcon.Exclamation);
                    }
                }
                else
                {
                    Dictionary <Horario, ListaSesiones> horarios = Cronograma.GetHorarios(_filter_results, teoricas, practicas);

                    if (horarios.Count > 0)
                    {
                        PgMng.Reset(horarios.Count + 5, 1, Resources.Messages.LOADING_DATA, this);

                        try
                        {
                            InstructorList instructores = InstructorList.GetList(false);
                            PgMng.Grow();

                            //EntidadInfo entidad = EntidadInfo.Get(typeof(Promocion), true);
                            //Agente agente = null;

                            //PromocionInfo promocion = PromocionInfo.Get(_cronograma.OidPromocion, true);

                            //if (entidad.Agentes.GetItemByProperty("OidAgenteExt", promocion.Oid) != null)
                            //    agente = Agente.Get(typeof(Promocion), promocion);
                            //else
                            //{
                            //    agente = Agente.New();
                            //    agente.CopyFrom(entidad, promocion);
                            //    agente.Codigo = agente.GetCode();
                            //}

                            PgMng.Grow();

                            string       sFile = "C:\\cronograma.pdf";
                            FileStream   fs    = new FileStream(sFile, FileMode.Create, FileAccess.Write, FileShare.None);
                            Document     doc   = new Document();
                            PdfSmartCopy copy  = new PdfSmartCopy(doc, fs);

                            doc.Open();

                            foreach (KeyValuePair <Horario, ListaSesiones> item in horarios)
                            {
                                item.Key.OidPlan      = _cronograma.OidPlan;
                                item.Key.OidPromocion = _cronograma.OidPromocion;
                                HorarioRpt rpt    = reportMng.GetHorarioReport(item.Key.GetInfo(false), true, teoricas, lista_practicas, null, instructores, modulos, item.Value, false, DateTime.Now);
                                PdfReader  reader = new PdfReader(rpt.ExportToStream(ExportFormatType.PortableDocFormat));
                                copy.AddPage(copy.GetImportedPage(reader, 1));
                                rpt.Close();
                                rpt.Dispose();
                                PgMng.Grow();
                            }

                            doc.Close();

                            System.Diagnostics.Process process = new System.Diagnostics.Process();
                            process.StartInfo.FileName = sFile;
                            process.Start();
                            try
                            {
                                process.WaitForExit();
                            }
                            catch { }
                            PgMng.Grow();

                            //Documento documento = Documento.New();
                            //documento.Fecha = DateTime.Now;
                            //documento.FechaAlta = DateTime.Now;
                            //documento.Nombre = documento.Fecha.ToString("yyyyMMdd") + "_CRONOGRAMA";
                            //documento.Ruta = "C:\\";
                            //documento.Tipo = "PDF";


                            //AgenteDocumento agente_documento = agente.Documentos.NewItem(agente);
                            //agente_documento.OidDocumento = documento.Oid;

                            //agente.Save();
                        }
                        catch (Exception ex) { throw ex; }
                        finally { PgMng.FillUp(); }
                    }
                }
                break;
            }
        }