Beispiel #1
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();
        }
Beispiel #2
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();
        }