public override void UpdateList() { switch (_current_action) { case molAction.Add: if (_entity == null) { return; } List.AddItem(_entity.GetInfo()); if (FilterType == IFilterType.Filter) { ClaseGenericaList listA = ClaseGenericaList.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) { ClaseGenericaList listD = ClaseGenericaList.GetList(_filter_results); listD.RemoveItem(ActiveOID); _filter_results = listD.GetSortedList(); } break; } _entity = null; RefreshSources(); }
public ClasesPromocionMngForm(bool isModal, Form parent, ClaseTeoricaList teoricas, ClasePracticaList practicas, ClaseExtraList extras) : base(isModal, parent, ClaseGenericaList.GetList(teoricas, practicas, extras)) { InitializeComponent(); SetView(molView.Normal); _teoricas = teoricas; _practicas = practicas; _extras = extras; // 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 = ClaseGenericaList.NewList().GetSortedList(); SortProperty = Submodulo.DataPropertyName; this.Text = Resources.Labels.CLASE_HORARIO_TITLE; }
/// <summary> /// Toma la lista de bancos de la base de datos y rellena la tabla. /// </summary> protected override void RefreshMainData() { PgMng.Grow(string.Empty, "ClaseGenerica"); _selectedOid = ActiveOID; switch (DataType) { case EntityMngFormTypeData.Default: List = ClaseGenericaList.GetList(_teoricas, _practicas, _extras); break; case EntityMngFormTypeData.ByParameter: _sorted_list = List.GetSortedList(); break; } PgMng.Grow(string.Empty, "Lista de Clases"); }