public override void UpdateList() { switch (_current_action) { case molAction.Add: case molAction.Copy: if (_entity == null) { return; } List.AddItem(_entity.GetInfo(false)); if (FilterType == IFilterType.Filter) { ExpedienteList listA = ExpedienteList.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) { ExpedienteList listD = ExpedienteList.GetList(_filter_results); listD.RemoveItem(ActiveOID); _filter_results = listD.GetSortedList(); } break; } RefreshSources(); if (_entity != null) { Select(_entity.Oid); } _entity = null; }
public static string SELECT(Expedient item) { Library.Store.QueryConditions conditions = new Library.Store.QueryConditions { Expedient = item.GetInfo(false) }; return(SELECT(conditions, false)); }
public static string SELECT(Expedient item) { string query = SELECT(new QueryConditions { Expedient = item.GetInfo() }) + @" ORDER BY ST.""OID_BATCH"", ST.""FECHA"" ASC, ST.""OID"""; return(query); }
public static string SELECT_FROM_LIST_BY_PARTIDA(Expedient item, string list) { QueryConditions conditions = new QueryConditions { Expedient = item.GetInfo(false) }; string query = Stock.SELECT(conditions, false) + " AND ST.\"OID_BATCH\" IN (" + list + ")"; return(query); }
protected override void SaveAction() { _action_result = SaveObject() ? DialogResult.OK : DialogResult.Ignore; if (_action_result == DialogResult.OK) { //Actualizamos la cache ExpedienteList cache = Cache.Instance.Get(typeof(ExpedienteList)) as ExpedienteList; if (cache != null) { cache.Change(_entity.Oid, _entity.GetInfo(false), true); } } }
public static Stocks GetChildListByPartida(Expedient parent, long oidPartida, bool childs) { CriteriaEx criteria = Stock.GetCriteria(parent.SessionCode); criteria.Childs = childs; QueryConditions conditions = new QueryConditions { Expedient = parent.GetInfo(false), Partida = Batch.NewChild().GetInfo(false) }; conditions.Partida.Oid = oidPartida; criteria.Query = Stocks.SELECT(conditions); return(DataPortal.Fetch <Stocks>(criteria)); }
public static StockList GetListByExpediente(long oid, bool throwStockException) { CriteriaEx criteria = Stock.GetCriteria(Stock.OpenSession()); criteria.Childs = true; Expedient item = Expedient.New(); item.Oid = oid; criteria.Query = StockList.SELECT(item.GetInfo(false)); StockList list = DataPortal.Fetch <StockList>(criteria); list.UpdateStocksByBatch(throwStockException); CloseSession(criteria.SessionCode); return(list); }
public static string SELECT(Expedient parent) { return(SELECT(new QueryConditions { Expedient = parent.GetInfo(false) })); }
public static string SELECT(Expedient source) { return(Cabeza.SELECT(new QueryConditions { Expedient = source.GetInfo() }, true)); }
public static string SELECT(Expedient source) { return(Expense.SELECT(new QueryConditions { Expedient = source.GetInfo(false), CategoriaGasto = ECategoriaGasto.Expediente }, true)); }
public static string SELECT(Expedient parent) { return(LineaFomento.SELECT(new QueryConditions { Expedient = parent.GetInfo(false) }, true)); }
public static string SELECT(Expedient item) { return(SELECT(new Library.Invoice.QueryConditions { Expediente = item.GetInfo(false) })); }
public static string SELECT(Expedient source) { return(Payroll.SELECT(new QueryConditions { Expedient = source.GetInfo(false) }, true)); }