PrinterSetFormMain.cs 208 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Drawing;
  5. using System.IO;
  6. using System.Windows.Forms;
  7. namespace LYFZ.Software.MainBusiness.StudioDataSet
  8. {
  9. public partial class PrinterSetFormMain : LYFZ.Software.UI.StudioDataSet.PrinterSetFormMain
  10. {
  11. LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
  12. LYFZ.BLL.BLL_ErpPrinterSetNow pstnbll = new BLL.BLL_ErpPrinterSetNow();
  13. LYFZ.BLL.BLL_ErpSystemConfigure scbll = new BLL.BLL_ErpSystemConfigure();
  14. LYFZ.BLL.BLL_ErpPrinterTemplateSet ptstbll = new BLL.BLL_ErpPrinterTemplateSet();
  15. /// <summary>
  16. /// 是否保存
  17. /// </summary>
  18. public bool IsSaveed = false;
  19. /// <summary>
  20. /// 调用时要单独显示的模块名
  21. /// </summary>
  22. public string ModuleName = "";
  23. List<LYFZ.Model.Model_ErpPrinterSetNow> mlist = new List<Model.Model_ErpPrinterSetNow>();
  24. string StrDividedShopID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID();
  25. string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
  26. public PrinterSetFormMain()
  27. {
  28. InitSqlPrintData();
  29. this.Load += PrinterSetFormMain_Load;
  30. this.Shown += PrinterSetFormMain_Shown;
  31. this.tbControl1.SelectedIndexChanged += tbControl1_SelectedIndexChanged;
  32. this.tbControl2.SelectedIndexChanged += tbControl2_SelectedIndexChanged;
  33. this.dgvDataPrinterSet.Click += dgvDataPrinterSet_Click;
  34. this.dgvDataPrinterSet.CellMouseDoubleClick += dgvDataPrinterSet_CellMouseDoubleClick;
  35. this.dgvDataPrinterSet.CellMouseDown += dgvDataPrinterSet_CellMouseDown;
  36. this.dgvDataPrinterSet.RowsAdded += dgvDataPrinterSet_RowsAdded;
  37. this.contextMenuStrip1.ItemClicked += contextMenuStrip1_ItemClicked;
  38. this.chkfrmYes.CheckedChanged += chkfrmYes_CheckedChanged;
  39. this.chkfrmNo.CheckedChanged += chkfrmNo_CheckedChanged;
  40. this.btnHistorySet.Click += btnHistorySet_Click;
  41. this.btnfrmOK.Click += btnfrmOK_Click;
  42. this.btnfrmCancel.Click += btnfrmCancel_Click;
  43. this.btnfrmColse.Click += btnfrmColse_Click;
  44. this.panelEx6.MouseDown += panelEx6_MouseDown;
  45. this.panelEx6.MouseMove += panelEx6_MouseMove;
  46. this.panelEx7.MouseDown += panelEx6_MouseDown;
  47. this.panelEx7.MouseMove += panelEx6_MouseMove;
  48. this.dgvDataPrinterSet.KeyUp += dgvDataPrinterSet_KeyUp;
  49. this.tbControl2.MouseDoubleClick += tbControl2_MouseDoubleClick;
  50. this.btnSaveed1.Click += btnSaveed1_Click;
  51. this.btnSaveed2.Click += btnSaveed2_Click;
  52. this.btnGlobalOrderDownloadLOG.Click += btnGlobalOrderDownloadLOG_Click;
  53. this.btnGlobalOrderBrowseLOG.Click += btnGlobalOrderBrowseLOG_Click;
  54. this.btnGlobalOrderDeleteLOG.Click += btnGlobalOrderDeleteLOG_Click;
  55. #region 其他设置
  56. this.treevModelSet.NodeMouseClick += treevModelSet_NodeMouseClick;
  57. this.btnSaveed.Click += btnSaveed_Click;
  58. this.btnCancel.Click += btnCancel_Click;
  59. this.btnOrderBrowseWeddingLOG.Click += btnOrderBrowseWeddingLOG_Click;
  60. this.btnOrderDeleteWeddingLOG.Click += btnOrderDeleteWeddingLOG_Click;
  61. this.btnOrderDownloadWeddingLOG.Click += btnOrderDownloadWeddingLOG_Click;
  62. this.btnOrderChildDownloadLOG.Click += btnOrderChildDownloadLOG_Click;
  63. this.btnOrderChildBrowseLOG.Click += btnOrderChildBrowseLOG_Click;
  64. this.btnOrderChildDeleteLOG.Click += btnOrderChildDeleteLOG_Click;
  65. this.btnOrderPortraitDownloadLOG.Click += btnOrderPortraitDownloadLOG_Click;
  66. this.btnOrderPortraitBrowseLOG.Click += btnOrderPortraitBrowseLOG_Click;
  67. this.btnOrderPortraitDeleteLOG.Click += btnOrderPortraitDeleteLOG_Click;
  68. this.btnOrderWeddingCeremonyDownloadLOG.Click += btnOrderWeddingCeremonyDownloadLOG_Click;
  69. this.btnOrderWeddingCeremonyBrowseLOG.Click += btnOrderWeddingCeremonyBrowseLOG_Click;
  70. this.btnOrderWeddingCeremonyDeleteLOG.Click += btnOrderWeddingCeremonyDeleteLOG_Click;
  71. this.btnOrderServiceDownloadLOG.Click += btnOrderServiceDownloadLOG_Click;
  72. this.btnOrderServiceBrowseLOG.Click += btnOrderServiceBrowseLOG_Click;
  73. this.btnOrderServiceDeleteLOG.Click += btnOrderServiceDeleteLOG_Click;
  74. #endregion
  75. this.tbPage1.Parent = null;
  76. this.tbPage2.Parent = null;
  77. this.tbPage3.Parent = null;
  78. this.tbPage4.Parent = null;
  79. this.tabControl3.Visible = false;
  80. TabPage1Bind();
  81. }
  82. void PrinterSetFormMain_Shown( object sender, EventArgs e )
  83. {
  84. /*bool b = LYFZ.Software.MainBusiness.VersionControl.StaticVersion.UIFunctionVersion(VersionControl.VersionFunctionEnum.打印根据订单类型区分打印);
  85. if (!b)
  86. {
  87. this.Close();
  88. return;
  89. }*/
  90. }
  91. #region 主事件
  92. /// <summary>
  93. /// 窗体加载事件
  94. /// </summary>
  95. /// <param name="sender"></param>
  96. /// <param name="e"></param>
  97. void PrinterSetFormMain_Load( object sender, EventArgs e )
  98. {
  99. LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintInitialSetting();
  100. //this.TabPage1Bind();
  101. if ( !string.IsNullOrEmpty( this.ModuleName ) )
  102. {
  103. this.btnHistorySet.Visible = false;
  104. switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), this.ModuleName.Trim() ) )
  105. {
  106. case EnumPublic.PrintTypeEnum.订单预约单:
  107. case EnumPublic.PrintTypeEnum.制作单明细:
  108. case EnumPublic.PrintTypeEnum.礼服出售清单:
  109. case EnumPublic.PrintTypeEnum.礼服出租清单:
  110. case EnumPublic.PrintTypeEnum.订单收款:
  111. case EnumPublic.PrintTypeEnum.会员充值收款:
  112. case EnumPublic.PrintTypeEnum.会员服务收款:
  113. case EnumPublic.PrintTypeEnum.会员服务消费:
  114. case EnumPublic.PrintTypeEnum.礼服出售收款:
  115. case EnumPublic.PrintTypeEnum.礼服出租收款:
  116. case EnumPublic.PrintTypeEnum.礼服出租退押金:
  117. case EnumPublic.PrintTypeEnum.其它收入:
  118. case EnumPublic.PrintTypeEnum.其它消费收款:
  119. case EnumPublic.PrintTypeEnum.现金支出:
  120. case EnumPublic.PrintTypeEnum.新摄会返还款:
  121. case EnumPublic.PrintTypeEnum.新摄会收款:
  122. break;
  123. default:
  124. if ( this.tbControl2.TabPages.Count > 1 )
  125. {
  126. this.tbControl2.TabPages.RemoveAt( 1 );
  127. }
  128. break;
  129. }
  130. }
  131. }
  132. LYFZ.Model.Model_ErpSystemConfigure modelsc;
  133. /// <summary>
  134. /// 其他设置选项卡选择事件
  135. /// </summary>
  136. /// <param name="sender"></param>
  137. /// <param name="e"></param>
  138. void tbControl1_SelectedIndexChanged( object sender, EventArgs e )
  139. {
  140. if ( this.tbControl2.SelectedIndex == 1 )
  141. {
  142. bool isTrun = true;
  143. while ( isTrun )
  144. {
  145. this.GetModelSystemConfigure();
  146. if ( modelsc.ID <= 0 )
  147. {
  148. modelsc.Sconfig_Code = "PrintGlobalSet";
  149. modelsc.Sconfig_Name = "打印全局设置";
  150. modelsc.Sconfig_Value = "";
  151. modelsc.Sconfig_IsEnabled = true;
  152. modelsc.Sconfig_Remark = "打印机设置里的全局设置";
  153. modelsc.Sconfig_Type = "";
  154. modelsc.Sconfig_Order = 1;
  155. modelsc.Sconfig_CreateDatetime = SDateTime.Now;
  156. modelsc.Sconfig_CreateName = "";
  157. if ( !scbll.Add( modelsc ) )
  158. {
  159. MessageBoxCustom.Show( "添加打印全局设置失败!" );
  160. isTrun = false;
  161. }
  162. }
  163. else
  164. {
  165. isTrun = false;
  166. }
  167. }
  168. string[] StrArray = modelsc.Sconfig_Value.Trim().Split( '∥' );
  169. for ( int i = 0; i < StrArray.Length; i++ )
  170. {
  171. if ( !string.IsNullOrEmpty( StrArray[i].Trim() ) )
  172. {
  173. string[] StrArray2 = StrArray[i].Trim().Split( '‖' );
  174. switch ( StrArray2[0].Trim() )
  175. {
  176. case "收款单说明":
  177. this.txtGlobalPaymentExplain.Text = StrArray2[1].Trim();
  178. break;
  179. case "预约单内容详情字体大小":
  180. this.cmbtreevGlobalContentDetail.TextFindTag( StrArray2[1].Trim() );
  181. break;
  182. case "预约单注意事项字体大小":
  183. this.cmbtreevGlobalNoteMatters.TextFindTag( StrArray2[1].Trim() );
  184. break;
  185. case "预约单标题":
  186. this.txtGlobalOrderTitle.Text = StrArray2[1].Trim();
  187. break;
  188. case "预约单LOG":
  189. this.pictGlobalOrderLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( StrArray2[1].Trim() ) );
  190. break;
  191. case "预约单注意事项说明":
  192. this.txtGlobalOrderNoteMatter.Text = StrArray2[1].Trim();
  193. break;
  194. }
  195. }
  196. }
  197. }
  198. }
  199. void GetModelSystemConfigure()
  200. {
  201. modelsc = scbll.GetModel( "Sconfig_Code", "PrintGlobalSet" );
  202. }
  203. /// <summary>
  204. /// 第二个选项卡的选择事件
  205. /// </summary>
  206. /// <param name="sender"></param>
  207. /// <param name="e"></param>
  208. void tbControl2_SelectedIndexChanged( object sender, EventArgs e )
  209. {
  210. if ( this.tbControl2.SelectedIndex == 1 )
  211. {
  212. DataTable tbl = orbll.GetView_Custom( "tb_ErpPrinterSetNow Left JOIN tb_ErpPrinterTemplateSet on TptSet_TemplateName = PrintSet_TemplateName", StrWhere: "[PrintSet_DividedShopNumber]='" + StrDividedShopID + "'", ShowColumnName: "tb_ErpPrinterSetNow.ID,TptSet_TemplateAliases,TptSet_TemplateParentNumber" ).Tables[0];
  213. this.treevModelSet.Nodes.Clear();
  214. TreeNode root = null;
  215. if ( string.IsNullOrEmpty( this.ModuleName ) )
  216. {
  217. string[] StrModel = Enum.GetNames( typeof( LYFZ.EnumPublic.PrintTypeEnum ) );
  218. for ( int i = 0; i < StrModel.Length; i++ )
  219. {
  220. LYFZ.EnumPublic.PrintTypeEnum printType = (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), StrModel[i] );
  221. switch ( printType )
  222. {
  223. case EnumPublic.PrintTypeEnum.订单预约单:
  224. case EnumPublic.PrintTypeEnum.制作单明细:
  225. case EnumPublic.PrintTypeEnum.礼服出售清单:
  226. case EnumPublic.PrintTypeEnum.礼服出租清单:
  227. case EnumPublic.PrintTypeEnum.订单收款:
  228. case EnumPublic.PrintTypeEnum.会员充值收款:
  229. case EnumPublic.PrintTypeEnum.会员服务收款:
  230. case EnumPublic.PrintTypeEnum.会员服务消费:
  231. case EnumPublic.PrintTypeEnum.礼服出售收款:
  232. case EnumPublic.PrintTypeEnum.礼服出租收款:
  233. case EnumPublic.PrintTypeEnum.礼服出租退押金:
  234. case EnumPublic.PrintTypeEnum.其它收入:
  235. case EnumPublic.PrintTypeEnum.其它消费收款:
  236. case EnumPublic.PrintTypeEnum.现金支出:
  237. case EnumPublic.PrintTypeEnum.新摄会返还款:
  238. case EnumPublic.PrintTypeEnum.新摄会收款:
  239. //case EnumPublic.PrintTypeEnum.员工奖罚:
  240. root = new TreeNode();
  241. root.Text = StrModel[i].ToString();
  242. root.Tag = Convert.ToInt32( Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), StrModel[i] ) );
  243. this.ForBindEnum( root, Convert.ToInt32( root.Tag ), tbl );
  244. this.treevModelSet.Nodes.Add( root );
  245. break;
  246. default:
  247. break;
  248. }
  249. }
  250. }
  251. else
  252. {
  253. LYFZ.EnumPublic.PrintTypeEnum printType = (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), this.ModuleName.Trim() );
  254. root = new TreeNode();
  255. root.Text = printType.ToString();
  256. root.Tag = Convert.ToInt32( printType );
  257. this.ForBindEnum( root, Convert.ToInt32( root.Tag ), tbl );
  258. this.treevModelSet.Nodes.Add( root );
  259. }
  260. this.treevModelSet.Nodes[0].ExpandAll();
  261. }
  262. }
  263. /// <summary>
  264. /// 绑定第二级
  265. /// </summary>
  266. /// <param name="nodes"></param>
  267. /// <param name="StrParentID"></param>
  268. /// <param name="tbl"></param>
  269. void ForBindEnum( TreeNode nodes, int StrParentID, DataTable tbl )
  270. {
  271. if ( tbl.Rows.Count > 0 )
  272. {
  273. DataRow[] dtRow = tbl.Select( "TptSet_TemplateParentNumber = '" + StrParentID + "'" );
  274. if ( dtRow.Length > 0 )
  275. {
  276. TreeNode node;
  277. for ( int i = 0; i < dtRow.Length; i++ )
  278. {
  279. node = new TreeNode();
  280. node.Text = dtRow[i]["TptSet_TemplateAliases"].ToString();
  281. node.Tag = dtRow[i]["TptSet_TemplateParentNumber"].ToString();
  282. node.Name = dtRow[i]["ID"].ToString();
  283. nodes.Nodes.Add( node );
  284. }
  285. }
  286. }
  287. }
  288. /// <summary>
  289. /// 打开历史设置
  290. /// </summary>
  291. /// <param name="sender"></param>
  292. /// <param name="e"></param>
  293. void btnHistorySet_Click( object sender, EventArgs e )
  294. {
  295. LYFZ.Software.MainBusiness.StudioDataSet.DefaultPrinterSetFormMain frmDefault = new DefaultPrinterSetFormMain();
  296. frmDefault.Show();
  297. }
  298. /// <summary>
  299. /// 显示历史设置按钮
  300. /// </summary>
  301. /// <param name="sender"></param>
  302. /// <param name="e"></param>
  303. void tbControl2_MouseDoubleClick( object sender, MouseEventArgs e )
  304. {
  305. this.btnHistorySet.Visible = true;
  306. }
  307. /// <summary>
  308. /// 显示历史设置按钮
  309. /// </summary>
  310. /// <param name="sender"></param>
  311. /// <param name="e"></param>
  312. void dgvDataPrinterSet_KeyUp( object sender, KeyEventArgs e )
  313. {
  314. if ( e.Control && e.KeyCode == Keys.F11 )
  315. {
  316. this.btnHistorySet.Visible = true;
  317. }
  318. }
  319. #endregion
  320. #region 打印机设置
  321. /// <summary>
  322. /// 第一个选项卡的第一面列表绑定
  323. /// </summary>
  324. void TabPage1Bind()
  325. {
  326. this.GetModelListPrinterSetNow();
  327. string StrWhere = "";
  328. if ( !string.IsNullOrEmpty( this.ModuleName ) )
  329. {
  330. StrWhere += " and TptSet_TemplateParentNumber = '" + (int)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), this.ModuleName ) + "'";
  331. }
  332. DataTable tbl = orbll.GetView_Custom( "tb_ErpPrinterSetNow Left JOIN tb_ErpPrinterTemplateSet on TptSet_TemplateName = PrintSet_TemplateName",
  333. StrWhere: "PrintSet_DividedShopNumber = '" + StrDividedShopID + "'" + StrWhere + "",
  334. filedOrder: "PrintSet_TemplateParentNumber ASC",
  335. ShowColumnName: "tb_ErpPrinterSetNow.ID,tb_ErpPrinterTemplateSet.ID AS PTID,PrintSet_TemplateName AS 模块名称,TptSet_PrintTypeName AS 打印名称,TptSet_TemplateAliases AS 风格名称,PrintSet_PrintPath AS 默认打印机名称,PrintSet_PrintSingleTitle AS 打印标题,case when PrintSet_PrintDefault = 1 then '默认' else '' end AS 是否默认,convert(varchar(50),PrintSet_MachineType) AS 纸张类型,TptSet_TemplateParentNumber" ).Tables[0];
  336. foreach ( DataRow dr in tbl.Rows )
  337. {
  338. if ( dr["纸张类型"] != null && dr["纸张类型"].ToString().Trim() != "" )
  339. {
  340. dr["纸张类型"] = Enum.GetName( typeof( LYFZ.EnumPublic.PrinterPaperType ), Convert.ToInt32( dr["纸张类型"] ) );
  341. }
  342. else
  343. {
  344. dr["纸张类型"] = "";
  345. }
  346. if ( dr["打印名称"] != null )
  347. {
  348. switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), dr["打印名称"].ToString() ) )
  349. {
  350. case EnumPublic.PrintTypeEnum.订单预约单:
  351. case EnumPublic.PrintTypeEnum.财务报表年:
  352. case EnumPublic.PrintTypeEnum.财务报表日:
  353. case EnumPublic.PrintTypeEnum.财务报表月:
  354. case EnumPublic.PrintTypeEnum.选片缩略图:
  355. case EnumPublic.PrintTypeEnum.制作单明细:
  356. dr["打印标题"] = "不可设置";
  357. //dr["打印标题"] = Color.Silver;
  358. break;
  359. }
  360. }
  361. }
  362. string strHideField = "ID,PTID,模块名称,TptSet_TemplateParentNumber";
  363. this.dgvDataPrinterSet.DataSource( tbl, strHideField: strHideField );
  364. }
  365. void GetModelListPrinterSetNow()
  366. {
  367. System.Threading.Thread t = new System.Threading.Thread( new System.Threading.ThreadStart( delegate ()
  368. {
  369. DataTable dt = orbll.GetView_Custom( "tb_ErpPrinterSetNow",
  370. StrWhere: "PrintSet_DividedShopNumber='" + LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID() + "'",
  371. ShowColumnName: "ID,PrintSet_DividedShopNumber,PrintSet_TemplateName,PrintSet_PrintDefault,PrintSet_MachineType,PrintSet_TemplateParentNumber,PrintSet_PrintPathName,PrintSet_PrintPath,PrintSet_PrintSingleTitle,PrintSet_PrintSingleLOG,PrintSet_PrintOtherDataJson,PrintSet_CreateDatetime,PrintSet_CreateName,PrintSet_UpdateDateTime,PrintSet_UpdateName" ).Tables[0];
  372. for ( int i = 0; i < dt.Rows.Count; i++ )
  373. {
  374. LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.DataRowToModel( dt.Rows[i] );
  375. mlist.Add( model );
  376. }
  377. } ) );
  378. t.Start();
  379. }
  380. /// <summary>
  381. /// 第一个选项卡的列表列点击事件
  382. /// </summary>
  383. /// <param name="sender"></param>
  384. /// <param name="e"></param>
  385. void dgvDataPrinterSet_Click( object sender, EventArgs e )
  386. {
  387. this.panelfrmShow.Visible = false;
  388. }
  389. /// <summary>
  390. /// 第一个选项卡的列表列双击事件
  391. /// </summary>
  392. /// <param name="sender"></param>
  393. /// <param name="e"></param>
  394. void dgvDataPrinterSet_CellMouseDoubleClick( object sender, DataGridViewCellMouseEventArgs e )
  395. {
  396. if ( this.dgvDataPrinterSet.Rows.Count > 0 )
  397. {
  398. if ( this.dgvDataPrinterSet.CurrentRow.Index >= 0 && this.dgvDataPrinterSet.CurrentCell.ColumnIndex >= 0 )
  399. {
  400. DateTime StrTime = SDateTime.Now;
  401. this.panelfrmShow.Visible = false;
  402. if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "风格名称" )
  403. {
  404. LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetTextSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetTextSuperSmallForm();
  405. frm.Text = "风格名称";
  406. frm.StrValue = this.dgvDataPrinterSet.CurrentRow.Cells["风格名称"].Value.ToString().Trim();
  407. frm.ShowDialog();
  408. if ( frm.IsOK )
  409. {
  410. if ( frm.StrValue.Trim().Length > 40 )
  411. {
  412. MessageBoxCustom.Show( "标题名称长度不能超过40字符!" );
  413. return;
  414. }
  415. LYFZ.Model.Model_ErpPrinterTemplateSet modelPt = ptstbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["PTID"].Value ) );
  416. modelPt.TptSet_TemplateAliases = frm.StrValue;
  417. modelPt.TptSet_UpdateDateTime = StrTime;
  418. modelPt.TptSet_UpdateName = StrUserID;
  419. if ( !ptstbll.Update( modelPt ) )
  420. {
  421. MessageBoxCustom.Show( "修改失败!" );
  422. return;
  423. }
  424. this.dgvDataPrinterSet.CurrentRow.Cells["风格名称"].Value = modelPt.TptSet_TemplateAliases;
  425. }
  426. }
  427. else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "默认打印机名称" )
  428. {
  429. PrintDialog dlg = new PrintDialog();
  430. if ( dlg.ShowDialog() == DialogResult.OK )
  431. {
  432. LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) );
  433. model.PrintSet_PrintPath = dlg.PrinterSettings.PrinterName;
  434. model.PrintSet_PrintPathName = System.IO.Path.GetFileName( model.PrintSet_PrintPath );
  435. model.PrintSet_UpdateDateTime = StrTime;
  436. model.PrintSet_UpdateName = StrUserID;
  437. if ( !pstnbll.Update( model ) )
  438. {
  439. MessageBoxCustom.Show( "设置失败!" );
  440. return;
  441. }
  442. this.dgvDataPrinterSet.CurrentRow.Cells["默认打印机名称"].Value = model.PrintSet_PrintPath;
  443. }
  444. }
  445. else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "打印标题" )
  446. {
  447. if ( this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value.ToString().Trim() == "不可设置" )
  448. {
  449. return;
  450. }
  451. LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetTextSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetTextSuperSmallForm();
  452. frm.Text = "打印标题";
  453. frm.IsValueNull = true;
  454. frm.StrValue = this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value.ToString().Trim();
  455. frm.ShowDialog();
  456. if ( frm.IsOK )
  457. {
  458. if ( frm.StrValue.Trim().Length > 40 )
  459. {
  460. MessageBoxCustom.Show( "标题名称长度不能超过40字符!" );
  461. return;
  462. }
  463. if ( frm.StrValue.Trim() == "不可设置" )
  464. {
  465. MessageBoxCustom.Show( "打印标题不能设置为‘不可设置’,与系统使用名词冲突!" );
  466. return;
  467. }
  468. LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) );
  469. model.PrintSet_PrintSingleTitle = frm.StrValue;
  470. model.PrintSet_UpdateDateTime = StrTime;
  471. model.PrintSet_UpdateName = StrUserID;
  472. if ( !pstnbll.Update( model ) )
  473. {
  474. MessageBoxCustom.Show( "修改失败!" );
  475. return;
  476. }
  477. this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value = model.PrintSet_PrintSingleTitle;
  478. }
  479. }
  480. else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "是否默认" )
  481. {
  482. this.panelfrmShow.Location = new Point( ( this.Width / 2 ), ( this.Height / 2 - this.panelfrmShow.Height ) );
  483. if ( this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value.ToString().Trim() == "默认" )
  484. {
  485. this.chkfrmYes.Checked = true;
  486. }
  487. else
  488. {
  489. this.chkfrmNo.Checked = true;
  490. }
  491. this.panelfrmShow.Visible = true;
  492. }
  493. this.IsSaveed = true;
  494. }
  495. }
  496. }
  497. /// <summary>
  498. /// 第一个选项卡的列表右键菜单
  499. /// </summary>
  500. /// <param name="sender"></param>
  501. /// <param name="e"></param>
  502. void dgvDataPrinterSet_CellMouseDown( object sender, DataGridViewCellMouseEventArgs e )
  503. {
  504. if ( this.dgvDataPrinterSet.Rows.Count > 0 )
  505. {
  506. if ( e.ColumnIndex >= 0 && e.RowIndex >= 0 )
  507. {
  508. if ( e.Button == MouseButtons.Right )
  509. {
  510. this.contextMenuStrip1.Items.Clear();
  511. this.contextMenuStrip1.Show( MousePosition.X, MousePosition.Y );
  512. ToolStripMenuItem item = null;
  513. if ( this.dgvDataPrinterSet.SelectedRows.Count > 1 )
  514. {
  515. if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "默认打印机名称" )
  516. {
  517. item = new ToolStripMenuItem();
  518. item.Text = "清空打印机";
  519. item.Tag = "StrClearPrinter";
  520. contextMenuStrip1.Items.Add( item );
  521. item = new ToolStripMenuItem();
  522. item.Text = "设置打印机";
  523. item.Tag = "StrPrinter";
  524. contextMenuStrip1.Items.Add( item );
  525. }
  526. else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "打印标题" )
  527. {
  528. int forICount = 0;
  529. for ( int i = 0; i < this.dgvDataPrinterSet.SelectedRows.Count; i++ )
  530. {
  531. if ( this.dgvDataPrinterSet.SelectedRows[i].Cells["打印标题"].Value.ToString().Trim() == "不可设置" )
  532. {
  533. forICount++;
  534. }
  535. }
  536. if ( forICount < this.dgvDataPrinterSet.SelectedRows.Count )
  537. {
  538. item = new ToolStripMenuItem();
  539. item.Text = "重置打印标题";
  540. item.Tag = "StrResetTitle";
  541. contextMenuStrip1.Items.Add( item );
  542. }
  543. }
  544. }
  545. else if ( this.dgvDataPrinterSet.SelectedRows.Count == 1 )
  546. {
  547. if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "风格名称" )
  548. {
  549. item = new ToolStripMenuItem();
  550. item.Text = "修改风格名称";
  551. item.Tag = "StrUpdateStyleName";
  552. contextMenuStrip1.Items.Add( item );
  553. }
  554. else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "默认打印机名称" )
  555. {
  556. item = new ToolStripMenuItem();
  557. item.Text = "清空值";
  558. item.Tag = "StrClearPrinter";
  559. contextMenuStrip1.Items.Add( item );
  560. item = new ToolStripMenuItem();
  561. item.Text = "设置打印机";
  562. item.Tag = "StrPrinter";
  563. contextMenuStrip1.Items.Add( item );
  564. }
  565. else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "打印标题" )
  566. {
  567. if ( this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value.ToString().Trim() == "不可设置" )
  568. {
  569. return;
  570. }
  571. item = new ToolStripMenuItem();
  572. item.Text = "重置打印标题";
  573. item.Tag = "StrResetTitle";
  574. contextMenuStrip1.Items.Add( item );
  575. }
  576. else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "是否默认" || this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "纸张类型" )
  577. {
  578. if ( this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value == null )
  579. {
  580. item = new ToolStripMenuItem();
  581. item.Text = "取消默认";
  582. item.Tag = "StrCancelDefault";
  583. contextMenuStrip1.Items.Add( item );
  584. item = new ToolStripMenuItem();
  585. item.Text = "设为默认";
  586. item.Tag = "StrSetDefault";
  587. contextMenuStrip1.Items.Add( item );
  588. }
  589. else if ( this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value.ToString().Trim() == "默认" )
  590. {
  591. item = new ToolStripMenuItem();
  592. item.Text = "取消默认";
  593. item.Tag = "StrCancelDefault";
  594. contextMenuStrip1.Items.Add( item );
  595. }
  596. else
  597. {
  598. item = new ToolStripMenuItem();
  599. item.Text = "设为默认";
  600. item.Tag = "StrSetDefault";
  601. contextMenuStrip1.Items.Add( item );
  602. }
  603. }
  604. }
  605. }
  606. }
  607. }
  608. }
  609. /// <summary>
  610. /// 打印机设置列表绑定
  611. /// </summary>
  612. /// <param name="sender"></param>
  613. /// <param name="e"></param>
  614. void dgvDataPrinterSet_RowsAdded( object sender, DataGridViewRowsAddedEventArgs e )
  615. {
  616. if ( this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value != null && this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value.ToString().Trim() != "" )
  617. {
  618. this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value = Enum.GetName( typeof( LYFZ.EnumPublic.PrinterPaperType ), Convert.ToInt32( this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value ) );
  619. }
  620. else
  621. {
  622. this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value = "";
  623. }
  624. if ( this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["打印名称"].Value != null )
  625. {
  626. switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["打印名称"].Value.ToString() ) )
  627. {
  628. case EnumPublic.PrintTypeEnum.订单预约单:
  629. case EnumPublic.PrintTypeEnum.财务报表年:
  630. case EnumPublic.PrintTypeEnum.财务报表日:
  631. case EnumPublic.PrintTypeEnum.财务报表月:
  632. case EnumPublic.PrintTypeEnum.选片缩略图:
  633. case EnumPublic.PrintTypeEnum.制作单明细:
  634. this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["打印标题"].Value = "不可设置";
  635. this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["打印标题"].Style.ForeColor = Color.Silver;
  636. break;
  637. }
  638. }
  639. }
  640. /// <summary>
  641. /// 右键菜单选择事件
  642. /// </summary>
  643. /// <param name="sender"></param>
  644. /// <param name="e"></param>
  645. void contextMenuStrip1_ItemClicked( object sender, ToolStripItemClickedEventArgs e )
  646. {
  647. ToolStripItem item = e.ClickedItem;
  648. List<LYFZ.Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
  649. LYFZ.Model.Model_ErpPrinterSetNow model = null;
  650. DateTime StrTime = SDateTime.Now;
  651. if ( item.Tag.ToString().Trim() == "StrUpdateStyleName" )
  652. {
  653. string StrStyleName = "";
  654. LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetTextSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetTextSuperSmallForm();
  655. frm.Text = "风格名称";
  656. frm.StrValue = this.dgvDataPrinterSet.CurrentRow.Cells["风格名称"].Value.ToString().Trim();
  657. frm.ShowDialog();
  658. if ( frm.IsOK )
  659. {
  660. StrStyleName = frm.StrValue;
  661. }
  662. else
  663. {
  664. return;
  665. }
  666. if ( StrStyleName.Trim().Length > 40 )
  667. {
  668. MessageBoxCustom.Show( "标题名称长度不能超过40字符!" );
  669. return;
  670. }
  671. LYFZ.Model.Model_ErpPrinterTemplateSet modelPt = ptstbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["PTID"].Value ) );
  672. modelPt.TptSet_TemplateAliases = StrStyleName;
  673. modelPt.TptSet_UpdateDateTime = StrTime;
  674. modelPt.TptSet_UpdateName = StrUserID;
  675. clist.Add( ptstbll.GetUpdateCommandInfo( modelPt ) );
  676. }
  677. else if ( item.Tag.ToString().Trim() == "StrClearPrinter" )
  678. {
  679. for ( int i = 0; i < this.dgvDataPrinterSet.SelectedRows.Count; i++ )
  680. {
  681. for ( int j = 0; j < mlist.Count; j++ )
  682. {
  683. if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.SelectedRows[i].Cells["ID"].Value ) )
  684. {
  685. model = mlist[j];
  686. break;
  687. }
  688. }
  689. if ( model != null )
  690. {
  691. model.PrintSet_PrintPathName = "";
  692. model.PrintSet_PrintPath = "";
  693. model.PrintSet_UpdateDateTime = StrTime;
  694. model.PrintSet_UpdateName = StrUserID;
  695. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  696. }
  697. }
  698. }
  699. else if ( item.Tag.ToString().Trim() == "StrPrinter" )
  700. {
  701. string StrName = "";
  702. string StrPath = "";
  703. this.contextMenuStrip1.Visible = false;
  704. PrintDialog dlg = new PrintDialog();
  705. if ( dlg.ShowDialog() == DialogResult.OK )
  706. {
  707. StrPath = dlg.PrinterSettings.PrinterName;
  708. StrName = System.IO.Path.GetFileName( StrPath );
  709. }
  710. else
  711. {
  712. return;
  713. }
  714. for ( int i = 0; i < this.dgvDataPrinterSet.SelectedRows.Count; i++ )
  715. {
  716. for ( int j = 0; j < mlist.Count; j++ )
  717. {
  718. if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.SelectedRows[i].Cells["ID"].Value ) )
  719. {
  720. model = mlist[j];
  721. break;
  722. }
  723. }
  724. if ( model != null )
  725. {
  726. model.PrintSet_PrintPathName = StrName;
  727. model.PrintSet_PrintPath = StrPath;
  728. model.PrintSet_UpdateDateTime = StrTime;
  729. model.PrintSet_UpdateName = StrUserID;
  730. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  731. }
  732. }
  733. }
  734. else if ( item.Tag.ToString().Trim() == "StrResetTitle" )
  735. {
  736. string StrTitle = "";
  737. this.contextMenuStrip1.Visible = false;
  738. LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetTextSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetTextSuperSmallForm();
  739. frm.Text = "打印标题";
  740. frm.StrValue = this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value.ToString().Trim();
  741. frm.IsValueNull = true;
  742. frm.ShowDialog();
  743. if ( frm.IsOK )
  744. {
  745. StrTitle = frm.StrValue;
  746. }
  747. else
  748. {
  749. return;
  750. }
  751. if ( StrTitle.Trim().Length > 40 )
  752. {
  753. MessageBoxCustom.Show( "标题名称长度不能超过40字符!" );
  754. return;
  755. }
  756. if ( frm.StrValue.Trim() == "不可设置" )
  757. {
  758. MessageBoxCustom.Show( "打印标题不能设置为‘不可设置’,与系统使用名词冲突!" );
  759. return;
  760. }
  761. for ( int i = 0; i < this.dgvDataPrinterSet.SelectedRows.Count; i++ )
  762. {
  763. if ( this.dgvDataPrinterSet.SelectedRows[i].Cells["打印标题"].Value.ToString().Trim() != "不可设置" )
  764. {
  765. for ( int j = 0; j < mlist.Count; j++ )
  766. {
  767. if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.SelectedRows[i].Cells["ID"].Value ) )
  768. {
  769. model = mlist[j];
  770. break;
  771. }
  772. }
  773. if ( model != null )
  774. {
  775. model.PrintSet_PrintSingleTitle = StrTitle;
  776. model.PrintSet_UpdateDateTime = StrTime;
  777. model.PrintSet_UpdateName = StrUserID;
  778. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  779. }
  780. }
  781. }
  782. }
  783. else if ( item.Tag.ToString().Trim() == "StrCancelDefault" )
  784. {
  785. for ( int j = 0; j < mlist.Count; j++ )
  786. {
  787. if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) )
  788. {
  789. model = pstnbll.GetModel( mlist[j].ID );
  790. break;
  791. }
  792. }
  793. if ( model != null )
  794. {
  795. model.PrintSet_PrintDefault = 0;
  796. model.PrintSet_UpdateDateTime = StrTime;
  797. model.PrintSet_UpdateName = StrUserID;
  798. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  799. }
  800. }
  801. else if ( item.Tag.ToString().Trim() == "StrSetDefault" )
  802. {
  803. for ( int j = 0; j < mlist.Count; j++ )
  804. {
  805. if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) )
  806. {
  807. model = pstnbll.GetModel( mlist[j].ID );
  808. break;
  809. }
  810. }
  811. if ( model != null )
  812. {
  813. model.PrintSet_PrintDefault = 1;
  814. model.PrintSet_UpdateDateTime = StrTime;
  815. model.PrintSet_UpdateName = StrUserID;
  816. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  817. model = null;
  818. for ( int k = 0; k < mlist.Count; k++ )
  819. {
  820. if ( mlist[k].ID != Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) && mlist[k].PrintSet_TemplateParentNumber == Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["TptSet_TemplateParentNumber"].Value ) )
  821. {
  822. model = mlist[k];
  823. break;
  824. }
  825. }
  826. if ( model != null )
  827. {
  828. model = pstnbll.GetModel( model.ID );
  829. model.PrintSet_PrintDefault = 0;
  830. model.PrintSet_UpdateDateTime = StrTime;
  831. model.PrintSet_UpdateName = StrUserID;
  832. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  833. }
  834. }
  835. }
  836. if ( clist.Count > 0 )
  837. {
  838. if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
  839. {
  840. MessageBoxCustom.Show( "设置失败" );
  841. return;
  842. }
  843. this.IsSaveed = true;
  844. this.TabPage1Bind();
  845. }
  846. }
  847. /// <summary>
  848. /// 选择是
  849. /// </summary>
  850. /// <param name="sender"></param>
  851. /// <param name="e"></param>
  852. void chkfrmYes_CheckedChanged( object sender, EventArgs e )
  853. {
  854. if ( this.chkfrmYes.Checked )
  855. {
  856. this.chkfrmNo.Checked = false;
  857. }
  858. else
  859. {
  860. this.chkfrmNo.Checked = true;
  861. }
  862. }
  863. /// <summary>
  864. /// 选择否
  865. /// </summary>
  866. /// <param name="sender"></param>
  867. /// <param name="e"></param>
  868. void chkfrmNo_CheckedChanged( object sender, EventArgs e )
  869. {
  870. if ( this.chkfrmNo.Checked )
  871. {
  872. this.chkfrmYes.Checked = false;
  873. }
  874. else
  875. {
  876. this.chkfrmYes.Checked = true;
  877. }
  878. }
  879. /// <summary>
  880. /// 是否默认确定
  881. /// </summary>
  882. /// <param name="sender"></param>
  883. /// <param name="e"></param>
  884. void btnfrmOK_Click( object sender, EventArgs e )
  885. {
  886. DateTime StrTime = SDateTime.Now;
  887. List<LYFZ.Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
  888. LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) );
  889. if ( this.chkfrmYes.Checked )
  890. {
  891. model.PrintSet_PrintDefault = 1;
  892. }
  893. else
  894. {
  895. model.PrintSet_PrintDefault = 0;
  896. }
  897. model.PrintSet_UpdateDateTime = StrTime;
  898. model.PrintSet_UpdateName = StrUserID;
  899. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  900. model = null;
  901. for ( int k = 0; k < mlist.Count; k++ )
  902. {
  903. if ( mlist[k].ID != Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) && mlist[k].PrintSet_TemplateParentNumber == Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["TptSet_TemplateParentNumber"].Value ) )
  904. {
  905. model = mlist[k];
  906. break;
  907. }
  908. }
  909. if ( model != null )
  910. {
  911. if ( this.chkfrmYes.Checked )
  912. {
  913. model.PrintSet_PrintDefault = 0;
  914. }
  915. else
  916. {
  917. model.PrintSet_PrintDefault = 1;
  918. }
  919. model.PrintSet_UpdateDateTime = StrTime;
  920. model.PrintSet_UpdateName = StrUserID;
  921. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  922. }
  923. if ( clist.Count > 0 )
  924. {
  925. if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
  926. {
  927. MessageBoxCustom.Show( "设置失败!" );
  928. return;
  929. }
  930. this.panelfrmShow.Visible = false;
  931. //this.TabPage1Bind();
  932. for ( int i = 0; i < this.dgvDataPrinterSet.Rows.Count; i++ )
  933. {
  934. if ( this.dgvDataPrinterSet.Rows[i].Cells["TptSet_TemplateParentNumber"].Value.ToString().Trim() == this.dgvDataPrinterSet.CurrentRow.Cells["TptSet_TemplateParentNumber"].Value.ToString().Trim() )
  935. {
  936. if ( this.dgvDataPrinterSet.Rows[i].Cells["ID"].Value.ToString().Trim() == this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value.ToString().Trim() )
  937. {
  938. if ( this.chkfrmYes.Checked )
  939. {
  940. this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value = "默认";
  941. }
  942. else
  943. {
  944. this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value = "";
  945. }
  946. }
  947. else
  948. {
  949. if ( this.chkfrmYes.Checked )
  950. {
  951. this.dgvDataPrinterSet.Rows[i].Cells["是否默认"].Value = "";
  952. }
  953. else
  954. {
  955. this.dgvDataPrinterSet.Rows[i].Cells["是否默认"].Value = "默认";
  956. }
  957. }
  958. }
  959. }
  960. }
  961. }
  962. /// <summary>
  963. /// 取消关闭层
  964. /// </summary>
  965. /// <param name="sender"></param>
  966. /// <param name="e"></param>
  967. void btnfrmCancel_Click( object sender, EventArgs e )
  968. {
  969. this.panelfrmShow.Visible = false;
  970. }
  971. /// <summary>
  972. /// 关闭层
  973. /// </summary>
  974. /// <param name="sender"></param>
  975. /// <param name="e"></param>
  976. void btnfrmColse_Click( object sender, EventArgs e )
  977. {
  978. this.panelfrmShow.Visible = false;
  979. }
  980. private Point f1;
  981. private Point f2;
  982. /// <summary>
  983. /// 鼠标MouseDown的事件
  984. /// </summary>
  985. /// <param name="sender"></param>
  986. /// <param name="e"></param>
  987. void panelEx6_MouseDown( object sender, MouseEventArgs e )
  988. {
  989. f1 = e.Location;
  990. f2 = this.panelfrmShow.Location;
  991. }
  992. /// <summary>
  993. /// 鼠标MouseMove的事件
  994. /// </summary>
  995. /// <param name="sender"></param>
  996. /// <param name="e"></param>
  997. void panelEx6_MouseMove( object sender, MouseEventArgs e )
  998. {
  999. if ( e.Button == MouseButtons.Left )
  1000. {
  1001. this.panelfrmShow.Left = f2.X + e.X - f1.X;
  1002. this.panelfrmShow.Top = f2.Y + e.Y - f1.Y;
  1003. }
  1004. }
  1005. #endregion
  1006. #region 其他设置
  1007. /// <summary>
  1008. /// 其他设置_树双击选择
  1009. /// </summary>
  1010. /// <param name="sender"></param>
  1011. /// <param name="e"></param>
  1012. void treevModelSet_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
  1013. {
  1014. this.GetColor();
  1015. e.Node.ForeColor = Color.Red;
  1016. if ( this.treevModelSet.Nodes.Count > 0 )
  1017. {
  1018. if ( e.Node.Level == 0 && e.Node.Nodes.Count <= 0 )
  1019. {
  1020. return;
  1021. }
  1022. LYFZ.EnumPublic.PrintTypeEnum nodePrint = (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), e.Node.Tag.ToString() );
  1023. LYFZ.Model.Model_ErpPrinterSetNow model = null;
  1024. if ( !string.IsNullOrEmpty( e.Node.Name.Trim() ) )
  1025. {
  1026. this.btnSaveed.Tag = "ID = '" + Convert.ToInt32( e.Node.Name ) + "'";
  1027. model = pstnbll.GetModel( Convert.ToInt32( e.Node.Name ) );
  1028. }
  1029. else
  1030. {
  1031. this.btnSaveed.Tag = "PrintSet_TemplateParentNumber = '" + Convert.ToInt32( e.Node.Tag ) + "' and PrintSet_DividedShopNumber='" + LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID() + "'";
  1032. }
  1033. this.PanelHide();
  1034. switch ( nodePrint )
  1035. {
  1036. case LYFZ.EnumPublic.PrintTypeEnum.订单预约单:
  1037. #region
  1038. #region LOG图片串
  1039. this.tbPage1.Parent = null;
  1040. this.tbPage2.Parent = null;
  1041. this.tbPage3.Parent = null;
  1042. this.tbPage4.Parent = null;
  1043. this.tbPage5.Parent = null;
  1044. switch ( LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType() )
  1045. {
  1046. case EnumPermissions.BusinessType.婚纱版:
  1047. this.tbPage1.Parent = this.tabControl3;
  1048. this.tbPage4.Parent = this.tabControl3;
  1049. break;
  1050. case EnumPermissions.BusinessType.儿童版:
  1051. this.tbPage2.Parent = this.tabControl3;
  1052. break;
  1053. case EnumPermissions.BusinessType.旗舰版:
  1054. this.tbPage1.Parent = this.tabControl3;
  1055. this.tbPage2.Parent = this.tabControl3;
  1056. this.tbPage4.Parent = this.tabControl3;
  1057. break;
  1058. }
  1059. if ( LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.IsEnablePhotoEdition )
  1060. {
  1061. this.tbPage3.Parent = this.tabControl3;
  1062. }
  1063. this.tbPage5.Parent = this.tabControl3;
  1064. this.pictOrderWeddingLOG.Image = null;
  1065. this.pictOrderChildLOG.Image = null;
  1066. this.pictOrderPortraitLOG.Image = null;
  1067. this.pictOrderWeddingCeremonyLOG.Image = null;
  1068. this.pictOrderServiceLOG.Image = null;
  1069. if ( model != null )
  1070. {
  1071. string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  1072. for ( int i = 0; i < strArray.Length; i++ )
  1073. {
  1074. if ( strArray[i].Trim() != "" )
  1075. {
  1076. string[] strArrayKey = strArray[i].Trim().Split( '‖' );
  1077. if ( strArrayKey[1].Trim() != "" )
  1078. {
  1079. switch ( strArrayKey[0].Trim() )
  1080. {
  1081. case "预约婚纱单LOG":
  1082. if ( tbPage1 != null )
  1083. {
  1084. this.pictOrderWeddingLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
  1085. }
  1086. break;
  1087. case "预约儿童单LOG":
  1088. if ( tbPage1 != null )
  1089. {
  1090. this.pictOrderChildLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
  1091. }
  1092. break;
  1093. case "预约写真单LOG":
  1094. if ( tbPage1 != null )
  1095. {
  1096. this.pictOrderPortraitLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
  1097. }
  1098. break;
  1099. case "预约婚庆单LOG":
  1100. if ( tbPage1 != null )
  1101. {
  1102. this.pictOrderWeddingCeremonyLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
  1103. }
  1104. break;
  1105. case "预约服务单LOG":
  1106. if ( tbPage1 != null )
  1107. {
  1108. this.pictOrderServiceLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
  1109. }
  1110. break;
  1111. }
  1112. }
  1113. }
  1114. }
  1115. }
  1116. #endregion
  1117. #region 标题串
  1118. this.txtWeddingTitle.Text = "";
  1119. this.txtChildTitle.Text = "";
  1120. this.txtPortraitTitle.Text = "";
  1121. this.txtWeddingCeremonyTitle.Text = "";
  1122. this.txtServiceTitle.Text = "";
  1123. if ( model != null )
  1124. {
  1125. if ( !string.IsNullOrEmpty( model.PrintSet_PrintSingleTitle ) )
  1126. {
  1127. string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  1128. for ( int i = 0; i < strArray.Length; i++ )
  1129. {
  1130. string[] strArrayKey = strArray[i].Trim().Split( '‖' );
  1131. switch ( strArrayKey[0].Trim() )
  1132. {
  1133. case "预约婚纱单标题":
  1134. this.txtWeddingTitle.Text = strArrayKey[1].Trim();
  1135. break;
  1136. case "预约儿童单标题":
  1137. this.txtChildTitle.Text = strArrayKey[1].Trim();
  1138. break;
  1139. case "预约写真单标题":
  1140. this.txtPortraitTitle.Text = strArrayKey[1].Trim();
  1141. break;
  1142. case "预约婚庆单标题":
  1143. this.txtWeddingCeremonyTitle.Text = strArrayKey[1].Trim();
  1144. break;
  1145. case "预约服务单标题":
  1146. this.txtServiceTitle.Text = strArrayKey[1].Trim();
  1147. break;
  1148. }
  1149. }
  1150. }
  1151. }
  1152. #endregion
  1153. #region 其他Json串
  1154. this.cmbtreevContentDetailWedding.SetTextAndTag_ValueNull();
  1155. this.cmbtreevNoteMattersWedding.SetTextAndTag_ValueNull();
  1156. this.txtOrderNoteMatterWedding.Text = "";
  1157. this.cmbtreevContentDetailChild.SetTextAndTag_ValueNull();
  1158. this.cmbtreevNoteMattersChild.SetTextAndTag_ValueNull();
  1159. this.txtOrderNoteMatterChild.Text = "";
  1160. this.cmbtreevContentDetailPortrait.SetTextAndTag_ValueNull();
  1161. this.cmbtreevNoteMattersPortrait.SetTextAndTag_ValueNull();
  1162. this.txtOrderNoteMatterPortrait.Text = "";
  1163. this.cmbtreevContentDetailWeddingCeremony.SetTextAndTag_ValueNull();
  1164. this.cmbtreevNoteMattersWeddingCeremony.SetTextAndTag_ValueNull();
  1165. this.txtOrderNoteMatterWeddingCeremony.Text = "";
  1166. this.cmbtreevContentDetailService.SetTextAndTag_ValueNull();
  1167. this.cmbtreevNoteMattersService.SetTextAndTag_ValueNull();
  1168. this.txtOrderNoteMattersService.Text = "";
  1169. if ( model != null )
  1170. {
  1171. if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
  1172. {
  1173. string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  1174. for ( int i = 0; i < strArray.Length; i++ )
  1175. {
  1176. string[] strArrayKey = strArray[i].Trim().Split( '‖' );
  1177. switch ( strArrayKey[0].Trim() )
  1178. {
  1179. case "预约单内容详情字体大小":
  1180. if ( tbPage1 != null )
  1181. {
  1182. this.cmbtreevContentDetailWedding.TextFindTag( strArrayKey[1].Trim() );
  1183. }
  1184. else
  1185. {
  1186. this.cmbtreevContentDetailChild.TextFindTag( strArrayKey[1].Trim() );
  1187. }
  1188. break;
  1189. case "预约单注意事项字体大小":
  1190. if ( tbPage1 != null )
  1191. {
  1192. this.cmbtreevNoteMattersWedding.TextFindTag( strArrayKey[1].Trim() );
  1193. }
  1194. else
  1195. {
  1196. this.cmbtreevNoteMattersChild.TextFindTag( strArrayKey[1].Trim() );
  1197. }
  1198. break;
  1199. case "预约单注意事项说明":
  1200. if ( tbPage1 != null )
  1201. {
  1202. this.txtOrderNoteMatterWedding.Text = strArrayKey[1].Trim();
  1203. }
  1204. else
  1205. {
  1206. this.txtOrderNoteMatterChild.Text = strArrayKey[1].Trim();
  1207. }
  1208. break;
  1209. case "婚纱预约单内容详情字体大小":
  1210. this.cmbtreevContentDetailWedding.TextFindTag( strArrayKey[1].Trim() );
  1211. break;
  1212. case "婚纱预约单注意事项字体大小":
  1213. this.cmbtreevNoteMattersWedding.TextFindTag( strArrayKey[1].Trim() );
  1214. break;
  1215. case "婚纱预约单注意事项说明":
  1216. this.txtOrderNoteMatterWedding.Text = strArrayKey[1].Trim();
  1217. break;
  1218. case "儿童预约单内容详情字体大小":
  1219. this.cmbtreevContentDetailChild.TextFindTag( strArrayKey[1].Trim() );
  1220. break;
  1221. case "儿童预约单注意事项字体大小":
  1222. this.cmbtreevNoteMattersChild.TextFindTag( strArrayKey[1].Trim() );
  1223. break;
  1224. case "儿童预约单注意事项说明":
  1225. this.txtOrderNoteMatterChild.Text = strArrayKey[1].Trim();
  1226. break;
  1227. case "写真预约单内容详情字体大小":
  1228. this.cmbtreevContentDetailPortrait.TextFindTag( strArrayKey[1].Trim() );
  1229. break;
  1230. case "写真预约单注意事项字体大小":
  1231. this.cmbtreevNoteMattersPortrait.TextFindTag( strArrayKey[1].Trim() );
  1232. break;
  1233. case "写真预约单注意事项说明":
  1234. this.txtOrderNoteMatterPortrait.Text = strArrayKey[1].Trim();
  1235. break;
  1236. case "婚庆预约单内容详情字体大小":
  1237. this.cmbtreevContentDetailWeddingCeremony.TextFindTag( strArrayKey[1].Trim() );
  1238. break;
  1239. case "婚庆预约单注意事项字体大小":
  1240. this.cmbtreevNoteMattersWeddingCeremony.TextFindTag( strArrayKey[1].Trim() );
  1241. break;
  1242. case "婚庆预约单注意事项说明":
  1243. this.txtOrderNoteMatterWeddingCeremony.Text = strArrayKey[1].Trim();
  1244. break;
  1245. case "服务预约单内容详情字体大小":
  1246. this.cmbtreevContentDetailService.TextFindTag( strArrayKey[1].Trim() );
  1247. break;
  1248. case "服务预约单注意事项字体大小":
  1249. this.cmbtreevNoteMattersService.TextFindTag( strArrayKey[1].Trim() );
  1250. break;
  1251. case "服务预约单注意事项说明":
  1252. this.txtOrderNoteMattersService.Text = strArrayKey[1].Trim();
  1253. break;
  1254. }
  1255. }
  1256. }
  1257. }
  1258. #endregion
  1259. if ( this.tabControl3.TabPages.Count > 0 )
  1260. {
  1261. this.tabControl3.Visible = true;
  1262. }
  1263. this.panelReservationSingle.Visible = true;
  1264. #endregion
  1265. break;
  1266. case EnumPublic.PrintTypeEnum.制作单明细:
  1267. #region
  1268. if ( model != null )
  1269. {
  1270. if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
  1271. {
  1272. if ( model.PrintSet_PrintOtherDataJson.Trim().Trim().IndexOf( "制作单说明" ) == -1 )
  1273. {
  1274. this.txtMakingExplain.Text = "";
  1275. }
  1276. else
  1277. {
  1278. string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  1279. for ( int i = 0; i < strArray.Length; i++ )
  1280. {
  1281. if ( strArray[i].Trim() != "" )
  1282. {
  1283. if ( strArray[i].Trim().Split( '‖' )[0].Trim() == "制作单说明" )
  1284. {
  1285. this.txtMakingExplain.Text = strArray[i].Trim().Split( '‖' )[1].Trim();
  1286. }
  1287. }
  1288. }
  1289. }
  1290. }
  1291. else
  1292. {
  1293. this.txtMakingExplain.Text = "";
  1294. }
  1295. }
  1296. else
  1297. {
  1298. this.txtMakingExplain.Text = "";
  1299. }
  1300. this.panelMakingExplain.Visible = true;
  1301. #endregion
  1302. break;
  1303. case EnumPublic.PrintTypeEnum.礼服出售清单:
  1304. case EnumPublic.PrintTypeEnum.礼服出租清单:
  1305. #region
  1306. if ( model != null )
  1307. {
  1308. if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
  1309. {
  1310. if ( model.PrintSet_PrintOtherDataJson.Trim().Trim().IndexOf( "礼服单说明" ) == -1 )
  1311. {
  1312. this.txtDressExplain.Text = "";
  1313. }
  1314. else
  1315. {
  1316. string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  1317. for ( int i = 0; i < strArray.Length; i++ )
  1318. {
  1319. if ( strArray[i].Trim() != "" )
  1320. {
  1321. if ( strArray[i].Trim().Split( '‖' )[0].Trim() == "礼服单说明" )
  1322. {
  1323. this.txtDressExplain.Text = strArray[i].Trim().Split( '‖' )[1].Trim();
  1324. }
  1325. }
  1326. }
  1327. }
  1328. }
  1329. else
  1330. {
  1331. this.txtDressExplain.Text = "";
  1332. }
  1333. }
  1334. else
  1335. {
  1336. this.txtDressExplain.Text = "";
  1337. }
  1338. this.panelDress.Visible = true;
  1339. #endregion
  1340. break;
  1341. case EnumPublic.PrintTypeEnum.订单收款:
  1342. case EnumPublic.PrintTypeEnum.会员充值收款:
  1343. case EnumPublic.PrintTypeEnum.会员服务收款:
  1344. case EnumPublic.PrintTypeEnum.会员服务消费:
  1345. case EnumPublic.PrintTypeEnum.礼服出售收款:
  1346. case EnumPublic.PrintTypeEnum.礼服出租收款:
  1347. case EnumPublic.PrintTypeEnum.礼服出租退押金:
  1348. case EnumPublic.PrintTypeEnum.其它收入:
  1349. case EnumPublic.PrintTypeEnum.其它消费收款:
  1350. case EnumPublic.PrintTypeEnum.现金支出:
  1351. case EnumPublic.PrintTypeEnum.新摄会返还款:
  1352. case EnumPublic.PrintTypeEnum.新摄会收款:
  1353. #region
  1354. bool IsFindReservationPayment = false;
  1355. if ( model != null )
  1356. {
  1357. if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
  1358. {
  1359. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "收款单说明" ) == -1 )
  1360. {
  1361. this.txtPaymentExplain.Text = "";
  1362. }
  1363. else
  1364. {
  1365. string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  1366. for ( int i = 0; i < strArray.Length; i++ )
  1367. {
  1368. if ( strArray[i].Trim() != "" )
  1369. {
  1370. if ( strArray[i].Trim().Split( '‖' )[0].Trim() == "收款单说明" )
  1371. {
  1372. this.txtPaymentExplain.Text = strArray[i].Trim().Split( '‖' )[1].Trim();
  1373. }
  1374. if ( strArray[i].Trim().Split( '‖' )[0].Trim() == "预约收款显示名称" )
  1375. {
  1376. this.txtReservationPayment.Text = strArray[i].Trim().Split( '‖' )[1].Trim();
  1377. IsFindReservationPayment = true;
  1378. }
  1379. }
  1380. }
  1381. }
  1382. }
  1383. else
  1384. {
  1385. this.txtPaymentExplain.Text = "";
  1386. }
  1387. }
  1388. else
  1389. {
  1390. this.txtPaymentExplain.Text = "";
  1391. }
  1392. if ( e.Node.Text.Trim() == "订单收款_风格针式" )
  1393. {
  1394. this.panelReservationPayment.Visible = true;
  1395. }
  1396. else
  1397. {
  1398. this.panelReservationPayment.Visible = false;
  1399. }
  1400. if ( !IsFindReservationPayment )
  1401. {
  1402. this.txtReservationPayment.Text = "预约收款";
  1403. }
  1404. this.panelPaymentExplain.Visible = true;
  1405. #endregion
  1406. break;
  1407. }
  1408. this.lblCurrentSelectedStyle.Text = "当前选中风格:" + e.Node.Text.Trim();
  1409. this.panelSaveed.Visible = true;
  1410. }
  1411. }
  1412. void GetColor()
  1413. {
  1414. foreach ( TreeNode node in this.treevModelSet.Nodes )
  1415. {
  1416. node.ForeColor = Color.Black;
  1417. if ( node.Nodes.Count > 0 )
  1418. {
  1419. NodeClearBackColor( node );
  1420. }
  1421. }
  1422. }
  1423. /// <summary>
  1424. /// 清除节点下的所有节点的背景颜色
  1425. /// </summary>
  1426. /// <param name="node"></param>
  1427. void NodeClearBackColor( TreeNode node )
  1428. {
  1429. foreach ( TreeNode nde in node.Nodes )
  1430. {
  1431. nde.ForeColor = Color.Black;
  1432. if ( nde.Nodes.Count > 0 )
  1433. {
  1434. NodeClearBackColor( nde );
  1435. if ( nde.Nodes.Count > 0 )
  1436. {
  1437. NodeClearBackColor( nde );
  1438. }
  1439. }
  1440. }
  1441. }
  1442. /// <summary>
  1443. /// 移除重复信息,以解决因为数据库中有重复内容时无法正确修改内容(如写真预约单注意事项说明)
  1444. /// </summary>
  1445. /// <param name="strArray"></param>
  1446. /// <returns></returns>
  1447. string[] RemoveDuplicateContent( string[] strArray )
  1448. {
  1449. List<string> tempList0 = new List<string>();
  1450. List<string> tempList = new List<string>();
  1451. foreach ( string temp in strArray )
  1452. {
  1453. string[] StrArray2 = temp.Trim().Split( '‖' );
  1454. if ( !tempList0.Contains( StrArray2[0].Trim() ) )
  1455. {
  1456. tempList0.Add( StrArray2[0].Trim() );
  1457. tempList.Add( temp );
  1458. }
  1459. }
  1460. return tempList.ToArray();
  1461. }
  1462. /// <summary>
  1463. /// 其他设置_保存
  1464. /// </summary>
  1465. /// <param name="sender"></param>
  1466. /// <param name="e"></param>
  1467. void btnSaveed_Click( object sender, EventArgs e )
  1468. {
  1469. if ( this.btnSaveed.Tag == null )
  1470. {
  1471. MessageBoxCustom.Show( "请选择要操作的风格!" );
  1472. return;
  1473. }
  1474. List<LYFZ.Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
  1475. //List<LYFZ.Model.Model_ErpPrinterSetNow> mlist = pstnbll.GetModelList(this.btnSaveed.Tag.ToString());
  1476. DataTable dt = orbll.GetView_Custom( "tb_ErpPrinterSetNow", StrWhere: this.btnSaveed.Tag.ToString().Trim(), ShowColumnName: "ID,PrintSet_DividedShopNumber,PrintSet_TemplateName,PrintSet_PrintDefault,PrintSet_MachineType,PrintSet_TemplateParentNumber,PrintSet_PrintPathName,PrintSet_PrintPath,PrintSet_PrintSingleTitle,PrintSet_PrintSingleLOG,PrintSet_PrintOtherDataJson,PrintSet_CreateDatetime,PrintSet_CreateName,PrintSet_UpdateDateTime,PrintSet_UpdateName" ).Tables[0];
  1477. //for (int i = 0; i < dt.Rows.Count; i++)
  1478. //{
  1479. // LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.DataRowToModel(dt.Rows[i]);
  1480. // mlist.Add(model);
  1481. //}
  1482. LYFZ.Model.Model_ErpPrinterSetNow model = null;
  1483. for ( int l = 0; l < dt.Rows.Count; l++ )
  1484. {
  1485. //model = mlist[l];
  1486. model = pstnbll.DataRowToModel( dt.Rows[l] );
  1487. #region 预约单
  1488. #region 注意事项说明
  1489. if ( this.panelReservationSingle.Visible )
  1490. {
  1491. string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
  1492. #region 婚纱
  1493. if ( tbPage1 != null )
  1494. {
  1495. string StrText = this.txtOrderNoteMatterWedding.Text.Trim();
  1496. if ( StrText != "" )
  1497. {
  1498. if ( StrText.Length > 2000 )
  1499. {
  1500. MessageBoxCustom.Show( "婚纱预约单注意事项字数不得超过2000字(含符号),当前字数" + StrText.Length );
  1501. return;
  1502. }
  1503. if ( StrText.IndexOf( '‖' ) != -1 || StrText.IndexOf( '∥' ) != -1 )
  1504. {
  1505. MessageBoxCustom.Show( "婚纱预约单注意事项中不允许存在字符'‖'或'∥'" );
  1506. return;
  1507. }
  1508. }
  1509. bool isFind = false;
  1510. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1511. for ( int i = 0; i < strArray.Length; i++ )
  1512. {
  1513. if ( strArray[i].Trim() != "" )
  1514. {
  1515. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1516. switch ( StrArray2[0].Trim() )
  1517. {
  1518. case "预约单注意事项说明":
  1519. case "婚纱预约单注意事项说明":
  1520. if ( StrArray2[0].Trim() == "预约单注意事项说明" )
  1521. {
  1522. StrArray2[0] = "婚纱预约单注意事项说明";
  1523. }
  1524. StrArray2[1] = StrText;
  1525. strArray[i] = string.Join( "‖", StrArray2 );
  1526. StrNewJoin = string.Join( "∥", strArray );
  1527. isFind = true;
  1528. break;
  1529. }
  1530. }
  1531. }
  1532. if ( !isFind )
  1533. {
  1534. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1535. {
  1536. StrNewJoin += "∥";
  1537. }
  1538. StrNewJoin += "婚纱预约单注意事项说明‖" + StrText + "∥";
  1539. }
  1540. StrText = "9";
  1541. isFind = false;
  1542. strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1543. if ( this.cmbtreevContentDetailWedding.Text.Trim() != "" )
  1544. {
  1545. StrText = this.cmbtreevContentDetailWedding.Text.Trim();
  1546. }
  1547. for ( int i = 0; i < strArray.Length; i++ )
  1548. {
  1549. if ( strArray[i].Trim() != "" )
  1550. {
  1551. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1552. switch ( StrArray2[0].Trim() )
  1553. {
  1554. case "预约单内容详情字体大小":
  1555. case "婚纱预约单内容详情字体大小":
  1556. if ( StrArray2[0].Trim() == "预约单内容详情字体大小" )
  1557. {
  1558. StrArray2[0] = "婚纱预约单内容详情字体大小";
  1559. }
  1560. StrArray2[1] = StrText;
  1561. strArray[i] = string.Join( "‖", StrArray2 );
  1562. StrNewJoin = string.Join( "∥", strArray );
  1563. isFind = true;
  1564. break;
  1565. }
  1566. }
  1567. }
  1568. if ( !isFind )
  1569. {
  1570. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1571. {
  1572. StrNewJoin += "∥";
  1573. }
  1574. StrNewJoin += "婚纱预约单内容详情字体大小‖" + StrText + "∥";
  1575. }
  1576. StrText = "9";
  1577. isFind = false;
  1578. strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1579. if ( this.cmbtreevNoteMattersWedding.Text.Trim() != "" )
  1580. {
  1581. StrText = this.cmbtreevNoteMattersWedding.Text.Trim();
  1582. }
  1583. for ( int i = 0; i < strArray.Length; i++ )
  1584. {
  1585. if ( strArray[i].Trim() != "" )
  1586. {
  1587. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1588. switch ( StrArray2[0].Trim() )
  1589. {
  1590. case "预约单注意事项字体大小":
  1591. case "婚纱预约单注意事项字体大小":
  1592. if ( StrArray2[0].Trim() == "预约单注意事项字体大小" )
  1593. {
  1594. StrArray2[0] = "婚纱预约单注意事项字体大小";
  1595. }
  1596. StrArray2[1] = StrText;
  1597. strArray[i] = string.Join( "‖", StrArray2 );
  1598. StrNewJoin = string.Join( "∥", strArray );
  1599. isFind = true;
  1600. break;
  1601. }
  1602. }
  1603. }
  1604. if ( !isFind )
  1605. {
  1606. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1607. {
  1608. StrNewJoin += "∥";
  1609. }
  1610. StrNewJoin += "婚纱预约单注意事项字体大小‖" + StrText + "∥";
  1611. }
  1612. }
  1613. #endregion
  1614. #region 儿童
  1615. if ( tbPage2 != null )
  1616. {
  1617. string StrText = this.txtOrderNoteMatterChild.Text.Trim();
  1618. if ( StrText != "" )
  1619. {
  1620. if ( StrText.Length > 2000 )
  1621. {
  1622. MessageBoxCustom.Show( "儿童预约单注意事项字数不得超过2000字(含符号),当前字数" + StrText.Length );
  1623. return;
  1624. }
  1625. if ( StrText.IndexOf( '‖' ) != -1 || StrText.IndexOf( '∥' ) != -1 )
  1626. {
  1627. MessageBoxCustom.Show( "儿童预约单注意事项中不允许存在字符'‖'或'∥'" );
  1628. return;
  1629. }
  1630. }
  1631. bool isFind = false;
  1632. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1633. for ( int i = 0; i < strArray.Length; i++ )
  1634. {
  1635. if ( strArray[i].Trim() != "" )
  1636. {
  1637. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1638. switch ( StrArray2[0].Trim() )
  1639. {
  1640. case "预约单注意事项说明":
  1641. case "儿童预约单注意事项说明":
  1642. if ( StrArray2[0].Trim() == "预约单注意事项说明" )
  1643. {
  1644. StrArray2[0] = "儿童预约单注意事项说明";
  1645. }
  1646. StrArray2[1] = StrText;
  1647. strArray[i] = string.Join( "‖", StrArray2 );
  1648. StrNewJoin = string.Join( "∥", strArray );
  1649. isFind = true;
  1650. break;
  1651. }
  1652. }
  1653. }
  1654. if ( !isFind )
  1655. {
  1656. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1657. {
  1658. StrNewJoin += "∥";
  1659. }
  1660. StrNewJoin += "儿童预约单注意事项说明‖" + StrText + "∥";
  1661. }
  1662. isFind = false;
  1663. StrText = "9";
  1664. if ( this.cmbtreevContentDetailChild.Text.Trim() != "" )
  1665. {
  1666. StrText = this.cmbtreevContentDetailChild.Text.Trim();
  1667. }
  1668. strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1669. for ( int i = 0; i < strArray.Length; i++ )
  1670. {
  1671. if ( strArray[i].Trim() != "" )
  1672. {
  1673. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1674. switch ( StrArray2[0].Trim() )
  1675. {
  1676. case "预约单内容详情字体大小":
  1677. case "儿童预约单内容详情字体大小":
  1678. if ( StrArray2[0].Trim() == "预约单内容详情字体大小" )
  1679. {
  1680. StrArray2[0] = "儿童预约单内容详情字体大小";
  1681. }
  1682. StrArray2[1] = StrText;
  1683. strArray[i] = string.Join( "‖", StrArray2 );
  1684. StrNewJoin = string.Join( "∥", strArray );
  1685. isFind = true;
  1686. break;
  1687. }
  1688. }
  1689. }
  1690. if ( !isFind )
  1691. {
  1692. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1693. {
  1694. StrNewJoin += "∥";
  1695. }
  1696. StrNewJoin += "儿童预约单内容详情字体大小‖" + StrText + "∥";
  1697. }
  1698. isFind = false;
  1699. StrText = "9";
  1700. if ( this.cmbtreevNoteMattersChild.Text.Trim() != "" )
  1701. {
  1702. StrText = this.cmbtreevNoteMattersChild.Text.Trim();
  1703. }
  1704. strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1705. for ( int i = 0; i < strArray.Length; i++ )
  1706. {
  1707. if ( strArray[i].Trim() != "" )
  1708. {
  1709. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1710. switch ( StrArray2[0].Trim() )
  1711. {
  1712. case "预约单注意事项字体大小":
  1713. case "儿童预约单注意事项字体大小":
  1714. if ( StrArray2[0].Trim() == "预约单注意事项字体大小" )
  1715. {
  1716. StrArray2[0] = "儿童预约单注意事项字体大小";
  1717. }
  1718. StrArray2[1] = StrText;
  1719. strArray[i] = string.Join( "‖", StrArray2 );
  1720. StrNewJoin = string.Join( "∥", strArray );
  1721. isFind = true;
  1722. break;
  1723. }
  1724. }
  1725. }
  1726. if ( !isFind )
  1727. {
  1728. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1729. {
  1730. StrNewJoin += "∥";
  1731. }
  1732. StrNewJoin += "儿童预约单注意事项字体大小‖" + StrText + "∥";
  1733. }
  1734. }
  1735. #endregion
  1736. #region 写真
  1737. if ( tbPage3 != null )
  1738. {
  1739. if ( this.txtOrderNoteMatterPortrait.Text.Trim() != "" )
  1740. {
  1741. if ( this.txtOrderNoteMatterPortrait.Text.Trim().Length > 2000 )
  1742. {
  1743. MessageBoxCustom.Show( "写真预约单注意事项字数不得超过2000字(含符号),当前字数" + this.txtOrderNoteMatterPortrait.Text.Trim().Length );
  1744. return;
  1745. }
  1746. if ( this.txtOrderNoteMatterPortrait.Text.Trim().IndexOf( '‖' ) != -1 || this.txtOrderNoteMatterPortrait.Text.Trim().IndexOf( '∥' ) != -1 )
  1747. {
  1748. MessageBoxCustom.Show( "写真预约单注意事项中不允许存在字符'‖'或'∥'" );
  1749. return;
  1750. }
  1751. }
  1752. if ( StrNewJoin.Trim().IndexOf( "写真预约单注意事项说明" ) == -1 )
  1753. {
  1754. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1755. {
  1756. StrNewJoin += "∥";
  1757. }
  1758. StrNewJoin += "写真预约单注意事项说明‖" + this.txtOrderNoteMatterPortrait.Text.Trim() + "∥";
  1759. }
  1760. else
  1761. {
  1762. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1763. for ( int i = 0; i < strArray.Length; i++ )
  1764. {
  1765. if ( strArray[i].Trim() != "" )
  1766. {
  1767. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1768. if ( StrArray2[0].Trim() == "写真预约单注意事项说明" )
  1769. {
  1770. StrArray2[1] = this.txtOrderNoteMatterPortrait.Text.Trim();
  1771. strArray[i] = string.Join( "‖", StrArray2 );
  1772. StrNewJoin = string.Join( "∥", strArray );
  1773. break;
  1774. }
  1775. }
  1776. }
  1777. }
  1778. string FontA = "9";
  1779. if ( this.cmbtreevContentDetailPortrait.Text.Trim() != "" )
  1780. {
  1781. FontA = this.cmbtreevContentDetailPortrait.Text.Trim();
  1782. }
  1783. if ( StrNewJoin.Trim().IndexOf( "写真预约单内容详情字体大小" ) == -1 )
  1784. {
  1785. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1786. {
  1787. StrNewJoin += "∥";
  1788. }
  1789. StrNewJoin += "写真预约单内容详情字体大小‖" + FontA + "∥";
  1790. }
  1791. else
  1792. {
  1793. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1794. for ( int i = 0; i < strArray.Length; i++ )
  1795. {
  1796. if ( strArray[i].Trim() != "" )
  1797. {
  1798. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1799. if ( StrArray2[0].Trim() == "写真预约单内容详情字体大小" )
  1800. {
  1801. StrArray2[1] = FontA;
  1802. strArray[i] = string.Join( "‖", StrArray2 );
  1803. StrNewJoin = string.Join( "∥", strArray );
  1804. break;
  1805. }
  1806. }
  1807. }
  1808. }
  1809. FontA = "9";
  1810. if ( this.cmbtreevNoteMattersPortrait.Text.Trim() != "" )
  1811. {
  1812. FontA = this.cmbtreevNoteMattersPortrait.Text.Trim();
  1813. }
  1814. if ( StrNewJoin.Trim().IndexOf( "写真预约单注意事项字体大小" ) == -1 )
  1815. {
  1816. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1817. {
  1818. StrNewJoin += "∥";
  1819. }
  1820. StrNewJoin += "写真预约单注意事项字体大小‖" + FontA + "∥";
  1821. }
  1822. else
  1823. {
  1824. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1825. for ( int i = 0; i < strArray.Length; i++ )
  1826. {
  1827. if ( strArray[i].Trim() != "" )
  1828. {
  1829. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1830. if ( StrArray2[0].Trim() == "写真预约单注意事项字体大小" )
  1831. {
  1832. if ( this.cmbtreevNoteMattersWedding.Text.Trim() != "" )
  1833. {
  1834. StrArray2[1] = FontA;
  1835. strArray[i] = string.Join( "‖", StrArray2 );
  1836. StrNewJoin = string.Join( "∥", strArray );
  1837. break;
  1838. }
  1839. }
  1840. }
  1841. }
  1842. }
  1843. }
  1844. #endregion
  1845. #region 婚庆
  1846. if ( tbPage4 != null )
  1847. {
  1848. if ( this.txtOrderNoteMatterWeddingCeremony.Text.Trim() != "" )
  1849. {
  1850. if ( this.txtOrderNoteMatterWeddingCeremony.Text.Trim().Length > 2000 )
  1851. {
  1852. MessageBoxCustom.Show( "婚庆预约单注意事项字数不得超过2000字(含符号),当前字数" + this.txtOrderNoteMatterWeddingCeremony.Text.Trim().Length );
  1853. return;
  1854. }
  1855. if ( this.txtOrderNoteMatterWeddingCeremony.Text.Trim().IndexOf( '‖' ) != -1 || this.txtOrderNoteMatterWeddingCeremony.Text.Trim().IndexOf( '∥' ) != -1 )
  1856. {
  1857. MessageBoxCustom.Show( "婚庆预约单注意事项中不允许存在字符'‖'或'∥'" );
  1858. return;
  1859. }
  1860. }
  1861. if ( StrNewJoin.Trim().IndexOf( "婚庆预约单注意事项说明" ) == -1 )
  1862. {
  1863. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1864. {
  1865. StrNewJoin += "∥";
  1866. }
  1867. StrNewJoin += "婚庆预约单注意事项说明‖" + this.txtOrderNoteMatterWeddingCeremony.Text.Trim() + "∥";
  1868. }
  1869. else
  1870. {
  1871. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1872. for ( int i = 0; i < strArray.Length; i++ )
  1873. {
  1874. if ( strArray[i].Trim() != "" )
  1875. {
  1876. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1877. if ( StrArray2[0].Trim() == "婚庆预约单注意事项说明" )
  1878. {
  1879. StrArray2[1] = this.txtOrderNoteMatterWeddingCeremony.Text.Trim();
  1880. strArray[i] = string.Join( "‖", StrArray2 );
  1881. StrNewJoin = string.Join( "∥", strArray );
  1882. break;
  1883. }
  1884. }
  1885. }
  1886. }
  1887. string FontA = "9";
  1888. if ( this.cmbtreevContentDetailWeddingCeremony.Text.Trim() != "" )
  1889. {
  1890. FontA = this.cmbtreevContentDetailWeddingCeremony.Text.Trim();
  1891. }
  1892. if ( StrNewJoin.Trim().IndexOf( "婚庆预约单内容详情字体大小" ) == -1 )
  1893. {
  1894. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1895. {
  1896. StrNewJoin += "∥";
  1897. }
  1898. StrNewJoin += "婚庆预约单内容详情字体大小‖" + FontA + "∥";
  1899. }
  1900. else
  1901. {
  1902. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1903. for ( int i = 0; i < strArray.Length; i++ )
  1904. {
  1905. if ( strArray[i].Trim() != "" )
  1906. {
  1907. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1908. if ( StrArray2[0].Trim() == "婚庆预约单内容详情字体大小" )
  1909. {
  1910. StrArray2[1] = FontA;
  1911. strArray[i] = string.Join( "‖", StrArray2 );
  1912. StrNewJoin = string.Join( "∥", strArray );
  1913. break;
  1914. }
  1915. }
  1916. }
  1917. }
  1918. FontA = "9";
  1919. if ( this.cmbtreevNoteMattersWeddingCeremony.Text.Trim() != "" )
  1920. {
  1921. FontA = this.cmbtreevNoteMattersWeddingCeremony.Text.Trim();
  1922. }
  1923. if ( StrNewJoin.Trim().IndexOf( "婚庆预约单注意事项字体大小" ) == -1 )
  1924. {
  1925. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1926. {
  1927. StrNewJoin += "∥";
  1928. }
  1929. StrNewJoin += "婚庆预约单注意事项字体大小‖" + FontA + "∥";
  1930. }
  1931. else
  1932. {
  1933. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1934. for ( int i = 0; i < strArray.Length; i++ )
  1935. {
  1936. if ( strArray[i].Trim() != "" )
  1937. {
  1938. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1939. if ( StrArray2[0].Trim() == "婚庆预约单注意事项字体大小" )
  1940. {
  1941. if ( this.cmbtreevNoteMattersWedding.Text.Trim() != "" )
  1942. {
  1943. StrArray2[1] = FontA;
  1944. strArray[i] = string.Join( "‖", StrArray2 );
  1945. StrNewJoin = string.Join( "∥", strArray );
  1946. break;
  1947. }
  1948. }
  1949. }
  1950. }
  1951. }
  1952. }
  1953. #endregion
  1954. #region 服务
  1955. if ( tbPage5 != null )
  1956. {
  1957. if ( this.txtOrderNoteMattersService.Text.Trim() != "" )
  1958. {
  1959. if ( this.txtOrderNoteMattersService.Text.Trim().Length > 2000 )
  1960. {
  1961. MessageBoxCustom.Show( "服务预约单注意事项字数不得超过2000字(含符号),当前字数" + this.txtOrderNoteMattersService.Text.Trim().Length );
  1962. return;
  1963. }
  1964. if ( this.txtOrderNoteMattersService.Text.Trim().IndexOf( '‖' ) != -1 || this.txtOrderNoteMattersService.Text.Trim().IndexOf( '∥' ) != -1 )
  1965. {
  1966. MessageBoxCustom.Show( "服务预约单注意事项中不允许存在字符'‖'或'∥'" );
  1967. return;
  1968. }
  1969. }
  1970. if ( StrNewJoin.Trim().IndexOf( "服务预约单注意事项说明" ) == -1 )
  1971. {
  1972. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  1973. {
  1974. StrNewJoin += "∥";
  1975. }
  1976. StrNewJoin += "服务预约单注意事项说明‖" + this.txtOrderNoteMattersService.Text.Trim() + "∥";
  1977. }
  1978. else
  1979. {
  1980. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  1981. for ( int i = 0; i < strArray.Length; i++ )
  1982. {
  1983. if ( strArray[i].Trim() != "" )
  1984. {
  1985. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  1986. if ( StrArray2[0].Trim() == "服务预约单注意事项说明" )
  1987. {
  1988. StrArray2[1] = this.txtOrderNoteMattersService.Text.Trim();
  1989. strArray[i] = string.Join( "‖", StrArray2 );
  1990. StrNewJoin = string.Join( "∥", strArray );
  1991. break;
  1992. }
  1993. }
  1994. }
  1995. }
  1996. string FontA = "9";
  1997. if ( this.cmbtreevContentDetailService.Text.Trim() != "" )
  1998. {
  1999. FontA = this.cmbtreevContentDetailService.Text.Trim();
  2000. }
  2001. if ( StrNewJoin.Trim().IndexOf( "服务预约单内容详情字体大小" ) == -1 )
  2002. {
  2003. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  2004. {
  2005. StrNewJoin += "∥";
  2006. }
  2007. StrNewJoin += "服务预约单内容详情字体大小‖" + FontA + "∥";
  2008. }
  2009. else
  2010. {
  2011. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  2012. for ( int i = 0; i < strArray.Length; i++ )
  2013. {
  2014. if ( strArray[i].Trim() != "" )
  2015. {
  2016. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2017. if ( StrArray2[0].Trim() == "服务预约单内容详情字体大小" )
  2018. {
  2019. StrArray2[1] = FontA;
  2020. strArray[i] = string.Join( "‖", StrArray2 );
  2021. StrNewJoin = string.Join( "∥", strArray );
  2022. break;
  2023. }
  2024. }
  2025. }
  2026. }
  2027. FontA = "9";
  2028. if ( this.cmbtreevNoteMattersService.Text.Trim() != "" )
  2029. {
  2030. FontA = this.cmbtreevNoteMattersService.Text.Trim();
  2031. }
  2032. if ( StrNewJoin.Trim().IndexOf( "服务预约单注意事项字体大小" ) == -1 )
  2033. {
  2034. if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
  2035. {
  2036. StrNewJoin += "∥";
  2037. }
  2038. StrNewJoin += "服务预约单注意事项字体大小‖" + FontA + "∥";
  2039. }
  2040. else
  2041. {
  2042. string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
  2043. for ( int i = 0; i < strArray.Length; i++ )
  2044. {
  2045. if ( strArray[i].Trim() != "" )
  2046. {
  2047. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2048. if ( StrArray2[0].Trim() == "服务预约单注意事项字体大小" )
  2049. {
  2050. if ( this.cmbtreevNoteMattersWedding.Text.Trim() != "" )
  2051. {
  2052. StrArray2[1] = FontA;
  2053. strArray[i] = string.Join( "‖", StrArray2 );
  2054. StrNewJoin = string.Join( "∥", strArray );
  2055. break;
  2056. }
  2057. }
  2058. }
  2059. }
  2060. }
  2061. }
  2062. #endregion
  2063. model.PrintSet_PrintOtherDataJson = StrNewJoin.TrimEnd( '∥' );
  2064. }
  2065. #endregion
  2066. #region LOG图片和标题
  2067. if ( this.tabControl3.Visible )
  2068. {
  2069. #region 标题
  2070. if ( model.PrintSet_PrintSingleTitle.Trim() != "" )
  2071. {
  2072. string StrNewJoin = model.PrintSet_PrintSingleTitle.Trim();
  2073. #region 预约婚纱单标题
  2074. if ( StrNewJoin.Trim().IndexOf( "预约婚纱单标题" ) == -1 )
  2075. {
  2076. model.PrintSet_PrintSingleTitle += "预约婚纱单标题‖" + this.txtWeddingTitle.Text.Trim() + "∥";
  2077. }
  2078. else
  2079. {
  2080. string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  2081. for ( int i = 0; i < strArray.Length; i++ )
  2082. {
  2083. if ( strArray[i].Trim() != "" )
  2084. {
  2085. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2086. if ( StrArray2[0].Trim() == "预约婚纱单标题" )
  2087. {
  2088. StrArray2[1] = this.txtWeddingTitle.Text.Trim();
  2089. strArray[i] = string.Join( "‖", StrArray2 );
  2090. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  2091. break;
  2092. }
  2093. }
  2094. }
  2095. }
  2096. #endregion
  2097. #region 预约儿童单标题
  2098. if ( StrNewJoin.Trim().IndexOf( "预约儿童单标题" ) == -1 )
  2099. {
  2100. model.PrintSet_PrintSingleTitle += "预约儿童单标题‖" + this.txtChildTitle.Text.Trim() + "∥";
  2101. }
  2102. else
  2103. {
  2104. string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  2105. for ( int i = 0; i < strArray.Length; i++ )
  2106. {
  2107. if ( strArray[i].Trim() != "" )
  2108. {
  2109. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2110. if ( StrArray2[0].Trim() == "预约儿童单标题" )
  2111. {
  2112. StrArray2[1] = this.txtChildTitle.Text.Trim();
  2113. strArray[i] = string.Join( "‖", StrArray2 );
  2114. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  2115. break;
  2116. }
  2117. }
  2118. }
  2119. }
  2120. #endregion
  2121. #region 预约写真单标题
  2122. if ( StrNewJoin.Trim().IndexOf( "预约写真单标题" ) == -1 )
  2123. {
  2124. model.PrintSet_PrintSingleTitle += "预约写真单标题‖" + this.txtPortraitTitle.Text.Trim() + "∥";
  2125. }
  2126. else
  2127. {
  2128. string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  2129. for ( int i = 0; i < strArray.Length; i++ )
  2130. {
  2131. if ( strArray[i].Trim() != "" )
  2132. {
  2133. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2134. if ( StrArray2[0].Trim() == "预约写真单标题" )
  2135. {
  2136. StrArray2[1] = this.txtPortraitTitle.Text.Trim();
  2137. strArray[i] = string.Join( "‖", StrArray2 );
  2138. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  2139. break;
  2140. }
  2141. }
  2142. }
  2143. }
  2144. #endregion
  2145. #region 预约婚庆单标题
  2146. if ( StrNewJoin.Trim().IndexOf( "预约婚庆单标题" ) == -1 )
  2147. {
  2148. model.PrintSet_PrintSingleTitle += "预约婚庆单标题‖" + this.txtWeddingCeremonyTitle.Text.Trim() + "∥";
  2149. }
  2150. else
  2151. {
  2152. string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  2153. for ( int i = 0; i < strArray.Length; i++ )
  2154. {
  2155. if ( strArray[i].Trim() != "" )
  2156. {
  2157. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2158. if ( StrArray2[0].Trim() == "预约婚庆单标题" )
  2159. {
  2160. StrArray2[1] = this.txtWeddingCeremonyTitle.Text.Trim();
  2161. strArray[i] = string.Join( "‖", StrArray2 );
  2162. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  2163. break;
  2164. }
  2165. }
  2166. }
  2167. }
  2168. #endregion
  2169. #region 预约服务单标题
  2170. if ( StrNewJoin.Trim().IndexOf( "预约服务单标题" ) == -1 )
  2171. {
  2172. model.PrintSet_PrintSingleTitle += "预约服务单标题‖" + this.txtServiceTitle.Text.Trim() + "∥";
  2173. }
  2174. else
  2175. {
  2176. string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  2177. for ( int i = 0; i < strArray.Length; i++ )
  2178. {
  2179. if ( strArray[i].Trim() != "" )
  2180. {
  2181. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2182. if ( StrArray2[0].Trim() == "预约服务单标题" )
  2183. {
  2184. StrArray2[1] = this.txtServiceTitle.Text.Trim();
  2185. strArray[i] = string.Join( "‖", StrArray2 );
  2186. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  2187. break;
  2188. }
  2189. }
  2190. }
  2191. }
  2192. #endregion
  2193. }
  2194. else
  2195. {
  2196. if ( this.txtWeddingTitle.Text.Trim() != "" )
  2197. {
  2198. if ( this.txtWeddingTitle.Text.Trim().Length > 25 )
  2199. {
  2200. MessageBoxCustom.Show( "预约婚纱单标题字数不得超过25字(含符号),当前字数" + this.txtWeddingTitle.Text.Trim().Length );
  2201. return;
  2202. }
  2203. if ( this.txtWeddingTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtWeddingTitle.Text.Trim().IndexOf( '∥' ) != -1 )
  2204. {
  2205. MessageBoxCustom.Show( "预约婚纱单标题中不允许存在字符'‖'或'∥'" );
  2206. return;
  2207. }
  2208. }
  2209. model.PrintSet_PrintSingleTitle += "预约婚纱单标题‖" + this.txtWeddingTitle.Text.Trim() + "∥";
  2210. if ( this.txtChildTitle.Text.Trim() != "" )
  2211. {
  2212. if ( this.txtChildTitle.Text.Trim().Length > 25 )
  2213. {
  2214. MessageBoxCustom.Show( "预约儿童单标题字数不得超过25字(含符号),当前字数" + this.txtChildTitle.Text.Trim().Length );
  2215. return;
  2216. }
  2217. if ( this.txtChildTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtChildTitle.Text.Trim().IndexOf( '∥' ) != -1 )
  2218. {
  2219. MessageBoxCustom.Show( "预约儿童单标题中不允许存在字符'‖'或'∥'" );
  2220. return;
  2221. }
  2222. }
  2223. model.PrintSet_PrintSingleTitle += "预约儿童单标题‖" + this.txtChildTitle.Text.Trim() + "∥";
  2224. if ( this.txtPortraitTitle.Text.Trim() != "" )
  2225. {
  2226. if ( this.txtPortraitTitle.Text.Trim().Length > 25 )
  2227. {
  2228. MessageBoxCustom.Show( "预约写真单标题字数不得超过25字(含符号),当前字数" + this.txtPortraitTitle.Text.Trim().Length );
  2229. return;
  2230. }
  2231. if ( this.txtPortraitTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtPortraitTitle.Text.Trim().IndexOf( '∥' ) != -1 )
  2232. {
  2233. MessageBoxCustom.Show( "预约写真单标题中不允许存在字符'‖'或'∥'" );
  2234. return;
  2235. }
  2236. }
  2237. model.PrintSet_PrintSingleTitle += "预约写真单标题‖" + this.txtPortraitTitle.Text.Trim() + "∥";
  2238. if ( this.txtWeddingCeremonyTitle.Text.Trim() != "" )
  2239. {
  2240. if ( this.txtWeddingCeremonyTitle.Text.Trim().Length > 25 )
  2241. {
  2242. MessageBoxCustom.Show( "预约婚庆单标题字数不得超过25字(含符号),当前字数" + this.txtWeddingCeremonyTitle.Text.Trim().Length );
  2243. return;
  2244. }
  2245. if ( this.txtWeddingCeremonyTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtWeddingCeremonyTitle.Text.Trim().IndexOf( '∥' ) != -1 )
  2246. {
  2247. MessageBoxCustom.Show( "预约婚庆单标题中不允许存在字符'‖'或'∥'" );
  2248. return;
  2249. }
  2250. }
  2251. model.PrintSet_PrintSingleTitle += "预约婚庆单标题‖" + this.txtWeddingCeremonyTitle.Text.Trim() + "∥";
  2252. if ( this.txtServiceTitle.Text.Trim() != "" )
  2253. {
  2254. if ( this.txtServiceTitle.Text.Trim().Length > 25 )
  2255. {
  2256. MessageBoxCustom.Show( "预约服务单标题字数不得超过25字(含符号),当前字数" + this.txtServiceTitle.Text.Trim().Length );
  2257. return;
  2258. }
  2259. if ( this.txtServiceTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtServiceTitle.Text.Trim().IndexOf( '∥' ) != -1 )
  2260. {
  2261. MessageBoxCustom.Show( "预约服务单标题中不允许存在字符'‖'或'∥'" );
  2262. return;
  2263. }
  2264. }
  2265. model.PrintSet_PrintSingleTitle += "预约服务单标题‖" + this.txtServiceTitle.Text.Trim() + "∥";
  2266. }
  2267. #endregion
  2268. #region 图片LOG
  2269. if ( model.PrintSet_PrintSingleLOG.Trim() != "" )
  2270. {
  2271. string StrNewJoin = model.PrintSet_PrintSingleLOG.Trim();
  2272. #region 预约婚纱单图片LOG
  2273. if ( StrNewJoin.Trim().IndexOf( "预约婚纱单LOG" ) == -1 )
  2274. {
  2275. model.PrintSet_PrintSingleLOG += "预约婚纱单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingLOG ) ) + "∥";
  2276. }
  2277. else
  2278. {
  2279. string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  2280. for ( int i = 0; i < strArray.Length; i++ )
  2281. {
  2282. if ( strArray[i].Trim() != "" )
  2283. {
  2284. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2285. if ( StrArray2[0].Trim() == "预约婚纱单LOG" )
  2286. {
  2287. StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingLOG ) );
  2288. strArray[i] = string.Join( "‖", StrArray2 );
  2289. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  2290. break;
  2291. }
  2292. }
  2293. }
  2294. }
  2295. #endregion
  2296. #region 预约儿童单图片LOG
  2297. if ( StrNewJoin.Trim().IndexOf( "预约儿童单LOG" ) == -1 )
  2298. {
  2299. model.PrintSet_PrintSingleLOG += "预约儿童单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderChildLOG ) ) + "∥";
  2300. }
  2301. else
  2302. {
  2303. string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  2304. for ( int i = 0; i < strArray.Length; i++ )
  2305. {
  2306. if ( strArray[i].Trim() != "" )
  2307. {
  2308. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2309. if ( StrArray2[0].Trim() == "预约儿童单LOG" )
  2310. {
  2311. StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderChildLOG ) );
  2312. strArray[i] = string.Join( "‖", StrArray2 );
  2313. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  2314. break;
  2315. }
  2316. }
  2317. }
  2318. }
  2319. #endregion
  2320. #region 预约写真单图片LOG
  2321. if ( StrNewJoin.Trim().IndexOf( "预约写真单LOG" ) == -1 )
  2322. {
  2323. model.PrintSet_PrintSingleLOG += "预约写真单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderPortraitLOG ) ) + "∥";
  2324. }
  2325. else
  2326. {
  2327. string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  2328. for ( int i = 0; i < strArray.Length; i++ )
  2329. {
  2330. if ( strArray[i].Trim() != "" )
  2331. {
  2332. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2333. if ( StrArray2[0].Trim() == "预约写真单LOG" )
  2334. {
  2335. StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderPortraitLOG ) );
  2336. strArray[i] = string.Join( "‖", StrArray2 );
  2337. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  2338. break;
  2339. }
  2340. }
  2341. }
  2342. }
  2343. #endregion
  2344. #region 预约婚庆单图片LOG
  2345. if ( StrNewJoin.Trim().IndexOf( "预约婚庆单LOG" ) == -1 )
  2346. {
  2347. model.PrintSet_PrintSingleLOG += "预约婚庆单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingCeremonyLOG ) ) + "∥";
  2348. }
  2349. else
  2350. {
  2351. string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  2352. for ( int i = 0; i < strArray.Length; i++ )
  2353. {
  2354. if ( strArray[i].Trim() != "" )
  2355. {
  2356. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2357. if ( StrArray2[0].Trim() == "预约婚庆单LOG" )
  2358. {
  2359. StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingCeremonyLOG ) );
  2360. strArray[i] = string.Join( "‖", StrArray2 );
  2361. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  2362. break;
  2363. }
  2364. }
  2365. }
  2366. }
  2367. #endregion
  2368. #region 预约服务单图片LOG
  2369. if ( StrNewJoin.Trim().IndexOf( "预约服务单LOG" ) == -1 )
  2370. {
  2371. model.PrintSet_PrintSingleLOG += "预约服务单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderServiceLOG ) ) + "∥";
  2372. }
  2373. else
  2374. {
  2375. string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  2376. for ( int i = 0; i < strArray.Length; i++ )
  2377. {
  2378. if ( strArray[i].Trim() != "" )
  2379. {
  2380. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2381. if ( StrArray2[0].Trim() == "预约服务单LOG" )
  2382. {
  2383. StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderServiceLOG ) );
  2384. strArray[i] = string.Join( "‖", StrArray2 );
  2385. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  2386. break;
  2387. }
  2388. }
  2389. }
  2390. }
  2391. #endregion
  2392. }
  2393. else
  2394. {
  2395. if ( this.pictOrderWeddingLOG.Image == null )
  2396. {
  2397. model.PrintSet_PrintSingleLOG += "预约婚纱单LOG‖∥";
  2398. }
  2399. else
  2400. {
  2401. model.PrintSet_PrintSingleLOG += "预约婚纱单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingLOG ) ) + "∥";
  2402. }
  2403. if ( this.pictOrderChildLOG.Image == null )
  2404. {
  2405. model.PrintSet_PrintSingleLOG += "预约儿童单LOG‖∥";
  2406. }
  2407. else
  2408. {
  2409. model.PrintSet_PrintSingleLOG += "预约儿童单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderChildLOG ) ) + "∥";
  2410. }
  2411. if ( this.pictOrderPortraitLOG.Image == null )
  2412. {
  2413. model.PrintSet_PrintSingleLOG += "预约写真单LOG‖∥";
  2414. }
  2415. else
  2416. {
  2417. model.PrintSet_PrintSingleLOG += "预约写真单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderPortraitLOG ) ) + "∥";
  2418. }
  2419. if ( this.pictOrderWeddingCeremonyLOG.Image == null )
  2420. {
  2421. model.PrintSet_PrintSingleLOG += "预约婚庆单LOG‖∥";
  2422. }
  2423. else
  2424. {
  2425. model.PrintSet_PrintSingleLOG += "预约婚庆单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingCeremonyLOG ) ) + "∥";
  2426. }
  2427. if ( this.pictOrderServiceLOG.Image == null )
  2428. {
  2429. model.PrintSet_PrintSingleLOG += "预约服务单LOG‖∥";
  2430. }
  2431. else
  2432. {
  2433. model.PrintSet_PrintSingleLOG += "预约服务单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderServiceLOG ) ) + "∥";
  2434. }
  2435. }
  2436. #endregion
  2437. }
  2438. #endregion
  2439. #endregion
  2440. #region 制作单
  2441. if ( this.panelMakingExplain.Visible )
  2442. {
  2443. if ( this.txtMakingExplain.Text.Trim().Length > 2000 )
  2444. {
  2445. MessageBoxCustom.Show( "制作单说明字数不得超过2000字(含符号),当前字数" + this.txtMakingExplain.Text.Trim().Length );
  2446. return;
  2447. }
  2448. if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
  2449. {
  2450. string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
  2451. //内容详情字体大小
  2452. if ( this.txtMakingExplain.Text.Trim() != "" )
  2453. {
  2454. if ( this.txtMakingExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtMakingExplain.Text.Trim().IndexOf( '∥' ) != -1 )
  2455. {
  2456. MessageBoxCustom.Show( "制作单说明中不允许存在字符'‖'或'∥'" );
  2457. return;
  2458. }
  2459. }
  2460. if ( StrNewJoin.Trim().IndexOf( "制作单说明" ) == -1 )
  2461. {
  2462. model.PrintSet_PrintOtherDataJson += "制作单说明‖" + this.txtMakingExplain.Text.Trim() + "∥";
  2463. }
  2464. else
  2465. {
  2466. string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  2467. for ( int i = 0; i < strArray.Length; i++ )
  2468. {
  2469. if ( strArray[i].Trim() != "" )
  2470. {
  2471. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2472. if ( StrArray2[0].Trim() == "制作单说明" )
  2473. {
  2474. StrArray2[1] = this.txtMakingExplain.Text.Trim();
  2475. strArray[i] = string.Join( "‖", StrArray2 );
  2476. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  2477. break;
  2478. }
  2479. }
  2480. }
  2481. }
  2482. }
  2483. else
  2484. {
  2485. if ( this.txtMakingExplain.Text.Trim() != "" )
  2486. {
  2487. if ( this.txtMakingExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtMakingExplain.Text.Trim().IndexOf( '∥' ) != -1 )
  2488. {
  2489. MessageBoxCustom.Show( "制作单说明中不允许存在字符'‖'或'∥'" );
  2490. return;
  2491. }
  2492. }
  2493. model.PrintSet_PrintOtherDataJson += "制作单说明‖" + this.txtMakingExplain.Text.Trim() + "∥";
  2494. }
  2495. }
  2496. #endregion
  2497. #region 礼服单
  2498. if ( this.panelDress.Visible )
  2499. {
  2500. if ( this.txtDressExplain.Text.Trim().Length > 2000 )
  2501. {
  2502. MessageBoxCustom.Show( "礼服单说明字数不得超过2000字(含符号),当前字数" + this.txtDressExplain.Text.Trim().Length );
  2503. return;
  2504. }
  2505. if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
  2506. {
  2507. string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
  2508. //内容详情字体大小
  2509. if ( this.txtDressExplain.Text.Trim() != "" )
  2510. {
  2511. if ( this.txtDressExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtDressExplain.Text.Trim().IndexOf( '∥' ) != -1 )
  2512. {
  2513. MessageBoxCustom.Show( "礼服单说明中不允许存在字符'‖'或'∥'" );
  2514. return;
  2515. }
  2516. }
  2517. if ( StrNewJoin.Trim().IndexOf( "礼服单说明" ) == -1 )
  2518. {
  2519. model.PrintSet_PrintOtherDataJson += "礼服单说明‖" + this.txtDressExplain.Text.Trim() + "∥";
  2520. }
  2521. else
  2522. {
  2523. string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  2524. for ( int i = 0; i < strArray.Length; i++ )
  2525. {
  2526. if ( strArray[i].Trim() != "" )
  2527. {
  2528. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2529. if ( StrArray2[0].Trim() == "礼服单说明" )
  2530. {
  2531. StrArray2[1] = this.txtDressExplain.Text.Trim();
  2532. strArray[i] = string.Join( "‖", StrArray2 );
  2533. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  2534. break;
  2535. }
  2536. }
  2537. }
  2538. }
  2539. }
  2540. else
  2541. {
  2542. if ( this.txtDressExplain.Text.Trim() != "" )
  2543. {
  2544. if ( this.txtDressExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtDressExplain.Text.Trim().IndexOf( '∥' ) != -1 )
  2545. {
  2546. MessageBoxCustom.Show( "礼服单说明中不允许存在字符'‖'或'∥'" );
  2547. return;
  2548. }
  2549. }
  2550. model.PrintSet_PrintOtherDataJson += "礼服单说明‖" + this.txtDressExplain.Text.Trim() + "∥";
  2551. }
  2552. }
  2553. #endregion
  2554. #region 收款单说明
  2555. if ( this.panelPaymentExplain.Visible )
  2556. {
  2557. string[] StrArrayListName = this.lblCurrentSelectedStyle.Text.Split( ':' );
  2558. bool IsFind = false;
  2559. if ( StrArrayListName.Length > 1 )
  2560. {
  2561. if ( StrArrayListName[1].Trim() == "会员充值收款_风格A4" )
  2562. {
  2563. IsFind = true;
  2564. }
  2565. }
  2566. if ( !IsFind )
  2567. {
  2568. if ( this.txtPaymentExplain.Text.Trim().Length > 200 )
  2569. {
  2570. MessageBoxCustom.Show( "收款单说明字数不得超过200字(含符号),当前字数" + this.txtPaymentExplain.Text.Trim().Length );
  2571. return;
  2572. }
  2573. }
  2574. else
  2575. {
  2576. if ( this.txtPaymentExplain.Text.Trim().Length > 500 )
  2577. {
  2578. MessageBoxCustom.Show( "收款单说明字数不得超过500字(含符号),当前字数" + this.txtPaymentExplain.Text.Trim().Length );
  2579. return;
  2580. }
  2581. }
  2582. if ( this.txtPaymentExplain.Text.Trim() != "" )
  2583. {
  2584. if ( this.txtPaymentExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtPaymentExplain.Text.Trim().IndexOf( '∥' ) != -1 )
  2585. {
  2586. MessageBoxCustom.Show( "收款单说明中不允许存在字符'‖'或'∥'" );
  2587. return;
  2588. }
  2589. }
  2590. if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
  2591. {
  2592. string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
  2593. if ( StrNewJoin.Trim().IndexOf( "收款单说明" ) == -1 )
  2594. {
  2595. model.PrintSet_PrintOtherDataJson += "收款单说明‖" + this.txtPaymentExplain.Text.Trim() + "∥";
  2596. }
  2597. else
  2598. {
  2599. string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  2600. for ( int i = 0; i < strArray.Length; i++ )
  2601. {
  2602. if ( strArray[i].Trim() != "" )
  2603. {
  2604. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2605. if ( StrArray2[0].Trim() == "收款单说明" )
  2606. {
  2607. StrArray2[1] = this.txtPaymentExplain.Text.Trim();
  2608. strArray[i] = string.Join( "‖", StrArray2 );
  2609. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  2610. break;
  2611. }
  2612. }
  2613. }
  2614. }
  2615. }
  2616. else
  2617. {
  2618. model.PrintSet_PrintOtherDataJson += "收款单说明‖" + this.txtPaymentExplain.Text.Trim() + "∥";
  2619. }
  2620. if ( this.panelReservationPayment.Visible )
  2621. {
  2622. //预约收款显示名称
  2623. if ( this.txtReservationPayment.Text.Trim() != "" )
  2624. {
  2625. if ( this.txtReservationPayment.Text.Trim().IndexOf( '‖' ) != -1 || this.txtReservationPayment.Text.Trim().IndexOf( '∥' ) != -1 )
  2626. {
  2627. MessageBoxCustom.Show( "'将预约收款显示为'中不允许存在字符'‖'或'∥'" );
  2628. return;
  2629. }
  2630. }
  2631. if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
  2632. {
  2633. string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
  2634. if ( StrNewJoin.Trim().IndexOf( "预约收款显示名称" ) == -1 )
  2635. {
  2636. model.PrintSet_PrintOtherDataJson += "预约收款显示名称‖" + this.txtReservationPayment.Text.Trim() + "∥";
  2637. }
  2638. else
  2639. {
  2640. string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  2641. for ( int i = 0; i < strArray.Length; i++ )
  2642. {
  2643. if ( strArray[i].Trim() != "" )
  2644. {
  2645. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2646. if ( StrArray2[0].Trim() == "预约收款显示名称" )
  2647. {
  2648. StrArray2[1] = this.txtReservationPayment.Text.Trim();
  2649. strArray[i] = string.Join( "‖", StrArray2 );
  2650. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  2651. break;
  2652. }
  2653. }
  2654. }
  2655. }
  2656. }
  2657. else
  2658. {
  2659. model.PrintSet_PrintOtherDataJson += "预约收款显示名称‖" + this.txtReservationPayment.Text.Trim() + "∥";
  2660. }
  2661. }
  2662. }
  2663. #endregion
  2664. model.PrintSet_UpdateDateTime = SDateTime.Now;
  2665. model.PrintSet_UpdateName = StrUserID;
  2666. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  2667. }
  2668. if ( clist.Count > 0 )
  2669. {
  2670. if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
  2671. {
  2672. MessageBoxCustom.Show( "保存失败" );
  2673. return;
  2674. }
  2675. this.GetModelListPrinterSetNow();
  2676. this.IsSaveed = true;
  2677. MessageBoxCustom.Show( "保存成功" );
  2678. }
  2679. }
  2680. /// <summary>
  2681. /// 其他设置_取消
  2682. /// </summary>
  2683. /// <param name="sender"></param>
  2684. /// <param name="e"></param>
  2685. void btnCancel_Click( object sender, EventArgs e )
  2686. {
  2687. this.panelSaveed.Visible = false;
  2688. this.PanelHide();
  2689. this.cmbtreevContentDetailWedding.SetTextAndTag_ValueNull();
  2690. this.cmbtreevNoteMattersWedding.SetTextAndTag_ValueNull();
  2691. this.lblCurrentSelectedStyle.Text = "当前选中风格:";
  2692. this.btnSaveed.Tag = null;
  2693. }
  2694. /// <summary>
  2695. /// 隐藏Panel
  2696. /// </summary>
  2697. void PanelHide()
  2698. {
  2699. this.panelDress.Visible = false;
  2700. this.panelMakingExplain.Visible = false;
  2701. this.panelPaymentExplain.Visible = false;
  2702. this.panelReservationSingle.Visible = false;
  2703. }
  2704. #region 预约单
  2705. /// <summary>
  2706. /// 婚纱浏览
  2707. /// </summary>
  2708. /// <param name="sender"></param>
  2709. /// <param name="e"></param>
  2710. void btnOrderBrowseWeddingLOG_Click( object sender, EventArgs e )
  2711. {
  2712. this.BrowseLogPhoto( this.pictOrderWeddingLOG );
  2713. }
  2714. /// <summary>
  2715. /// 婚纱删除
  2716. /// </summary>
  2717. /// <param name="sender"></param>
  2718. /// <param name="e"></param>
  2719. void btnOrderDeleteWeddingLOG_Click( object sender, EventArgs e )
  2720. {
  2721. this.pictOrderWeddingLOG.Image = null;
  2722. }
  2723. /// <summary>
  2724. /// 婚纱下载
  2725. /// </summary>
  2726. /// <param name="sender"></param>
  2727. /// <param name="e"></param>
  2728. void btnOrderDownloadWeddingLOG_Click( object sender, EventArgs e )
  2729. {
  2730. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderWeddingLOG, "婚纱单LOG" );
  2731. }
  2732. /// <summary>
  2733. /// 儿童下载
  2734. /// </summary>
  2735. /// <param name="sender"></param>
  2736. /// <param name="e"></param>
  2737. void btnOrderChildDownloadLOG_Click( object sender, EventArgs e )
  2738. {
  2739. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderChildLOG, "儿童单LOG" );
  2740. }
  2741. /// <summary>
  2742. /// 儿童浏览
  2743. /// </summary>
  2744. /// <param name="sender"></param>
  2745. /// <param name="e"></param>
  2746. void btnOrderChildBrowseLOG_Click( object sender, EventArgs e )
  2747. {
  2748. this.BrowseLogPhoto( this.pictOrderChildLOG );
  2749. }
  2750. /// <summary>
  2751. /// 儿童删除
  2752. /// </summary>
  2753. /// <param name="sender"></param>
  2754. /// <param name="e"></param>
  2755. void btnOrderChildDeleteLOG_Click( object sender, EventArgs e )
  2756. {
  2757. this.pictOrderChildLOG.Image = null;
  2758. }
  2759. /// <summary>
  2760. /// 写真下载
  2761. /// </summary>
  2762. /// <param name="sender"></param>
  2763. /// <param name="e"></param>
  2764. void btnOrderPortraitDownloadLOG_Click( object sender, EventArgs e )
  2765. {
  2766. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderPortraitLOG, "写真单LOG" );
  2767. }
  2768. /// <summary>
  2769. /// 写真浏览
  2770. /// </summary>
  2771. /// <param name="sender"></param>
  2772. /// <param name="e"></param>
  2773. void btnOrderPortraitBrowseLOG_Click( object sender, EventArgs e )
  2774. {
  2775. this.BrowseLogPhoto( this.pictOrderPortraitLOG );
  2776. }
  2777. /// <summary>
  2778. /// 写真删除
  2779. /// </summary>
  2780. /// <param name="sender"></param>
  2781. /// <param name="e"></param>
  2782. void btnOrderPortraitDeleteLOG_Click( object sender, EventArgs e )
  2783. {
  2784. this.pictOrderPortraitLOG.Image = null;
  2785. }
  2786. /// <summary>
  2787. /// 婚庆下载
  2788. /// </summary>
  2789. /// <param name="sender"></param>
  2790. /// <param name="e"></param>
  2791. void btnOrderWeddingCeremonyDownloadLOG_Click( object sender, EventArgs e )
  2792. {
  2793. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderWeddingCeremonyLOG, "婚庆单LOG" );
  2794. }
  2795. /// <summary>
  2796. /// 婚庆浏览
  2797. /// </summary>
  2798. /// <param name="sender"></param>
  2799. /// <param name="e"></param>
  2800. void btnOrderWeddingCeremonyBrowseLOG_Click( object sender, EventArgs e )
  2801. {
  2802. this.BrowseLogPhoto( this.pictOrderWeddingCeremonyLOG );
  2803. }
  2804. /// <summary>
  2805. /// 婚庆删除
  2806. /// </summary>
  2807. /// <param name="sender"></param>
  2808. /// <param name="e"></param>
  2809. void btnOrderWeddingCeremonyDeleteLOG_Click( object sender, EventArgs e )
  2810. {
  2811. this.pictOrderWeddingCeremonyLOG.Image = null;
  2812. }
  2813. /// <summary>
  2814. /// 服务下载
  2815. /// </summary>
  2816. /// <param name="sender"></param>
  2817. /// <param name="e"></param>
  2818. void btnOrderServiceDownloadLOG_Click( object sender, EventArgs e )
  2819. {
  2820. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderServiceLOG, "服务单LOG" );
  2821. }
  2822. /// <summary>
  2823. /// 服务浏览
  2824. /// </summary>
  2825. /// <param name="sender"></param>
  2826. /// <param name="e"></param>
  2827. void btnOrderServiceBrowseLOG_Click( object sender, EventArgs e )
  2828. {
  2829. this.BrowseLogPhoto( this.pictOrderServiceLOG );
  2830. }
  2831. /// <summary>
  2832. /// 服务删除
  2833. /// </summary>
  2834. /// <param name="sender"></param>
  2835. /// <param name="e"></param>
  2836. void btnOrderServiceDeleteLOG_Click( object sender, EventArgs e )
  2837. {
  2838. this.pictOrderServiceLOG.Image = null;
  2839. }
  2840. /// <summary>
  2841. /// 浏览选择LOG图片
  2842. /// </summary>
  2843. /// <param name="pict"></param>
  2844. void BrowseLogPhoto( LYFZ.ComponentLibrary.PictureBoxEx pict )
  2845. {
  2846. OpenFileDialog fileDlg = new OpenFileDialog();
  2847. fileDlg.ShowDialog( this );
  2848. if ( fileDlg.FileName.Length > 0 )
  2849. {
  2850. if ( fileDlg.FileName != "openFileDialog1" )
  2851. {
  2852. Image img = Image.FromFile( fileDlg.FileName );
  2853. FileInfo f = new FileInfo( fileDlg.FileName );
  2854. if ( f.Length > 2100000 )
  2855. {
  2856. MessageBoxCustom.Show( "图片过大,建议使用大小在800K以内的图片" );
  2857. return;
  2858. }
  2859. if ( img.Width > 2500 )
  2860. {
  2861. MessageBoxCustom.Show( "图片长度过长,建议使用大小在 2000*280(像素)以内的图片" );
  2862. return;
  2863. }
  2864. if ( img.Height > 300 )
  2865. {
  2866. MessageBoxCustom.Show( "图片过大,建议使用大小在 2000*280(像素)以内的图片" );
  2867. return;
  2868. }
  2869. FileStream fs = new FileStream( fileDlg.FileName, FileMode.Open, FileAccess.Read );
  2870. pict.Image = System.Drawing.Image.FromStream( fs );
  2871. fs.Close();
  2872. }
  2873. }
  2874. }
  2875. #endregion
  2876. #endregion
  2877. #region 全局设置
  2878. /// <summary>
  2879. /// 收款单说明
  2880. /// </summary>
  2881. /// <param name="sender"></param>
  2882. /// <param name="e"></param>
  2883. void btnSaveed1_Click( object sender, EventArgs e )
  2884. {
  2885. if ( this.txtGlobalPaymentExplain.Text.Trim().Length > 200 )
  2886. {
  2887. MessageBoxCustom.Show( "收款单说明字数不得超过200字(含符号),当前字数" + this.txtGlobalPaymentExplain.Text.Trim().Length );
  2888. return;
  2889. }
  2890. if ( this.txtGlobalPaymentExplain.Text.Trim() != "" )
  2891. {
  2892. if ( this.txtGlobalPaymentExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtGlobalPaymentExplain.Text.Trim().IndexOf( '∥' ) != -1 )
  2893. {
  2894. MessageBoxCustom.Show( "收款单说明中不允许存在字符'‖'或'∥'" );
  2895. return;
  2896. }
  2897. }
  2898. List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
  2899. LYFZ.Model.Model_ErpSystemConfigure modelsystem = modelsc;
  2900. #region 全局
  2901. if ( modelsystem.Sconfig_Value.Trim() != "" )
  2902. {
  2903. string StrNewJoin = modelsystem.Sconfig_Value.Trim();
  2904. if ( StrNewJoin.Trim().IndexOf( "收款单说明" ) == -1 )
  2905. {
  2906. modelsystem.Sconfig_Value += "收款单说明‖" + this.txtGlobalPaymentExplain.Text.Trim() + "∥";
  2907. }
  2908. else
  2909. {
  2910. string[] strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
  2911. for ( int i = 0; i < strArray.Length; i++ )
  2912. {
  2913. if ( strArray[i].Trim() != "" )
  2914. {
  2915. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2916. if ( StrArray2[0].Trim() == "收款单说明" )
  2917. {
  2918. StrArray2[1] = this.txtGlobalPaymentExplain.Text.Trim();
  2919. strArray[i] = string.Join( "‖", StrArray2 );
  2920. modelsystem.Sconfig_Value = string.Join( "∥", strArray );
  2921. break;
  2922. }
  2923. }
  2924. }
  2925. }
  2926. }
  2927. else
  2928. {
  2929. modelsystem.Sconfig_Value += "收款单说明‖" + this.txtGlobalPaymentExplain.Text.Trim() + "∥";
  2930. }
  2931. clist.Add( scbll.GetUpdateCommandInfo( modelsystem ) );
  2932. #endregion
  2933. #region 修改打印设置
  2934. for ( int j = 0; j < mlist.Count; j++ )
  2935. {
  2936. switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), mlist[j].PrintSet_TemplateParentNumber.ToString() ) )
  2937. {
  2938. case EnumPublic.PrintTypeEnum.订单收款:
  2939. case EnumPublic.PrintTypeEnum.会员充值收款:
  2940. case EnumPublic.PrintTypeEnum.会员服务收款:
  2941. case EnumPublic.PrintTypeEnum.会员服务消费:
  2942. case EnumPublic.PrintTypeEnum.礼服出售收款:
  2943. case EnumPublic.PrintTypeEnum.礼服出租收款:
  2944. case EnumPublic.PrintTypeEnum.礼服出租退押金:
  2945. case EnumPublic.PrintTypeEnum.其它收入:
  2946. case EnumPublic.PrintTypeEnum.其它消费收款:
  2947. case EnumPublic.PrintTypeEnum.现金支出:
  2948. case EnumPublic.PrintTypeEnum.新摄会返还款:
  2949. case EnumPublic.PrintTypeEnum.新摄会收款:
  2950. LYFZ.Model.Model_ErpPrinterSetNow model = mlist[j];
  2951. if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
  2952. {
  2953. string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
  2954. if ( StrNewJoin.Trim().IndexOf( "收款单说明" ) == -1 )
  2955. {
  2956. model.PrintSet_PrintOtherDataJson += "收款单说明‖" + this.txtGlobalPaymentExplain.Text.Trim() + "∥";
  2957. }
  2958. else
  2959. {
  2960. string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  2961. for ( int i = 0; i < strArray.Length; i++ )
  2962. {
  2963. if ( strArray[i].Trim() != "" )
  2964. {
  2965. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  2966. if ( StrArray2[0].Trim() == "收款单说明" )
  2967. {
  2968. StrArray2[1] = this.txtGlobalPaymentExplain.Text.Trim();
  2969. strArray[i] = string.Join( "‖", StrArray2 );
  2970. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  2971. break;
  2972. }
  2973. }
  2974. }
  2975. }
  2976. }
  2977. else
  2978. {
  2979. model.PrintSet_PrintOtherDataJson += "收款单说明‖" + this.txtGlobalPaymentExplain.Text.Trim() + "∥";
  2980. }
  2981. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  2982. break;
  2983. }
  2984. }
  2985. #endregion
  2986. if ( clist.Count > 0 )
  2987. {
  2988. if ( MessageBoxCustom.Show( "保存后,将覆盖'" + EnumPublic.PrintTypeEnum.订单收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.会员充值收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.会员充值收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.会员服务收款.ToString()
  2989. + "'、'" + EnumPublic.PrintTypeEnum.会员服务消费.ToString() + "'、'" + EnumPublic.PrintTypeEnum.礼服出售收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.礼服出租收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.礼服出租退押金.ToString() + "'、'" + EnumPublic.PrintTypeEnum.其它收入.ToString()
  2990. + "'、'" + EnumPublic.PrintTypeEnum.其它消费收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.现金支出.ToString() + "'、'" + EnumPublic.PrintTypeEnum.新摄会返还款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.新摄会收款.ToString() + "' 等所有的收款单说明,你确定要继续保存吗?", "温馨提示", MessageBoxButtons.YesNo ) == DialogResult.No )
  2991. {
  2992. return;
  2993. }
  2994. if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
  2995. {
  2996. MessageBoxCustom.Show( "保存全局收款单说明失败!" );
  2997. return;
  2998. }
  2999. this.GetModelListPrinterSetNow();
  3000. this.GetModelSystemConfigure();
  3001. MessageBoxCustom.Show( "保存成功!" );
  3002. }
  3003. }
  3004. /// <summary>
  3005. /// 预约单
  3006. /// </summary>
  3007. /// <param name="sender"></param>
  3008. /// <param name="e"></param>
  3009. void btnSaveed2_Click( object sender, EventArgs e )
  3010. {
  3011. string StrText = this.txtGlobalOrderNoteMatter.Text.Trim();
  3012. if ( StrText != "" )
  3013. {
  3014. if ( StrText.Length > 2000 )
  3015. {
  3016. MessageBoxCustom.Show( "预约单注意事项字数不得超过2000字(含符号),当前字数" + StrText.Length );
  3017. return;
  3018. }
  3019. if ( StrText.IndexOf( '‖' ) != -1 || StrText.IndexOf( '∥' ) != -1 )
  3020. {
  3021. MessageBoxCustom.Show( "预约单注意事项中不允许存在字符'‖'或'∥'" );
  3022. return;
  3023. }
  3024. }
  3025. List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
  3026. #region 全局
  3027. LYFZ.Model.Model_ErpSystemConfigure modelsystem = modelsc;
  3028. string[] strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
  3029. if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单注意事项说明" ) == -1 )
  3030. {
  3031. modelsystem.Sconfig_Value += "预约单注意事项说明‖" + StrText + "∥";
  3032. }
  3033. else
  3034. {
  3035. for ( int i = 0; i < strArray.Length; i++ )
  3036. {
  3037. if ( strArray[i].Trim() != "" )
  3038. {
  3039. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3040. switch ( StrArray2[0].Trim() )
  3041. {
  3042. case "预约单注意事项说明":
  3043. StrArray2[1] = StrText;
  3044. strArray[i] = string.Join( "‖", StrArray2 );
  3045. modelsystem.Sconfig_Value = string.Join( "∥", strArray );
  3046. break;
  3047. }
  3048. }
  3049. }
  3050. }
  3051. StrText = "9";
  3052. if ( this.cmbtreevGlobalContentDetail.Text.Trim() != "" )
  3053. {
  3054. StrText = this.cmbtreevGlobalContentDetail.Text.Trim();
  3055. }
  3056. if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单内容详情字体大小" ) == -1 )
  3057. {
  3058. modelsystem.Sconfig_Value += "预约单内容详情字体大小‖" + StrText + "∥";
  3059. }
  3060. else
  3061. {
  3062. strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
  3063. for ( int i = 0; i < strArray.Length; i++ )
  3064. {
  3065. if ( strArray[i].Trim() != "" )
  3066. {
  3067. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3068. switch ( StrArray2[0].Trim() )
  3069. {
  3070. case "预约单内容详情字体大小":
  3071. StrArray2[1] = StrText;
  3072. strArray[i] = string.Join( "‖", StrArray2 );
  3073. modelsystem.Sconfig_Value = string.Join( "∥", strArray );
  3074. break;
  3075. }
  3076. }
  3077. }
  3078. }
  3079. StrText = "9";
  3080. if ( this.cmbtreevGlobalNoteMatters.Text.Trim() != "" )
  3081. {
  3082. StrText = this.cmbtreevGlobalNoteMatters.Text.Trim();
  3083. }
  3084. if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单注意事项字体大小" ) == -1 )
  3085. {
  3086. modelsystem.Sconfig_Value += "预约单注意事项字体大小‖" + StrText + "∥";
  3087. }
  3088. else
  3089. {
  3090. strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
  3091. for ( int i = 0; i < strArray.Length; i++ )
  3092. {
  3093. if ( strArray[i].Trim() != "" )
  3094. {
  3095. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3096. switch ( StrArray2[0].Trim() )
  3097. {
  3098. case "预约单注意事项字体大小":
  3099. StrArray2[1] = StrText;
  3100. strArray[i] = string.Join( "‖", StrArray2 );
  3101. modelsystem.Sconfig_Value = string.Join( "∥", strArray );
  3102. break;
  3103. }
  3104. }
  3105. }
  3106. }
  3107. if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单标题" ) == -1 )
  3108. {
  3109. modelsystem.Sconfig_Value += "预约单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
  3110. }
  3111. else
  3112. {
  3113. strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
  3114. for ( int i = 0; i < strArray.Length; i++ )
  3115. {
  3116. if ( strArray[i].Trim() != "" )
  3117. {
  3118. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3119. switch ( StrArray2[0].Trim() )
  3120. {
  3121. case "预约单标题":
  3122. StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
  3123. strArray[i] = string.Join( "‖", StrArray2 );
  3124. modelsystem.Sconfig_Value = string.Join( "∥", strArray );
  3125. break;
  3126. }
  3127. }
  3128. }
  3129. }
  3130. if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单LOG" ) == -1 )
  3131. {
  3132. modelsystem.Sconfig_Value += "预约单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictGlobalOrderLOG ) ) + "∥";
  3133. }
  3134. else
  3135. {
  3136. strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
  3137. for ( int i = 0; i < strArray.Length; i++ )
  3138. {
  3139. if ( strArray[i].Trim() != "" )
  3140. {
  3141. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3142. if ( StrArray2[0].Trim() == "预约单LOG" )
  3143. {
  3144. StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictGlobalOrderLOG ) );
  3145. strArray[i] = string.Join( "‖", StrArray2 );
  3146. modelsystem.Sconfig_Value = string.Join( "∥", strArray );
  3147. break;
  3148. }
  3149. }
  3150. }
  3151. }
  3152. clist.Add( scbll.GetUpdateCommandInfo( modelsystem ) );
  3153. #endregion
  3154. #region 修改打印设置
  3155. for ( int j = 0; j < mlist.Count; j++ )
  3156. {
  3157. switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), mlist[j].PrintSet_TemplateParentNumber.ToString() ) )
  3158. {
  3159. case EnumPublic.PrintTypeEnum.订单预约单:
  3160. LYFZ.Model.Model_ErpPrinterSetNow model = mlist[j];
  3161. #region 注意事项
  3162. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3163. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚纱预约单注意事项说明" ) == -1 )
  3164. {
  3165. model.PrintSet_PrintOtherDataJson += "婚纱预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
  3166. }
  3167. else
  3168. {
  3169. for ( int i = 0; i < strArray.Length; i++ )
  3170. {
  3171. if ( strArray[i].Trim() != "" )
  3172. {
  3173. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3174. switch ( StrArray2[0].Trim() )
  3175. {
  3176. case "婚纱预约单注意事项说明":
  3177. StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
  3178. strArray[i] = string.Join( "‖", StrArray2 );
  3179. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3180. break;
  3181. }
  3182. }
  3183. }
  3184. }
  3185. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "儿童预约单注意事项说明" ) == -1 )
  3186. {
  3187. model.PrintSet_PrintOtherDataJson += "儿童预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
  3188. }
  3189. else
  3190. {
  3191. for ( int i = 0; i < strArray.Length; i++ )
  3192. {
  3193. if ( strArray[i].Trim() != "" )
  3194. {
  3195. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3196. switch ( StrArray2[0].Trim() )
  3197. {
  3198. case "儿童预约单注意事项说明":
  3199. StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
  3200. strArray[i] = string.Join( "‖", StrArray2 );
  3201. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3202. break;
  3203. }
  3204. }
  3205. }
  3206. }
  3207. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "写真预约单注意事项说明" ) == -1 )
  3208. {
  3209. model.PrintSet_PrintOtherDataJson += "写真预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
  3210. }
  3211. else
  3212. {
  3213. for ( int i = 0; i < strArray.Length; i++ )
  3214. {
  3215. if ( strArray[i].Trim() != "" )
  3216. {
  3217. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3218. switch ( StrArray2[0].Trim() )
  3219. {
  3220. case "写真预约单注意事项说明":
  3221. StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
  3222. strArray[i] = string.Join( "‖", StrArray2 );
  3223. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3224. break;
  3225. }
  3226. }
  3227. }
  3228. }
  3229. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "服务预约单注意事项说明" ) == -1 )
  3230. {
  3231. model.PrintSet_PrintOtherDataJson += "服务预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
  3232. }
  3233. else
  3234. {
  3235. for ( int i = 0; i < strArray.Length; i++ )
  3236. {
  3237. if ( strArray[i].Trim() != "" )
  3238. {
  3239. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3240. switch ( StrArray2[0].Trim() )
  3241. {
  3242. case "服务预约单注意事项说明":
  3243. StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
  3244. strArray[i] = string.Join( "‖", StrArray2 );
  3245. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3246. break;
  3247. }
  3248. }
  3249. }
  3250. }
  3251. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚庆预约单注意事项说明" ) == -1 )
  3252. {
  3253. model.PrintSet_PrintOtherDataJson += "婚庆预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
  3254. }
  3255. else
  3256. {
  3257. for ( int i = 0; i < strArray.Length; i++ )
  3258. {
  3259. if ( strArray[i].Trim() != "" )
  3260. {
  3261. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3262. switch ( StrArray2[0].Trim() )
  3263. {
  3264. case "婚庆预约单注意事项说明":
  3265. StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
  3266. strArray[i] = string.Join( "‖", StrArray2 );
  3267. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3268. break;
  3269. }
  3270. }
  3271. }
  3272. }
  3273. #endregion
  3274. StrText = "9";
  3275. if ( this.cmbtreevGlobalContentDetail.Text.Trim() != "" )
  3276. {
  3277. StrText = this.cmbtreevGlobalContentDetail.Text.Trim();
  3278. }
  3279. #region 预约单内容详情字体大小
  3280. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚纱预约单内容详情字体大小" ) == -1 )
  3281. {
  3282. model.PrintSet_PrintOtherDataJson += "婚纱预约单内容详情字体大小‖" + StrText + "∥";
  3283. }
  3284. else
  3285. {
  3286. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3287. for ( int i = 0; i < strArray.Length; i++ )
  3288. {
  3289. if ( strArray[i].Trim() != "" )
  3290. {
  3291. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3292. switch ( StrArray2[0].Trim() )
  3293. {
  3294. case "婚纱预约单内容详情字体大小":
  3295. StrArray2[1] = StrText;
  3296. strArray[i] = string.Join( "‖", StrArray2 );
  3297. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3298. break;
  3299. }
  3300. }
  3301. }
  3302. }
  3303. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "儿童预约单内容详情字体大小" ) == -1 )
  3304. {
  3305. model.PrintSet_PrintOtherDataJson += "儿童预约单内容详情字体大小‖" + StrText + "∥";
  3306. }
  3307. else
  3308. {
  3309. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3310. for ( int i = 0; i < strArray.Length; i++ )
  3311. {
  3312. if ( strArray[i].Trim() != "" )
  3313. {
  3314. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3315. switch ( StrArray2[0].Trim() )
  3316. {
  3317. case "儿童预约单内容详情字体大小":
  3318. StrArray2[1] = StrText;
  3319. strArray[i] = string.Join( "‖", StrArray2 );
  3320. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3321. break;
  3322. }
  3323. }
  3324. }
  3325. }
  3326. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "写真预约单内容详情字体大小" ) == -1 )
  3327. {
  3328. model.PrintSet_PrintOtherDataJson += "写真预约单内容详情字体大小‖" + StrText + "∥";
  3329. }
  3330. else
  3331. {
  3332. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3333. for ( int i = 0; i < strArray.Length; i++ )
  3334. {
  3335. if ( strArray[i].Trim() != "" )
  3336. {
  3337. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3338. switch ( StrArray2[0].Trim() )
  3339. {
  3340. case "写真预约单内容详情字体大小":
  3341. StrArray2[1] = StrText;
  3342. strArray[i] = string.Join( "‖", StrArray2 );
  3343. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3344. break;
  3345. }
  3346. }
  3347. }
  3348. }
  3349. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "服务预约单内容详情字体大小" ) == -1 )
  3350. {
  3351. model.PrintSet_PrintOtherDataJson += "服务预约单注意事项字体大小‖" + StrText + "∥";
  3352. }
  3353. else
  3354. {
  3355. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3356. for ( int i = 0; i < strArray.Length; i++ )
  3357. {
  3358. if ( strArray[i].Trim() != "" )
  3359. {
  3360. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3361. switch ( StrArray2[0].Trim() )
  3362. {
  3363. case "服务预约单内容详情字体大小":
  3364. StrArray2[1] = StrText;
  3365. strArray[i] = string.Join( "‖", StrArray2 );
  3366. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3367. break;
  3368. }
  3369. }
  3370. }
  3371. }
  3372. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚庆预约单内容详情字体大小" ) == -1 )
  3373. {
  3374. model.PrintSet_PrintOtherDataJson += "婚庆预约单内容详情字体大小‖" + StrText + "∥";
  3375. }
  3376. else
  3377. {
  3378. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3379. for ( int i = 0; i < strArray.Length; i++ )
  3380. {
  3381. if ( strArray[i].Trim() != "" )
  3382. {
  3383. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3384. switch ( StrArray2[0].Trim() )
  3385. {
  3386. case "婚庆预约单内容详情字体大小":
  3387. StrArray2[1] = StrText;
  3388. strArray[i] = string.Join( "‖", StrArray2 );
  3389. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3390. break;
  3391. }
  3392. }
  3393. }
  3394. }
  3395. #endregion
  3396. StrText = "9";
  3397. if ( this.cmbtreevGlobalNoteMatters.Text.Trim() != "" )
  3398. {
  3399. StrText = this.cmbtreevGlobalNoteMatters.Text.Trim();
  3400. }
  3401. #region 预约单注意事项字体大小
  3402. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚纱预约单注意事项字体大小" ) == -1 )
  3403. {
  3404. model.PrintSet_PrintOtherDataJson += "婚纱预约单注意事项字体大小‖" + StrText + "∥";
  3405. }
  3406. else
  3407. {
  3408. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3409. for ( int i = 0; i < strArray.Length; i++ )
  3410. {
  3411. if ( strArray[i].Trim() != "" )
  3412. {
  3413. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3414. switch ( StrArray2[0].Trim() )
  3415. {
  3416. case "婚纱预约单注意事项字体大小":
  3417. StrArray2[1] = StrText;
  3418. strArray[i] = string.Join( "‖", StrArray2 );
  3419. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3420. break;
  3421. }
  3422. }
  3423. }
  3424. }
  3425. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "儿童预约单注意事项字体大小" ) == -1 )
  3426. {
  3427. model.PrintSet_PrintOtherDataJson += "儿童预约单注意事项字体大小‖" + StrText + "∥";
  3428. }
  3429. else
  3430. {
  3431. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3432. for ( int i = 0; i < strArray.Length; i++ )
  3433. {
  3434. if ( strArray[i].Trim() != "" )
  3435. {
  3436. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3437. switch ( StrArray2[0].Trim() )
  3438. {
  3439. case "儿童预约单注意事项字体大小":
  3440. StrArray2[1] = StrText;
  3441. strArray[i] = string.Join( "‖", StrArray2 );
  3442. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3443. break;
  3444. }
  3445. }
  3446. }
  3447. }
  3448. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "写真预约单注意事项字体大小" ) == -1 )
  3449. {
  3450. model.PrintSet_PrintOtherDataJson += "写真预约单注意事项字体大小‖" + StrText + "∥";
  3451. }
  3452. else
  3453. {
  3454. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3455. for ( int i = 0; i < strArray.Length; i++ )
  3456. {
  3457. if ( strArray[i].Trim() != "" )
  3458. {
  3459. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3460. switch ( StrArray2[0].Trim() )
  3461. {
  3462. case "写真预约单注意事项字体大小":
  3463. StrArray2[1] = StrText;
  3464. strArray[i] = string.Join( "‖", StrArray2 );
  3465. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3466. break;
  3467. }
  3468. }
  3469. }
  3470. }
  3471. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "服务预约单注意事项字体大小" ) == -1 )
  3472. {
  3473. model.PrintSet_PrintOtherDataJson += "服务预约单注意事项字体大小‖" + StrText + "∥";
  3474. }
  3475. else
  3476. {
  3477. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3478. for ( int i = 0; i < strArray.Length; i++ )
  3479. {
  3480. if ( strArray[i].Trim() != "" )
  3481. {
  3482. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3483. switch ( StrArray2[0].Trim() )
  3484. {
  3485. case "服务预约单注意事项字体大小":
  3486. StrArray2[1] = StrText;
  3487. strArray[i] = string.Join( "‖", StrArray2 );
  3488. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3489. break;
  3490. }
  3491. }
  3492. }
  3493. }
  3494. if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚庆预约单注意事项字体大小" ) == -1 )
  3495. {
  3496. model.PrintSet_PrintOtherDataJson += "婚庆预约单注意事项字体大小‖" + StrText + "∥";
  3497. }
  3498. else
  3499. {
  3500. strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
  3501. for ( int i = 0; i < strArray.Length; i++ )
  3502. {
  3503. if ( strArray[i].Trim() != "" )
  3504. {
  3505. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3506. switch ( StrArray2[0].Trim() )
  3507. {
  3508. case "婚庆预约单注意事项字体大小":
  3509. StrArray2[1] = StrText;
  3510. strArray[i] = string.Join( "‖", StrArray2 );
  3511. model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
  3512. break;
  3513. }
  3514. }
  3515. }
  3516. }
  3517. #endregion
  3518. #region 预约单标题
  3519. if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约婚纱单标题" ) == -1 )
  3520. {
  3521. model.PrintSet_PrintSingleTitle += "预约婚纱单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
  3522. }
  3523. else
  3524. {
  3525. strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  3526. for ( int i = 0; i < strArray.Length; i++ )
  3527. {
  3528. if ( strArray[i].Trim() != "" )
  3529. {
  3530. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3531. switch ( StrArray2[0].Trim() )
  3532. {
  3533. case "预约婚纱单标题":
  3534. StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
  3535. strArray[i] = string.Join( "‖", StrArray2 );
  3536. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  3537. break;
  3538. }
  3539. }
  3540. }
  3541. }
  3542. if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约儿童单标题" ) == -1 )
  3543. {
  3544. model.PrintSet_PrintSingleTitle += "预约儿童单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
  3545. }
  3546. else
  3547. {
  3548. strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  3549. for ( int i = 0; i < strArray.Length; i++ )
  3550. {
  3551. if ( strArray[i].Trim() != "" )
  3552. {
  3553. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3554. switch ( StrArray2[0].Trim() )
  3555. {
  3556. case "预约儿童单标题":
  3557. StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
  3558. strArray[i] = string.Join( "‖", StrArray2 );
  3559. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  3560. break;
  3561. }
  3562. }
  3563. }
  3564. }
  3565. if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约写真单标题" ) == -1 )
  3566. {
  3567. model.PrintSet_PrintSingleTitle += "预约写真单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
  3568. }
  3569. else
  3570. {
  3571. strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  3572. for ( int i = 0; i < strArray.Length; i++ )
  3573. {
  3574. if ( strArray[i].Trim() != "" )
  3575. {
  3576. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3577. switch ( StrArray2[0].Trim() )
  3578. {
  3579. case "预约写真单标题":
  3580. StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
  3581. strArray[i] = string.Join( "‖", StrArray2 );
  3582. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  3583. break;
  3584. }
  3585. }
  3586. }
  3587. }
  3588. if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约服务单标题" ) == -1 )
  3589. {
  3590. model.PrintSet_PrintSingleTitle += "预约服务单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
  3591. }
  3592. else
  3593. {
  3594. strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  3595. for ( int i = 0; i < strArray.Length; i++ )
  3596. {
  3597. if ( strArray[i].Trim() != "" )
  3598. {
  3599. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3600. switch ( StrArray2[0].Trim() )
  3601. {
  3602. case "预约服务单标题":
  3603. StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
  3604. strArray[i] = string.Join( "‖", StrArray2 );
  3605. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  3606. break;
  3607. }
  3608. }
  3609. }
  3610. }
  3611. if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约婚庆单标题" ) == -1 )
  3612. {
  3613. model.PrintSet_PrintSingleTitle += "预约婚庆单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
  3614. }
  3615. else
  3616. {
  3617. strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
  3618. for ( int i = 0; i < strArray.Length; i++ )
  3619. {
  3620. if ( strArray[i].Trim() != "" )
  3621. {
  3622. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3623. switch ( StrArray2[0].Trim() )
  3624. {
  3625. case "预约婚庆单标题":
  3626. StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
  3627. strArray[i] = string.Join( "‖", StrArray2 );
  3628. model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
  3629. break;
  3630. }
  3631. }
  3632. }
  3633. }
  3634. #endregion
  3635. #region 预约单LOG
  3636. string StrIamgeLog = "";
  3637. if ( this.pictGlobalOrderLOG.Image != null )
  3638. {
  3639. StrIamgeLog = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictGlobalOrderLOG ) );
  3640. }
  3641. if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约婚纱单LOG" ) == -1 )
  3642. {
  3643. model.PrintSet_PrintSingleLOG += "预约婚纱单LOG‖" + StrIamgeLog + "∥";
  3644. }
  3645. else
  3646. {
  3647. strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  3648. for ( int i = 0; i < strArray.Length; i++ )
  3649. {
  3650. if ( strArray[i].Trim() != "" )
  3651. {
  3652. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3653. if ( StrArray2[0].Trim() == "预约婚纱单LOG" )
  3654. {
  3655. StrArray2[1] = StrIamgeLog;
  3656. strArray[i] = string.Join( "‖", StrArray2 );
  3657. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  3658. break;
  3659. }
  3660. }
  3661. }
  3662. }
  3663. if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约儿童单LOG" ) == -1 )
  3664. {
  3665. model.PrintSet_PrintSingleLOG += "预约儿童单LOG‖" + StrIamgeLog + "∥";
  3666. }
  3667. else
  3668. {
  3669. strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  3670. for ( int i = 0; i < strArray.Length; i++ )
  3671. {
  3672. if ( strArray[i].Trim() != "" )
  3673. {
  3674. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3675. if ( StrArray2[0].Trim() == "预约儿童单LOG" )
  3676. {
  3677. StrArray2[1] = StrIamgeLog;
  3678. strArray[i] = string.Join( "‖", StrArray2 );
  3679. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  3680. break;
  3681. }
  3682. }
  3683. }
  3684. }
  3685. if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约写真单LOG" ) == -1 )
  3686. {
  3687. model.PrintSet_PrintSingleLOG += "预约写真单LOG‖" + StrIamgeLog + "∥";
  3688. }
  3689. else
  3690. {
  3691. strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  3692. for ( int i = 0; i < strArray.Length; i++ )
  3693. {
  3694. if ( strArray[i].Trim() != "" )
  3695. {
  3696. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3697. if ( StrArray2[0].Trim() == "预约写真单LOG" )
  3698. {
  3699. StrArray2[1] = StrIamgeLog;
  3700. strArray[i] = string.Join( "‖", StrArray2 );
  3701. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  3702. break;
  3703. }
  3704. }
  3705. }
  3706. }
  3707. if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约服务单LOG" ) == -1 )
  3708. {
  3709. model.PrintSet_PrintSingleLOG += "预约服务单LOG‖" + StrIamgeLog + "∥";
  3710. }
  3711. else
  3712. {
  3713. strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  3714. for ( int i = 0; i < strArray.Length; i++ )
  3715. {
  3716. if ( strArray[i].Trim() != "" )
  3717. {
  3718. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3719. if ( StrArray2[0].Trim() == "预约服务单LOG" )
  3720. {
  3721. StrArray2[1] = StrIamgeLog;
  3722. strArray[i] = string.Join( "‖", StrArray2 );
  3723. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  3724. break;
  3725. }
  3726. }
  3727. }
  3728. }
  3729. if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约婚庆单LOG" ) == -1 )
  3730. {
  3731. model.PrintSet_PrintSingleLOG += "预约婚庆单LOG‖" + StrIamgeLog + "∥";
  3732. }
  3733. else
  3734. {
  3735. strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
  3736. for ( int i = 0; i < strArray.Length; i++ )
  3737. {
  3738. if ( strArray[i].Trim() != "" )
  3739. {
  3740. string[] StrArray2 = strArray[i].Trim().Split( '‖' );
  3741. if ( StrArray2[0].Trim() == "预约婚庆单LOG" )
  3742. {
  3743. StrArray2[1] = StrIamgeLog;
  3744. strArray[i] = string.Join( "‖", StrArray2 );
  3745. model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
  3746. break;
  3747. }
  3748. }
  3749. }
  3750. }
  3751. #endregion
  3752. clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
  3753. break;
  3754. }
  3755. }
  3756. #endregion
  3757. if ( clist.Count > 0 )
  3758. {
  3759. if ( MessageBoxCustom.Show( "保存后,将覆盖'" + EnumPublic.PrintTypeEnum.订单预约单.ToString() + "'的所有'注意事项'、'打印单标题','字体大小','Log图片',你确定要继续保存吗?", "温馨提示", MessageBoxButtons.YesNo ) == DialogResult.No )
  3760. {
  3761. return;
  3762. }
  3763. if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
  3764. {
  3765. MessageBoxCustom.Show( "保存全局预约单设置失败!" );
  3766. return;
  3767. }
  3768. this.GetModelListPrinterSetNow();
  3769. this.GetModelSystemConfigure();
  3770. MessageBoxCustom.Show( "保存成功!" );
  3771. }
  3772. }
  3773. /// <summary>
  3774. /// 全局LOG下载
  3775. /// </summary>
  3776. /// <param name="sender"></param>
  3777. /// <param name="e"></param>
  3778. void btnGlobalOrderDownloadLOG_Click( object sender, EventArgs e )
  3779. {
  3780. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictGlobalOrderLOG, "全局预约单LOG" );
  3781. }
  3782. /// <summary>
  3783. /// 全局LOG浏览选择
  3784. /// </summary>
  3785. /// <param name="sender"></param>
  3786. /// <param name="e"></param>
  3787. void btnGlobalOrderBrowseLOG_Click( object sender, EventArgs e )
  3788. {
  3789. this.BrowseLogPhoto( this.pictGlobalOrderLOG );
  3790. }
  3791. /// <summary>
  3792. /// 全局LOG删除
  3793. /// </summary>
  3794. /// <param name="sender"></param>
  3795. /// <param name="e"></param>
  3796. void btnGlobalOrderDeleteLOG_Click( object sender, EventArgs e )
  3797. {
  3798. this.pictGlobalOrderLOG.Image = null;
  3799. }
  3800. #endregion
  3801. #region 绑定打印模拟数据
  3802. /// <summary>
  3803. /// 绑定新增的打印模板
  3804. /// </summary>
  3805. public void InitSqlPrintData()
  3806. {
  3807. LYFZ.BLL.BLL_ErpPrinterSetNow printSetNowBll = new BLL.BLL_ErpPrinterSetNow();
  3808. LYFZ.BLL.BLL_ErpPrinterTemplateSet prinTemplateSetBll = new BLL.BLL_ErpPrinterTemplateSet();
  3809. DataTable dtNow = printSetNowBll.GetList( " PrintSet_TemplateName='礼服出租清单_风格2' or PrintSet_TemplateName = '礼服出售清单_风格2' " ).Tables[0];
  3810. DataTable dtTemplateSet = prinTemplateSetBll.GetList( " TptSet_TemplateName='礼服出租清单_风格2' or TptSet_TemplateName = '礼服出售清单_风格2' " ).Tables[0];
  3811. DataRow[] drNowList = dtNow.Select( " PrintSet_TemplateName = '礼服出租清单_风格2' " );
  3812. if ( drNowList.Length == 0 )
  3813. {
  3814. LYFZ.Model.Model_ErpPrinterSetNow printNowModel = new Model.Model_ErpPrinterSetNow();
  3815. printNowModel.PrintSet_DividedShopNumber = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.CurrentCompanyInfoID;
  3816. printNowModel.PrintSet_TemplateName = "礼服出租清单_风格2";
  3817. printNowModel.PrintSet_MachineType = 1;
  3818. printNowModel.PrintSet_TemplateParentNumber = 25;
  3819. printNowModel.PrintSet_CreateName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
  3820. printNowModel.PrintSet_CreateDatetime = DateTime.Now;
  3821. printSetNowBll.Add( printNowModel );
  3822. LYFZ.Model.Model_ErpPrinterTemplateSet printTemplateModel = new Model.Model_ErpPrinterTemplateSet();
  3823. printTemplateModel.TptSet_TemplateName = "礼服出租清单_风格2";
  3824. printTemplateModel.TptSet_TemplateAliases = "礼服出租清单_风格A4";
  3825. printTemplateModel.TptSet_TemplateType = 0;
  3826. printTemplateModel.TptSet_MachineType = 1;
  3827. printTemplateModel.TptSet_TemplateParentNumber = 25;
  3828. printTemplateModel.TptSet_PrintTypeName = "礼服出租清单";
  3829. prinTemplateSetBll.Add( printTemplateModel );
  3830. }
  3831. drNowList = dtNow.Select( " PrintSet_TemplateName = '礼服出售清单_风格2' " );
  3832. if ( drNowList.Length == 0 )
  3833. {
  3834. LYFZ.Model.Model_ErpPrinterSetNow printNowModel = new Model.Model_ErpPrinterSetNow();
  3835. printNowModel.PrintSet_DividedShopNumber = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.CurrentCompanyInfoID;
  3836. printNowModel.PrintSet_TemplateName = "礼服出售清单_风格2";
  3837. printNowModel.PrintSet_MachineType = 1;
  3838. printNowModel.PrintSet_TemplateParentNumber = 26;
  3839. printNowModel.PrintSet_CreateName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
  3840. printNowModel.PrintSet_CreateDatetime = DateTime.Now;
  3841. printSetNowBll.Add( printNowModel );
  3842. LYFZ.Model.Model_ErpPrinterTemplateSet printTemplateModel = new Model.Model_ErpPrinterTemplateSet();
  3843. printTemplateModel.TptSet_TemplateName = "礼服出售清单_风格2";
  3844. printTemplateModel.TptSet_TemplateAliases = "礼服出售清单_风格A4";
  3845. printTemplateModel.TptSet_TemplateType = 0;
  3846. printTemplateModel.TptSet_MachineType = 1;
  3847. printTemplateModel.TptSet_TemplateParentNumber = 26;
  3848. printTemplateModel.TptSet_PrintTypeName = "礼服出售清单";
  3849. prinTemplateSetBll.Add( printTemplateModel );
  3850. }
  3851. }
  3852. #endregion
  3853. }
  3854. }