public override void UpdateList() { switch (_current_action) { case molAction.Add: if (_entity == null) { return; } List.AddItem(_entity.GetInfo(false)); if (FilterType == IFilterType.Filter) { InputInvoiceList listA = InputInvoiceList.GetList(_filter_results); listA.AddItem(_entity.GetInfo(false)); _filter_results = listA.GetSortedList(); } break; case molAction.Edit: case molAction.ChangeStateContabilizado: case molAction.ChangeStateEmitido: case molAction.Unlock: if (_entity == null) { return; } ActiveItem.CopyFrom(_entity); break; case molAction.Delete: if (ActiveItem == null) { return; } List.RemoveItem(ActiveItem.Oid); if (FilterType == IFilterType.Filter) { InputInvoiceList listD = InputInvoiceList.GetList(_filter_results); listD.RemoveItem(ActiveItem.Oid); _filter_results = listD.GetSortedList(); } break; } RefreshSources(); if (_entity != null) { Select(_entity.Oid); } _entity = null; }