private void DataPortal_Fetch(CriteriaEx criteria) { try { _base.Record.Oid = 0; SessionCode = criteria.SessionCode; Childs = criteria.Childs; if (nHMng.UseDirectSQL) { //Empresa.DoLOCK(Session()); IDataReader reader = nHMng.SQLNativeSelect(criteria.Query, Session()); if (reader.Read()) { _base.CopyValues(reader); } if (Childs) { //ContactoEmpresa.DoLOCK(Session()); string query = ContactoEmpresa.SELECT(this);; reader = nHManager.Instance.SQLNativeSelect(query, Session()); _contactos = ContactoEmpresas.GetChildList(reader); } } } catch (Exception ex) { if (Transaction() != null) { Transaction().Rollback(); } iQExceptionHandler.TreatException(ex); } }
public static string SELECT() { return(ContactoEmpresa.SELECT(new QueryConditions(), false)); }