private bool AgenteExists() { AgenteList agentes = AgenteList.GetList(false); foreach (AgenteInfo item in agentes) { if (item.OidEntidad == CurrentEntidad.Oid && item.OidAgenteExt == ActiveItem.Oid) { return(true); } } return(false); }
public override void UpdateList() { switch (_current_action) { case molAction.Add: if (_entity == null) { return; } List.AddItem(_entity.GetInfo(false)); if (FilterType == IFilterType.Filter) { AgenteList listA = AgenteList.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) { AgenteList listD = AgenteList.GetList(_filter_results); listD.RemoveItem(ActiveOID); _filter_results = listD.GetSortedList(); } break; } _entity = null; RefreshSources(); }
protected override void RefreshMainData() { PgMng.Grow(string.Empty, "Agente"); long oid = ActiveOID; if (CurrentEntidad != null) { List = AgenteList.GetListByEntidad(CurrentEntidad); } else { List = AgenteList.GetList(false); } PgMng.Grow(string.Empty, "Lista de Agentes"); }