public async Task <ActionResult> MentoringReportDetail(int reportSn, SelectedMentorReportParmModel selectParam) { ViewBag.naviLeftMenu = Global.MentoringReport; var scMentoringReport = await _scMentoringReportService.GetMentoringReportById(reportSn); //멘토링 사진 var listscMentoringImageInfo = scMentoringReport.ScMentoringFileInfoes.Where(mtfi => mtfi.Classify == "P").Select(mtfi => mtfi.ScFileInfo).Where(fi => fi.Status == "N"); //사진추가 var listMentoringPhotoView = Mapper.Map <List <FileContent> >(listscMentoringImageInfo); FileHelper fileHelper = new FileHelper(); foreach (var mentoringPhoto in listMentoringPhotoView) { mentoringPhoto.FileBase64String = await fileHelper.GetPhotoString(mentoringPhoto.FilePath); // resize/ mentoringPhoto.FileFullPath = await fileHelper.GetPhotoStringFullsize(mentoringPhoto.FilePath); } //첨부파일 var listscFileInfo = scMentoringReport.ScMentoringFileInfoes.Where(mtfi => mtfi.Classify == "A").Select(mtfi => mtfi.ScFileInfo).Where(fi => fi.Status == "N"); var listFileContentView = Mapper.Map <List <FileContent> >(listscFileInfo); //멘토링 상세 매핑 var reportViewModel = Mapper.Map <MentoringReportViewModel>(scMentoringReport); //멘토링상세뷰에 파일정보 추가 reportViewModel.FileContents = listFileContentView; reportViewModel.MentoringPhoto = listMentoringPhotoView; // 기업명 넘기기 SqlParameter loginId3 = new SqlParameter("LOGIN_ID", Session[Global.LoginID].ToString()); object[] parameters3 = new object[] { loginId3 }; var compInfo = await procMngService.getCompMapping(parameters3); ViewBag.CompName = compInfo[0].COMP_NM; //검색조건 유지를 위해 ViewBag.SelectParam = selectParam; return(View(reportViewModel)); }
public async Task <ActionResult> MentoringReportDetail(int reportSn, SelectedMentorReportParmModel selectParam) { ViewBag.LeftMenu = Global.MentoringReport; var scMentoringReport = await _scMentoringReportService.GetMentoringReportById(reportSn); //멘토링 사진 var listscMentoringImageInfo = scMentoringReport.ScMentoringFileInfoes.Where(mtfi => mtfi.Classify == "P").Select(mtfi => mtfi.ScFileInfo).Where(fi => fi.Status == "N"); //사진추가 var listMentoringPhotoView = Mapper.Map <List <FileContent> >(listscMentoringImageInfo); FileHelper fileHelper = new FileHelper(); foreach (var mentoringPhoto in listMentoringPhotoView) { mentoringPhoto.FileBase64String = await fileHelper.GetPhotoString(mentoringPhoto.FilePath); } //첨부파일 var listscFileInfo = scMentoringReport.ScMentoringFileInfoes.Where(mtfi => mtfi.Classify == "A").Select(mtfi => mtfi.ScFileInfo).Where(fi => fi.Status == "N"); var listFileContentView = Mapper.Map <List <FileContent> >(listscFileInfo); //멘토링 상세 매핑 var reportViewModel = Mapper.Map <MentoringReportViewModel>(scMentoringReport); //멘토링상세뷰에 파일정보 추가 reportViewModel.FileContents = listFileContentView; reportViewModel.MentoringPhoto = listMentoringPhotoView; //검색조건 유지를 위해 ViewBag.SelectParam = selectParam; return(View(reportViewModel)); }
public async Task <ActionResult> MentoringReportDetail(int reportSn, SelectedMentorReportParmModel selectParam) { ViewBag.naviLeftMenu = Global.MentorMng; var scMentoringReport = await _scMentoringReportService.GetMentoringReportById(reportSn); //멘토링 사진 var listscMentoringImageInfo = scMentoringReport.ScMentoringFileInfoes.Where(mtfi => mtfi.Classify == "P").Select(mtfi => mtfi.ScFileInfo).Where(fi => fi.Status == "N"); //사진추가 var listMentoringPhotoView = Mapper.Map <List <FileContent> >(listscMentoringImageInfo); FileHelper fileHelper = new FileHelper(); foreach (var mentoringPhoto in listMentoringPhotoView) { mentoringPhoto.FileBase64String = await fileHelper.GetPhotoString(mentoringPhoto.FilePath); } //첨부파일 var listscFileInfo = scMentoringReport.ScMentoringFileInfoes.Where(mtfi => mtfi.Classify == "A").Select(mtfi => mtfi.ScFileInfo).Where(fi => fi.Status == "N"); var listFileContentView = Mapper.Map <List <FileContent> >(listscFileInfo); //멘토링 상세 매핑 var reportViewModel = Mapper.Map <MentoringReportViewModel>(scMentoringReport); // 멘토명을 이용한 기업명 var mentorId = reportViewModel.MentorId; var mentorLoginKey = await _scUsrService.SelectScUsrforIf(mentorId); SqlParameter loginId = new SqlParameter("LOGIN_ID", mentorLoginKey.TcmsLoginKey); object[] parameters = new object[] { loginId }; var listObj = await procMngService.getCompMapping(parameters); ViewBag.CompName = listObj[0].COMP_NM; //멘토링상세뷰에 파일정보 추가 reportViewModel.FileContents = listFileContentView; reportViewModel.MentoringPhoto = listMentoringPhotoView; //검색조건 유지를 위해 ViewBag.SelectParam = selectParam; return(View(reportViewModel)); }