12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372 |
- #region Copyright © 2015 CLIPSOFT Co.,Ltd. All Rights Reserved.
- //
- // All rights are reserved. Reproduction or transmission in whole or in part,
- // in any form or by any means, electronic, mechanical or otherwise, is
- // prohibited without the prior written consent of the copyright owner.
- //
- // Filename:ConsentCommandCtrl.cs
- //
- #endregion
- using System;
- using System.ComponentModel;
- using System.Collections.Generic;
- using System.Windows.Forms;
- using System.IO;
- using System.Net;
- using System.Xml;
- using System.Drawing;
- using System.Security.Cryptography;
- using CLIP.eForm.Consent.Dfh.UI.ConsentSvcRef;
- using CLIP.eForm.Consent.Dfh.UI.HospitalSvcRef;
- using ClipSoft.eForm.Base.Dialog;
- namespace CLIP.eForm.Consent.Dfh.UI
- {
- /// <summary>
- /// 출력, 전자동의서 실행 버튼 클래스
- /// </summary>
- /// <remarks>
- /// <p>[설계자]</p>
- /// <p> 클립소프트 연구소 홍지철 (jchong@clipsoft.co.kr)</p>
- /// <p>[원본 작성자]</p>
- /// <p> 클립소프트 기술부 이창훈 (chlee@clipsoft.co.kr)</p>
- /// <p>[수정 작성자]</p>
- /// <p> 클립소프트 기술부 이인희</p>
- /// <p>----------------------------------------------------------------------------------------</p>
- /// <p>[HISTORY]</p>
- /// <p> 2016-06-21 : 최초작성</p>
- /// <p>----------------------------------------------------------------------------------------</p>
- /// </remarks>
- public partial class ConsentCommandCtrl : ConsentCommandCtrlBase
- {
- private PreviewConsent currentPreviewConsent = null;
- private TargetPatient currentTargetPatient = null;
- private EndUser currentEndUser = null;
- private IConsentMain consentMain = null;
- private ConsentSvcRef.ConsentSvcSoapClient consentWebService = null;
- private HospitalSvcRef.HospitalSvcSoapClient hospitalWebService = null;
- private string exportedImageFiles = string.Empty;
- private string exportedImageFilesJson = string.Empty;
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConsentCommandCtrl));
- public ConsentCommandCtrl()
- {
- InitializeComponent();
- }
- public override bool EnableRedo
- {
- get
- {
- return base.EnableRedo;
- }
- set
- {
- base.EnableRedo = value;
- this.toolStripButtonRedo.Enabled = base.EnableRedo;
- }
- }
- public override bool EnableUndo
- {
- get
- {
- return base.EnableUndo;
- }
- set
- {
- base.EnableUndo = value;
- this.toolStripButtonUndo.Enabled = base.EnableUndo;
- }
- }
- public override bool EnableRemoveAll
- {
- get
- {
- return base.EnableRemoveAll;
- }
- set
- {
- base.EnableRemoveAll = value;
- this.toolStripButtonDelAllDraw.Enabled = base.EnableRemoveAll;
- }
- }
- public override bool EnablePenDrawing
- {
- get
- {
- return base.EnableRemoveAll;
- }
- set
- {
- base.EnablePenDrawing = value;
- this.toolStripButtonPen.Enabled = base.EnablePenDrawing;
- }
- }
- public override bool EnablePenConfig
- {
- get
- {
- return base.EnablePenConfig;
- }
- set
- {
- base.EnablePenConfig = value;
- this.toolStripButtonPenConfig.Enabled = base.EnablePenConfig;
- }
- }
- public PreviewConsent CurrentPreviewConsent
- {
- get
- {
- return currentPreviewConsent;
- }
- set
- {
- currentPreviewConsent = value;
- }
- }
- public TargetPatient CurrentTargetPatient
- {
- get
- {
- return currentTargetPatient;
- }
- set
- {
- currentTargetPatient = value;
- }
- }
- public EndUser CurrentEndUser
- {
- get
- {
- return currentEndUser;
- }
- set
- {
- currentEndUser = value;
- }
- }
- public override bool getTempSaveButton()
- {
- return this.toolStripButtonTempSaveToServer.Enabled;
- }
- public override bool getSaveButton()
- {
- return this.toolStripButtonSaveToServer.Enabled;
- }
- public override void setTempSaveButton(bool enabled)
- {
- this.toolStripButtonTempSaveToServer.Enabled = enabled;
- }
- public override void setSaveButton(bool enabled)
- {
- this.toolStripButtonSaveToServer.Enabled = enabled;
- }
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- if (this.DesignMode || LicenseManager.UsageMode == LicenseUsageMode.Designtime)
- {
- return;
- }
- if (!ConsentMainControl.HasVerticalMonitor)
- {
- this.toolStripButtonExecute.Visible = false;
- }
- else
- {
- this.toolStripButtonExecute.Visible = true;
- }
- this.consentMain = ConsentMainControl.GetConsentMainInterface(this);
- this.consentWebService = WebMethodCommon.GetConsentWebService(consentMain.PluginExecuteInfo["consentSvcUrl"]);
- this.hospitalWebService = WebMethodCommon.GetHospitalWebService(consentMain.PluginExecuteInfo["hospitalSvcUrl"]);
- InitZoomRateDropdownItems();
- this.consentMain.OnLoadPartControls += ConsentMain_OnLoadPartControls;
- this.toolStripButtons.MouseEnter += ToolStripButtons_MouseEnter;
- }
- private void ConsentMain_OnLoadPartControls(object sender, EventArgs e)
- {
- this.consentMain.OnVisibleEFormControl += ConsentMain_OnVisibleEFormControl;
- this.consentMain.OnInvisibleEFormControl += ConsentMain_OnInvisibleEFormControl;
- }
- private void ConsentMain_OnInvisibleEFormControl(object sender, EventArgs e)
- {
- this.consentMain.ConsentCommandCtrl.Enabled = false;
- }
- private void ConsentMain_OnVisibleEFormControl(object sender, EventArgs e)
- {
- this.consentMain.ConsentCommandCtrl.Enabled = true;
- }
- private void InitZoomRateDropdownItems()
- {
- this.toolStripComboBoxZoom.Items.Add(new ZoomRateDropdownItem("50%", "50"));
- this.toolStripComboBoxZoom.Items.Add(new ZoomRateDropdownItem("75%", "75"));
- this.toolStripComboBoxZoom.Items.Add(new ZoomRateDropdownItem("100%", "100"));
- this.toolStripComboBoxZoom.Items.Add(new ZoomRateDropdownItem("200%", "200"));
- this.toolStripComboBoxZoom.Items.Add(new ZoomRateDropdownItem("창 너비에 맞춤", "pagewidth"));
- this.toolStripComboBoxZoom.Items.Add(new ZoomRateDropdownItem("창 크기에 맞춤", "wholepage"));
- }
- #region toolStripButton 이벤트
- private void ToolStripButtons_MouseEnter(object sender, EventArgs e)
- {
- this.toolStripButtons.Focus();
- }
- private void toolStripButtonFirstPage_Click(object sender, EventArgs e)
- {
- this.consentMain.MoveFirstPage();
- }
- private void toolStripButtonPrevPage_Click(object sender, EventArgs e)
- {
- this.consentMain.MovePrevPage();
- }
- private void toolStripButtonNextPage_Click(object sender, EventArgs e)
- {
- this.consentMain.MoveNextPage();
- }
- private void toolStripButtonLastPage_Click(object sender, EventArgs e)
- {
- this.consentMain.MoveLastPage();
- }
- private void toolStripTextBoxPageIndex_TextChanged(object sender, EventArgs e)
- {
- if (!string.IsNullOrEmpty(this.toolStripTextBoxPageIndex.Text))
- {
- bool currentIndexParseResult;
- int currentIndex = 0;
- currentIndexParseResult = int.TryParse(this.toolStripTextBoxPageIndex.Text, out currentIndex);
- bool totalIndexParseResult;
- int totalIndex = 0;
- totalIndexParseResult = int.TryParse(this.toolStripTextBoxPageIndex.Text, out totalIndex);
- if (currentIndexParseResult == false || totalIndexParseResult == false)
- {
- return;
- }
- if (currentIndex > totalIndex)
- {
- }
- else
- {
- this.consentMain.MoveToPageIndex(currentIndex);
- }
- }
- }
- private void toolStripComboBoxZoom_SelectedIndexChanged(object sender, EventArgs e)
- {
- ZoomRateDropdownItem zoomRateItem = this.toolStripComboBoxZoom.SelectedItem as ZoomRateDropdownItem;
- if (zoomRateItem == null)
- {
- }
- else
- {
- this.consentMain.SetZoomRate(zoomRateItem.ItemValue);
- }
- }
- private void toolStripButtonPrint_Click(object sender, EventArgs e)
- {
- PrintConsent();
- }
- private void toolStripButtonCloseDualViewer_Click(object sender, EventArgs e)
- {
- this.consentMain.CloseDualViewer();
- }
- private void toolStripButtonTempSaveToServer_Click(object sender, EventArgs e)
- {
- this.consentMain.TempSave();
- }
- private void toolStripButtonSaveToServer_Click(object sender, EventArgs e)
- {
- this.consentMain.saveClickPoint = true;
- this.consentMain.Save();
- this.consentMain.saveClickPoint = false;
- }
- private void toolStripButtonExecute_Click(object sender, EventArgs e)
- {
- RunConsentDualView();
- }
- private void toolStripButtonPen_Click(object sender, EventArgs e)
- {
- bool isDrawMode = this.consentMain.IsDrawMode();
- this.consentMain.EnableDrawing(!isDrawMode);
- this.toolStripButtonPen.Checked = !isDrawMode;
- }
- private void toolStripButtonPenConfig_Click(object sender, EventArgs e)
- {
- this.consentMain.ConfigDrawingPen();
- }
- private void toolStripButtonDelAllDraw_Click(object sender, EventArgs e)
- {
- this.consentMain.RemoveAllDrawing();
- }
- private void toolStripButtonUndo_Click(object sender, EventArgs e)
- {
- this.consentMain.UndoDrawing();
- }
- private void toolStripButtonRedo_Click(object sender, EventArgs e)
- {
- this.consentMain.RedoDrawing();
- }
- #endregion
- public override void OnPaging(int currentPageIndex)
- {
- this.toolStripTextBoxPageIndex.Text = currentPageIndex.ToString();
- }
- /// <summary>
- /// 동의서 종이 출력
- /// </summary>
- /// <param name="value"></param>
- public override void OnPrint(string value)
- {
- Cursor currentCursor = this.Cursor;
- try
- {
- this.Cursor = Cursors.WaitCursor;
- SaveDataForPrintedConsent(string.Empty);
- // 출력 카운트만큼 출력 된 후 처리
- if (this.consentMain.printSaveStatus)
- {
- if (!string.IsNullOrEmpty(consentMain.ConsentExecuteInfo["printAct"]) && consentMain.ConsentExecuteInfo["printAct"].Equals("N"))
- {
- //MessageBox.Show(string.Format(Properties.Resources.msg_temp_print_confirm)
- // , string.Format(Properties.Resources.msg_caption_confirm), MessageBoxButtons.OK, MessageBoxIcon.Information);
- //출력후에는 전체목록 탭이 선택되게 한다.
- this.consentMain.ConsentListCtrl.InquiryConsentData(-2);
- }
- else
- {
- //agent 구동시 바로 출력을 하는 경우 미작성 탭이 선택되게 한다.
- this.consentMain.ConsentListCtrl.InquiryConsentData(9);
- }
- //Agent에서 출력요청한 내용이 모두 끝나면 창을 닫는다.
- if (this.consentMain.ConsentExecuteInfo.ContainsKey("printAct") && !string.IsNullOrEmpty(this.consentMain.ConsentExecuteInfo["printAct"]) && this.consentMain.ConsentExecuteInfo["printAct"].Equals("Y"))
- {
- this.consentMain.agentCallPrintCnt--;
- if (this.consentMain.agentCallPrintCnt == 0)
- {
- this.consentMain.Parent_Disposed();
- }
- }
- }
- this.Cursor = currentCursor;
- }
- catch (Exception ex)
- {
- this.Cursor = currentCursor;
- throw ex;
- }
- finally
- {
- }
- base.OnPrint(value);
- }
- /// <summary>
- /// 동의서 동의서 미리보기 상태 활성화 처리
- /// </summary>
- /// <param name="isIssuable"></param>
- public override void SetEnableConsentIssueCommands(bool isIssuable)
- {
- this.toolStripButtonPrint.Enabled = isIssuable;//프린트
- this.toolStripButtonExecute.Enabled = isIssuable;//아큐실행버튼
- this.toolStripButtonFirstPage.Enabled = isIssuable;//
- this.toolStripButtonPrevPage.Enabled = isIssuable;
- this.toolStripButtonNextPage.Enabled = isIssuable;
- this.toolStripButtonLastPage.Enabled = isIssuable;
- this.toolStripTextBoxPageIndex.Enabled = isIssuable;//페이지번호 보여주는부분 total page
- this.toolStripLabelTotalPages.Enabled = isIssuable;//
- this.toolStripTextBoxPageIndex.Text = consentMain.GetCurrentPageIndex().ToString();
- this.toolStripLabelTotalPages.Text = consentMain.GetTotalPageCount().ToString();
- this.toolStripComboBoxZoom.Enabled = isIssuable;//넓이 맞춤 서식 폭 조정
- //this.toolStripComboBoxZoom.SelectedItem = this.toolStripComboBoxZoom.Items[2];
- this.toolStripButtonDeleteAllSignData.Enabled = isIssuable;//그림그린거 다없앤거
- this.toolStripButtonInsertAttach.Enabled = isIssuable;//첨지
- this.toolStripButtonDeleteAttach.Enabled = isIssuable;//첨지삭제
- //if (!ConsentMainControl.HasVerticalMonitor)
- //{
- this.toolStripButtonSaveToServer.Enabled = isIssuable;//저장완료
- this.toolStripButtonTempSaveToServer.Enabled = isIssuable;//임시저장
- //}
- }
- /// <summary>
- /// 동의서 상태에 따라 버튼들 활성화를 조절한다
- /// </summary>
- public override void SetEnableButtonsByCurrentConsent()
- {
- string state = string.Empty;
- if (this.CurrentPreviewConsent != null)
- {
- state = this.CurrentPreviewConsent.ConsentState;
- }
- if (this.CurrentTargetPatient != null && !string.IsNullOrEmpty(this.CurrentTargetPatient.PatientCode))
- {
- if (!ConsentMainControl.HasVerticalMonitor)//아큐체크 여기는 아큐가 없음..
- {
- this.toolStripButtonTempSaveToServer.Enabled = true;
- this.toolStripButtonSaveToServer.Enabled = true;
- this.toolStripButtonPrint.Enabled = true;
- SetEnableButtonsByConsentStateForSingleView(state);
- this.EnablePenDrawing = true;
- this.EnablePenConfig = true;
- }
- else
- {
- this.toolStripButtonExecute.Enabled = true;
- this.toolStripButtonPrint.Enabled = true;
- SetEnableButtonsByConsentStateForDualView(state);
- this.toolStripButtonSaveToServer.Enabled = true;
- }
- }
- else
- {
- this.toolStripButtonPrint.Enabled = false;
- this.toolStripButtonTempSaveToServer.Enabled = false;
- this.toolStripButtonSaveToServer.Enabled = false;
- }
- }
- public override void SetEnablementExecuteWhenDualViewerActive(bool enabled)
- {
- this.toolStripButtonExecute.Enabled = enabled;
- this.toolStripButtonPrint.Enabled = enabled;
- //this.toolStripButtonTempSaveToServer.Enabled = !enabled;
- //this.toolStripButtonSaveToServer.Enabled = !enabled;
- if (enabled)
- { if(this.CurrentPreviewConsent != null) {
- if (this.CurrentPreviewConsent.OutputType != null)
- {
- if (this.CurrentPreviewConsent.OutputType.Equals("ELECTRONIC"))
- {
- this.toolStripButtonPrint.Enabled = !enabled;
- }
- }
- }
- }
- this.toolStripButtonCloseDualViewer.Visible = !enabled;
- SetEnableByUserType();
- base.SetEnablementExecuteWhenDualViewerActive(enabled);
- }
- private void SetEnableButtonsByConsentStateForDualView(string state)
- {
- if (state.Equals("PAPER_OUT"))
- {
- this.toolStripButtonExecute.Enabled = false;
- }
- else if (state.Equals("FNU_PRINT"))
- {
- this.toolStripButtonExecute.Enabled = false;
- }
- else if (state.Equals("TEMP"))
- {
- this.toolStripButtonPrint.Enabled = false;
- }
- else if (state.Equals("ELECTR_CMP") || state.Equals("CERTIFY_CMP"))
- {
- this.toolStripButtonExecute.Enabled = false;
- this.toolStripButtonPrint.Enabled = false;
- }
- if (this.CurrentPreviewConsent.RewriteConsentMstRid > 0)
- {
- this.toolStripButtonExecute.Enabled = true;
- this.toolStripButtonPrint.Enabled = false;
- }
- }
- private void SetEnableButtonsByConsentStateForSingleView(string state)
- {
- if (state.Equals("PAPER_OUT"))
- {
- this.toolStripButtonSaveToServer.Enabled = false;
- this.toolStripButtonTempSaveToServer.Enabled = false;
- this.toolStripButtonExecute.Enabled = false;
- }
- else if (state.Equals("FNU_PRINT"))
- {
- this.toolStripButtonPrint.Enabled = false;
- this.toolStripButtonSaveToServer.Enabled = false;
- this.toolStripButtonTempSaveToServer.Enabled = false;
- this.toolStripButtonExecute.Enabled = false;
- }
- else if (state.Equals("TEMP"))
- {
- this.toolStripButtonPrint.Enabled = false;
- }
- else if (state.Equals("ELECTR_CMP") || state.Equals("CERTIFY_CMP"))
- {
- this.toolStripButtonSaveToServer.Enabled = false;
- this.toolStripButtonTempSaveToServer.Enabled = false;
- this.toolStripButtonPrint.Enabled = false;
- }
- if (this.CurrentPreviewConsent.RewriteConsentMstRid > 0)
- {
- this.toolStripButtonSaveToServer.Enabled = true;
- this.toolStripButtonTempSaveToServer.Enabled = true;
- this.toolStripButtonPrint.Enabled = false;
- }
- }
- /// <summary>
- /// 미작성 동의서 삭제
- /// </summary>
- /// <param name="reasonForUseN"></param>
- public override void DeleteRecordOfDeleteConsent(string reasonForUseN)
- {
- SaveDataForDeleteConsent(reasonForUseN);
- }
- private void SaveDataForPrintedConsent(string reasonForUseN)
- {
- string consentOutputType = this.CurrentPreviewConsent.OutputType;
- string consentState = this.CurrentPreviewConsent.ConsentState;
- //인쇄(바코드제외), FNU_PRINT인 경우 CONSENT_MST에 데이터를 입력하지 않는다.
- if (( !string.IsNullOrEmpty(consentOutputType) && consentOutputType.Equals("PAPER_EXCEPT_BARCODE") )
- || (!string.IsNullOrEmpty(consentState) && consentState.Equals("FNU_PRINT")) )
- {
- return;
- }
- if (consentOutputType != null && consentOutputType.Equals("MULTI"))
- {
- Cursor currentCursor = this.Cursor;
- try
- {
- this.Cursor = Cursors.WaitCursor;
- List<PatListVO> volist = consentMain.PatientListCtrl.GetSelectedPatientList;
- string[] strOcrCd = null;
- if (this.CurrentPreviewConsent.MultiOcrcode.Length > 0)
- {
- strOcrCd = this.CurrentPreviewConsent.MultiOcrcode.Split('^');
- }
- string[] strMainDrIdCd = null;
- if (this.CurrentPreviewConsent.MultiMainDrIdCd.Length > 0)
- {
- strMainDrIdCd = this.CurrentPreviewConsent.MultiMainDrIdCd.Split('^');
- }
- for (int i=0; i<volist.Count; i++)
- {
- #region parameter 셋팅하고 DB 저장
- PatientVO vo = GetPatientByPatList(volist[i]);
- string userId = (vo.IO_InputId == null) ? CurrentEndUser.UserNo: vo.IO_InputId;
- string hosType = (vo.IO_HosType == null) ? CurrentEndUser.HosType : vo.IO_HosType;
- string userName = (vo.IO_InputNm == null) ? CurrentEndUser.UserName : vo.IO_InputNm;
- string patientCode = vo.IO_Pt_ID;
- string clnDeptCode = vo.IO_DeptCd;
- string vistType = vo.IO_VisitType;
- string clnDate = vo.IO_ADdate.Replace("-","");
- int rewriteConsentMstRid = 0;
- string ward = vo.IO_Ward;
- string roomcd = vo.IO_RoomNo;
- string formRid = CurrentPreviewConsent.FormRid;
- string formCd = CurrentPreviewConsent.FormCd;
- string consentMstRid = CurrentPreviewConsent.ConsentMstRid;
- int orderNo = vo.IO_OrderNo;
- string orderCode = vo.IO_DxCd;
- string orderName = vo.IO_DxNm;
- //string mainDrId = currentTargetPatient.MainDrId;
- //string ocrCode = CurrentPreviewConsent.Ocrcode;
- string ocrCode = (strOcrCd != null && !string.IsNullOrEmpty(strOcrCd[i])) ? strOcrCd[i] : CurrentPreviewConsent.Ocrcode;
- string mainDrId = (strMainDrIdCd != null && !string.IsNullOrEmpty(strMainDrIdCd[i])) ? strMainDrIdCd[i] : currentTargetPatient.MainDrId;
- int cretno = 0;
- int.TryParse(vo.IO_CretNo, out cretno);
- int formRidInt, consentMstRidInt;
- ConvertStringToInt(formRid, consentMstRid, out formRidInt, out consentMstRidInt);
- string deviceIdentNo = System.Environment.MachineName;
-
- consentMstRidInt = this.consentWebService.SavePrintOut(userId, patientCode, clnDeptCode, formRidInt, formCd,
- consentMstRidInt, rewriteConsentMstRid, null, null,
- "PRT", deviceIdentNo, vistType, hosType, clnDate,
- ward, roomcd, orderNo, orderName, orderCode, ocrCode, cretno,
- userName, userName, mainDrId);
- //LCtech 모듈 연동을 위한 웹메서드 호출
- string fstprntdt = DateTime.Now.ToString("yyyyMMddHHmmss");
- if (this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.Ocrtagprntyn)
- //&& this.CurrentPreviewConsent.Ocrtagprntyn.Equals("Y")
- )
- {
- // 출력 카운트만큼 출력 된 후 처리
- if (this.consentMain.multiPrintExecCnt < 1)
- {
- this.hospitalWebService.insertPrintData(ocrCode, patientCode, vistType, clnDate, vo.IO_CretNo, userId, clnDeptCode, formCd
- , fstprntdt, CurrentEndUser.DeptCode, userId, consentMain.GetTotalPageCount().ToString(), this.consentMain.checkAutoPrint, this.CurrentPreviewConsent.Ocrtagprntyn);
- }
- }
- #endregion
- }
-
- this.consentMain.multiPrintExecCnt++;
- this.Cursor = currentCursor;
- }
- catch (Exception ex)
- {
- this.Cursor = currentCursor;
- throw ex;
- }
- //if (this.consentMain.multiPrintPlanCnt == this.consentMain.multiPrintExecCnt)
- //{
- consentMain.PatientListCtrl.SetClearCheckBox();
- consentMain.ReInitializeViewer();
- //}
- this.CurrentPreviewConsent.OutputType = null;
- }
- else
- {
- if (this.CurrentTargetPatient != null && !string.IsNullOrEmpty(this.CurrentTargetPatient.PatientCode))
- {
- #region parameter 셋팅하고 DB 저장
- string userId = CurrentEndUser.UserNo;
- string hosType = CurrentEndUser.HosType;
- string userName = CurrentEndUser.UserName;
- string patientCode = CurrentTargetPatient.PatientCode;
- string clnDeptCode = CurrentTargetPatient.clnDeptCode;
- string vistType = CurrentTargetPatient.VisitType;
- string clnDate = CurrentTargetPatient.clnDate.Replace("-", "");
- string ward = CurrentTargetPatient.Ward;
- string roomcd = currentTargetPatient.RoomNo;
- int orderNo = CurrentTargetPatient.OrderNo;
- string orderCode = CurrentTargetPatient.OPdeptCode;
- string orderName = CurrentTargetPatient.OPdeptName;
- string mainDrId = CurrentTargetPatient.MainDrId;
- string formRid = CurrentPreviewConsent.FormRid;
- string formCd = CurrentPreviewConsent.FormCd;
- string consentMstRid = CurrentPreviewConsent.ConsentMstRid;
- string ocrCode = CurrentPreviewConsent.Ocrcode;
- int cretno = 0;
- int.TryParse(CurrentTargetPatient.cretno, out cretno);
- int formRidInt, consentMstRidInt;
- ConvertStringToInt(formRid, consentMstRid, out formRidInt, out consentMstRidInt);
- int reissueConsentMstRid = 0;
- //재출력인 경우 (미작성상태에서 바로 출력하는 경우는 출력으로 상태가 변경된다.)
- if (consentMstRidInt > 0 && !CurrentPreviewConsent.ConsentState.ToUpper().Equals("UNFINISHED"))
- reissueConsentMstRid = consentMstRidInt;
- string deviceIdentNo = System.Environment.MachineName;
- Cursor currentCursor = this.Cursor;
- try
- {
- this.Cursor = Cursors.WaitCursor;
-
- consentMstRidInt = this.consentWebService.SavePrintOut(userId, patientCode, clnDeptCode, formRidInt, formCd,
- consentMstRidInt, reissueConsentMstRid, null, null,
- "PRT", deviceIdentNo, vistType, hosType, clnDate,
- ward, roomcd, orderNo, orderName, orderCode, ocrCode, cretno,
- userName, userName, mainDrId);
- //첫번째 출력인 경우에만 LCtech 모듈 연동을 위한 웹메서드 호출
- if (reissueConsentMstRid == 0)
- {
- if (this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.Ocrtagprntyn)
- //&& this.CurrentPreviewConsent.Ocrtagprntyn.Equals("Y")
- )
- {
- // 출력 카운트만큼 출력 된 후 처리
- if (this.consentMain.multiPrintExecCnt < 1)
- {
- string fstprntdt = DateTime.Now.ToString("yyyyMMddHHmmss");
- this.hospitalWebService.insertPrintData(ocrCode, patientCode, vistType, clnDate, CurrentTargetPatient.cretno, userId, clnDeptCode, formCd
- , fstprntdt, CurrentEndUser.DeptCode, userId, consentMain.GetTotalPageCount().ToString(),this.consentMain.checkAutoPrint, this.CurrentPreviewConsent.Ocrtagprntyn);
- }
- }
- }
- this.consentMain.multiPrintExecCnt++;
- this.Cursor = currentCursor;
- }
- catch (Exception ex)
- {
- this.Cursor = currentCursor;
- throw ex;
- }
- #endregion
- }
- }
- }
- private PatientVO GetPatientByPatList(PatListVO patvo)
- {
- string indd = string.Empty;
- if (!string.IsNullOrEmpty(patvo.indd)) indd = patvo.indd.Replace("/", "").Replace("-", "");
- PatientVO[] patientVOList = this.hospitalWebService.GetPatientInfo(patvo.pid,
- indd,
- patvo.ordtype,
- patvo.orddeptcd,
- patvo.cretno.ToString()
- );
- if (patientVOList == null || patientVOList.Length == 0)
- {
- return null;
- }
- else
- {
- return patientVOList[0];
- }
- }
- private void SaveDataForDeleteConsent(string reasonForUseN)
- {
- string userId = CurrentEndUser.UserNo;
- string patientCode = CurrentTargetPatient.PatientCode;
- string clnDeptCd = CurrentTargetPatient.clnDeptCode;
- string ward = CurrentTargetPatient.Ward;
- string roomcd = CurrentTargetPatient.RoomNo;
- string formRid = CurrentPreviewConsent.FormRid;
- string consentMstRid = CurrentPreviewConsent.ConsentMstRid;
- string consentState = CurrentPreviewConsent.ConsentState;
- int rewriteConsentMstRid = CurrentPreviewConsent.RewriteConsentMstRid;
- int formRidInt;
- int consentMstRidInt;
- ConvertStringToInt(formRid, consentMstRid, out formRidInt, out consentMstRidInt);
- int reissueConsentMstRidInt = CurrentPreviewConsent.ReissueConsentMstRid;
- string deviceIdentNo = System.Environment.MachineName;
- this.consentWebService.SaveDelete(userId
- , consentMstRidInt
- , patientCode
- , clnDeptCd
- , ward
- , roomcd
- , formRidInt
- , rewriteConsentMstRid
- , reissueConsentMstRidInt
- , consentState
- , deviceIdentNo
- , reasonForUseN
- );
- }
- private void SetHasMedicalHistoryInConsent(string patientCode)
- {
- this.CurrentPreviewConsent.HasMedicalHistory = false;
- }
- public void RunConsentDualView()
- {
- bool runDualView = true;
- if (this.CurrentEndUser != null && this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.PrintOnly)
- && this.CurrentPreviewConsent.PrintOnly.Equals("Y")
- )
- {
- runDualView = false;
- }
- // 출력 상태일 경우 재출력만 가능하도록 버튼 조정
- if (this.CurrentEndUser != null && this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.ConsentState)
- && ( this.CurrentPreviewConsent.ConsentState.ToUpper().Equals("PAPER_OUT") || this.CurrentPreviewConsent.ConsentState.ToUpper().Equals("FNU_PRINT") )
- )
- {
- runDualView = false;
- }
- // 일반의사의 경우 출력만 가능하도록.
- if (this.CurrentEndUser.UserNo.Substring(0,4).Equals("5000") && this.CurrentPreviewConsent != null)
- {
- runDualView = false;
- }
- int state = this.consentWebService.CheckConsentState(int.Parse(this.CurrentPreviewConsent.ConsentMstRid), this.CurrentPreviewConsent.ConsentState);
- if (state == 1)
- {
- return;
- }
- // 출력만 가능하거나 출력상태일 경우 듀얼뷰어 실행 못하도록 적용
- if (runDualView) this.consentMain.RunConsentDualView();
- }
- public void ShowCompleteConsent(IConsentMain consentMain)
- {
- //SetEnableButtonsByCurrentConsent();
- consentMain.ReviewConsent();
- ConsentImageVO[] cImage = this.consentWebService.GetConsentImage(this.CurrentPreviewConsent.ConsentMstRid);
- if (cImage != null && cImage.Length > 0)
- {
- CLIP.eForm.ImageView.ImageViewCtrl iViewer = consentMain.GetImageViewerCtrl();
- List<string> lStr = new List<string>();
- string sPath = this.consentMain.PluginExecuteInfo["imageUploadPath"] + "/DataTempImage/";
- string sLocal = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Clipsoft\ClipSoft.eForm.Viewer\DataTemp\";
- DirectoryInfo di = new DirectoryInfo(sLocal);
- if (di.Exists == false)
- {
- di.Create();
- }
- foreach (ConsentImageVO img in cImage)
- {
- if (File.Exists(sLocal + img.ImageFilename))
- {
- Image imgTemp = Image.FromFile(sLocal + img.ImageFilename);
- lStr.Add(ImageToBase64(imgTemp, System.Drawing.Imaging.ImageFormat.Jpeg));
- imgTemp.Dispose();
- }
- else
- {
- string orgFile = img.ImagePath + "\\" + img.ImageFilename;
- string tempImgNm = orgFile.Substring(orgFile.IndexOf("\\") + 1).Replace("\\", "");
- using (WebClient myWebClient = new WebClient())
- {
- myWebClient.DownloadFile(sPath + tempImgNm, sLocal + img.ImageFilename);
- if (File.Exists(sLocal + img.ImageFilename))
- {
- Image imgTemp = Image.FromFile(sLocal + img.ImageFilename);
- lStr.Add(ImageToBase64(imgTemp, System.Drawing.Imaging.ImageFormat.Jpeg));
- imgTemp.Dispose();
- }
- else
- {
- break;
- }
- }
- }
- }
- if (lStr.Count > 0)
- iViewer.SetBase64Images(lStr);
- }
- else
- {
- // 검색된 이미지가 없습니다.
- }
- }
- public string ImageToBase64(Image image, System.Drawing.Imaging.ImageFormat format)
- {
- using (MemoryStream ms = new MemoryStream())
- {
- // Convert Image to byte[]
- image.Save(ms, format);
- byte[] imageBytes = ms.ToArray();
- // Convert byte[] to Base64 String
- string base64String = Convert.ToBase64String(imageBytes);
- return base64String;
- }
- }
- public void PreviewConsent(IConsentMain consentMain)
- {
- Dictionary<string, string> globalParams = Common.CreateGlobalParamsDictionary();
- List<string> formGuids = new List<string>();
-
- formGuids.Add(this.CurrentPreviewConsent.FormGuid);
- if (this.CurrentPreviewConsent.ConsentState.ToLower().Equals("paper_out") || this.CurrentPreviewConsent.ConsentState.ToLower().Equals("fnu_print"))
- {
- SetPatientAndUser(globalParams, true);
- }
- else
- {
- SetPatientAndUser(globalParams, false);
- }
- globalParams["IO_ocr_cd"] = CurrentPreviewConsent.Ocrcode = GetOcrCode(); // OCR 코드
- globalParams["IO_device"] = "C";
- globalParams["IO_printtime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- globalParams["IO_signdate"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- globalParams["IO_signtime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- string fos = Common.GetFosString(formGuids
- , consentMain.PluginExecuteInfo["formServiceUrl"]
- , globalParams
- , null);
- int state = this.consentWebService.CheckConsentState(int.Parse(this.CurrentPreviewConsent.ConsentMstRid), this.CurrentPreviewConsent.ConsentState);
- if (state == 1)
- {
- MessageBoxDlg.Show(this, "이미 저장된 서식 입니다."
- , string.Format(Properties.Resources.msg_caption_confirm),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- consentMain.PreviewConsent(fos);//서식을 열도록 fos을 던짐
- consentMain.ConsentCommandCtrl.SetEnableConsentIssueCommands(true);//
- consentMain.ConsentCommandCtrl.SetEnableButtonsByCurrentConsent();
- SetEnableByUserType();//최종적 버튼 체크
- //System.Diagnostics.Trace.WriteLine(fos);
- }
- private string GetOcrCode()
- {
- string strOcrCode = "";
- if (this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.Ocrcode))
- {
- strOcrCode = this.CurrentPreviewConsent.Ocrcode;
- }
- else
- {
- if (this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.Ocrtagprntyn)
- && this.CurrentPreviewConsent.Ocrtagprntyn.Equals("Y"))
- {
- strOcrCode = hospitalWebService.GetOcrTag();
- }
- }
- return strOcrCode;
- }
- private void SetPatientAndUser(Dictionary<string, string> globalParams, bool isPrint)
- {
- Dictionary<string, string> changingGlobalParams = new Dictionary<string, string>();
-
- if (this.CurrentPreviewConsent != null)
- {
- changingGlobalParams["IO_formname"] = this.CurrentPreviewConsent.FormName;
- if (!isPrint)
- {
- // changingGlobalParams["IO_INPUTNM"] = (this.CurrentPreviewConsent.InputNm.Length > 0) ? this.CurrentPreviewConsent.InputNm : this.CurrentEndUser.UserName;
- changingGlobalParams["IO_INPUTNM"] = this.CurrentEndUser.UserName;
- }
- }
- if (this.CurrentTargetPatient != null && !string.IsNullOrEmpty(this.CurrentTargetPatient.PatientCode))
- {
- changingGlobalParams["UrlParam"] = this.consentMain.PluginExecuteInfo["imageUploadPath"] + "/";
- changingGlobalParams["IO_Pt_ID"] = this.CurrentTargetPatient.PatientCode;
- changingGlobalParams["IO_sex_age_y_m"] = this.CurrentTargetPatient.PatientSexAge;
- changingGlobalParams["IO_Pt_name"] = this.CurrentTargetPatient.PatientName;
- changingGlobalParams["IO_JuminNo"] = this.CurrentTargetPatient.PatientJuminNo;
- changingGlobalParams["IO_roomNo"] = this.CurrentTargetPatient.Ward + "/" + this.CurrentTargetPatient.RoomNo;
- changingGlobalParams["IO_ADdate"] = SetDateFormatting(this.CurrentTargetPatient.clnDate.Replace("-", ""));
- changingGlobalParams["IO_Dept"] = this.CurrentTargetPatient.clnDeptName;
- changingGlobalParams["IO_Dept2"] = this.CurrentTargetPatient.clnDeptNameKO;
- changingGlobalParams["IO_maindr"] = this.CurrentTargetPatient.MainDrNm;
- changingGlobalParams["IO_Pt_address"] = this.CurrentTargetPatient.PatientAddr;
- changingGlobalParams["IO_Pt_tel"] = this.CurrentTargetPatient.PatientTelNo;
- changingGlobalParams["IO_Insukind"] = this.CurrentTargetPatient.Insukind;
- if (!isPrint)
- {
- changingGlobalParams["IO_OPdept"] = this.CurrentTargetPatient.OPdeptName;
- changingGlobalParams["IO_OPdept"] = this.CurrentTargetPatient.OPdeptName;
- changingGlobalParams["IO_OPdr"] = this.CurrentTargetPatient.OPdrNm;
- changingGlobalParams["IO_Dx"] = this.CurrentTargetPatient.clnDxNm;
- if (!string.IsNullOrEmpty(this.CurrentTargetPatient.PatientJuminNo) && this.CurrentTargetPatient.PatientJuminNo.Length > 6)
- {
- changingGlobalParams["IO_PT_birthday"] = this.CurrentTargetPatient.PatientJuminNo.Substring(0, 6);
- }
- if (string.IsNullOrEmpty(changingGlobalParams["IO_Dx"]))
- {
- if (consentMain.ConsentExecuteInfo.ContainsKey("clnDxNm"))
- {
- changingGlobalParams["IO_Dx"] = consentMain.ConsentExecuteInfo["clnDxNm"];
- }
- consentMain.ConsentExecuteInfo["clnDxNm"] = string.Empty;
- }
- changingGlobalParams["IO_bp"] = this.CurrentTargetPatient.Ex_bp;
- changingGlobalParams["IO_dm"] = this.CurrentTargetPatient.Ex_dm;
- changingGlobalParams["IO_heart"] = this.CurrentTargetPatient.Ex_heart;
- changingGlobalParams["IO_kidney"] = this.CurrentTargetPatient.Ex_kidney;
- changingGlobalParams["IO_respiration"] = this.CurrentTargetPatient.Ex_respiration;
- changingGlobalParams["IO_hx"] = this.CurrentTargetPatient.Ex_hx;
- changingGlobalParams["IO_allergy"] = this.CurrentTargetPatient.Ex_allergy;
- changingGlobalParams["IO_drug"] = this.CurrentTargetPatient.Ex_drug;
- changingGlobalParams["IO_smoking"] = this.CurrentTargetPatient.Ex_smoking;
- changingGlobalParams["IO_idio"] = this.CurrentTargetPatient.Ex_idio;
- changingGlobalParams["IO_nacrotics"] = this.CurrentTargetPatient.Ex_nacrotics;
- changingGlobalParams["IO_airway"] = this.CurrentTargetPatient.Ex_airway;
- changingGlobalParams["IO_hemorrhage"] = this.CurrentTargetPatient.Ex_hemorrhage;
- changingGlobalParams["IO_status_etc"] = this.CurrentTargetPatient.Ex_status_etc;
- if (this.CurrentTargetPatient.clnDeptCode.Equals("2010300000") && this.CurrentTargetPatient.VisitType.Equals("O"))//소화기내과일 경우에만 진료의를 셋팅
- {
- changingGlobalParams["IO_OPdr"] = this.CurrentTargetPatient.MainDrNm;
- }
- }
- }
- if (this.CurrentEndUser != null && !isPrint)
- {
- UserSignImageVO vo = this.hospitalWebService.GetSignImage(this.CurrentEndUser.UserNo);
- if (vo != null)
- {
- changingGlobalParams["IO_SIGNIMG"] = ImageToBase64(byteArrayToImage(vo.SignImage), System.Drawing.Imaging.ImageFormat.Png);
- }
- }
- ChangeGlobalParametersToNew(globalParams, changingGlobalParams);
- }
- public void ShowTempSaveConsent(IConsentMain consentMain)
- {
- if (string.IsNullOrEmpty(this.CurrentPreviewConsent.ConsentMstRid)
- || this.CurrentPreviewConsent.ConsentMstRid.Equals("-1"))
- {
- return;
- }
- List<string> formGuids = new List<string>();
- formGuids.Add(this.CurrentPreviewConsent.FormGuid);
- Dictionary<string, string> actionParams = new Dictionary<string, string>();
- actionParams.Add("rid", this.CurrentPreviewConsent.ConsentMstRid);//선택한 리스트의 rid, state
-
- Dictionary<string, string> globalParams = new Dictionary<string, string>();
- // changingGlobalParams["IO_INPUTNM"] = (this.CurrentPreviewConsent.InputNm.Length > 0) ? this.CurrentPreviewConsent.InputNm : this.CurrentEndUser.UserName;
- if(!string.IsNullOrEmpty(this.CurrentPreviewConsent.VisitType))
- {
- if (!this.CurrentPreviewConsent.VisitType.Equals("O"))
- {
- if (consentMain.ConsentExecuteInfo.ContainsKey("loginUserName"))
- {
- globalParams["IO_INPUTNM"] = consentMain.ConsentExecuteInfo["loginUserName"];
- }
- }
- }
- string fos = Common.GetFosStringForEpt(actionParams, consentMain.PluginExecuteInfo["formServiceUrl"], globalParams);
- int state = this.consentWebService.CheckConsentState(int.Parse(this.CurrentPreviewConsent.ConsentMstRid), this.CurrentPreviewConsent.ConsentState);
- if (state == 1)
- {
- MessageBoxDlg.Show(this, "이미 저장된 서식 입니다."
- , string.Format(Properties.Resources.msg_caption_confirm),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- consentMain.PreviewConsent(fos);
- consentMain.ConsentCommandCtrl.SetEnableConsentIssueCommands(true);
- consentMain.ConsentCommandCtrl.SetEnableButtonsByCurrentConsent();
- SetEnableByUserType();
- }
- private Image byteArrayToImage(byte[] byteArrayIn)
- {
- MemoryStream ms = new MemoryStream(byteArrayIn);
- Image returnImage = Image.FromStream(ms);
- return returnImage;
- }
- /// <summary>
- /// 동의서 임시 데이터 저장
- /// </summary>
- /// <param name="eptXmlValue"></param>
- /// <param name="dataValue"></param>
- public override void SaveTempConsentData(string eptXmlValue, string dataValue)
- {
- ///////
- int state = this.consentWebService.CheckConsentState(int.Parse(this.CurrentPreviewConsent.ConsentMstRid), this.CurrentPreviewConsent.ConsentState);
- if (state == 1)
- {
- MessageBoxDlg.Show(this, "이미 저장된 서식 입니다."
- , string.Format(Properties.Resources.msg_caption_confirm),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- return ;
- }
- /////
- string userId = CurrentEndUser.UserNo;
- string hosType = CurrentEndUser.HosType;
- string userName = CurrentEndUser.UserName;
- string patientCode = CurrentTargetPatient.PatientCode;
- string clnDeptCode = CurrentTargetPatient.clnDeptCode;
- string vistType = CurrentTargetPatient.VisitType;
- string clnDate = CurrentTargetPatient.clnDate.Replace("-","");
- int rewriteConsentMstRid = 0;
- string ward = CurrentTargetPatient.Ward;
- string roomcd = CurrentTargetPatient.RoomNo;
- string formRid = CurrentPreviewConsent.FormRid;
- string formCd = CurrentPreviewConsent.FormCd;
- string consentMstRid = CurrentPreviewConsent.ConsentMstRid;
- int orderNo = CurrentTargetPatient.OrderNo;
- string orderCode = CurrentTargetPatient.clnDxCd;
- string orderName = CurrentTargetPatient.clnDxNm;
- string mainDrId = this.CurrentTargetPatient.MainDrId;
- string ocrCode = CurrentPreviewConsent.Ocrcode;
- if (string.IsNullOrEmpty(ocrCode))
- {
- ocrCode = CurrentPreviewConsent.Ocrcode = GetOcrCode();
- }
- int cretno = 0;
- int.TryParse(CurrentTargetPatient.cretno, out cretno);
- int formRidInt, consentMstRidInt;
- ConvertStringToInt(formRid, consentMstRid, out formRidInt, out consentMstRidInt);
- string deviceIdentNo = System.Environment.MachineName;
- Cursor currentCursor = this.Cursor;
- try
- {
- this.Cursor = Cursors.WaitCursor;
- consentMstRidInt = this.consentWebService.SaveTempData(userId,
- patientCode,
- clnDeptCode,
- formRidInt,
- formCd,
- consentMstRidInt,
- rewriteConsentMstRid,
- eptXmlValue,
- dataValue,
- "WIN",
- deviceIdentNo,
- vistType,
- hosType,
- clnDate,
- ward,
- roomcd,
- orderNo,
- orderName,
- orderCode,
- ocrCode,
- cretno,
- userName,
- userName,
- mainDrId
- );
- //기왕력 데이터 저장
- SetNewMedicalHistory(dataValue);
- //string sPID = this.consentWebService.SaveMedicalHistory(
- // patientCode,
- // clnDate.Replace("-", ""),
- // this.CurrentTargetPatient.Ex_bp,
- // this.CurrentTargetPatient.Ex_dm,
- // this.CurrentTargetPatient.Ex_heart,
- // this.CurrentTargetPatient.Ex_kidney,
- // this.CurrentTargetPatient.Ex_respiration,
- // this.CurrentTargetPatient.Ex_hx,
- // this.CurrentTargetPatient.Ex_allergy,
- // this.CurrentTargetPatient.Ex_drug,
- // this.CurrentTargetPatient.Ex_smoking,
- // this.CurrentTargetPatient.Ex_idio,
- // this.CurrentTargetPatient.Ex_nacrotics,
- // this.CurrentTargetPatient.Ex_airway,
- // this.CurrentTargetPatient.Ex_hemorrhage,
- // this.CurrentTargetPatient.Ex_status_etc,
- // userId
- // );
- //if (string.IsNullOrEmpty(consentMain.ConsentExecuteInfo["startFormCd"]))
- //{
- // this.consentMain.ConsentListCtrl.InquiryConsentData(consentMstRidInt);
- //}
- this.consentMain.ConsentListCtrl.InquiryConsentData(consentMstRidInt);
- MessageBoxDlg.Show(this, string.Format(Properties.Resources.msg_temp_save_confirm)
- , string.Format(Properties.Resources.msg_caption_confirm),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- this.Cursor = currentCursor;
- }
- catch (Exception ex)
- {
- this.Cursor = currentCursor;
- throw ex;
- }
- }
- private void SetNewMedicalHistory(string dataXml)
- {
- Dictionary<string, string> outputDataDic = DataXmlToDictionary(dataXml);
- if (outputDataDic.ContainsKey("IO_bp")) this.CurrentTargetPatient.Ex_bp = outputDataDic["IO_bp"];
- if (outputDataDic.ContainsKey("IO_dm")) this.CurrentTargetPatient.Ex_dm = outputDataDic["IO_dm"];
- if (outputDataDic.ContainsKey("IO_heart")) this.CurrentTargetPatient.Ex_heart = outputDataDic["IO_heart"];
- if (outputDataDic.ContainsKey("IO_kidney")) this.CurrentTargetPatient.Ex_kidney = outputDataDic["IO_kidney"];
- if (outputDataDic.ContainsKey("IO_respiration")) this.CurrentTargetPatient.Ex_respiration = outputDataDic["IO_respiration"];
- if (outputDataDic.ContainsKey("IO_hx")) this.CurrentTargetPatient.Ex_hx = outputDataDic["IO_hx"];
- if (outputDataDic.ContainsKey("IO_allergy")) this.CurrentTargetPatient.Ex_allergy = outputDataDic["IO_allergy"];
- if (outputDataDic.ContainsKey("IO_drug")) this.CurrentTargetPatient.Ex_drug = outputDataDic["IO_drug"];
- if (outputDataDic.ContainsKey("IO_smoking")) this.CurrentTargetPatient.Ex_smoking = outputDataDic["IO_smoking"];
- if (outputDataDic.ContainsKey("IO_idio")) this.CurrentTargetPatient.Ex_idio = outputDataDic["IO_idio"];
- if (outputDataDic.ContainsKey("IO_nacrotics")) this.CurrentTargetPatient.Ex_nacrotics = outputDataDic["IO_nacrotics"];
- if (outputDataDic.ContainsKey("IO_airway")) this.CurrentTargetPatient.Ex_airway = outputDataDic["IO_airway"];
- if (outputDataDic.ContainsKey("IO_hemorrhage")) this.CurrentTargetPatient.Ex_hemorrhage = outputDataDic["IO_hemorrhage"];
- if (outputDataDic.ContainsKey("IO_status_etc")) this.CurrentTargetPatient.Ex_status_etc = outputDataDic["IO_status_etc"];
- }
- private static Dictionary<string, string> DataXmlToDictionary(string dataXml)
- {
- Dictionary<string, string> outputDataDic;
- XmlDocument xmlDocument = new XmlDocument();
- xmlDocument.LoadXml(dataXml);
- outputDataDic = outputDataDic = new Dictionary<string, string>();
- XmlNode rootNode = xmlDocument.SelectSingleNode("form-data");
- foreach (XmlNode childNode in rootNode.ChildNodes)
- {
- string fieldName = string.Empty;
- string fieldValue = string.Empty;
- XmlElement outFieldElement = childNode as XmlElement;
- if (outFieldElement == null)
- {
- }
- else
- {
- fieldName = outFieldElement.Name;
- if (fieldName.Equals("state"))
- {
- foreach (XmlNode childNode2 in childNode.ChildNodes)
- {
- string fieldName2 = string.Empty;
- string fieldValue2 = string.Empty;
- XmlElement outFieldElement2 = childNode2 as XmlElement;
- fieldName2 = outFieldElement2.Name;
- if (outFieldElement2.ChildNodes.Count > 0
- && outFieldElement2.ChildNodes[0] is XmlCDataSection)
- {
- fieldValue2 = ((XmlCDataSection)outFieldElement2.ChildNodes[0]).InnerText;
- }
- if (outputDataDic.ContainsKey(fieldName2))
- {
- outputDataDic[fieldName2] = fieldValue2;
- }
- else
- {
- outputDataDic.Add(fieldName2, fieldValue2);
- }
- }
- }
- }
- }
- return outputDataDic;
- }
- /// <summary>
- /// 동의서 완료 데이터 저장
- /// </summary>
- /// <param name="eptXmlValue"></param>
- /// <param name="dataValue"></param>
- public override bool SaveCompleteConsentData(string eptXmlValue, string dataValue, out object saveResult)
- {
- /////////
- //int state = this.consentWebService.CheckConsentState(int.Parse(this.CurrentPreviewConsent.ConsentMstRid), this.CurrentPreviewConsent.ConsentState);
- //if (state == 1)
- //{
- // MessageBoxDlg.Show(this, "이미 저장된 서식 입니다."
- // , string.Format(Properties.Resources.msg_caption_confirm),
- // MessageBoxButtons.OK, MessageBoxIcon.Information);
- // saveResult = -1;
- // return false;
- //}
- ////
- int translateResult = -1;
- string sCertTarget = string.Empty;
- string sCertResult = string.Empty;
- try
- {
- translateResult = TranslateConsentToImageServer(exportedImageFiles, sCertResult);
- }
- catch (Exception ex)
- {
- string exMessage = ex.Message;
- if (ex.InnerException != null)
- {
- exMessage += Environment.NewLine + ex.InnerException.Message;
- }
- MessageBoxDlg.Show(true, string.Format(exMessage)
- , string.Format("CLIP e-Form Consent-" + Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- saveResult = translateResult;
- return false;
- }
- string consentState = "ELECTR_CMP";
- SignatureConfig sign = new SignatureConfig();
- // 외래일 경우 공인인증 처리가 없음.
- if (!string.IsNullOrEmpty(CurrentTargetPatient.VisitType) && !CurrentTargetPatient.VisitType.Equals("O"))
- {
- try
- {
- // 공인인증 처리용
- sCertTarget = sign.getSHA256ImageHash(exportedImageFiles, string.Empty);
- // 공인인증 처리
- sCertResult = ConsentImageSignature(sCertTarget, CurrentEndUser.UserNo, CurrentEndUser.UserName);
- if (sCertResult == "-10")
- {
- // "로그인 사용자 정보를 통하여 공인인증서 정보가 정상적으로 조회되지 않았습니다."
- MessageBoxDlg.Show(true, Properties.Resources.msg_sign_user_info_fail
- , string.Format("CLIP e-Form Consent-" + Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- saveResult = "-99";
- return true;
- }
- else if (sCertResult == "-20")
- {
- // "공인인증 서버 접속에 실패하였을 하였습니다."
- MessageBoxDlg.Show(true, Properties.Resources.msg_sign_server_connection_fail
- , string.Format("CLIP e-Form Consent-" + Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- saveResult = "-99";
- return true;
- }
- else if (sCertResult == "-30")
- {
- // "공인인증 서버 접속에 실패하였을 하였습니다."
- MessageBoxDlg.Show(true, Properties.Resources.msg_sign_server_connection_fail
- , string.Format("CLIP e-Form Consent-" + Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- saveResult = "-99";
- return true;
- }
- else if (sCertResult == "-35")
- {
- // 공인인증 비밀번호 입력하지 않고 닫음
- saveResult = "-99";
- return true;
- }
- else if (sCertResult == "-40")
- {
- // "공인인증서 비밀번호가 틀렸습니다.
- MessageBoxDlg.Show(true, Properties.Resources.msg_sign_password_fail
- , string.Format("CLIP e-Form Consent-" + Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- saveResult = "-99";
- return true;
- }
- else if (sCertResult == "-50")
- {
- // "공인인증서명 처리를 실패하였을 하였습니다."
- MessageBoxDlg.Show(true, Properties.Resources.msg_sign_exec_fail
- , string.Format("CLIP e-Form Consent-" + Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- saveResult = "-99";
- return true;
- }
- else if (sCertResult == "-99")
- {
- // "공인인증서명 처리를 실패하였을 하였습니다."
- MessageBoxDlg.Show(true, Properties.Resources.msg_sign_exec_fail
- , string.Format("CLIP e-Form Consent-" + Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- saveResult = "-99";
- return true;
- }
- translateResult = 1;
- consentState = "CERTIFY_CMP";
- }
- catch (Exception ex)
- {
- string exMessage = ex.Message;
- if (ex.InnerException != null)
- {
- exMessage += Environment.NewLine + ex.InnerException.Message;
- }
- MessageBoxDlg.Show(true, string.Format(exMessage)
- , string.Format("CLIP e-Form Consent-" + Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- saveResult = translateResult;
- return false;
- }
- }
- // DB 저장용
- sCertTarget = sign.getSHA256ImageHash(exportedImageFiles, "^");
- string userId = CurrentEndUser.UserNo;
- string hosType = CurrentEndUser.HosType;
- string userName = CurrentEndUser.UserName;
- string patientCode = CurrentTargetPatient.PatientCode;
- string clnDeptCode = CurrentTargetPatient.clnDeptCode;
- string vistType = CurrentTargetPatient.VisitType;
- string clnDate = CurrentTargetPatient.clnDate.Replace("-", "").Replace("/", "");
- string ward = CurrentTargetPatient.Ward;
- string roomcd = CurrentTargetPatient.RoomNo;
- string formRid = CurrentPreviewConsent.FormRid;
- string formCd = CurrentPreviewConsent.FormCd;
- string consentMstRid = CurrentPreviewConsent.ConsentMstRid;
- int rewriteConsentMstRid = CurrentPreviewConsent.RewriteConsentMstRid;
- int orderNo = CurrentTargetPatient.OrderNo;
- string orderCode = CurrentTargetPatient.clnDxCd;
- string orderName = CurrentTargetPatient.clnDxNm;
- string dschdd = CurrentTargetPatient.Dschdd;
- string mainDrId = this.CurrentTargetPatient.MainDrId;
- string ocrCode = CurrentPreviewConsent.Ocrcode;
- if (string.IsNullOrEmpty(ocrCode))
- {
- ocrCode = CurrentPreviewConsent.Ocrcode = GetOcrCode();
- }
- int cretno = 0;
- int.TryParse(CurrentTargetPatient.cretno, out cretno);
- int formRidInt;
- int consentMstRidInt;
- ConvertStringToInt(formRid, consentMstRid, out formRidInt, out consentMstRidInt);
- string deviceIdentNo = System.Environment.MachineName;
- Cursor currentCursor = this.Cursor;
- try
- {
- this.Cursor = Cursors.WaitCursor;
- #region consent_mst 데이터 저장 consentMstRidInt
- consentMstRidInt = this.consentWebService.SaveCompleteAll(userId,
- patientCode,
- clnDeptCode,
- formRidInt,
- formCd,
- consentMstRidInt,
- rewriteConsentMstRid,
- eptXmlValue,
- dataValue,
- "WIN",
- deviceIdentNo,
- vistType,
- hosType,
- clnDate,
- ward,
- roomcd,
- orderNo,
- orderName,
- orderCode,
- ocrCode,
- cretno,
- userName,
- userName,
- this.exportedImageFilesJson,
- sCertTarget,
- sCertResult,
- dschdd,
- consentState,
- mainDrId
- );
- #endregion
- //#region 기왕력 데이터 저장 sPID
- SetNewMedicalHistory(dataValue);
- //string sPID = this.consentWebService.SaveMedicalHistory(
- // patientCode,
- // clnDate.Replace("-", ""),
- // this.CurrentTargetPatient.Ex_bp,
- // this.CurrentTargetPatient.Ex_dm,
- // this.CurrentTargetPatient.Ex_heart,
- // this.CurrentTargetPatient.Ex_kidney,
- // this.CurrentTargetPatient.Ex_respiration,
- // this.CurrentTargetPatient.Ex_hx,
- // this.CurrentTargetPatient.Ex_allergy,
- // this.CurrentTargetPatient.Ex_drug,
- // this.CurrentTargetPatient.Ex_smoking,
- // this.CurrentTargetPatient.Ex_idio,
- // this.CurrentTargetPatient.Ex_nacrotics,
- // this.CurrentTargetPatient.Ex_airway,
- // this.CurrentTargetPatient.Ex_hemorrhage,
- // this.CurrentTargetPatient.Ex_status_etc,
- // userId
- // );
- //#endregion
- //이미지를 서버에 업로드
- //int result = TranslateConsentToImageServer(exportedImageFiles, consentMstRidInt, sCertResult);
- //if (result == -10)
- //{
- // throw new Exception("파일명 조회가 정상적으로 이루어지지 않았습니다.");
- //}
- //else if (result < 1)
- //{
- // throw new Exception("이미지 서버 저장중 오류가 발생하였습니다.");
- //}
- //else
- //{
- this.consentMain.ConsentListCtrl.InquiryConsentData(consentMstRidInt);
- MessageBoxDlg.Show(this, string.Format(Properties.Resources.msg_esign_N_comp_save_confirm)
- , string.Format(Properties.Resources.msg_caption_confirm),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- this.consentMain.ReInitializeViewer();
- //}
- this.Cursor = currentCursor;
- }
- catch (Exception ex)
- {
- this.Cursor = currentCursor;
- throw ex;
- }
- finally
- {
- #region export 파일삭제
- try
- {
- if (!string.IsNullOrEmpty(exportedImageFiles))
- {
- string[] imgFile = exportedImageFiles.Split('^');
- if (imgFile != null && imgFile.Length > 0)
- {
- FileInfo fileInfo;
- foreach (string sImgFileName in imgFile)
- {
- fileInfo = new FileInfo(sImgFileName);
- if (fileInfo != null)
- {
- // 이미지 파일 삭제
- fileInfo.Delete();
- }
- }
- fileInfo = new FileInfo(imgFile[0].Replace("_0.jpg", ".xml"));
- if (fileInfo != null)
- {
- // EPT 파일 삭제
- fileInfo.Delete();
- }
- }
- }
- }
- catch (System.IO.IOException e)
- {
- throw e;
- }
- #endregion
- }
- saveResult = 1;
- return true;
- }
- private string ConsentImageSignature(string sCertTarget, string userId, string userName)
- {
- string resultValue = string.Empty;
- try
- {
- if (!string.IsNullOrEmpty(sCertTarget))
- {
- // 공인인증 서명
- SignatureConfig sign = new SignatureConfig();
- string rtn = "";
- // 메모리에 본인 공인인증서가 아닐 경우
- string sSignIp = consentMain.PluginExecuteInfo["signatureServerUrl"];
- string sSignPort = consentMain.PluginExecuteInfo["signatureServerPort"];
- int iPort = 0;
- int.TryParse(sSignPort, out iPort);
- // 공인인증 서버 접속
- rtn = sign.SetSignServerInfo(sSignIp, iPort, userId);
-
- // 공인인증 서명
- resultValue = sign.SignatureExec(sCertTarget, rtn, userName, userId, this.consentMain.saveClickPoint);
- if (string.IsNullOrEmpty(resultValue) || resultValue == "-1")
- {
- // 공인인증 서명에 실패하였을 경우
- return "-50";
- }
- }
- }
- catch (Exception ex)
- {
- MessageBoxDlg.Show(true, string.Format(ex.Message)
- , string.Format(Properties.Resources.msg_caption_confirm),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- resultValue = "-99";
- }
- return resultValue;
- }
- private int TranslateConsentToImageServer(string exportedImageFiles, string sCertResult)
- {
- int resultValue = -1;
- if (!string.IsNullOrEmpty(exportedImageFilesJson) && !string.IsNullOrEmpty(exportedImageFiles))
- {
- Dictionary<string, object> jsonRoot = null;
- try
- {
- jsonRoot = fastJSON.JSON.Parse(exportedImageFilesJson) as Dictionary<string, object>;
- if (jsonRoot != null && jsonRoot.Count > 0)
- {
- string sPath = string.Empty;
- string sFileName = string.Empty;
- string[] sFullPath = exportedImageFiles.Split('^');
- int k = 0;
- foreach (KeyValuePair<string, object> jr in jsonRoot)
- {
- if (jr.Value != null && !string.IsNullOrEmpty(jr.Value.ToString()))
- {
- sPath = string.Empty;
- sFileName = string.Empty;
- string[] filepath = jr.Value.ToString().Split('/');
- for (int i = 0; i < filepath.Length; i++)
- {
- if (i == 0)
- {
- sPath = filepath[i];
- }
- else if ((i + 1) == filepath.Length)
- {
- sFileName = filepath[i];
- }
- else
- {
- sPath += "/" + filepath[i];
- }
- }
- //이미지를 서버에 업로드(전자동의서 서버에 저장)
- System.Net.WebClient wcClient = new System.Net.WebClient();
- string imageUploadServerUrl = this.consentMain.PluginExecuteInfo["imageUploadServerUrl"];
- System.Collections.Specialized.NameValueCollection values = new System.Collections.Specialized.NameValueCollection();
- values.Add("up_path", sPath + "/" + sFileName);
- wcClient.QueryString = values;
- wcClient.UploadFile(imageUploadServerUrl, "POST", sFullPath[k++]);
- }
- }
- }
- }
- catch( Exception ex)
- {
- return resultValue = -99;
- }
- resultValue = 1;
- }
- return resultValue;
- }
- //private int TranslateConsentToImageServer(string exportedImageFiles, int consentMstRidInt, string sCertResult)
- //{
- // int resultValue = -1;
- // if (!string.IsNullOrEmpty(exportedImageFiles))
- // {
- // string[] aryimgFile = exportedImageFiles.Split('^');
- // if (aryimgFile != null && aryimgFile.Length > 0)
- // {
- // try
- // {
- // int consentImageRid_F = 0;
- // string sCertTarget = "";
- // for (int i = 0; i < aryimgFile.Length; i++)
- // {
- // string imgFile = aryimgFile[i];
- // //MessageBox.Show(CurrentTargetPatient.PatientCode + "," + CurrentTargetPatient.VisitType + "," + CurrentTargetPatient.clnDate + "," + "20150815" + "," + CurrentTargetPatient.cretno + "," + "500" + "," + CurrentPreviewConsent.FormCd + "," + i.ToString() + "," + CurrentPreviewConsent.Ocrcode + "," + CurrentEndUser.UserNo);
- // //LCTech 모듈을 위한 DB 작업을 하고 저장할 파일명을 얻는다.
- // string newFileFullName = this.hospitalWebService.GetFileName(CurrentTargetPatient.PatientCode, CurrentTargetPatient.VisitType,
- // CurrentTargetPatient.clnDate.Replace("-", ""), CurrentTargetPatient.Dschdd, CurrentTargetPatient.cretno,
- // "500", CurrentPreviewConsent.FormCd, i.ToString(),
- // CurrentPreviewConsent.Ocrcode, CurrentEndUser.UserNo);
- // //MessageBox.Show(newFileFullName); //O:\fnuImage\201607\19\100501967
- // string uploadFileName = newFileFullName + ".jpg";
- // if (string.IsNullOrEmpty(newFileFullName))
- // {
- // return -10;
- // }
- // //이미지 정보 DB에 저장
- // int consentImageRid = this.consentWebService.SaveImageUploadInfo("ELECTR_CMP", uploadFileName,
- // consentMstRidInt, CurrentEndUser.UserNo, int.Parse(CurrentPreviewConsent.FormRid));
- // /*
- // //저장된 이미지에서 해쉬정보 추출
- // string sCertTarget = GetImageCertification(imgFile);
- // //해쉬정보 DB에 저장
- // this.consentWebService.SaveImageSignInfo("ELECTR_CMP", consentMstRidInt, consentImageRid,
- // CurrentEndUser.UserNo, sCertTarget);
- // */
- // if (i == 0) consentImageRid_F = consentImageRid; //첫번째 consentImageRid 를 저장한다.
- // sCertTarget += GetImageCertification(imgFile) + "^";
- // //이미지를 서버에 업로드(서버에서 나스에 저장)
- // System.Net.WebClient wcClient = new System.Net.WebClient();
- // string imageUploadServerUrl = this.consentMain.PluginExecuteInfo["imageUploadServerUrl"];
- // System.Collections.Specialized.NameValueCollection values = new System.Collections.Specialized.NameValueCollection();
- // values.Add("up_path", uploadFileName);
- // wcClient.QueryString = values;
- // wcClient.UploadFile(imageUploadServerUrl, "POST", imgFile);
- // File.Delete(imgFile);
- // }
- // // 외래일 경우 공인인증 처리가 없음.
- // if (!string.IsNullOrEmpty(CurrentTargetPatient.VisitType) && !CurrentTargetPatient.VisitType.Equals("O"))
- // {
- // sCertTarget = sCertTarget.Substring(0, sCertTarget.Length - 1);
- // this.consentWebService.SaveImageSignInfo("ELECTR_CMP", consentMstRidInt, consentImageRid_F,
- // CurrentEndUser.UserNo, sCertTarget, sCertResult);
- // }
- // resultValue = 1;
- // }
- // catch (Exception err)
- // {
- // resultValue = -99;
- // throw err;
- // }
- // }
- // }
- // return resultValue;
- //}
- private string GetImageCertification(string exportedImageFile)
- {
- try
- {
- FileStream fileStream = null;
- fileStream = new FileStream(exportedImageFile, FileMode.Open);
- fileStream.Position = 0;
- SHA256 mySHA256 = SHA256Managed.Create();
- byte[] hashValue = mySHA256.ComputeHash(fileStream);
- fileStream.Close();
- return byteArrayToString(hashValue);
- }
- catch (Exception ex)
- {
- string exMessage = ex.Message;
- if (ex.InnerException != null)
- {
- exMessage += Environment.NewLine + ex.InnerException.Message;
- }
- return exMessage;
- }
- }
- private string byteArrayToString(byte[] bStr)
- {
- string hexOutput = string.Empty;
- foreach (char letter in bStr)
- {
- int value = Convert.ToInt32(letter);
- hexOutput += String.Format("{0:x}", value);
- }
- return hexOutput;
- }
- public override void WorkExtraWithSavedImageFiles(string savedImageFileDescription)
- {
- string[] aryImageInfo = savedImageFileDescription.Split(';');
- Dictionary<string, string> dicImageInfo = new Dictionary<string, string>();
- foreach (string imageInfo in aryImageInfo)
- {
- string[] aryInfo = imageInfo.Split('=');
- if (aryInfo.Length == 2)
- {
- dicImageInfo.Add(aryInfo[0], aryInfo[1]);
- }
- }
- int baseIndex = -1;
- int.TryParse(dicImageInfo["base-index"], out baseIndex);
- int totalFiles = -1;
- int.TryParse(dicImageInfo["total-files"], out totalFiles);
- if (baseIndex > -1 && totalFiles > 0)
- {
- this.exportedImageFiles = string.Empty;
- this.exportedImageFilesJson = "{ ";
- string sUploadPath = string.Empty;
- for (int i = baseIndex; i < baseIndex + totalFiles; i++)
- {
- string exportedImageFile = string.Format("{0}\\{1}_{2}.{3}", dicImageInfo["path"], dicImageInfo["key"], i, dicImageInfo["extention"]);
- exportedImageFiles += exportedImageFile;
- sUploadPath = string.Format("{0}/{1}", DateTime.Now.ToString("yyyyMM"), DateTime.Now.ToString("dd"));
- this.exportedImageFilesJson += string.Format("\"imageFile{0}\" : \"{1}/{2}_{3}.{4}\"", i, sUploadPath, dicImageInfo["key"], i, dicImageInfo["extention"]);
- if (i + 1 < (baseIndex + totalFiles))
- {
- exportedImageFiles += "^";
- this.exportedImageFilesJson += ", ";
- }
- }
- this.exportedImageFilesJson += " }";
- System.Diagnostics.Debug.WriteLine("Debug=> exportedImageFiles: " + this.exportedImageFiles);
- System.Diagnostics.Debug.WriteLine("Debug=> exportedImageFilesJson: " + this.exportedImageFilesJson);
- }
- }
- private void ConvertStringToInt(string formRid, string consentMstRid, out int formRidInt, out int consentMstRidInt)
- {
- formRidInt = 0;
- int.TryParse(formRid, out formRidInt);
- consentMstRidInt = 0;
- int.TryParse(consentMstRid, out consentMstRidInt);
- }
- private void ChangeGlobalParametersToNew(Dictionary<string, string> baseGlobalParams, Dictionary<string, string> changingGlobalParams)
- {
- foreach (string dicKey in changingGlobalParams.Keys)
- {
- if (baseGlobalParams.ContainsKey(dicKey))
- {
- baseGlobalParams[dicKey] = changingGlobalParams[dicKey];
- }
- }
- }
- /// <summary>
- /// 사용자에 따른 버튼 활성화
- /// </summary>
- private void SetEnableByUserType()
- {
- // 기록 테이블의 출력 유무에 따른 서명버튼 활성화 처리
- SetSaveButtonDisabledWhenPrintYN();
- }
- private void SetSaveButtonDisabledWhenPrintYN()
- {
- if (this.CurrentEndUser != null && this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.PrintOnly)
- && this.CurrentPreviewConsent.PrintOnly.Equals("Y")
- )
- {
- // 출력만 가능하게 설정
- this.toolStripButtonPrint.Enabled = true;
- this.toolStripButtonSaveToServer.Enabled = false;
- this.toolStripButtonTempSaveToServer.Enabled = false;
- this.toolStripButtonExecute.Enabled = false;
- }
- // 출력 상태일 경우 재출력만 가능하도록 버튼 조정
- else if (this.CurrentEndUser != null && this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.ConsentState)
- && ( this.CurrentPreviewConsent.ConsentState.ToUpper().Equals("PAPER_OUT"))
- )
- {
- // 재출력만 가능하게 설정
- this.toolStripButtonPrint.Enabled = true;
- this.toolStripButtonSaveToServer.Enabled = false;
- this.toolStripButtonTempSaveToServer.Enabled = false;
- this.toolStripButtonExecute.Enabled = false;
- }
- else if (this.CurrentEndUser != null && this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.ConsentState)
- && (!this.CurrentPreviewConsent.ConsentState.ToUpper().Equals("UNFINISHED"))
- )
- {
- // 출력이 불가능하도록 설정
- this.toolStripButtonPrint.Enabled = false;
- }
- //일반의사가 켤 경우
- if (this.CurrentEndUser.UserNo.Substring(0, 4).Equals("5000") && this.CurrentPreviewConsent != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.PrintOnly)
- )
- {
- // 출력만 가능하게 설정
- this.toolStripButtonPrint.Enabled = true;
- this.toolStripButtonSaveToServer.Enabled = false;
- this.toolStripButtonTempSaveToServer.Enabled = false;
- this.toolStripButtonExecute.Enabled = false;
- }
- }
- private void PrintConsent()
- {
- // 환자정보가 없을 경우 출력이 되지 않도록 적용
- if (this.CurrentTargetPatient == null || string.IsNullOrEmpty(this.CurrentTargetPatient.PatientCode) || string.IsNullOrEmpty(this.CurrentTargetPatient.PatientName))
- {
- DialogResult result = MessageBox.Show(string.Format(Properties.Resources.msg_error_user_data)
- , string.Format(Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- // 출력 : patientInfo 를 기반으로 출력하는 경우와 환자목록에서 멀티선택 출력의 경우로 나눠야 한다.
- List<PatListVO> volist = consentMain.PatientListCtrl.GetSelectedPatientList;
- if (volist.Count == 1)
- {
- MessageBox.Show(string.Format("멀티출력은 두명이상 선택하여 주십시오.")
- , string.Format(Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- /*if(this.CurrentPreviewConsent.ConsentMstRid != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.ConsentMstRid)
- && !this.CurrentPreviewConsent.ConsentMstRid.Equals("-1")
- && !this.CurrentPreviewConsent.ConsentMstRid.Equals("0"))
- {
- DialogResult result = MessageBox.Show(string.Format(Properties.Resources.msg_multi_print_fail)
- , string.Format(Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- else
- {
- PrintConsentDocument();
- }*/
- }
- else if (volist.Count > 1)
- {
- if (this.CurrentPreviewConsent.ConsentMstRid != null
- && !string.IsNullOrEmpty(this.CurrentPreviewConsent.ConsentMstRid)
- && !this.CurrentPreviewConsent.ConsentMstRid.Equals("-1")
- && !this.CurrentPreviewConsent.ConsentMstRid.Equals("0"))
- {
- DialogResult result = MessageBox.Show(string.Format(Properties.Resources.msg_multi_print_fail)
- , string.Format(Properties.Resources.msg_caption_fail),
- MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- else
- {
- //DialogResult result = MessageBox.Show(string.Format(Properties.Resources.msg_multi_print_question)
- // , string.Format(Properties.Resources.msg_caption_fail),
- // MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
- //if (result == DialogResult.OK)
- //{
- this.CurrentPreviewConsent.OutputType = "MULTI";
- MultiPrintConsentDocument(volist);
- //}
- //else
- //{
- // PrintConsentDocument();
- //}
- }
- }
- else
- {
- PrintConsentDocument();
- }
- }
- //미리보기 데이터를 출력하는 경우
- public void PrintConsentDocument()
- {
- //Dictionary<string, string> globalParams = Common.CreateGlobalParamsDictionary();
- //Dictionary<string, string> changingGlobalParams = new Dictionary<string, string>();
- //SetPatientAndUser(globalParams, true);
- //changingGlobalParams["IO_device"] = "P";
- //changingGlobalParams["IO_ocr_cd"] = this.CurrentPreviewConsent.Ocrcode = GetOcrCode(); // OCR 코드
- //changingGlobalParams["IO_printtime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- //ChangeGlobalParametersToNew(globalParams, changingGlobalParams);
- //List<string> formGuids = new List<string>();
- //formGuids.Add(this.CurrentPreviewConsent.FormGuid);
- //string fos = Common.GetFosString(formGuids
- // , this.consentMain.PluginExecuteInfo["formServiceUrl"]
- // , globalParams
- // , null);
- //this.consentMain.PrintConsentDocument(fos);
- Dictionary<string, Dictionary<string, string>> formParamsList = new Dictionary<string, Dictionary<string, string>>();
- string[] formGuidList = new string[this.CurrentPreviewConsent.PrntCnt];
- int prntCnt = 0;
- string sOcrCd = string.Empty;
- for (int i = 0; i < this.CurrentPreviewConsent.PrntCnt; i++)
- {
- Dictionary<string, string> formParams = Common.CreateGlobalParamsDictionary();
- Dictionary<string, string> changingFormParams = new Dictionary<string, string>();
-
- SetPatientAndUser(formParams, true);
- changingFormParams["IO_device"] = "P";
- changingFormParams["IO_printtime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- if (i == 0)
- {
- changingFormParams["IO_ocr_cd"] = this.CurrentPreviewConsent.Ocrcode = GetOcrCode(); // OCR 코드
- sOcrCd = this.CurrentPreviewConsent.Ocrcode;
- }
- else
- {
- changingFormParams["IO_ocr_cd"] = sOcrCd; //OCR코드
- }
- if (i == 1) changingFormParams["IO_print_comment"] = Properties.Resources.msg_print_comment_2;
- else if (i == 2) changingFormParams["IO_print_comment"] = Properties.Resources.msg_print_comment_3;
- ChangeGlobalParametersToNew(formParams, changingFormParams);
- formGuidList[prntCnt] = this.CurrentPreviewConsent.FormGuid;
- formParamsList.Add((prntCnt + 1).ToString(), formParams);
- prntCnt++;
- }
- string fos = Common.GetMultiFosString(formGuidList
- , this.consentMain.PluginExecuteInfo["formServiceUrl"]
- , null
- , formParamsList);
- this.consentMain.PrintConsentDocument(fos);
- }
-
- public void PrintDirectConsentDocument()
- {
- if (this.currentPreviewConsent == null || this.CurrentTargetPatient == null || this.CurrentEndUser == null)
- {
- return;
- }
-
- //미리보기 데이터를 바로 출력하는 경우는 미작성상태인 경우로만 한다. (임시작성 이상의 경우는 바로 출력을 안하도록)
- if (!this.currentPreviewConsent.ConsentState.ToUpper().Equals("UNFINISHED"))
- {
- return;
- }
- //Dictionary<string, string> globalParams = Common.CreateGlobalParamsDictionary();
- //Dictionary<string, string> changingGlobalParams = new Dictionary<string, string>();
- //SetPatientAndUser(globalParams, true);
- //changingGlobalParams["IO_device"] = "P";
- //changingGlobalParams["IO_ocr_cd"] = this.CurrentPreviewConsent.Ocrcode = GetOcrCode(); // OCR 코드
- ////changingGlobalParams["IO_signdate"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- ////changingGlobalParams["IO_signtime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- //changingGlobalParams["IO_printtime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- //ChangeGlobalParametersToNew(globalParams, changingGlobalParams);
- //List<string> formGuids = new List<string>();
- //formGuids.Add(this.CurrentPreviewConsent.FormGuid);
- //string fos = Common.GetFosString(formGuids
- // , this.consentMain.PluginExecuteInfo["formServiceUrl"]
- // , globalParams
- // , null);
- int prntCnt = 0;
- prntCnt = this.CurrentPreviewConsent.PrntCnt;
- int prntMsgCnt = 0;
- if (this.consentMain.ConsentExecuteInfo.ContainsKey("printList") && !string.IsNullOrEmpty(this.consentMain.ConsentExecuteInfo["printList"]))
- {
- if (this.consentMain.ConsentExecuteInfo.ContainsKey("prntCnt") && !string.IsNullOrEmpty(this.consentMain.ConsentExecuteInfo["prntCnt"])
- && !this.consentMain.ConsentExecuteInfo["prntCnt"].ToString().Equals("-1"))
- {
- int.TryParse(this.consentMain.ConsentExecuteInfo["prntCnt"].ToString(), out prntCnt);
- prntMsgCnt++;
- }
- }
- Dictionary<string, Dictionary<string, string>> formParamsList = new Dictionary<string, Dictionary<string, string>>();
- string[] formGuidList = new string[prntCnt];
- string sOcrCd = string.Empty;
- for (int i = 0; i < prntCnt; i++)
- {
- Dictionary<string, string> formParams = Common.CreateGlobalParamsDictionary();
- Dictionary<string, string> changingFormParams = new Dictionary<string, string>();
- SetPatientAndUser(formParams, true);
- changingFormParams["IO_device"] = "P";
- changingFormParams["IO_printtime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- //MessageBox.Show(this.CurrentPreviewConsent.Ocrcode);
- if (i == 0)
- {
- changingFormParams["IO_ocr_cd"] = this.CurrentPreviewConsent.Ocrcode = GetOcrCode(); // OCR 코드
- sOcrCd = this.CurrentPreviewConsent.Ocrcode;
- }
- else
- {
- changingFormParams["IO_ocr_cd"] = sOcrCd; //OCR코드
- }
- //MessageBox.Show("this.CurrentPreviewConsent.Ocrcode[" + this.CurrentPreviewConsent.Ocrcode + "]sOcrCd[" + sOcrCd + "]changingFormParams[" + changingFormParams["IO_ocr_cd"] + "]");
- if (prntMsgCnt == 1) changingFormParams["IO_print_comment"] = Properties.Resources.msg_print_comment_2;
- else if (prntMsgCnt == 2) changingFormParams["IO_print_comment"] = Properties.Resources.msg_print_comment_3;
- ChangeGlobalParametersToNew(formParams, changingFormParams);
- formGuidList[i] = this.CurrentPreviewConsent.FormGuid;
- formParamsList.Add((i + 1).ToString(), formParams);
- prntMsgCnt++;
- }
- string fos = Common.GetMultiFosString(formGuidList
- , this.consentMain.PluginExecuteInfo["formServiceUrl"]
- , null
- , formParamsList);
- this.consentMain.PrintDirect(fos);
- }
- //멀티출력일 경우 동의서 미리보기
- private void MultiPrintConsentDocument(List<PatListVO> voList)
- {
- Dictionary<string, Dictionary<string, string>> formParamsList = new Dictionary<string, Dictionary<string, string>>();
- List<string> formGuids = new List<string>();
- int guidCnt = 0;
- this.CurrentPreviewConsent.MultiOcrcode = "";
- this.CurrentPreviewConsent.MultiMainDrIdCd = "";
- this.CurrentPreviewConsent.Ocrcode = "";
- if (voList.Count > 0 && this.CurrentPreviewConsent.PrntCnt > 0)
- {
- guidCnt = voList.Count * this.CurrentPreviewConsent.PrntCnt;
- }
- string[] formGuidList = new string[guidCnt];
- int prntCnt = 0;
- string sOcrCd = string.Empty;
- for (int i=0; i<voList.Count; i++)
- {
- sOcrCd = string.Empty;
- for (int j = 0; j < this.CurrentPreviewConsent.PrntCnt; j++)
- {
- PatientVO vo = GetPatientByPatList(voList[i]);
- Dictionary<string, string> formParams = Common.CreateGlobalParamsDictionary();
- Dictionary<string, string> changingFormParams = new Dictionary<string, string>();
- changingFormParams["UrlParam"] = this.consentMain.PluginExecuteInfo["imageUploadPath"] + "/";
- changingFormParams["IO_device"] = "P";
- changingFormParams["IO_Pt_ID"] = vo.IO_Pt_ID;
- changingFormParams["IO_sex_age_y_m"] = vo.IO_sex_age_y_m;
- changingFormParams["IO_Pt_name"] = vo.IO_Pt_Name;
- changingFormParams["IO_JuminNo"] = vo.IO_JuminNo;
- changingFormParams["IO_roomNo"] = vo.IO_Ward + "/" + vo.IO_RoomNo;
- changingFormParams["IO_ADdate"] = SetDateFormatting(vo.IO_ADdate);
- changingFormParams["IO_Dept"] = vo.IO_DeptNm;
- changingFormParams["IO_Dept2"] = vo.IO_Dept2;
- changingFormParams["IO_formname"] = this.CurrentPreviewConsent.FormName;
- changingFormParams["IO_maindr"] = vo.IO_MaindrNm;
- changingFormParams["IO_Pt_tel"] = vo.IO_Tel;
- changingFormParams["IO_Pt_address"] = vo.IO_Zipcdaddr;
- if (j == 0)
- {
- changingFormParams["IO_ocr_cd"] = vo.IO_OcrCd = hospitalWebService.GetOcrTag(); //OCR코드
- this.CurrentPreviewConsent.MultiOcrcode += vo.IO_OcrCd + "^";
- this.CurrentPreviewConsent.MultiMainDrIdCd += vo.IO_MaindrId + "^";
- sOcrCd = vo.IO_OcrCd;
- }
- else
- {
- changingFormParams["IO_ocr_cd"] = sOcrCd; //OCR코드
- }
- if (j == 1) changingFormParams["IO_print_comment"] = Properties.Resources.msg_print_comment_2;
- else if (j == 2) changingFormParams["IO_print_comment"] = Properties.Resources.msg_print_comment_3;
- changingFormParams["IO_printtime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- ChangeGlobalParametersToNew(formParams, changingFormParams);
- formGuidList[prntCnt] = this.CurrentPreviewConsent.FormGuid;
- //formGuids.Add(this.CurrentPreviewConsent.FormGuid);
- formParamsList.Add((prntCnt+1).ToString(), formParams);
- prntCnt++;
- }
- }
- if (this.CurrentPreviewConsent.MultiOcrcode.Length > 0)
- {
- this.CurrentPreviewConsent.MultiOcrcode = this.CurrentPreviewConsent.MultiOcrcode.Substring(0, this.CurrentPreviewConsent.MultiOcrcode.Length - 1);
- }
- if (this.CurrentPreviewConsent.MultiMainDrIdCd.Length > 0)
- {
- this.CurrentPreviewConsent.MultiMainDrIdCd = this.CurrentPreviewConsent.MultiMainDrIdCd.Substring(0, this.CurrentPreviewConsent.MultiMainDrIdCd.Length - 1);
- }
- string fos = Common.GetMultiFosString(formGuidList
- , this.consentMain.PluginExecuteInfo["formServiceUrl"]
- , null
- , formParamsList);
- //string fos = Common.GetMultiFosString(formGuids
- // , this.consentMain.PluginExecuteInfo["formServiceUrl"]
- // , null
- // , formParamsList);
- this.consentMain.PrintConsentDocument(fos);
- }
- private string SetDateFormatting(string adDate)
- {
- if (adDate.Length == 8)
- return string.Format("{0}/{1}/{2}", adDate.Substring(0, 4), adDate.Substring(4, 2), adDate.Substring(6, 2));
- else
- return adDate;
- }
- public override void OnRequiredInputViolation(string value)
- {
- MessageBoxDlg.Show(true, value + " 항목이 누락되었습니다.", Properties.Resources.msg_caption_warn, MessageBoxButtons.OK, MessageBoxIcon.Warning);
- }
- public override void onEnableDrawing(bool enabled)
- {
- this.toolStripButtonPen.Checked = enabled;
- if (this.toolStripButtonPen.Checked) this.toolStripButtonPen.Image = global::CLIP.eForm.Consent.Dfh.UI.Properties.Resources.newDrawingClick;
- else this.toolStripButtonPen.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonPen.Image")));
- }
- private void toolStripButtonDeleteAttach_Click(object sender, EventArgs e)
- {
- this.consentMain.DeleteAttach();
- setViewerPageInit();
- }
- private void toolStripButtonInsertAttach_Click(object sender, EventArgs e)
- {
- this.consentMain.InsertAttach();
- setViewerPageInit();
- }
- public override void setViewerPageInit()
- {
- this.toolStripLabelTotalPages.Text = this.consentMain.GetTotalPageCount().ToString();
- this.toolStripTextBoxPageIndex.Text = this.consentMain.GetCurrentPageIndex().ToString();
- }
- private void toolStripButtonConfig_Click(object sender, EventArgs e)
- {
- ShowConfigDialog();
- }
- private void ShowConfigDialog()
- {
- ConfigForm configForm = new ConfigForm();
- configForm.ShowDialog(this);
- }
- class ZoomRateDropdownItem
- {
- private string caption = string.Empty;
- public string Caption
- {
- get { return caption; }
- set { caption = value; }
- }
- private string itemValue = string.Empty;
- public string ItemValue
- {
- get { return itemValue; }
- set { itemValue = value; }
- }
- public ZoomRateDropdownItem()
- {
- }
- public ZoomRateDropdownItem(string caption, string itemValue)
- {
- this.caption = caption;
- this.itemValue = itemValue;
- }
- public override string ToString()
- {
- return caption;
- }
- }
- private void toolStripButtonConfig_Click_1(object sender, EventArgs e)
- {
- ShowConfigDialog();
- }
- private void ConsentCommandCtrl_Click(object sender, EventArgs e)
- {
- MessageBoxDlg.MessageBoxParent = this;
- }
- }
- }
|