Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }