Example #1
0
        public ActionResult modify(DownLoadForm downLoadForm)
        {
            DownLoadForm item = this.downLoadFormService.findDownLoadForm(downLoadForm);

            ViewBag.item  = item;
            ViewBag.files = this.filesService.findAllByMasterIdxAndType(item.idx, "formFile");
            return(View("~/Views/CustomerService/DownloadForm/modify.cshtml"));
        }
Example #2
0
        public RedirectToRouteResult modifyProc(DownLoadForm downLoadForm)
        {
            HttpFileCollectionBase multipartfiles = Request.Files;

            downLoadForm.uptId = System.Web.HttpContext.Current.User.Identity.Name;
            this.downLoadFormService.updateDownLoadForm(multipartfiles, downLoadForm);
            return(RedirectToAction("list", (RouteValueDictionary)Session["searchMap"]));
        }
Example #3
0
        public ActionResult list(DownLoadForm downLoadForm)
        {
            this.searchService.setSearchSession(Request, Session);
            this.searchService.setPagination(downLoadForm, 20, this.downLoadFormService.findAllCount(downLoadForm));
            ViewBag.list       = this.downLoadFormService.findAll(downLoadForm);
            ViewBag.pagination = downLoadForm;

            return(View("~/Views/CustomerService/DownloadForm/list.cshtml"));
        }
Example #4
0
        public DownLoadForm findDownLoadForm(DownLoadForm downloadForm)
        {
            DownLoadForm findDownLoadFormOne = this.downloadFormDao.findDownloadForm(downloadForm);

            if (findDownLoadFormOne == null)
            {
                throw new CustomException("데이터가 존재하지 않습니다.");
            }

            return(findDownLoadFormOne);
        }
Example #5
0
 public void deleteDownLoadForm(DownLoadForm downloadForm)
 {
     findDownLoadForm(downloadForm);
     try {
         Mapper.Instance().BeginTransaction();
         this.downloadFormDao.deleteDownloadForm(downloadForm);
         this.filesService.deleteRealFilesAndDataByFileMasterIdx(downloadForm.idx);
         Mapper.Instance().CommitTransaction();
     }
     catch (Exception e)
     {
         Mapper.Instance().RollBackTransaction();
     }
 }
Example #6
0
 private void validation(HttpFileCollectionBase multipartFiles, DownLoadForm downloadForm)
 {
     if (String.IsNullOrWhiteSpace(downloadForm.formName))
     {
         throw new CustomException("필수 값이 없습니다.");
     }
     if (String.IsNullOrWhiteSpace(downloadForm.usagePurpose))
     {
         throw new CustomException("필수 값이 없습니다.");
     }
     if (multipartFiles.Count < 0)
     {
         throw new CustomException("필수 값이 없습니다.");
     }
 }
Example #7
0
 public void updateDownLoadForm(HttpFileCollectionBase multipartFiles, DownLoadForm downloadForm)
 {
     findDownLoadForm(downloadForm);
     validation(multipartFiles, downloadForm);
     try {
         Mapper.Instance().BeginTransaction();
         this.filesService.deleteFileAndFileUpload(multipartFiles, "formFile", "pdf", 10 * 1024 * 1024, downloadForm.idx, downloadForm.fileIdxs);
         this.downloadFormDao.updateDownloadForm(downloadForm);
         Mapper.Instance().CommitTransaction();
     }
     catch (Exception e)
     {
         Mapper.Instance().RollBackTransaction();
     }
 }
Example #8
0
        public void insertDownLoadForm(HttpFileCollectionBase multipartFiles, DownLoadForm downloadForm)
        {
            int masterIdx = this.sequenceService.getSequenceMasterIdx();

            downloadForm.idx = masterIdx;
            validation(multipartFiles, downloadForm);
            try {
                Mapper.Instance().BeginTransaction();
                this.downloadFormDao.insertDownloadForm(downloadForm);
                this.filesService.fileUpload(multipartFiles, "formFile", "pdf", 10 * 1024 * 1024, masterIdx, null);
                Mapper.Instance().CommitTransaction();
            }
            catch (Exception e)
            {
                Mapper.Instance().RollBackTransaction();
            }
        }
Example #9
0
 public ActionResult register(DownLoadForm downLoadForm)
 {
     return(View("~/Views/CustomerService/DownloadForm/register.cshtml"));
 }
Example #10
0
 public void deleteDownloadForm(DownLoadForm downloadForm)
 {
     Mapper.Instance().Delete("downloadForm.deleteDownloadForm", downloadForm);
 }
Example #11
0
 public void updateDownloadForm(DownLoadForm downloadForm)
 {
     Mapper.Instance().Update("downloadForm.updateDownloadForm", downloadForm);
 }
Example #12
0
 public DownLoadForm findDownloadForm(DownLoadForm downloadForm)
 {
     return(Mapper.Instance().QueryForObject <DownLoadForm>("downloadForm.findDownloadForm", downloadForm));
 }
Example #13
0
 public int findAllCount(DownLoadForm downloadForm)
 {
     return(this.downloadFormDao.findAllCount(downloadForm));
 }
Example #14
0
 public int findAllCount(DownLoadForm downloadForm)
 {
     return(Mapper.Instance().QueryForObject <int>("downloadForm.findAllCount", downloadForm));
 }
Example #15
0
 public IList <DownLoadForm> findAll(DownLoadForm downloadForm)
 {
     return(Mapper.Instance().QueryForList <DownLoadForm>("downloadForm.findAll", downloadForm));
 }
Example #16
0
 public void insertDownloadForm(DownLoadForm downloadForm)
 {
     Mapper.Instance().Insert("downloadForm.insertDownloadForm", downloadForm);
 }
Example #17
0
 public RedirectToRouteResult delete(DownLoadForm downLoadForm)
 {
     this.downLoadFormService.deleteDownLoadForm(downLoadForm);
     return(RedirectToAction("list"));
 }
Example #18
0
        private SequenceService sequenceService = new SequenceServiceImpl(); //시퀀스생성

        public IList <DownLoadForm> findAll(DownLoadForm downloadForm)
        {
            return(this.downloadFormDao.findAll(downloadForm));
        }