/// <summary> /// Asigna el objeto principal al origen de datos /// <returns>void</returns> /// </summary> protected override void RefreshMainData() { Datos.DataSource = _entity; Duracion_MTB.Text = _entity.Duracion.TimeOfDay.ToString(); promociones = PromocionList.GetList(false); foreach (PromocionInfo info in promociones) { _promociones_todas.Add(info.Numero + " - " + info.Nombre, info); } RellenaPromociones(); TimeSpan duracion = TimeSpan.Zero; TimeSpan tiempo_pregunta; if (_entity.Desarrollo) { tiempo_pregunta = moleQule.Library.Instruction.ModulePrincipal.GetTiempoPreguntasTipoDesarrolloSetting().TimeOfDay; } else { tiempo_pregunta = moleQule.Library.Instruction.ModulePrincipal.GetTiempoPreguntasTipoTestSetting().TimeOfDay; } duracion = TimeSpan.FromSeconds(tiempo_pregunta.TotalSeconds * Datos_Preguntas.Count); _entity.Duracion = Convert.ToDateTime(duracion.ToString()); Duracion_MTB.Text = _entity.Duracion.Hour.ToString("00") + ":" + _entity.Duracion.Minute.ToString("00"); }
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); }
/// <summary> /// Asigna el objeto principal al origen de datos /// <returns>void</returns> /// </summary> protected override void RefreshMainData() { _preguntas_modulo = PreguntaList.GetPreguntasModulo(_modulo.Oid, _entity.MemoPreguntas); //_modulo.Preguntas = _preguntas_modulo; PgMng.Grow(string.Empty, "_preguntas"); _respuestas_modulo = RespuestaList.GetModuloList(_modulo.Oid); PgMng.Grow(string.Empty, "_respuestas"); RellenaPreguntas(); promociones = PromocionList.GetList(false); foreach (PromocionInfo info in promociones) { _promociones_todas.Add(info.Numero + " - " + info.Nombre, info); } RellenaPromociones(); PgMng.Grow(string.Empty, "RellenaPreguntas"); Datos.DataSource = _entity; Duracion_MTB.Text = _entity.Duracion.TimeOfDay.ToString(); PgMng.FillUp(string.Empty, "RefreshMain de ExamenEditForm"); //PgMng.ShowCronos(); }
public PromocionSelectForm(Form parent, PromocionList list) : base(true, parent, list) { InitializeComponent(); _view_mode = molView.Select; DialogResult = DialogResult.Cancel; }
public override void RefreshSecondaryData() { _municipios = MunicipioList.GetList(false); Library.Common.HComboBoxSourceList combo_municipios = new Library.Common.HComboBoxSourceList(_municipios); Datos_Municipios.DataSource = combo_municipios; //MunicipioP_CB.Text = EntityInfo.Municipio; PgMng.Grow(); _promociones = PromocionList.GetList(false); PgMng.Grow(); moleQule.Library.Instruction.HComboBoxSourceList combo_promociones = new moleQule.Library.Instruction.HComboBoxSourceList(_promociones); //_promociones.AddEmptyItem(); Datos_Promociones.DataSource = combo_promociones; PgMng.Grow(); //moleQule.Library.Instruction.HComboBoxSourceList _combo_practicas = new moleQule.Library.Instruction.HComboBoxSourceList(); //if (EntityInfo.OidPromocion != 0) //{ //_practicas = ClasePracticaList.GetList(); //_combo_practicas = new moleQule.Library.Instruction.HComboBoxSourceList(_practicas); //} PgMng.Grow(); //Datos_Practicas.DataSource = _combo_practicas; PgMng.Grow(); }
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(); }
public override void RefreshSecondaryData() { PlanEstudiosList planes = PlanEstudiosList.GetList(false); _combo_planes = new Library.Instruction.HComboBoxSourceList(planes); Datos_Planes.DataSource = _combo_planes; PgMng.Grow(string.Empty, "_combo_planes"); moleQule.Library.HComboBoxSourceList lista_horas = new moleQule.Library.HComboBoxSourceList(); lista_horas.Add(new ComboBoxSource(1, "08:00")); lista_horas.Add(new ComboBoxSource(2, "09:00")); lista_horas.Add(new ComboBoxSource(3, "10:00")); lista_horas.Add(new ComboBoxSource(4, "11:00")); lista_horas.Add(new ComboBoxSource(5, "12:00")); lista_horas.Add(new ComboBoxSource(6, "13:00")); lista_horas.Add(new ComboBoxSource(7, "14:00")); lista_horas.Add(new ComboBoxSource(8, "15:00")); lista_horas.Add(new ComboBoxSource(9, "16:00")); lista_horas.Add(new ComboBoxSource(10, "17:00")); lista_horas.Add(new ComboBoxSource(11, "18:00")); lista_horas.Add(new ComboBoxSource(12, "19:00")); lista_horas.Add(new ComboBoxSource(13, "20:00")); lista_horas.Add(new ComboBoxSource(14, "21:00")); Datos_Horas.DataSource = lista_horas; PgMng.Grow(string.Empty, "Datos_Planes.DataSource"); _promociones = PromocionList.GetList(false); _combo_planes.Childs = new Library.Instruction.HComboBoxSourceList(_promociones); PgMng.Grow(string.Empty, "_combo_planes.Childs"); //PgMng.ShowCronos(); }
public void SetSourceData(Examen item) { _entity = item; _alumnos = AlumnoList.GetAlumnosAdmitidosList(item.OidModulo, _entity.Desarrollo, _entity.Oid, ExamenPromocionList.GetChildList(_entity.Promociones), _entity.FechaExamen, false); _promociones = PromocionList.GetList(false);//.GetByModuloList(item.OidModulo, false); this.Text = Resources.Labels.SELECT_ALUMNOS; RefreshSecondaryData(); RefreshMainData(); }
public void SetSourceData(ExamenInfo item) { _entity = item; _alumnos = AlumnoList.GetAlumnosAdmitidosList(_entity.OidModulo, _entity.Desarrollo, true); _promociones = PromocionList.GetByModuloList(_entity.OidModulo, false); this.Text = Resources.Labels.SELECT_ALUMNOS; RefreshSecondaryData(); RefreshMainData(); }
/// <summary> /// Implementa Save_button_Click /// </summary> protected override void SubmitAction() { AlumnoInfo alumno = TodosAlumno_CkB.Checked ? null : _alumno; PromocionInfo promocion = TodosPromocion_CkB.Checked ? null : _promocion; string filtro = GetFilterValues(); AlumnoReportMng reportMng = new AlumnoReportMng(AppContext.ActiveSchema, string.Empty, filtro); AlumnoList alumnos = GetAlumnoList(alumno, promocion); PromocionList promos = GetPromocionList(promocion); if (Documentos_CLB.GetItemCheckState(0) == CheckState.Checked) { MatriculaPromocionRpt rpt = reportMng.GetMatriculaPromocionReport(alumnos, promos); if (rpt != null) { ReportViewer.SetReport(rpt); ReportViewer.ShowDialog(); } else { MessageBox.Show(moleQule.Face.Resources.Messages.NO_DATA_REPORTS); } } /*if (Documentos_CLB.GetItemCheckState(1) == CheckState.Checked) * { * MatriculaPromocionRpt rpt = reportMng.GetMatriculaPromocionReport(list, promocion); * * if (rpt != null) * { * ReportViewer.SetReport(rpt); * ReportViewer.ShowDialog(); * } * else * MessageBox.Show(moleQule.Face.Resources.Messages.NO_DATA_REPORTS); * }*/ if (Documentos_CLB.GetItemCheckState(2) == CheckState.Checked) { DocumentacionRpt rpt = reportMng.GetDocumentacionReport(alumnos, promos); if (rpt != null) { ReportViewer.SetReport(rpt); ReportViewer.ShowDialog(); } else { MessageBox.Show(moleQule.Face.Resources.Messages.NO_DATA_REPORTS); } } _action_result = DialogResult.OK; }
public override void RefreshSecondaryData() { PromocionList promociones = PromocionList.GetList(false); _combo_promociones = new Library.Instruction.HComboBoxSourceList(promociones); Datos_Promocion_Origen.DataSource = _combo_promociones; PgMng.Grow(); Datos_Promocion_Destino.DataSource = _combo_promociones; }
/// <summary> /// Asigna el objeto principal al origen de datos /// <returns>void</returns> /// </summary> protected override void RefreshMainData() { Datos.DataSource = _entity; Duracion_MTB.Text = _entity.Duracion.TimeOfDay.ToString(); promociones = PromocionList.GetList(false); foreach (PromocionInfo info in promociones) { _promociones_todas.Add(info.Numero + " - " + info.Nombre, info); } RellenaPromociones(); }
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(); }
public override void UpdateList() { switch (_current_action) { case molAction.Add: if (_entity == null) { return; } List.AddItem(_entity.GetInfo(false)); if (FilterType == IFilterType.Filter) { PromocionList listA = PromocionList.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) { PromocionList listD = PromocionList.GetList(_filter_results); listD.RemoveItem(ActiveOID); _filter_results = listD.GetSortedList(); } break; } RefreshSources(); if (_entity != null) { Select(_entity.Oid); } _entity = null; }
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 PromocionMngForm(bool isModal, Form parent, PromocionList list) : base(isModal, parent, list) { InitializeComponent(); SetView(molView.Normal); _sort_property = Codigo.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 = PromocionList.NewList().GetSortedList(); base.SortProperty = Codigo.DataPropertyName; }
public override void RefreshSecondaryData() { _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, "Promociones"); _combo_tipo = new Library.Instruction.HComboBoxSourceList(); _combo_tipo.Add(new ComboBoxSource(0, "")); _combo_tipo.Add(new ComboBoxSource(1, "Finales")); _combo_tipo.Add(new ComboBoxSource(2, "Parciales")); Datos_Tipos.DataSource = _combo_tipo; //PgMng.Grow(string.Empty, "Tipos"); }
protected PromocionList GetPromocionList(PromocionInfo promocion) { List <PromocionInfo> promociones = new List <PromocionInfo>(); PromocionList list; if (promocion != null) { promociones.Add(promocion); list = PromocionList.GetList(promociones); } else { list = PromocionList.GetList(false); } return(list); }
private void Promocion_BT_Click(object sender, EventArgs e) { PromocionList lista_promociones = PromocionList.GetList(false); if (_promociones_todas.Count == 0) { foreach (PromocionInfo info in lista_promociones) { _promociones_todas.Add(info.Numero + " - " + info.Nombre, info); } } PromocionSelectForm form = new PromocionSelectForm(this, lista_promociones); if (form.ShowDialog(this) == DialogResult.OK) { if (form.Selected is PromocionInfo) { PromocionInfo info = form.Selected as PromocionInfo; if (!_promociones.ContainsKey(info.Numero + " - " + info.Nombre)) { _promociones.Add(info.Numero + " - " + info.Nombre, info); } } else if (form.Selected is SortedBindingList <PromocionInfo> ) { SortedBindingList <PromocionInfo> promociones = form.Selected as SortedBindingList <PromocionInfo>; foreach (PromocionInfo info in promociones) { if (!_promociones.ContainsKey(info.Numero + " - " + info.Nombre)) { _promociones.Add(info.Numero + " - " + info.Nombre, info); } } } Promociones_CLB.Items.Clear(); foreach (KeyValuePair <string, PromocionInfo> item in _promociones) { Promociones_CLB.Items.Add(item.Key, true); } } }
protected override void RefreshMainData() { PgMng.Grow(string.Empty, "Promocion"); _selectedOid = ActiveOID; switch (DataType) { case EntityMngFormTypeData.Default: List = PromocionList.GetList(false); break; case EntityMngFormTypeData.ByParameter: _sorted_list = List.GetSortedList(); break; } PgMng.Grow(string.Empty, "Lista de Promociones"); }
public override void RefreshSecondaryData() { base.RefreshSecondaryData(); _planes = PlanEstudiosList.GetList(false); PgMng.Grow(string.Empty, "Planes de Estudio"); _combo_planes = new Library.Instruction.HComboBoxSourceList(_planes); PgMng.Grow(string.Empty, "ComboBox Planes de Estudio"); _promociones = PromocionList.GetList(false); PgMng.Grow(string.Empty, "Promociones"); _combo_planes.Childs = new Library.Instruction.HComboBoxSourceList(_promociones); PgMng.Grow(string.Empty, "ComboBox de Promociones"); Datos_Planes.DataSource = _combo_planes; PgMng.Grow(string.Empty, "Datos_Planes"); _no_asignables = new List <SesionNoAsignable>(); PgMng.Grow(); }
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)); } }
public override void RefreshSecondaryData() { PromocionList promociones = PromocionList.GetList(false); _combo_promociones = new Library.Instruction.HComboBoxSourceList(promociones); Datos_Promociones.DataSource = _combo_promociones; PgMng.Grow(); _alumnos = AlumnoList.GetList(false); _combo_promociones.Childs = new Library.Instruction.HComboBoxSourceList(_alumnos); Datos_ComboAlumnos.DataSource = _combo_promociones.Childs; PgMng.Grow(); _combo_tipo = new Library.Instruction.HComboBoxSourceList(); _combo_tipo.Add(new ComboBoxSource()); _combo_tipo.Add(new ComboBoxSource(1, "Curso")); _combo_tipo.Add(new ComboBoxSource(2, "Módulo")); Datos_Tipo.DataSource = _combo_tipo; PgMng.Grow(); }
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 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(); }
protected override bool DoSearch() { bool promo = false; bool plan = false; PromocionList sublist = null; PlanEstudiosList sublist_plan = null; DateTime inicio = DateTime.MinValue; DateTime fin = DateTime.MaxValue; if (Desde_DTP.Checked) { inicio = Desde_DTP.Value; } if (Hasta_DTP.Checked) { fin = Hasta_DTP.Value; } if (_lista == null) { MessageBox.Show(Resources.Messages.NO_RESULTS); return(false); } FCriteria criteria = null; if (Valor_TB.Text != " ") { foreach (Control ctl in this.Campos_Groupbox.Controls) { if (((System.Windows.Forms.RadioButton)ctl).Checked) { switch (ctl.Name) { case "Promocion_RB": { CriteriaEx criteriaex = Promocion.GetCriteria(Promocion.OpenSession()); criteriaex.AddContains("Nombre", Valor_TB.Text); criteriaex.Childs = false; sublist = PromocionList.GetList(criteriaex); // No existe la promoción if (sublist.Count == 0) { MessageBox.Show(Resources.Messages.NO_RESULTS); return(false); } promo = true; break; } case "Plan_RB": { CriteriaEx criteriaex = PlanEstudios.GetCriteria(PlanEstudios.OpenSession()); criteriaex.AddContains("Nombre", Valor_TB.Text); criteriaex.Childs = false; sublist_plan = PlanEstudiosList.GetList(criteriaex); // No existe la promoción if (sublist_plan.Count == 0) { MessageBox.Show(Resources.Messages.NO_RESULTS); return(false); } plan = true; break; } } } } } // Consulta en la bd SortedBindingList <HorarioInfo> lista = null; if (SortProperty != string.Empty) { if (promo) { HorarioList list = HorarioList.GetList(HorarioList.GetFilteredList(HorarioList.GetFilteredFechaList(_lista, inicio, fin), sublist, "OidPromocion")); lista = list.ToSortedList(SortProperty, SortDirection); } else { if (plan) { HorarioList list = HorarioList.GetList(HorarioList.GetFilteredList(HorarioList.GetFilteredFechaList(_lista, inicio, fin), sublist_plan, "OidPlan")); lista = list.ToSortedList(SortProperty, SortDirection); } else { lista = HorarioList.SortList(HorarioList.GetFilteredFechaList(_lista, inicio, fin), SortProperty, SortDirection); }; } } else { lista = _lista.GetSortedSubList(criteria, "Oid", SortDirection); } Datos.DataSource = lista; if (lista.Count == 0) { MessageBox.Show(Resources.Messages.NO_RESULTS); return(false); } Datos.MoveFirst(); return(true); }
protected override bool DoSearch() { bool promo = false; PromocionList sublist = null; 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 "Nombre_RB": { criteria = new FCriteria <string>("Nombre", Valor_TB.Text); break; } case "Apellidos_RB": { criteria = new FCriteria <string>("Apellidos", Valor_TB.Text); break; } case "Promocion_RB": { CriteriaEx criteriaex = Promocion.GetCriteria(Promocion.OpenSession()); criteriaex.AddContains("Nombre", Valor_TB.Text); sublist = PromocionList.GetList(criteriaex); // No existe el plan if (sublist.Count == 0) { MessageBox.Show(Resources.Messages.NO_RESULTS); return(false); } promo = true; break; } } } } // Consulta en la bd SortedBindingList <AlumnoInfo> lista; if (SortProperty != string.Empty) { if (!promo) { lista = _lista.GetSortedSubList(criteria, SortProperty, SortDirection); } else { AlumnoList list = AlumnoList.GetList(AlumnoList.GetFilteredList(_lista, sublist, "OidPromocion")); lista = list.ToSortedList(SortProperty, SortDirection); } } else { lista = _lista.GetSortedSubList(criteria, "Oid", SortDirection); } Datos.DataSource = lista; if (lista.Count == 0) { MessageBox.Show(Resources.Messages.NO_RESULTS); return(false); } Datos.MoveFirst(); return(true); }
protected override bool DoFilter() { bool plan = false; PlanEstudiosList sublist = null; 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 "Nombre_RB": { criteria = new FCriteria <string>("Nombre", Valor_TB.Text); break; } case "Plan_RB": { CriteriaEx criteriaex = PlanEstudios.GetCriteria(PlanEstudios.OpenSession()); criteriaex.AddContains("Nombre", Valor_TB.Text); sublist = PlanEstudiosList.GetList(criteriaex); // No existe el proveedor if (sublist.Count == 0) { MessageBox.Show(Resources.Messages.NO_RESULTS); return(false); } plan = true; break; } } } } // Consulta en la bd PromocionList lista = null; if (!plan) { lista = PromocionList.GetList(_lista.GetSubList(criteria)); } else { lista = PromocionList.GetList(PromocionList.GetFilteredList(_lista, sublist, "OidPlan")); } Datos.DataSource = lista; if (lista.Count == 0) { MessageBox.Show(Resources.Messages.NO_RESULTS); return(false); } Datos.MoveFirst(); _filtered_list = lista; return(true); }
public override void RefreshSecondaryData() { _promociones = PromocionList.GetList(false);//.GetByModuloList(_entity.OidModulo, false); _combo_promociones = new Library.Instruction.HComboBoxSourceList(_promociones); Datos_Promociones.DataSource = _combo_promociones; }