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")); }
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"])); }
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")); }
public DownLoadForm findDownLoadForm(DownLoadForm downloadForm) { DownLoadForm findDownLoadFormOne = this.downloadFormDao.findDownloadForm(downloadForm); if (findDownLoadFormOne == null) { throw new CustomException("데이터가 존재하지 않습니다."); } return(findDownLoadFormOne); }
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(); } }
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("필수 값이 없습니다."); } }
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(); } }
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(); } }
public ActionResult register(DownLoadForm downLoadForm) { return(View("~/Views/CustomerService/DownloadForm/register.cshtml")); }
public void deleteDownloadForm(DownLoadForm downloadForm) { Mapper.Instance().Delete("downloadForm.deleteDownloadForm", downloadForm); }
public void updateDownloadForm(DownLoadForm downloadForm) { Mapper.Instance().Update("downloadForm.updateDownloadForm", downloadForm); }
public DownLoadForm findDownloadForm(DownLoadForm downloadForm) { return(Mapper.Instance().QueryForObject <DownLoadForm>("downloadForm.findDownloadForm", downloadForm)); }
public int findAllCount(DownLoadForm downloadForm) { return(this.downloadFormDao.findAllCount(downloadForm)); }
public int findAllCount(DownLoadForm downloadForm) { return(Mapper.Instance().QueryForObject <int>("downloadForm.findAllCount", downloadForm)); }
public IList <DownLoadForm> findAll(DownLoadForm downloadForm) { return(Mapper.Instance().QueryForList <DownLoadForm>("downloadForm.findAll", downloadForm)); }
public void insertDownloadForm(DownLoadForm downloadForm) { Mapper.Instance().Insert("downloadForm.insertDownloadForm", downloadForm); }
public RedirectToRouteResult delete(DownLoadForm downLoadForm) { this.downLoadFormService.deleteDownLoadForm(downLoadForm); return(RedirectToAction("list")); }
private SequenceService sequenceService = new SequenceServiceImpl(); //시퀀스생성 public IList <DownLoadForm> findAll(DownLoadForm downloadForm) { return(this.downloadFormDao.findAll(downloadForm)); }