コード例 #1
0
        public List <DocumentVO> FindByFileName(string fileName, bool isExact)
        {
            FileDAO       dao   = new FileDAO();
            List <FileVO> files = dao.FindFilesByName(fileName, isExact);

            dao.CloseConnection();
            NoRepeatList <DocumentVO> result = new NoRepeatList <DocumentVO>();

            foreach (FileVO file in files)
            {
                result.AddDistinct(file.Document);
            }

            FullLoadList(result);

            return(result);
        }
コード例 #2
0
        public List <DocumentVO> FindByFileArchivingDate(Common.Search.DateRange range)
        {
            FileDAO       dao   = new FileDAO();
            List <FileVO> files = dao.FindFilesByArchivingDate(range);

            dao.CloseConnection();
            NoRepeatList <DocumentVO> result = new NoRepeatList <DocumentVO>();

            foreach (FileVO file in files)
            {
                result.AddDistinct(file.Document);
            }

            FullLoadList(result);

            return(result);
        }
コード例 #3
0
        public void FullLoad(DocumentVO doc)
        {
            DocumentCategoryDAO dao           = new DocumentCategoryDAO();
            List <int>          categoriesIds = dao.GetAssociationsOfFirstTable(doc);

            dao.CloseConnection();

            CategoryDAO       catDao = new CategoryDAO();
            List <CategoryVO> result = new List <CategoryVO>();

            foreach (int item in categoriesIds)
            {
                result.Add(catDao.GetItem(item));
            }

            catDao.CloseConnection();
            doc.Categories = result;

            FileDAO fileDao = new FileDAO();

            doc.Files = fileDao.GetFilesOfDocument(doc);
            fileDao.CloseConnection();
        }