示例#1
0
 public void RemoveAgent(DocumentoInfo doc_parent)
 {
     foreach (AgenteDocumento item in this)
     {
         if (item.OidDocumento == doc_parent.OidDocumento)
         {
             this.Remove(item);
             return;
         }
     }
 }
示例#2
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);
        }
示例#3
0
        public void CopyValues(DocumentoInfo source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source.Base.Record);

            _n_agentes     = source.NAgentes;
            _oid_documento = source.OidDocumento;
            _entidad       = source.Entidad;
            _agente        = source.Agente;
        }
示例#4
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);
        }
示例#5
0
 public static string SELECT(DocumentoInfo source)
 {
     return(SELECT(new QueryConditions {
         Document = source
     }));
 }
示例#6
0
 public static bool ExistsFile(FtpClient ftp, AgenteInfo agente, DocumentoInfo doc)
 {
     return(ExistsFile(ftp, GetAgenteDirectory(ftp, agente), doc.Nombre));
 }