internal static string SELECT(long oid, bool lockTable) { string query = string.Empty; QueryConditions conditions = new QueryConditions { Document = DocumentoInfo.New(oid) }; query = SELECT(conditions, lockTable); return(query); }
public static long CountAssociations(long oid) { CriteriaEx criteria = AgenteDocumento.GetCriteria(AgenteDocumento.OpenSession()); criteria.Childs = false; QueryConditions conditions = new QueryConditions() { Document = DocumentoInfo.New(oid) }; criteria.Query = AgenteDocumentos.SELECT(conditions); AgenteDocumentoList list = DataPortal.Fetch <AgenteDocumentoList>(criteria); CloseSession(criteria.SessionCode); return(list.Count); }