Exemplo n.º 1
0
        public void insertCatalog(HttpFileCollectionBase multipartFiles, Catalog catalog)
        {
            int masterIdx = sequenceService.getSequenceMasterIdx();

            catalog.idx = masterIdx;
            validation(catalog);
            try {
                Mapper.Instance().BeginTransaction();
                catalogDao.insertCatalog(catalog);
                filesService.fileUpload(multipartFiles, "file", "pdf", 10 * 1024 * 1024, masterIdx, null);
                Mapper.Instance().CommitTransaction();
            }
            catch (Exception e)
            {
                Mapper.Instance().RollBackTransaction();
            }
        }