1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Drawing;
- using System.IO;
- using System.Windows.Forms;
- namespace LYFZ.Software.MainBusiness.StudioDataSet
- {
- public partial class PrinterSetFormMain : LYFZ.Software.UI.StudioDataSet.PrinterSetFormMain
- {
- LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpPrinterSetNow pstnbll = new BLL.BLL_ErpPrinterSetNow();
- LYFZ.BLL.BLL_ErpSystemConfigure scbll = new BLL.BLL_ErpSystemConfigure();
- LYFZ.BLL.BLL_ErpPrinterTemplateSet ptstbll = new BLL.BLL_ErpPrinterTemplateSet();
- /// <summary>
- /// 是否保存
- /// </summary>
- public bool IsSaveed = false;
- /// <summary>
- /// 调用时要单独显示的模块名
- /// </summary>
- public string ModuleName = "";
- List<LYFZ.Model.Model_ErpPrinterSetNow> mlist = new List<Model.Model_ErpPrinterSetNow>();
- string StrDividedShopID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID();
- string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- public PrinterSetFormMain()
- {
- InitSqlPrintData();
- this.Load += PrinterSetFormMain_Load;
- this.Shown += PrinterSetFormMain_Shown;
- this.tbControl1.SelectedIndexChanged += tbControl1_SelectedIndexChanged;
- this.tbControl2.SelectedIndexChanged += tbControl2_SelectedIndexChanged;
- this.dgvDataPrinterSet.Click += dgvDataPrinterSet_Click;
- this.dgvDataPrinterSet.CellMouseDoubleClick += dgvDataPrinterSet_CellMouseDoubleClick;
- this.dgvDataPrinterSet.CellMouseDown += dgvDataPrinterSet_CellMouseDown;
- this.dgvDataPrinterSet.RowsAdded += dgvDataPrinterSet_RowsAdded;
- this.contextMenuStrip1.ItemClicked += contextMenuStrip1_ItemClicked;
- this.chkfrmYes.CheckedChanged += chkfrmYes_CheckedChanged;
- this.chkfrmNo.CheckedChanged += chkfrmNo_CheckedChanged;
- this.btnHistorySet.Click += btnHistorySet_Click;
- this.btnfrmOK.Click += btnfrmOK_Click;
- this.btnfrmCancel.Click += btnfrmCancel_Click;
- this.btnfrmColse.Click += btnfrmColse_Click;
- this.panelEx6.MouseDown += panelEx6_MouseDown;
- this.panelEx6.MouseMove += panelEx6_MouseMove;
- this.panelEx7.MouseDown += panelEx6_MouseDown;
- this.panelEx7.MouseMove += panelEx6_MouseMove;
- this.dgvDataPrinterSet.KeyUp += dgvDataPrinterSet_KeyUp;
- this.tbControl2.MouseDoubleClick += tbControl2_MouseDoubleClick;
- this.btnSaveed1.Click += btnSaveed1_Click;
- this.btnSaveed2.Click += btnSaveed2_Click;
- this.btnGlobalOrderDownloadLOG.Click += btnGlobalOrderDownloadLOG_Click;
- this.btnGlobalOrderBrowseLOG.Click += btnGlobalOrderBrowseLOG_Click;
- this.btnGlobalOrderDeleteLOG.Click += btnGlobalOrderDeleteLOG_Click;
- #region 其他设置
- this.treevModelSet.NodeMouseClick += treevModelSet_NodeMouseClick;
- this.btnSaveed.Click += btnSaveed_Click;
- this.btnCancel.Click += btnCancel_Click;
- this.btnOrderBrowseWeddingLOG.Click += btnOrderBrowseWeddingLOG_Click;
- this.btnOrderDeleteWeddingLOG.Click += btnOrderDeleteWeddingLOG_Click;
- this.btnOrderDownloadWeddingLOG.Click += btnOrderDownloadWeddingLOG_Click;
- this.btnOrderChildDownloadLOG.Click += btnOrderChildDownloadLOG_Click;
- this.btnOrderChildBrowseLOG.Click += btnOrderChildBrowseLOG_Click;
- this.btnOrderChildDeleteLOG.Click += btnOrderChildDeleteLOG_Click;
- this.btnOrderPortraitDownloadLOG.Click += btnOrderPortraitDownloadLOG_Click;
- this.btnOrderPortraitBrowseLOG.Click += btnOrderPortraitBrowseLOG_Click;
- this.btnOrderPortraitDeleteLOG.Click += btnOrderPortraitDeleteLOG_Click;
- this.btnOrderWeddingCeremonyDownloadLOG.Click += btnOrderWeddingCeremonyDownloadLOG_Click;
- this.btnOrderWeddingCeremonyBrowseLOG.Click += btnOrderWeddingCeremonyBrowseLOG_Click;
- this.btnOrderWeddingCeremonyDeleteLOG.Click += btnOrderWeddingCeremonyDeleteLOG_Click;
- this.btnOrderServiceDownloadLOG.Click += btnOrderServiceDownloadLOG_Click;
- this.btnOrderServiceBrowseLOG.Click += btnOrderServiceBrowseLOG_Click;
- this.btnOrderServiceDeleteLOG.Click += btnOrderServiceDeleteLOG_Click;
- #endregion
- this.tbPage1.Parent = null;
- this.tbPage2.Parent = null;
- this.tbPage3.Parent = null;
- this.tbPage4.Parent = null;
- this.tabControl3.Visible = false;
- TabPage1Bind();
- }
- void PrinterSetFormMain_Shown( object sender, EventArgs e )
- {
- /*bool b = LYFZ.Software.MainBusiness.VersionControl.StaticVersion.UIFunctionVersion(VersionControl.VersionFunctionEnum.打印根据订单类型区分打印);
- if (!b)
- {
- this.Close();
- return;
- }*/
- }
- #region 主事件
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void PrinterSetFormMain_Load( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintInitialSetting();
- //this.TabPage1Bind();
- if ( !string.IsNullOrEmpty( this.ModuleName ) )
- {
- this.btnHistorySet.Visible = false;
- switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), this.ModuleName.Trim() ) )
- {
- case EnumPublic.PrintTypeEnum.订单预约单:
- case EnumPublic.PrintTypeEnum.制作单明细:
- case EnumPublic.PrintTypeEnum.礼服出售清单:
- case EnumPublic.PrintTypeEnum.礼服出租清单:
- case EnumPublic.PrintTypeEnum.订单收款:
- case EnumPublic.PrintTypeEnum.会员充值收款:
- case EnumPublic.PrintTypeEnum.会员服务收款:
- case EnumPublic.PrintTypeEnum.会员服务消费:
- case EnumPublic.PrintTypeEnum.礼服出售收款:
- case EnumPublic.PrintTypeEnum.礼服出租收款:
- case EnumPublic.PrintTypeEnum.礼服出租退押金:
- case EnumPublic.PrintTypeEnum.其它收入:
- case EnumPublic.PrintTypeEnum.其它消费收款:
- case EnumPublic.PrintTypeEnum.现金支出:
- case EnumPublic.PrintTypeEnum.新摄会返还款:
- case EnumPublic.PrintTypeEnum.新摄会收款:
- break;
- default:
- if ( this.tbControl2.TabPages.Count > 1 )
- {
- this.tbControl2.TabPages.RemoveAt( 1 );
- }
- break;
- }
- }
- }
- LYFZ.Model.Model_ErpSystemConfigure modelsc;
- /// <summary>
- /// 其他设置选项卡选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void tbControl1_SelectedIndexChanged( object sender, EventArgs e )
- {
- if ( this.tbControl2.SelectedIndex == 1 )
- {
- bool isTrun = true;
- while ( isTrun )
- {
- this.GetModelSystemConfigure();
- if ( modelsc.ID <= 0 )
- {
- modelsc.Sconfig_Code = "PrintGlobalSet";
- modelsc.Sconfig_Name = "打印全局设置";
- modelsc.Sconfig_Value = "";
- modelsc.Sconfig_IsEnabled = true;
- modelsc.Sconfig_Remark = "打印机设置里的全局设置";
- modelsc.Sconfig_Type = "";
- modelsc.Sconfig_Order = 1;
- modelsc.Sconfig_CreateDatetime = SDateTime.Now;
- modelsc.Sconfig_CreateName = "";
- if ( !scbll.Add( modelsc ) )
- {
- MessageBoxCustom.Show( "添加打印全局设置失败!" );
- isTrun = false;
- }
- }
- else
- {
- isTrun = false;
- }
- }
- string[] StrArray = modelsc.Sconfig_Value.Trim().Split( '∥' );
- for ( int i = 0; i < StrArray.Length; i++ )
- {
- if ( !string.IsNullOrEmpty( StrArray[i].Trim() ) )
- {
- string[] StrArray2 = StrArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "收款单说明":
- this.txtGlobalPaymentExplain.Text = StrArray2[1].Trim();
- break;
- case "预约单内容详情字体大小":
- this.cmbtreevGlobalContentDetail.TextFindTag( StrArray2[1].Trim() );
- break;
- case "预约单注意事项字体大小":
- this.cmbtreevGlobalNoteMatters.TextFindTag( StrArray2[1].Trim() );
- break;
- case "预约单标题":
- this.txtGlobalOrderTitle.Text = StrArray2[1].Trim();
- break;
- case "预约单LOG":
- this.pictGlobalOrderLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( StrArray2[1].Trim() ) );
- break;
- case "预约单注意事项说明":
- this.txtGlobalOrderNoteMatter.Text = StrArray2[1].Trim();
- break;
- }
- }
- }
- }
- }
- void GetModelSystemConfigure()
- {
- modelsc = scbll.GetModel( "Sconfig_Code", "PrintGlobalSet" );
- }
- /// <summary>
- /// 第二个选项卡的选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void tbControl2_SelectedIndexChanged( object sender, EventArgs e )
- {
- if ( this.tbControl2.SelectedIndex == 1 )
- {
- 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];
- this.treevModelSet.Nodes.Clear();
- TreeNode root = null;
- if ( string.IsNullOrEmpty( this.ModuleName ) )
- {
- string[] StrModel = Enum.GetNames( typeof( LYFZ.EnumPublic.PrintTypeEnum ) );
- for ( int i = 0; i < StrModel.Length; i++ )
- {
- LYFZ.EnumPublic.PrintTypeEnum printType = (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), StrModel[i] );
- switch ( printType )
- {
- case EnumPublic.PrintTypeEnum.订单预约单:
- case EnumPublic.PrintTypeEnum.制作单明细:
- case EnumPublic.PrintTypeEnum.礼服出售清单:
- case EnumPublic.PrintTypeEnum.礼服出租清单:
- case EnumPublic.PrintTypeEnum.订单收款:
- case EnumPublic.PrintTypeEnum.会员充值收款:
- case EnumPublic.PrintTypeEnum.会员服务收款:
- case EnumPublic.PrintTypeEnum.会员服务消费:
- case EnumPublic.PrintTypeEnum.礼服出售收款:
- case EnumPublic.PrintTypeEnum.礼服出租收款:
- case EnumPublic.PrintTypeEnum.礼服出租退押金:
- case EnumPublic.PrintTypeEnum.其它收入:
- case EnumPublic.PrintTypeEnum.其它消费收款:
- case EnumPublic.PrintTypeEnum.现金支出:
- case EnumPublic.PrintTypeEnum.新摄会返还款:
- case EnumPublic.PrintTypeEnum.新摄会收款:
- //case EnumPublic.PrintTypeEnum.员工奖罚:
- root = new TreeNode();
- root.Text = StrModel[i].ToString();
- root.Tag = Convert.ToInt32( Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), StrModel[i] ) );
- this.ForBindEnum( root, Convert.ToInt32( root.Tag ), tbl );
- this.treevModelSet.Nodes.Add( root );
- break;
- default:
- break;
- }
- }
- }
- else
- {
- LYFZ.EnumPublic.PrintTypeEnum printType = (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), this.ModuleName.Trim() );
- root = new TreeNode();
- root.Text = printType.ToString();
- root.Tag = Convert.ToInt32( printType );
- this.ForBindEnum( root, Convert.ToInt32( root.Tag ), tbl );
- this.treevModelSet.Nodes.Add( root );
- }
- this.treevModelSet.Nodes[0].ExpandAll();
- }
- }
- /// <summary>
- /// 绑定第二级
- /// </summary>
- /// <param name="nodes"></param>
- /// <param name="StrParentID"></param>
- /// <param name="tbl"></param>
- void ForBindEnum( TreeNode nodes, int StrParentID, DataTable tbl )
- {
- if ( tbl.Rows.Count > 0 )
- {
- DataRow[] dtRow = tbl.Select( "TptSet_TemplateParentNumber = '" + StrParentID + "'" );
- if ( dtRow.Length > 0 )
- {
- TreeNode node;
- for ( int i = 0; i < dtRow.Length; i++ )
- {
- node = new TreeNode();
- node.Text = dtRow[i]["TptSet_TemplateAliases"].ToString();
- node.Tag = dtRow[i]["TptSet_TemplateParentNumber"].ToString();
- node.Name = dtRow[i]["ID"].ToString();
- nodes.Nodes.Add( node );
- }
- }
- }
- }
- /// <summary>
- /// 打开历史设置
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnHistorySet_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.StudioDataSet.DefaultPrinterSetFormMain frmDefault = new DefaultPrinterSetFormMain();
- frmDefault.Show();
- }
- /// <summary>
- /// 显示历史设置按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void tbControl2_MouseDoubleClick( object sender, MouseEventArgs e )
- {
- this.btnHistorySet.Visible = true;
- }
- /// <summary>
- /// 显示历史设置按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvDataPrinterSet_KeyUp( object sender, KeyEventArgs e )
- {
- if ( e.Control && e.KeyCode == Keys.F11 )
- {
- this.btnHistorySet.Visible = true;
- }
- }
- #endregion
- #region 打印机设置
- /// <summary>
- /// 第一个选项卡的第一面列表绑定
- /// </summary>
- void TabPage1Bind()
- {
- this.GetModelListPrinterSetNow();
- string StrWhere = "";
- if ( !string.IsNullOrEmpty( this.ModuleName ) )
- {
- StrWhere += " and TptSet_TemplateParentNumber = '" + (int)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), this.ModuleName ) + "'";
- }
- DataTable tbl = orbll.GetView_Custom( "tb_ErpPrinterSetNow Left JOIN tb_ErpPrinterTemplateSet on TptSet_TemplateName = PrintSet_TemplateName",
- StrWhere: "PrintSet_DividedShopNumber = '" + StrDividedShopID + "'" + StrWhere + "",
- filedOrder: "PrintSet_TemplateParentNumber ASC",
- 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];
- foreach ( DataRow dr in tbl.Rows )
- {
- if ( dr["纸张类型"] != null && dr["纸张类型"].ToString().Trim() != "" )
- {
- dr["纸张类型"] = Enum.GetName( typeof( LYFZ.EnumPublic.PrinterPaperType ), Convert.ToInt32( dr["纸张类型"] ) );
- }
- else
- {
- dr["纸张类型"] = "";
- }
- if ( dr["打印名称"] != null )
- {
- switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), dr["打印名称"].ToString() ) )
- {
- case EnumPublic.PrintTypeEnum.订单预约单:
- case EnumPublic.PrintTypeEnum.财务报表年:
- case EnumPublic.PrintTypeEnum.财务报表日:
- case EnumPublic.PrintTypeEnum.财务报表月:
- case EnumPublic.PrintTypeEnum.选片缩略图:
- case EnumPublic.PrintTypeEnum.制作单明细:
- dr["打印标题"] = "不可设置";
- //dr["打印标题"] = Color.Silver;
- break;
- }
- }
- }
- string strHideField = "ID,PTID,模块名称,TptSet_TemplateParentNumber";
- this.dgvDataPrinterSet.DataSource( tbl, strHideField: strHideField );
- }
- void GetModelListPrinterSetNow()
- {
- System.Threading.Thread t = new System.Threading.Thread( new System.Threading.ThreadStart( delegate ()
- {
- DataTable dt = orbll.GetView_Custom( "tb_ErpPrinterSetNow",
- StrWhere: "PrintSet_DividedShopNumber='" + LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID() + "'",
- 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];
- for ( int i = 0; i < dt.Rows.Count; i++ )
- {
- LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.DataRowToModel( dt.Rows[i] );
- mlist.Add( model );
- }
- } ) );
- t.Start();
- }
- /// <summary>
- /// 第一个选项卡的列表列点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvDataPrinterSet_Click( object sender, EventArgs e )
- {
- this.panelfrmShow.Visible = false;
- }
- /// <summary>
- /// 第一个选项卡的列表列双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvDataPrinterSet_CellMouseDoubleClick( object sender, DataGridViewCellMouseEventArgs e )
- {
- if ( this.dgvDataPrinterSet.Rows.Count > 0 )
- {
- if ( this.dgvDataPrinterSet.CurrentRow.Index >= 0 && this.dgvDataPrinterSet.CurrentCell.ColumnIndex >= 0 )
- {
- DateTime StrTime = SDateTime.Now;
- this.panelfrmShow.Visible = false;
- if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "风格名称" )
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetTextSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetTextSuperSmallForm();
- frm.Text = "风格名称";
- frm.StrValue = this.dgvDataPrinterSet.CurrentRow.Cells["风格名称"].Value.ToString().Trim();
- frm.ShowDialog();
- if ( frm.IsOK )
- {
- if ( frm.StrValue.Trim().Length > 40 )
- {
- MessageBoxCustom.Show( "标题名称长度不能超过40字符!" );
- return;
- }
- LYFZ.Model.Model_ErpPrinterTemplateSet modelPt = ptstbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["PTID"].Value ) );
- modelPt.TptSet_TemplateAliases = frm.StrValue;
- modelPt.TptSet_UpdateDateTime = StrTime;
- modelPt.TptSet_UpdateName = StrUserID;
- if ( !ptstbll.Update( modelPt ) )
- {
- MessageBoxCustom.Show( "修改失败!" );
- return;
- }
- this.dgvDataPrinterSet.CurrentRow.Cells["风格名称"].Value = modelPt.TptSet_TemplateAliases;
- }
- }
- else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "默认打印机名称" )
- {
- PrintDialog dlg = new PrintDialog();
- if ( dlg.ShowDialog() == DialogResult.OK )
- {
- LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) );
- model.PrintSet_PrintPath = dlg.PrinterSettings.PrinterName;
- model.PrintSet_PrintPathName = System.IO.Path.GetFileName( model.PrintSet_PrintPath );
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- if ( !pstnbll.Update( model ) )
- {
- MessageBoxCustom.Show( "设置失败!" );
- return;
- }
- this.dgvDataPrinterSet.CurrentRow.Cells["默认打印机名称"].Value = model.PrintSet_PrintPath;
- }
- }
- else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "打印标题" )
- {
- if ( this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value.ToString().Trim() == "不可设置" )
- {
- return;
- }
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetTextSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetTextSuperSmallForm();
- frm.Text = "打印标题";
- frm.IsValueNull = true;
- frm.StrValue = this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value.ToString().Trim();
- frm.ShowDialog();
- if ( frm.IsOK )
- {
- if ( frm.StrValue.Trim().Length > 40 )
- {
- MessageBoxCustom.Show( "标题名称长度不能超过40字符!" );
- return;
- }
- if ( frm.StrValue.Trim() == "不可设置" )
- {
- MessageBoxCustom.Show( "打印标题不能设置为‘不可设置’,与系统使用名词冲突!" );
- return;
- }
- LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) );
- model.PrintSet_PrintSingleTitle = frm.StrValue;
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- if ( !pstnbll.Update( model ) )
- {
- MessageBoxCustom.Show( "修改失败!" );
- return;
- }
- this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value = model.PrintSet_PrintSingleTitle;
- }
- }
- else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "是否默认" )
- {
- this.panelfrmShow.Location = new Point( ( this.Width / 2 ), ( this.Height / 2 - this.panelfrmShow.Height ) );
- if ( this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value.ToString().Trim() == "默认" )
- {
- this.chkfrmYes.Checked = true;
- }
- else
- {
- this.chkfrmNo.Checked = true;
- }
- this.panelfrmShow.Visible = true;
- }
- this.IsSaveed = true;
- }
- }
- }
- /// <summary>
- /// 第一个选项卡的列表右键菜单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvDataPrinterSet_CellMouseDown( object sender, DataGridViewCellMouseEventArgs e )
- {
- if ( this.dgvDataPrinterSet.Rows.Count > 0 )
- {
- if ( e.ColumnIndex >= 0 && e.RowIndex >= 0 )
- {
- if ( e.Button == MouseButtons.Right )
- {
- this.contextMenuStrip1.Items.Clear();
- this.contextMenuStrip1.Show( MousePosition.X, MousePosition.Y );
- ToolStripMenuItem item = null;
- if ( this.dgvDataPrinterSet.SelectedRows.Count > 1 )
- {
- if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "默认打印机名称" )
- {
- item = new ToolStripMenuItem();
- item.Text = "清空打印机";
- item.Tag = "StrClearPrinter";
- contextMenuStrip1.Items.Add( item );
- item = new ToolStripMenuItem();
- item.Text = "设置打印机";
- item.Tag = "StrPrinter";
- contextMenuStrip1.Items.Add( item );
- }
- else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "打印标题" )
- {
- int forICount = 0;
- for ( int i = 0; i < this.dgvDataPrinterSet.SelectedRows.Count; i++ )
- {
- if ( this.dgvDataPrinterSet.SelectedRows[i].Cells["打印标题"].Value.ToString().Trim() == "不可设置" )
- {
- forICount++;
- }
- }
- if ( forICount < this.dgvDataPrinterSet.SelectedRows.Count )
- {
- item = new ToolStripMenuItem();
- item.Text = "重置打印标题";
- item.Tag = "StrResetTitle";
- contextMenuStrip1.Items.Add( item );
- }
- }
- }
- else if ( this.dgvDataPrinterSet.SelectedRows.Count == 1 )
- {
- if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "风格名称" )
- {
- item = new ToolStripMenuItem();
- item.Text = "修改风格名称";
- item.Tag = "StrUpdateStyleName";
- contextMenuStrip1.Items.Add( item );
- }
- else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "默认打印机名称" )
- {
- item = new ToolStripMenuItem();
- item.Text = "清空值";
- item.Tag = "StrClearPrinter";
- contextMenuStrip1.Items.Add( item );
- item = new ToolStripMenuItem();
- item.Text = "设置打印机";
- item.Tag = "StrPrinter";
- contextMenuStrip1.Items.Add( item );
- }
- else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "打印标题" )
- {
- if ( this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value.ToString().Trim() == "不可设置" )
- {
- return;
- }
- item = new ToolStripMenuItem();
- item.Text = "重置打印标题";
- item.Tag = "StrResetTitle";
- contextMenuStrip1.Items.Add( item );
- }
- else if ( this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "是否默认" || this.dgvDataPrinterSet.Columns[e.ColumnIndex].Name.Trim() == "纸张类型" )
- {
- if ( this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value == null )
- {
- item = new ToolStripMenuItem();
- item.Text = "取消默认";
- item.Tag = "StrCancelDefault";
- contextMenuStrip1.Items.Add( item );
- item = new ToolStripMenuItem();
- item.Text = "设为默认";
- item.Tag = "StrSetDefault";
- contextMenuStrip1.Items.Add( item );
- }
- else if ( this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value.ToString().Trim() == "默认" )
- {
- item = new ToolStripMenuItem();
- item.Text = "取消默认";
- item.Tag = "StrCancelDefault";
- contextMenuStrip1.Items.Add( item );
- }
- else
- {
- item = new ToolStripMenuItem();
- item.Text = "设为默认";
- item.Tag = "StrSetDefault";
- contextMenuStrip1.Items.Add( item );
- }
- }
- }
- }
- }
- }
- }
- /// <summary>
- /// 打印机设置列表绑定
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvDataPrinterSet_RowsAdded( object sender, DataGridViewRowsAddedEventArgs e )
- {
- if ( this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value != null && this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value.ToString().Trim() != "" )
- {
- this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value = Enum.GetName( typeof( LYFZ.EnumPublic.PrinterPaperType ), Convert.ToInt32( this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value ) );
- }
- else
- {
- this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["纸张类型"].Value = "";
- }
- if ( this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["打印名称"].Value != null )
- {
- switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["打印名称"].Value.ToString() ) )
- {
- case EnumPublic.PrintTypeEnum.订单预约单:
- case EnumPublic.PrintTypeEnum.财务报表年:
- case EnumPublic.PrintTypeEnum.财务报表日:
- case EnumPublic.PrintTypeEnum.财务报表月:
- case EnumPublic.PrintTypeEnum.选片缩略图:
- case EnumPublic.PrintTypeEnum.制作单明细:
- this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["打印标题"].Value = "不可设置";
- this.dgvDataPrinterSet.Rows[e.RowIndex].Cells["打印标题"].Style.ForeColor = Color.Silver;
- break;
- }
- }
- }
- /// <summary>
- /// 右键菜单选择事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void contextMenuStrip1_ItemClicked( object sender, ToolStripItemClickedEventArgs e )
- {
- ToolStripItem item = e.ClickedItem;
- List<LYFZ.Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- LYFZ.Model.Model_ErpPrinterSetNow model = null;
- DateTime StrTime = SDateTime.Now;
- if ( item.Tag.ToString().Trim() == "StrUpdateStyleName" )
- {
- string StrStyleName = "";
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetTextSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetTextSuperSmallForm();
- frm.Text = "风格名称";
- frm.StrValue = this.dgvDataPrinterSet.CurrentRow.Cells["风格名称"].Value.ToString().Trim();
- frm.ShowDialog();
- if ( frm.IsOK )
- {
- StrStyleName = frm.StrValue;
- }
- else
- {
- return;
- }
- if ( StrStyleName.Trim().Length > 40 )
- {
- MessageBoxCustom.Show( "标题名称长度不能超过40字符!" );
- return;
- }
- LYFZ.Model.Model_ErpPrinterTemplateSet modelPt = ptstbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["PTID"].Value ) );
- modelPt.TptSet_TemplateAliases = StrStyleName;
- modelPt.TptSet_UpdateDateTime = StrTime;
- modelPt.TptSet_UpdateName = StrUserID;
- clist.Add( ptstbll.GetUpdateCommandInfo( modelPt ) );
- }
- else if ( item.Tag.ToString().Trim() == "StrClearPrinter" )
- {
- for ( int i = 0; i < this.dgvDataPrinterSet.SelectedRows.Count; i++ )
- {
- for ( int j = 0; j < mlist.Count; j++ )
- {
- if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.SelectedRows[i].Cells["ID"].Value ) )
- {
- model = mlist[j];
- break;
- }
- }
- if ( model != null )
- {
- model.PrintSet_PrintPathName = "";
- model.PrintSet_PrintPath = "";
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- }
- }
- }
- else if ( item.Tag.ToString().Trim() == "StrPrinter" )
- {
- string StrName = "";
- string StrPath = "";
- this.contextMenuStrip1.Visible = false;
- PrintDialog dlg = new PrintDialog();
- if ( dlg.ShowDialog() == DialogResult.OK )
- {
- StrPath = dlg.PrinterSettings.PrinterName;
- StrName = System.IO.Path.GetFileName( StrPath );
- }
- else
- {
- return;
- }
- for ( int i = 0; i < this.dgvDataPrinterSet.SelectedRows.Count; i++ )
- {
- for ( int j = 0; j < mlist.Count; j++ )
- {
- if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.SelectedRows[i].Cells["ID"].Value ) )
- {
- model = mlist[j];
- break;
- }
- }
- if ( model != null )
- {
- model.PrintSet_PrintPathName = StrName;
- model.PrintSet_PrintPath = StrPath;
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- }
- }
- }
- else if ( item.Tag.ToString().Trim() == "StrResetTitle" )
- {
- string StrTitle = "";
- this.contextMenuStrip1.Visible = false;
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetTextSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetTextSuperSmallForm();
- frm.Text = "打印标题";
- frm.StrValue = this.dgvDataPrinterSet.CurrentRow.Cells["打印标题"].Value.ToString().Trim();
- frm.IsValueNull = true;
- frm.ShowDialog();
- if ( frm.IsOK )
- {
- StrTitle = frm.StrValue;
- }
- else
- {
- return;
- }
- if ( StrTitle.Trim().Length > 40 )
- {
- MessageBoxCustom.Show( "标题名称长度不能超过40字符!" );
- return;
- }
- if ( frm.StrValue.Trim() == "不可设置" )
- {
- MessageBoxCustom.Show( "打印标题不能设置为‘不可设置’,与系统使用名词冲突!" );
- return;
- }
- for ( int i = 0; i < this.dgvDataPrinterSet.SelectedRows.Count; i++ )
- {
- if ( this.dgvDataPrinterSet.SelectedRows[i].Cells["打印标题"].Value.ToString().Trim() != "不可设置" )
- {
- for ( int j = 0; j < mlist.Count; j++ )
- {
- if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.SelectedRows[i].Cells["ID"].Value ) )
- {
- model = mlist[j];
- break;
- }
- }
- if ( model != null )
- {
- model.PrintSet_PrintSingleTitle = StrTitle;
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- }
- }
- }
- }
- else if ( item.Tag.ToString().Trim() == "StrCancelDefault" )
- {
- for ( int j = 0; j < mlist.Count; j++ )
- {
- if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) )
- {
- model = pstnbll.GetModel( mlist[j].ID );
- break;
- }
- }
- if ( model != null )
- {
- model.PrintSet_PrintDefault = 0;
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- }
- }
- else if ( item.Tag.ToString().Trim() == "StrSetDefault" )
- {
- for ( int j = 0; j < mlist.Count; j++ )
- {
- if ( mlist[j].ID == Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) )
- {
- model = pstnbll.GetModel( mlist[j].ID );
- break;
- }
- }
- if ( model != null )
- {
- model.PrintSet_PrintDefault = 1;
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- model = null;
- for ( int k = 0; k < mlist.Count; k++ )
- {
- 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 ) )
- {
- model = mlist[k];
- break;
- }
- }
- if ( model != null )
- {
- model = pstnbll.GetModel( model.ID );
- model.PrintSet_PrintDefault = 0;
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- }
- }
- }
- if ( clist.Count > 0 )
- {
- if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
- {
- MessageBoxCustom.Show( "设置失败" );
- return;
- }
- this.IsSaveed = true;
- this.TabPage1Bind();
- }
- }
- /// <summary>
- /// 选择是
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkfrmYes_CheckedChanged( object sender, EventArgs e )
- {
- if ( this.chkfrmYes.Checked )
- {
- this.chkfrmNo.Checked = false;
- }
- else
- {
- this.chkfrmNo.Checked = true;
- }
- }
- /// <summary>
- /// 选择否
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkfrmNo_CheckedChanged( object sender, EventArgs e )
- {
- if ( this.chkfrmNo.Checked )
- {
- this.chkfrmYes.Checked = false;
- }
- else
- {
- this.chkfrmYes.Checked = true;
- }
- }
- /// <summary>
- /// 是否默认确定
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnfrmOK_Click( object sender, EventArgs e )
- {
- DateTime StrTime = SDateTime.Now;
- List<LYFZ.Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.GetModel( Convert.ToInt32( this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value ) );
- if ( this.chkfrmYes.Checked )
- {
- model.PrintSet_PrintDefault = 1;
- }
- else
- {
- model.PrintSet_PrintDefault = 0;
- }
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- model = null;
- for ( int k = 0; k < mlist.Count; k++ )
- {
- 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 ) )
- {
- model = mlist[k];
- break;
- }
- }
- if ( model != null )
- {
- if ( this.chkfrmYes.Checked )
- {
- model.PrintSet_PrintDefault = 0;
- }
- else
- {
- model.PrintSet_PrintDefault = 1;
- }
- model.PrintSet_UpdateDateTime = StrTime;
- model.PrintSet_UpdateName = StrUserID;
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- }
- if ( clist.Count > 0 )
- {
- if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
- {
- MessageBoxCustom.Show( "设置失败!" );
- return;
- }
- this.panelfrmShow.Visible = false;
- //this.TabPage1Bind();
- for ( int i = 0; i < this.dgvDataPrinterSet.Rows.Count; i++ )
- {
- if ( this.dgvDataPrinterSet.Rows[i].Cells["TptSet_TemplateParentNumber"].Value.ToString().Trim() == this.dgvDataPrinterSet.CurrentRow.Cells["TptSet_TemplateParentNumber"].Value.ToString().Trim() )
- {
- if ( this.dgvDataPrinterSet.Rows[i].Cells["ID"].Value.ToString().Trim() == this.dgvDataPrinterSet.CurrentRow.Cells["ID"].Value.ToString().Trim() )
- {
- if ( this.chkfrmYes.Checked )
- {
- this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value = "默认";
- }
- else
- {
- this.dgvDataPrinterSet.CurrentRow.Cells["是否默认"].Value = "";
- }
- }
- else
- {
- if ( this.chkfrmYes.Checked )
- {
- this.dgvDataPrinterSet.Rows[i].Cells["是否默认"].Value = "";
- }
- else
- {
- this.dgvDataPrinterSet.Rows[i].Cells["是否默认"].Value = "默认";
- }
- }
- }
- }
- }
- }
- /// <summary>
- /// 取消关闭层
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnfrmCancel_Click( object sender, EventArgs e )
- {
- this.panelfrmShow.Visible = false;
- }
- /// <summary>
- /// 关闭层
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnfrmColse_Click( object sender, EventArgs e )
- {
- this.panelfrmShow.Visible = false;
- }
- private Point f1;
- private Point f2;
- /// <summary>
- /// 鼠标MouseDown的事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void panelEx6_MouseDown( object sender, MouseEventArgs e )
- {
- f1 = e.Location;
- f2 = this.panelfrmShow.Location;
- }
- /// <summary>
- /// 鼠标MouseMove的事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void panelEx6_MouseMove( object sender, MouseEventArgs e )
- {
- if ( e.Button == MouseButtons.Left )
- {
- this.panelfrmShow.Left = f2.X + e.X - f1.X;
- this.panelfrmShow.Top = f2.Y + e.Y - f1.Y;
- }
- }
- #endregion
- #region 其他设置
- /// <summary>
- /// 其他设置_树双击选择
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void treevModelSet_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
- {
- this.GetColor();
- e.Node.ForeColor = Color.Red;
- if ( this.treevModelSet.Nodes.Count > 0 )
- {
- if ( e.Node.Level == 0 && e.Node.Nodes.Count <= 0 )
- {
- return;
- }
- LYFZ.EnumPublic.PrintTypeEnum nodePrint = (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), e.Node.Tag.ToString() );
- LYFZ.Model.Model_ErpPrinterSetNow model = null;
- if ( !string.IsNullOrEmpty( e.Node.Name.Trim() ) )
- {
- this.btnSaveed.Tag = "ID = '" + Convert.ToInt32( e.Node.Name ) + "'";
- model = pstnbll.GetModel( Convert.ToInt32( e.Node.Name ) );
- }
- else
- {
- this.btnSaveed.Tag = "PrintSet_TemplateParentNumber = '" + Convert.ToInt32( e.Node.Tag ) + "' and PrintSet_DividedShopNumber='" + LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID() + "'";
- }
- this.PanelHide();
- switch ( nodePrint )
- {
- case LYFZ.EnumPublic.PrintTypeEnum.订单预约单:
- #region
- #region LOG图片串
- this.tbPage1.Parent = null;
- this.tbPage2.Parent = null;
- this.tbPage3.Parent = null;
- this.tbPage4.Parent = null;
- this.tbPage5.Parent = null;
- switch ( LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType() )
- {
- case EnumPermissions.BusinessType.婚纱版:
- this.tbPage1.Parent = this.tabControl3;
- this.tbPage4.Parent = this.tabControl3;
- break;
- case EnumPermissions.BusinessType.儿童版:
- this.tbPage2.Parent = this.tabControl3;
- break;
- case EnumPermissions.BusinessType.旗舰版:
- this.tbPage1.Parent = this.tabControl3;
- this.tbPage2.Parent = this.tabControl3;
- this.tbPage4.Parent = this.tabControl3;
- break;
- }
- if ( LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.IsEnablePhotoEdition )
- {
- this.tbPage3.Parent = this.tabControl3;
- }
- this.tbPage5.Parent = this.tabControl3;
- this.pictOrderWeddingLOG.Image = null;
- this.pictOrderChildLOG.Image = null;
- this.pictOrderPortraitLOG.Image = null;
- this.pictOrderWeddingCeremonyLOG.Image = null;
- this.pictOrderServiceLOG.Image = null;
- if ( model != null )
- {
- string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] strArrayKey = strArray[i].Trim().Split( '‖' );
- if ( strArrayKey[1].Trim() != "" )
- {
- switch ( strArrayKey[0].Trim() )
- {
- case "预约婚纱单LOG":
- if ( tbPage1 != null )
- {
- this.pictOrderWeddingLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
- }
- break;
- case "预约儿童单LOG":
- if ( tbPage1 != null )
- {
- this.pictOrderChildLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
- }
- break;
- case "预约写真单LOG":
- if ( tbPage1 != null )
- {
- this.pictOrderPortraitLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
- }
- break;
- case "预约婚庆单LOG":
- if ( tbPage1 != null )
- {
- this.pictOrderWeddingCeremonyLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
- }
- break;
- case "预约服务单LOG":
- if ( tbPage1 != null )
- {
- this.pictOrderServiceLOG.Image = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetImage( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.StringToByte( strArrayKey[1].Trim() ) );
- }
- break;
- }
- }
- }
- }
- }
- #endregion
- #region 标题串
- this.txtWeddingTitle.Text = "";
- this.txtChildTitle.Text = "";
- this.txtPortraitTitle.Text = "";
- this.txtWeddingCeremonyTitle.Text = "";
- this.txtServiceTitle.Text = "";
- if ( model != null )
- {
- if ( !string.IsNullOrEmpty( model.PrintSet_PrintSingleTitle ) )
- {
- string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- string[] strArrayKey = strArray[i].Trim().Split( '‖' );
- switch ( strArrayKey[0].Trim() )
- {
- case "预约婚纱单标题":
- this.txtWeddingTitle.Text = strArrayKey[1].Trim();
- break;
- case "预约儿童单标题":
- this.txtChildTitle.Text = strArrayKey[1].Trim();
- break;
- case "预约写真单标题":
- this.txtPortraitTitle.Text = strArrayKey[1].Trim();
- break;
- case "预约婚庆单标题":
- this.txtWeddingCeremonyTitle.Text = strArrayKey[1].Trim();
- break;
- case "预约服务单标题":
- this.txtServiceTitle.Text = strArrayKey[1].Trim();
- break;
- }
- }
- }
- }
- #endregion
- #region 其他Json串
- this.cmbtreevContentDetailWedding.SetTextAndTag_ValueNull();
- this.cmbtreevNoteMattersWedding.SetTextAndTag_ValueNull();
- this.txtOrderNoteMatterWedding.Text = "";
- this.cmbtreevContentDetailChild.SetTextAndTag_ValueNull();
- this.cmbtreevNoteMattersChild.SetTextAndTag_ValueNull();
- this.txtOrderNoteMatterChild.Text = "";
- this.cmbtreevContentDetailPortrait.SetTextAndTag_ValueNull();
- this.cmbtreevNoteMattersPortrait.SetTextAndTag_ValueNull();
- this.txtOrderNoteMatterPortrait.Text = "";
- this.cmbtreevContentDetailWeddingCeremony.SetTextAndTag_ValueNull();
- this.cmbtreevNoteMattersWeddingCeremony.SetTextAndTag_ValueNull();
- this.txtOrderNoteMatterWeddingCeremony.Text = "";
- this.cmbtreevContentDetailService.SetTextAndTag_ValueNull();
- this.cmbtreevNoteMattersService.SetTextAndTag_ValueNull();
- this.txtOrderNoteMattersService.Text = "";
- if ( model != null )
- {
- if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
- {
- string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- string[] strArrayKey = strArray[i].Trim().Split( '‖' );
- switch ( strArrayKey[0].Trim() )
- {
- case "预约单内容详情字体大小":
- if ( tbPage1 != null )
- {
- this.cmbtreevContentDetailWedding.TextFindTag( strArrayKey[1].Trim() );
- }
- else
- {
- this.cmbtreevContentDetailChild.TextFindTag( strArrayKey[1].Trim() );
- }
- break;
- case "预约单注意事项字体大小":
- if ( tbPage1 != null )
- {
- this.cmbtreevNoteMattersWedding.TextFindTag( strArrayKey[1].Trim() );
- }
- else
- {
- this.cmbtreevNoteMattersChild.TextFindTag( strArrayKey[1].Trim() );
- }
- break;
- case "预约单注意事项说明":
- if ( tbPage1 != null )
- {
- this.txtOrderNoteMatterWedding.Text = strArrayKey[1].Trim();
- }
- else
- {
- this.txtOrderNoteMatterChild.Text = strArrayKey[1].Trim();
- }
- break;
- case "婚纱预约单内容详情字体大小":
- this.cmbtreevContentDetailWedding.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "婚纱预约单注意事项字体大小":
- this.cmbtreevNoteMattersWedding.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "婚纱预约单注意事项说明":
- this.txtOrderNoteMatterWedding.Text = strArrayKey[1].Trim();
- break;
- case "儿童预约单内容详情字体大小":
- this.cmbtreevContentDetailChild.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "儿童预约单注意事项字体大小":
- this.cmbtreevNoteMattersChild.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "儿童预约单注意事项说明":
- this.txtOrderNoteMatterChild.Text = strArrayKey[1].Trim();
- break;
- case "写真预约单内容详情字体大小":
- this.cmbtreevContentDetailPortrait.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "写真预约单注意事项字体大小":
- this.cmbtreevNoteMattersPortrait.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "写真预约单注意事项说明":
- this.txtOrderNoteMatterPortrait.Text = strArrayKey[1].Trim();
- break;
- case "婚庆预约单内容详情字体大小":
- this.cmbtreevContentDetailWeddingCeremony.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "婚庆预约单注意事项字体大小":
- this.cmbtreevNoteMattersWeddingCeremony.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "婚庆预约单注意事项说明":
- this.txtOrderNoteMatterWeddingCeremony.Text = strArrayKey[1].Trim();
- break;
- case "服务预约单内容详情字体大小":
- this.cmbtreevContentDetailService.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "服务预约单注意事项字体大小":
- this.cmbtreevNoteMattersService.TextFindTag( strArrayKey[1].Trim() );
- break;
- case "服务预约单注意事项说明":
- this.txtOrderNoteMattersService.Text = strArrayKey[1].Trim();
- break;
- }
- }
- }
- }
- #endregion
- if ( this.tabControl3.TabPages.Count > 0 )
- {
- this.tabControl3.Visible = true;
- }
- this.panelReservationSingle.Visible = true;
- #endregion
- break;
- case EnumPublic.PrintTypeEnum.制作单明细:
- #region
- if ( model != null )
- {
- if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
- {
- if ( model.PrintSet_PrintOtherDataJson.Trim().Trim().IndexOf( "制作单说明" ) == -1 )
- {
- this.txtMakingExplain.Text = "";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- if ( strArray[i].Trim().Split( '‖' )[0].Trim() == "制作单说明" )
- {
- this.txtMakingExplain.Text = strArray[i].Trim().Split( '‖' )[1].Trim();
- }
- }
- }
- }
- }
- else
- {
- this.txtMakingExplain.Text = "";
- }
- }
- else
- {
- this.txtMakingExplain.Text = "";
- }
- this.panelMakingExplain.Visible = true;
- #endregion
- break;
- case EnumPublic.PrintTypeEnum.礼服出售清单:
- case EnumPublic.PrintTypeEnum.礼服出租清单:
- #region
- if ( model != null )
- {
- if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
- {
- if ( model.PrintSet_PrintOtherDataJson.Trim().Trim().IndexOf( "礼服单说明" ) == -1 )
- {
- this.txtDressExplain.Text = "";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- if ( strArray[i].Trim().Split( '‖' )[0].Trim() == "礼服单说明" )
- {
- this.txtDressExplain.Text = strArray[i].Trim().Split( '‖' )[1].Trim();
- }
- }
- }
- }
- }
- else
- {
- this.txtDressExplain.Text = "";
- }
- }
- else
- {
- this.txtDressExplain.Text = "";
- }
- this.panelDress.Visible = true;
- #endregion
- break;
- case EnumPublic.PrintTypeEnum.订单收款:
- case EnumPublic.PrintTypeEnum.会员充值收款:
- case EnumPublic.PrintTypeEnum.会员服务收款:
- case EnumPublic.PrintTypeEnum.会员服务消费:
- case EnumPublic.PrintTypeEnum.礼服出售收款:
- case EnumPublic.PrintTypeEnum.礼服出租收款:
- case EnumPublic.PrintTypeEnum.礼服出租退押金:
- case EnumPublic.PrintTypeEnum.其它收入:
- case EnumPublic.PrintTypeEnum.其它消费收款:
- case EnumPublic.PrintTypeEnum.现金支出:
- case EnumPublic.PrintTypeEnum.新摄会返还款:
- case EnumPublic.PrintTypeEnum.新摄会收款:
- #region
- bool IsFindReservationPayment = false;
- if ( model != null )
- {
- if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
- {
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "收款单说明" ) == -1 )
- {
- this.txtPaymentExplain.Text = "";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- if ( strArray[i].Trim().Split( '‖' )[0].Trim() == "收款单说明" )
- {
- this.txtPaymentExplain.Text = strArray[i].Trim().Split( '‖' )[1].Trim();
- }
- if ( strArray[i].Trim().Split( '‖' )[0].Trim() == "预约收款显示名称" )
- {
- this.txtReservationPayment.Text = strArray[i].Trim().Split( '‖' )[1].Trim();
- IsFindReservationPayment = true;
- }
- }
- }
- }
- }
- else
- {
- this.txtPaymentExplain.Text = "";
- }
- }
- else
- {
- this.txtPaymentExplain.Text = "";
- }
- if ( e.Node.Text.Trim() == "订单收款_风格针式" )
- {
- this.panelReservationPayment.Visible = true;
- }
- else
- {
- this.panelReservationPayment.Visible = false;
- }
- if ( !IsFindReservationPayment )
- {
- this.txtReservationPayment.Text = "预约收款";
- }
- this.panelPaymentExplain.Visible = true;
- #endregion
- break;
- }
- this.lblCurrentSelectedStyle.Text = "当前选中风格:" + e.Node.Text.Trim();
- this.panelSaveed.Visible = true;
- }
- }
- void GetColor()
- {
- foreach ( TreeNode node in this.treevModelSet.Nodes )
- {
- node.ForeColor = Color.Black;
- if ( node.Nodes.Count > 0 )
- {
- NodeClearBackColor( node );
- }
- }
- }
- /// <summary>
- /// 清除节点下的所有节点的背景颜色
- /// </summary>
- /// <param name="node"></param>
- void NodeClearBackColor( TreeNode node )
- {
- foreach ( TreeNode nde in node.Nodes )
- {
- nde.ForeColor = Color.Black;
- if ( nde.Nodes.Count > 0 )
- {
- NodeClearBackColor( nde );
- if ( nde.Nodes.Count > 0 )
- {
- NodeClearBackColor( nde );
- }
- }
- }
- }
- /// <summary>
- /// 移除重复信息,以解决因为数据库中有重复内容时无法正确修改内容(如写真预约单注意事项说明)
- /// </summary>
- /// <param name="strArray"></param>
- /// <returns></returns>
- string[] RemoveDuplicateContent( string[] strArray )
- {
- List<string> tempList0 = new List<string>();
- List<string> tempList = new List<string>();
- foreach ( string temp in strArray )
- {
- string[] StrArray2 = temp.Trim().Split( '‖' );
- if ( !tempList0.Contains( StrArray2[0].Trim() ) )
- {
- tempList0.Add( StrArray2[0].Trim() );
- tempList.Add( temp );
- }
- }
- return tempList.ToArray();
- }
- /// <summary>
- /// 其他设置_保存
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSaveed_Click( object sender, EventArgs e )
- {
- if ( this.btnSaveed.Tag == null )
- {
- MessageBoxCustom.Show( "请选择要操作的风格!" );
- return;
- }
- List<LYFZ.Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- //List<LYFZ.Model.Model_ErpPrinterSetNow> mlist = pstnbll.GetModelList(this.btnSaveed.Tag.ToString());
- 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];
- //for (int i = 0; i < dt.Rows.Count; i++)
- //{
- // LYFZ.Model.Model_ErpPrinterSetNow model = pstnbll.DataRowToModel(dt.Rows[i]);
- // mlist.Add(model);
- //}
- LYFZ.Model.Model_ErpPrinterSetNow model = null;
- for ( int l = 0; l < dt.Rows.Count; l++ )
- {
- //model = mlist[l];
- model = pstnbll.DataRowToModel( dt.Rows[l] );
- #region 预约单
- #region 注意事项说明
- if ( this.panelReservationSingle.Visible )
- {
- string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
- #region 婚纱
- if ( tbPage1 != null )
- {
- string StrText = this.txtOrderNoteMatterWedding.Text.Trim();
- if ( StrText != "" )
- {
- if ( StrText.Length > 2000 )
- {
- MessageBoxCustom.Show( "婚纱预约单注意事项字数不得超过2000字(含符号),当前字数" + StrText.Length );
- return;
- }
- if ( StrText.IndexOf( '‖' ) != -1 || StrText.IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "婚纱预约单注意事项中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- bool isFind = false;
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单注意事项说明":
- case "婚纱预约单注意事项说明":
- if ( StrArray2[0].Trim() == "预约单注意事项说明" )
- {
- StrArray2[0] = "婚纱预约单注意事项说明";
- }
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- isFind = true;
- break;
- }
- }
- }
- if ( !isFind )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "婚纱预约单注意事项说明‖" + StrText + "∥";
- }
- StrText = "9";
- isFind = false;
- strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- if ( this.cmbtreevContentDetailWedding.Text.Trim() != "" )
- {
- StrText = this.cmbtreevContentDetailWedding.Text.Trim();
- }
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单内容详情字体大小":
- case "婚纱预约单内容详情字体大小":
- if ( StrArray2[0].Trim() == "预约单内容详情字体大小" )
- {
- StrArray2[0] = "婚纱预约单内容详情字体大小";
- }
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- isFind = true;
- break;
- }
- }
- }
- if ( !isFind )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "婚纱预约单内容详情字体大小‖" + StrText + "∥";
- }
- StrText = "9";
- isFind = false;
- strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- if ( this.cmbtreevNoteMattersWedding.Text.Trim() != "" )
- {
- StrText = this.cmbtreevNoteMattersWedding.Text.Trim();
- }
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单注意事项字体大小":
- case "婚纱预约单注意事项字体大小":
- if ( StrArray2[0].Trim() == "预约单注意事项字体大小" )
- {
- StrArray2[0] = "婚纱预约单注意事项字体大小";
- }
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- isFind = true;
- break;
- }
- }
- }
- if ( !isFind )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "婚纱预约单注意事项字体大小‖" + StrText + "∥";
- }
- }
- #endregion
- #region 儿童
- if ( tbPage2 != null )
- {
- string StrText = this.txtOrderNoteMatterChild.Text.Trim();
- if ( StrText != "" )
- {
- if ( StrText.Length > 2000 )
- {
- MessageBoxCustom.Show( "儿童预约单注意事项字数不得超过2000字(含符号),当前字数" + StrText.Length );
- return;
- }
- if ( StrText.IndexOf( '‖' ) != -1 || StrText.IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "儿童预约单注意事项中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- bool isFind = false;
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单注意事项说明":
- case "儿童预约单注意事项说明":
- if ( StrArray2[0].Trim() == "预约单注意事项说明" )
- {
- StrArray2[0] = "儿童预约单注意事项说明";
- }
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- isFind = true;
- break;
- }
- }
- }
- if ( !isFind )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "儿童预约单注意事项说明‖" + StrText + "∥";
- }
- isFind = false;
- StrText = "9";
- if ( this.cmbtreevContentDetailChild.Text.Trim() != "" )
- {
- StrText = this.cmbtreevContentDetailChild.Text.Trim();
- }
- strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单内容详情字体大小":
- case "儿童预约单内容详情字体大小":
- if ( StrArray2[0].Trim() == "预约单内容详情字体大小" )
- {
- StrArray2[0] = "儿童预约单内容详情字体大小";
- }
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- isFind = true;
- break;
- }
- }
- }
- if ( !isFind )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "儿童预约单内容详情字体大小‖" + StrText + "∥";
- }
- isFind = false;
- StrText = "9";
- if ( this.cmbtreevNoteMattersChild.Text.Trim() != "" )
- {
- StrText = this.cmbtreevNoteMattersChild.Text.Trim();
- }
- strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单注意事项字体大小":
- case "儿童预约单注意事项字体大小":
- if ( StrArray2[0].Trim() == "预约单注意事项字体大小" )
- {
- StrArray2[0] = "儿童预约单注意事项字体大小";
- }
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- isFind = true;
- break;
- }
- }
- }
- if ( !isFind )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "儿童预约单注意事项字体大小‖" + StrText + "∥";
- }
- }
- #endregion
- #region 写真
- if ( tbPage3 != null )
- {
- if ( this.txtOrderNoteMatterPortrait.Text.Trim() != "" )
- {
- if ( this.txtOrderNoteMatterPortrait.Text.Trim().Length > 2000 )
- {
- MessageBoxCustom.Show( "写真预约单注意事项字数不得超过2000字(含符号),当前字数" + this.txtOrderNoteMatterPortrait.Text.Trim().Length );
- return;
- }
- if ( this.txtOrderNoteMatterPortrait.Text.Trim().IndexOf( '‖' ) != -1 || this.txtOrderNoteMatterPortrait.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "写真预约单注意事项中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- if ( StrNewJoin.Trim().IndexOf( "写真预约单注意事项说明" ) == -1 )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "写真预约单注意事项说明‖" + this.txtOrderNoteMatterPortrait.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "写真预约单注意事项说明" )
- {
- StrArray2[1] = this.txtOrderNoteMatterPortrait.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- string FontA = "9";
- if ( this.cmbtreevContentDetailPortrait.Text.Trim() != "" )
- {
- FontA = this.cmbtreevContentDetailPortrait.Text.Trim();
- }
- if ( StrNewJoin.Trim().IndexOf( "写真预约单内容详情字体大小" ) == -1 )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "写真预约单内容详情字体大小‖" + FontA + "∥";
- }
- else
- {
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "写真预约单内容详情字体大小" )
- {
- StrArray2[1] = FontA;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- FontA = "9";
- if ( this.cmbtreevNoteMattersPortrait.Text.Trim() != "" )
- {
- FontA = this.cmbtreevNoteMattersPortrait.Text.Trim();
- }
- if ( StrNewJoin.Trim().IndexOf( "写真预约单注意事项字体大小" ) == -1 )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "写真预约单注意事项字体大小‖" + FontA + "∥";
- }
- else
- {
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "写真预约单注意事项字体大小" )
- {
- if ( this.cmbtreevNoteMattersWedding.Text.Trim() != "" )
- {
- StrArray2[1] = FontA;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- }
- }
- #endregion
- #region 婚庆
- if ( tbPage4 != null )
- {
- if ( this.txtOrderNoteMatterWeddingCeremony.Text.Trim() != "" )
- {
- if ( this.txtOrderNoteMatterWeddingCeremony.Text.Trim().Length > 2000 )
- {
- MessageBoxCustom.Show( "婚庆预约单注意事项字数不得超过2000字(含符号),当前字数" + this.txtOrderNoteMatterWeddingCeremony.Text.Trim().Length );
- return;
- }
- if ( this.txtOrderNoteMatterWeddingCeremony.Text.Trim().IndexOf( '‖' ) != -1 || this.txtOrderNoteMatterWeddingCeremony.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "婚庆预约单注意事项中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- if ( StrNewJoin.Trim().IndexOf( "婚庆预约单注意事项说明" ) == -1 )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "婚庆预约单注意事项说明‖" + this.txtOrderNoteMatterWeddingCeremony.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "婚庆预约单注意事项说明" )
- {
- StrArray2[1] = this.txtOrderNoteMatterWeddingCeremony.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- string FontA = "9";
- if ( this.cmbtreevContentDetailWeddingCeremony.Text.Trim() != "" )
- {
- FontA = this.cmbtreevContentDetailWeddingCeremony.Text.Trim();
- }
- if ( StrNewJoin.Trim().IndexOf( "婚庆预约单内容详情字体大小" ) == -1 )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "婚庆预约单内容详情字体大小‖" + FontA + "∥";
- }
- else
- {
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "婚庆预约单内容详情字体大小" )
- {
- StrArray2[1] = FontA;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- FontA = "9";
- if ( this.cmbtreevNoteMattersWeddingCeremony.Text.Trim() != "" )
- {
- FontA = this.cmbtreevNoteMattersWeddingCeremony.Text.Trim();
- }
- if ( StrNewJoin.Trim().IndexOf( "婚庆预约单注意事项字体大小" ) == -1 )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "婚庆预约单注意事项字体大小‖" + FontA + "∥";
- }
- else
- {
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "婚庆预约单注意事项字体大小" )
- {
- if ( this.cmbtreevNoteMattersWedding.Text.Trim() != "" )
- {
- StrArray2[1] = FontA;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- }
- }
- #endregion
- #region 服务
- if ( tbPage5 != null )
- {
- if ( this.txtOrderNoteMattersService.Text.Trim() != "" )
- {
- if ( this.txtOrderNoteMattersService.Text.Trim().Length > 2000 )
- {
- MessageBoxCustom.Show( "服务预约单注意事项字数不得超过2000字(含符号),当前字数" + this.txtOrderNoteMattersService.Text.Trim().Length );
- return;
- }
- if ( this.txtOrderNoteMattersService.Text.Trim().IndexOf( '‖' ) != -1 || this.txtOrderNoteMattersService.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "服务预约单注意事项中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- if ( StrNewJoin.Trim().IndexOf( "服务预约单注意事项说明" ) == -1 )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "服务预约单注意事项说明‖" + this.txtOrderNoteMattersService.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "服务预约单注意事项说明" )
- {
- StrArray2[1] = this.txtOrderNoteMattersService.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- string FontA = "9";
- if ( this.cmbtreevContentDetailService.Text.Trim() != "" )
- {
- FontA = this.cmbtreevContentDetailService.Text.Trim();
- }
- if ( StrNewJoin.Trim().IndexOf( "服务预约单内容详情字体大小" ) == -1 )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "服务预约单内容详情字体大小‖" + FontA + "∥";
- }
- else
- {
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "服务预约单内容详情字体大小" )
- {
- StrArray2[1] = FontA;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- FontA = "9";
- if ( this.cmbtreevNoteMattersService.Text.Trim() != "" )
- {
- FontA = this.cmbtreevNoteMattersService.Text.Trim();
- }
- if ( StrNewJoin.Trim().IndexOf( "服务预约单注意事项字体大小" ) == -1 )
- {
- if ( StrNewJoin.Length > 0 && StrNewJoin.Substring( StrNewJoin.Length - 1, 1 ) != "∥" )
- {
- StrNewJoin += "∥";
- }
- StrNewJoin += "服务预约单注意事项字体大小‖" + FontA + "∥";
- }
- else
- {
- string[] strArray = RemoveDuplicateContent( StrNewJoin.Trim().Split( '∥' ) );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "服务预约单注意事项字体大小" )
- {
- if ( this.cmbtreevNoteMattersWedding.Text.Trim() != "" )
- {
- StrArray2[1] = FontA;
- strArray[i] = string.Join( "‖", StrArray2 );
- StrNewJoin = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- }
- }
- #endregion
- model.PrintSet_PrintOtherDataJson = StrNewJoin.TrimEnd( '∥' );
- }
- #endregion
- #region LOG图片和标题
- if ( this.tabControl3.Visible )
- {
- #region 标题
- if ( model.PrintSet_PrintSingleTitle.Trim() != "" )
- {
- string StrNewJoin = model.PrintSet_PrintSingleTitle.Trim();
- #region 预约婚纱单标题
- if ( StrNewJoin.Trim().IndexOf( "预约婚纱单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约婚纱单标题‖" + this.txtWeddingTitle.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约婚纱单标题" )
- {
- StrArray2[1] = this.txtWeddingTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约儿童单标题
- if ( StrNewJoin.Trim().IndexOf( "预约儿童单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约儿童单标题‖" + this.txtChildTitle.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约儿童单标题" )
- {
- StrArray2[1] = this.txtChildTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约写真单标题
- if ( StrNewJoin.Trim().IndexOf( "预约写真单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约写真单标题‖" + this.txtPortraitTitle.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约写真单标题" )
- {
- StrArray2[1] = this.txtPortraitTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约婚庆单标题
- if ( StrNewJoin.Trim().IndexOf( "预约婚庆单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约婚庆单标题‖" + this.txtWeddingCeremonyTitle.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约婚庆单标题" )
- {
- StrArray2[1] = this.txtWeddingCeremonyTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约服务单标题
- if ( StrNewJoin.Trim().IndexOf( "预约服务单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约服务单标题‖" + this.txtServiceTitle.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约服务单标题" )
- {
- StrArray2[1] = this.txtServiceTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- }
- else
- {
- if ( this.txtWeddingTitle.Text.Trim() != "" )
- {
- if ( this.txtWeddingTitle.Text.Trim().Length > 25 )
- {
- MessageBoxCustom.Show( "预约婚纱单标题字数不得超过25字(含符号),当前字数" + this.txtWeddingTitle.Text.Trim().Length );
- return;
- }
- if ( this.txtWeddingTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtWeddingTitle.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "预约婚纱单标题中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- model.PrintSet_PrintSingleTitle += "预约婚纱单标题‖" + this.txtWeddingTitle.Text.Trim() + "∥";
- if ( this.txtChildTitle.Text.Trim() != "" )
- {
- if ( this.txtChildTitle.Text.Trim().Length > 25 )
- {
- MessageBoxCustom.Show( "预约儿童单标题字数不得超过25字(含符号),当前字数" + this.txtChildTitle.Text.Trim().Length );
- return;
- }
- if ( this.txtChildTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtChildTitle.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "预约儿童单标题中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- model.PrintSet_PrintSingleTitle += "预约儿童单标题‖" + this.txtChildTitle.Text.Trim() + "∥";
- if ( this.txtPortraitTitle.Text.Trim() != "" )
- {
- if ( this.txtPortraitTitle.Text.Trim().Length > 25 )
- {
- MessageBoxCustom.Show( "预约写真单标题字数不得超过25字(含符号),当前字数" + this.txtPortraitTitle.Text.Trim().Length );
- return;
- }
- if ( this.txtPortraitTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtPortraitTitle.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "预约写真单标题中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- model.PrintSet_PrintSingleTitle += "预约写真单标题‖" + this.txtPortraitTitle.Text.Trim() + "∥";
- if ( this.txtWeddingCeremonyTitle.Text.Trim() != "" )
- {
- if ( this.txtWeddingCeremonyTitle.Text.Trim().Length > 25 )
- {
- MessageBoxCustom.Show( "预约婚庆单标题字数不得超过25字(含符号),当前字数" + this.txtWeddingCeremonyTitle.Text.Trim().Length );
- return;
- }
- if ( this.txtWeddingCeremonyTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtWeddingCeremonyTitle.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "预约婚庆单标题中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- model.PrintSet_PrintSingleTitle += "预约婚庆单标题‖" + this.txtWeddingCeremonyTitle.Text.Trim() + "∥";
- if ( this.txtServiceTitle.Text.Trim() != "" )
- {
- if ( this.txtServiceTitle.Text.Trim().Length > 25 )
- {
- MessageBoxCustom.Show( "预约服务单标题字数不得超过25字(含符号),当前字数" + this.txtServiceTitle.Text.Trim().Length );
- return;
- }
- if ( this.txtServiceTitle.Text.Trim().IndexOf( '‖' ) != -1 || this.txtServiceTitle.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "预约服务单标题中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- model.PrintSet_PrintSingleTitle += "预约服务单标题‖" + this.txtServiceTitle.Text.Trim() + "∥";
- }
- #endregion
- #region 图片LOG
- if ( model.PrintSet_PrintSingleLOG.Trim() != "" )
- {
- string StrNewJoin = model.PrintSet_PrintSingleLOG.Trim();
- #region 预约婚纱单图片LOG
- if ( StrNewJoin.Trim().IndexOf( "预约婚纱单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约婚纱单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingLOG ) ) + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约婚纱单LOG" )
- {
- StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingLOG ) );
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约儿童单图片LOG
- if ( StrNewJoin.Trim().IndexOf( "预约儿童单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约儿童单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderChildLOG ) ) + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约儿童单LOG" )
- {
- StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderChildLOG ) );
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约写真单图片LOG
- if ( StrNewJoin.Trim().IndexOf( "预约写真单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约写真单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderPortraitLOG ) ) + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约写真单LOG" )
- {
- StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderPortraitLOG ) );
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约婚庆单图片LOG
- if ( StrNewJoin.Trim().IndexOf( "预约婚庆单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约婚庆单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingCeremonyLOG ) ) + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约婚庆单LOG" )
- {
- StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingCeremonyLOG ) );
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约服务单图片LOG
- if ( StrNewJoin.Trim().IndexOf( "预约服务单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约服务单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderServiceLOG ) ) + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约服务单LOG" )
- {
- StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderServiceLOG ) );
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- }
- else
- {
- if ( this.pictOrderWeddingLOG.Image == null )
- {
- model.PrintSet_PrintSingleLOG += "预约婚纱单LOG‖∥";
- }
- else
- {
- model.PrintSet_PrintSingleLOG += "预约婚纱单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingLOG ) ) + "∥";
- }
- if ( this.pictOrderChildLOG.Image == null )
- {
- model.PrintSet_PrintSingleLOG += "预约儿童单LOG‖∥";
- }
- else
- {
- model.PrintSet_PrintSingleLOG += "预约儿童单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderChildLOG ) ) + "∥";
- }
- if ( this.pictOrderPortraitLOG.Image == null )
- {
- model.PrintSet_PrintSingleLOG += "预约写真单LOG‖∥";
- }
- else
- {
- model.PrintSet_PrintSingleLOG += "预约写真单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderPortraitLOG ) ) + "∥";
- }
- if ( this.pictOrderWeddingCeremonyLOG.Image == null )
- {
- model.PrintSet_PrintSingleLOG += "预约婚庆单LOG‖∥";
- }
- else
- {
- model.PrintSet_PrintSingleLOG += "预约婚庆单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderWeddingCeremonyLOG ) ) + "∥";
- }
- if ( this.pictOrderServiceLOG.Image == null )
- {
- model.PrintSet_PrintSingleLOG += "预约服务单LOG‖∥";
- }
- else
- {
- model.PrintSet_PrintSingleLOG += "预约服务单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictOrderServiceLOG ) ) + "∥";
- }
- }
- #endregion
- }
- #endregion
- #endregion
- #region 制作单
- if ( this.panelMakingExplain.Visible )
- {
- if ( this.txtMakingExplain.Text.Trim().Length > 2000 )
- {
- MessageBoxCustom.Show( "制作单说明字数不得超过2000字(含符号),当前字数" + this.txtMakingExplain.Text.Trim().Length );
- return;
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
- {
- string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
- //内容详情字体大小
- if ( this.txtMakingExplain.Text.Trim() != "" )
- {
- if ( this.txtMakingExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtMakingExplain.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "制作单说明中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- if ( StrNewJoin.Trim().IndexOf( "制作单说明" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "制作单说明‖" + this.txtMakingExplain.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "制作单说明" )
- {
- StrArray2[1] = this.txtMakingExplain.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- }
- else
- {
- if ( this.txtMakingExplain.Text.Trim() != "" )
- {
- if ( this.txtMakingExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtMakingExplain.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "制作单说明中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- model.PrintSet_PrintOtherDataJson += "制作单说明‖" + this.txtMakingExplain.Text.Trim() + "∥";
- }
- }
- #endregion
- #region 礼服单
- if ( this.panelDress.Visible )
- {
- if ( this.txtDressExplain.Text.Trim().Length > 2000 )
- {
- MessageBoxCustom.Show( "礼服单说明字数不得超过2000字(含符号),当前字数" + this.txtDressExplain.Text.Trim().Length );
- return;
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
- {
- string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
- //内容详情字体大小
- if ( this.txtDressExplain.Text.Trim() != "" )
- {
- if ( this.txtDressExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtDressExplain.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "礼服单说明中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- if ( StrNewJoin.Trim().IndexOf( "礼服单说明" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "礼服单说明‖" + this.txtDressExplain.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "礼服单说明" )
- {
- StrArray2[1] = this.txtDressExplain.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- }
- else
- {
- if ( this.txtDressExplain.Text.Trim() != "" )
- {
- if ( this.txtDressExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtDressExplain.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "礼服单说明中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- model.PrintSet_PrintOtherDataJson += "礼服单说明‖" + this.txtDressExplain.Text.Trim() + "∥";
- }
- }
- #endregion
- #region 收款单说明
- if ( this.panelPaymentExplain.Visible )
- {
- string[] StrArrayListName = this.lblCurrentSelectedStyle.Text.Split( ':' );
- bool IsFind = false;
- if ( StrArrayListName.Length > 1 )
- {
- if ( StrArrayListName[1].Trim() == "会员充值收款_风格A4" )
- {
- IsFind = true;
- }
- }
- if ( !IsFind )
- {
- if ( this.txtPaymentExplain.Text.Trim().Length > 200 )
- {
- MessageBoxCustom.Show( "收款单说明字数不得超过200字(含符号),当前字数" + this.txtPaymentExplain.Text.Trim().Length );
- return;
- }
- }
- else
- {
- if ( this.txtPaymentExplain.Text.Trim().Length > 500 )
- {
- MessageBoxCustom.Show( "收款单说明字数不得超过500字(含符号),当前字数" + this.txtPaymentExplain.Text.Trim().Length );
- return;
- }
- }
- if ( this.txtPaymentExplain.Text.Trim() != "" )
- {
- if ( this.txtPaymentExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtPaymentExplain.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "收款单说明中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
- {
- string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
- if ( StrNewJoin.Trim().IndexOf( "收款单说明" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "收款单说明‖" + this.txtPaymentExplain.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "收款单说明" )
- {
- StrArray2[1] = this.txtPaymentExplain.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- }
- else
- {
- model.PrintSet_PrintOtherDataJson += "收款单说明‖" + this.txtPaymentExplain.Text.Trim() + "∥";
- }
- if ( this.panelReservationPayment.Visible )
- {
- //预约收款显示名称
- if ( this.txtReservationPayment.Text.Trim() != "" )
- {
- if ( this.txtReservationPayment.Text.Trim().IndexOf( '‖' ) != -1 || this.txtReservationPayment.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "'将预约收款显示为'中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
- {
- string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
- if ( StrNewJoin.Trim().IndexOf( "预约收款显示名称" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "预约收款显示名称‖" + this.txtReservationPayment.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约收款显示名称" )
- {
- StrArray2[1] = this.txtReservationPayment.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- }
- else
- {
- model.PrintSet_PrintOtherDataJson += "预约收款显示名称‖" + this.txtReservationPayment.Text.Trim() + "∥";
- }
- }
- }
- #endregion
- model.PrintSet_UpdateDateTime = SDateTime.Now;
- model.PrintSet_UpdateName = StrUserID;
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- }
- if ( clist.Count > 0 )
- {
- if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
- {
- MessageBoxCustom.Show( "保存失败" );
- return;
- }
- this.GetModelListPrinterSetNow();
- this.IsSaveed = true;
- MessageBoxCustom.Show( "保存成功" );
- }
- }
- /// <summary>
- /// 其他设置_取消
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnCancel_Click( object sender, EventArgs e )
- {
- this.panelSaveed.Visible = false;
- this.PanelHide();
- this.cmbtreevContentDetailWedding.SetTextAndTag_ValueNull();
- this.cmbtreevNoteMattersWedding.SetTextAndTag_ValueNull();
- this.lblCurrentSelectedStyle.Text = "当前选中风格:";
- this.btnSaveed.Tag = null;
- }
- /// <summary>
- /// 隐藏Panel
- /// </summary>
- void PanelHide()
- {
- this.panelDress.Visible = false;
- this.panelMakingExplain.Visible = false;
- this.panelPaymentExplain.Visible = false;
- this.panelReservationSingle.Visible = false;
- }
- #region 预约单
- /// <summary>
- /// 婚纱浏览
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderBrowseWeddingLOG_Click( object sender, EventArgs e )
- {
- this.BrowseLogPhoto( this.pictOrderWeddingLOG );
- }
- /// <summary>
- /// 婚纱删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderDeleteWeddingLOG_Click( object sender, EventArgs e )
- {
- this.pictOrderWeddingLOG.Image = null;
- }
- /// <summary>
- /// 婚纱下载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderDownloadWeddingLOG_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderWeddingLOG, "婚纱单LOG" );
- }
- /// <summary>
- /// 儿童下载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderChildDownloadLOG_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderChildLOG, "儿童单LOG" );
- }
- /// <summary>
- /// 儿童浏览
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderChildBrowseLOG_Click( object sender, EventArgs e )
- {
- this.BrowseLogPhoto( this.pictOrderChildLOG );
- }
- /// <summary>
- /// 儿童删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderChildDeleteLOG_Click( object sender, EventArgs e )
- {
- this.pictOrderChildLOG.Image = null;
- }
- /// <summary>
- /// 写真下载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderPortraitDownloadLOG_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderPortraitLOG, "写真单LOG" );
- }
- /// <summary>
- /// 写真浏览
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderPortraitBrowseLOG_Click( object sender, EventArgs e )
- {
- this.BrowseLogPhoto( this.pictOrderPortraitLOG );
- }
- /// <summary>
- /// 写真删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderPortraitDeleteLOG_Click( object sender, EventArgs e )
- {
- this.pictOrderPortraitLOG.Image = null;
- }
- /// <summary>
- /// 婚庆下载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderWeddingCeremonyDownloadLOG_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderWeddingCeremonyLOG, "婚庆单LOG" );
- }
- /// <summary>
- /// 婚庆浏览
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderWeddingCeremonyBrowseLOG_Click( object sender, EventArgs e )
- {
- this.BrowseLogPhoto( this.pictOrderWeddingCeremonyLOG );
- }
- /// <summary>
- /// 婚庆删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderWeddingCeremonyDeleteLOG_Click( object sender, EventArgs e )
- {
- this.pictOrderWeddingCeremonyLOG.Image = null;
- }
- /// <summary>
- /// 服务下载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderServiceDownloadLOG_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictOrderServiceLOG, "服务单LOG" );
- }
- /// <summary>
- /// 服务浏览
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderServiceBrowseLOG_Click( object sender, EventArgs e )
- {
- this.BrowseLogPhoto( this.pictOrderServiceLOG );
- }
- /// <summary>
- /// 服务删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOrderServiceDeleteLOG_Click( object sender, EventArgs e )
- {
- this.pictOrderServiceLOG.Image = null;
- }
- /// <summary>
- /// 浏览选择LOG图片
- /// </summary>
- /// <param name="pict"></param>
- void BrowseLogPhoto( LYFZ.ComponentLibrary.PictureBoxEx pict )
- {
- OpenFileDialog fileDlg = new OpenFileDialog();
- fileDlg.ShowDialog( this );
- if ( fileDlg.FileName.Length > 0 )
- {
- if ( fileDlg.FileName != "openFileDialog1" )
- {
- Image img = Image.FromFile( fileDlg.FileName );
- FileInfo f = new FileInfo( fileDlg.FileName );
- if ( f.Length > 2100000 )
- {
- MessageBoxCustom.Show( "图片过大,建议使用大小在800K以内的图片" );
- return;
- }
- if ( img.Width > 2500 )
- {
- MessageBoxCustom.Show( "图片长度过长,建议使用大小在 2000*280(像素)以内的图片" );
- return;
- }
- if ( img.Height > 300 )
- {
- MessageBoxCustom.Show( "图片过大,建议使用大小在 2000*280(像素)以内的图片" );
- return;
- }
- FileStream fs = new FileStream( fileDlg.FileName, FileMode.Open, FileAccess.Read );
- pict.Image = System.Drawing.Image.FromStream( fs );
- fs.Close();
- }
- }
- }
- #endregion
- #endregion
- #region 全局设置
- /// <summary>
- /// 收款单说明
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSaveed1_Click( object sender, EventArgs e )
- {
- if ( this.txtGlobalPaymentExplain.Text.Trim().Length > 200 )
- {
- MessageBoxCustom.Show( "收款单说明字数不得超过200字(含符号),当前字数" + this.txtGlobalPaymentExplain.Text.Trim().Length );
- return;
- }
- if ( this.txtGlobalPaymentExplain.Text.Trim() != "" )
- {
- if ( this.txtGlobalPaymentExplain.Text.Trim().IndexOf( '‖' ) != -1 || this.txtGlobalPaymentExplain.Text.Trim().IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "收款单说明中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- LYFZ.Model.Model_ErpSystemConfigure modelsystem = modelsc;
- #region 全局
- if ( modelsystem.Sconfig_Value.Trim() != "" )
- {
- string StrNewJoin = modelsystem.Sconfig_Value.Trim();
- if ( StrNewJoin.Trim().IndexOf( "收款单说明" ) == -1 )
- {
- modelsystem.Sconfig_Value += "收款单说明‖" + this.txtGlobalPaymentExplain.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "收款单说明" )
- {
- StrArray2[1] = this.txtGlobalPaymentExplain.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- modelsystem.Sconfig_Value = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- }
- else
- {
- modelsystem.Sconfig_Value += "收款单说明‖" + this.txtGlobalPaymentExplain.Text.Trim() + "∥";
- }
- clist.Add( scbll.GetUpdateCommandInfo( modelsystem ) );
- #endregion
- #region 修改打印设置
- for ( int j = 0; j < mlist.Count; j++ )
- {
- switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), mlist[j].PrintSet_TemplateParentNumber.ToString() ) )
- {
- case EnumPublic.PrintTypeEnum.订单收款:
- case EnumPublic.PrintTypeEnum.会员充值收款:
- case EnumPublic.PrintTypeEnum.会员服务收款:
- case EnumPublic.PrintTypeEnum.会员服务消费:
- case EnumPublic.PrintTypeEnum.礼服出售收款:
- case EnumPublic.PrintTypeEnum.礼服出租收款:
- case EnumPublic.PrintTypeEnum.礼服出租退押金:
- case EnumPublic.PrintTypeEnum.其它收入:
- case EnumPublic.PrintTypeEnum.其它消费收款:
- case EnumPublic.PrintTypeEnum.现金支出:
- case EnumPublic.PrintTypeEnum.新摄会返还款:
- case EnumPublic.PrintTypeEnum.新摄会收款:
- LYFZ.Model.Model_ErpPrinterSetNow model = mlist[j];
- if ( model.PrintSet_PrintOtherDataJson.Trim() != "" )
- {
- string StrNewJoin = model.PrintSet_PrintOtherDataJson.Trim();
- if ( StrNewJoin.Trim().IndexOf( "收款单说明" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "收款单说明‖" + this.txtGlobalPaymentExplain.Text.Trim() + "∥";
- }
- else
- {
- string[] strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "收款单说明" )
- {
- StrArray2[1] = this.txtGlobalPaymentExplain.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- }
- else
- {
- model.PrintSet_PrintOtherDataJson += "收款单说明‖" + this.txtGlobalPaymentExplain.Text.Trim() + "∥";
- }
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- break;
- }
- }
- #endregion
- if ( clist.Count > 0 )
- {
- if ( MessageBoxCustom.Show( "保存后,将覆盖'" + EnumPublic.PrintTypeEnum.订单收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.会员充值收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.会员充值收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.会员服务收款.ToString()
- + "'、'" + EnumPublic.PrintTypeEnum.会员服务消费.ToString() + "'、'" + EnumPublic.PrintTypeEnum.礼服出售收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.礼服出租收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.礼服出租退押金.ToString() + "'、'" + EnumPublic.PrintTypeEnum.其它收入.ToString()
- + "'、'" + EnumPublic.PrintTypeEnum.其它消费收款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.现金支出.ToString() + "'、'" + EnumPublic.PrintTypeEnum.新摄会返还款.ToString() + "'、'" + EnumPublic.PrintTypeEnum.新摄会收款.ToString() + "' 等所有的收款单说明,你确定要继续保存吗?", "温馨提示", MessageBoxButtons.YesNo ) == DialogResult.No )
- {
- return;
- }
- if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
- {
- MessageBoxCustom.Show( "保存全局收款单说明失败!" );
- return;
- }
- this.GetModelListPrinterSetNow();
- this.GetModelSystemConfigure();
- MessageBoxCustom.Show( "保存成功!" );
- }
- }
- /// <summary>
- /// 预约单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSaveed2_Click( object sender, EventArgs e )
- {
- string StrText = this.txtGlobalOrderNoteMatter.Text.Trim();
- if ( StrText != "" )
- {
- if ( StrText.Length > 2000 )
- {
- MessageBoxCustom.Show( "预约单注意事项字数不得超过2000字(含符号),当前字数" + StrText.Length );
- return;
- }
- if ( StrText.IndexOf( '‖' ) != -1 || StrText.IndexOf( '∥' ) != -1 )
- {
- MessageBoxCustom.Show( "预约单注意事项中不允许存在字符'‖'或'∥'" );
- return;
- }
- }
- List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- #region 全局
- LYFZ.Model.Model_ErpSystemConfigure modelsystem = modelsc;
- string[] strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
- if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单注意事项说明" ) == -1 )
- {
- modelsystem.Sconfig_Value += "预约单注意事项说明‖" + StrText + "∥";
- }
- else
- {
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单注意事项说明":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- modelsystem.Sconfig_Value = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- StrText = "9";
- if ( this.cmbtreevGlobalContentDetail.Text.Trim() != "" )
- {
- StrText = this.cmbtreevGlobalContentDetail.Text.Trim();
- }
- if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单内容详情字体大小" ) == -1 )
- {
- modelsystem.Sconfig_Value += "预约单内容详情字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单内容详情字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- modelsystem.Sconfig_Value = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- StrText = "9";
- if ( this.cmbtreevGlobalNoteMatters.Text.Trim() != "" )
- {
- StrText = this.cmbtreevGlobalNoteMatters.Text.Trim();
- }
- if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单注意事项字体大小" ) == -1 )
- {
- modelsystem.Sconfig_Value += "预约单注意事项字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单注意事项字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- modelsystem.Sconfig_Value = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单标题" ) == -1 )
- {
- modelsystem.Sconfig_Value += "预约单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
- }
- else
- {
- strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约单标题":
- StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- modelsystem.Sconfig_Value = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( modelsystem.Sconfig_Value.Trim().IndexOf( "预约单LOG" ) == -1 )
- {
- modelsystem.Sconfig_Value += "预约单LOG‖" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictGlobalOrderLOG ) ) + "∥";
- }
- else
- {
- strArray = modelsystem.Sconfig_Value.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约单LOG" )
- {
- StrArray2[1] = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictGlobalOrderLOG ) );
- strArray[i] = string.Join( "‖", StrArray2 );
- modelsystem.Sconfig_Value = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- clist.Add( scbll.GetUpdateCommandInfo( modelsystem ) );
- #endregion
- #region 修改打印设置
- for ( int j = 0; j < mlist.Count; j++ )
- {
- switch ( (LYFZ.EnumPublic.PrintTypeEnum)Enum.Parse( typeof( LYFZ.EnumPublic.PrintTypeEnum ), mlist[j].PrintSet_TemplateParentNumber.ToString() ) )
- {
- case EnumPublic.PrintTypeEnum.订单预约单:
- LYFZ.Model.Model_ErpPrinterSetNow model = mlist[j];
- #region 注意事项
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚纱预约单注意事项说明" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "婚纱预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
- }
- else
- {
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "婚纱预约单注意事项说明":
- StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "儿童预约单注意事项说明" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "儿童预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
- }
- else
- {
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "儿童预约单注意事项说明":
- StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "写真预约单注意事项说明" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "写真预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
- }
- else
- {
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "写真预约单注意事项说明":
- StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "服务预约单注意事项说明" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "服务预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
- }
- else
- {
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "服务预约单注意事项说明":
- StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚庆预约单注意事项说明" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "婚庆预约单注意事项说明‖" + this.txtGlobalOrderNoteMatter.Text.Trim() + "∥";
- }
- else
- {
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "婚庆预约单注意事项说明":
- StrArray2[1] = this.txtGlobalOrderNoteMatter.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- StrText = "9";
- if ( this.cmbtreevGlobalContentDetail.Text.Trim() != "" )
- {
- StrText = this.cmbtreevGlobalContentDetail.Text.Trim();
- }
- #region 预约单内容详情字体大小
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚纱预约单内容详情字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "婚纱预约单内容详情字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "婚纱预约单内容详情字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "儿童预约单内容详情字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "儿童预约单内容详情字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "儿童预约单内容详情字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "写真预约单内容详情字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "写真预约单内容详情字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "写真预约单内容详情字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "服务预约单内容详情字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "服务预约单注意事项字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "服务预约单内容详情字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚庆预约单内容详情字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "婚庆预约单内容详情字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "婚庆预约单内容详情字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- StrText = "9";
- if ( this.cmbtreevGlobalNoteMatters.Text.Trim() != "" )
- {
- StrText = this.cmbtreevGlobalNoteMatters.Text.Trim();
- }
- #region 预约单注意事项字体大小
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚纱预约单注意事项字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "婚纱预约单注意事项字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "婚纱预约单注意事项字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "儿童预约单注意事项字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "儿童预约单注意事项字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "儿童预约单注意事项字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "写真预约单注意事项字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "写真预约单注意事项字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "写真预约单注意事项字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "服务预约单注意事项字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "服务预约单注意事项字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "服务预约单注意事项字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintOtherDataJson.Trim().IndexOf( "婚庆预约单注意事项字体大小" ) == -1 )
- {
- model.PrintSet_PrintOtherDataJson += "婚庆预约单注意事项字体大小‖" + StrText + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintOtherDataJson.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "婚庆预约单注意事项字体大小":
- StrArray2[1] = StrText;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintOtherDataJson = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约单标题
- if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约婚纱单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约婚纱单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约婚纱单标题":
- StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约儿童单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约儿童单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约儿童单标题":
- StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约写真单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约写真单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约写真单标题":
- StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约服务单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约服务单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约服务单标题":
- StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintSingleTitle.Trim().IndexOf( "预约婚庆单标题" ) == -1 )
- {
- model.PrintSet_PrintSingleTitle += "预约婚庆单标题‖" + this.txtGlobalOrderTitle.Text.Trim() + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleTitle.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- switch ( StrArray2[0].Trim() )
- {
- case "预约婚庆单标题":
- StrArray2[1] = this.txtGlobalOrderTitle.Text.Trim();
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleTitle = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- #region 预约单LOG
- string StrIamgeLog = "";
- if ( this.pictGlobalOrderLOG.Image != null )
- {
- StrIamgeLog = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ToHexString( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImageDatabytes( this.pictGlobalOrderLOG ) );
- }
- if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约婚纱单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约婚纱单LOG‖" + StrIamgeLog + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约婚纱单LOG" )
- {
- StrArray2[1] = StrIamgeLog;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约儿童单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约儿童单LOG‖" + StrIamgeLog + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约儿童单LOG" )
- {
- StrArray2[1] = StrIamgeLog;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约写真单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约写真单LOG‖" + StrIamgeLog + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约写真单LOG" )
- {
- StrArray2[1] = StrIamgeLog;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约服务单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约服务单LOG‖" + StrIamgeLog + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约服务单LOG" )
- {
- StrArray2[1] = StrIamgeLog;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- if ( model.PrintSet_PrintSingleLOG.Trim().IndexOf( "预约婚庆单LOG" ) == -1 )
- {
- model.PrintSet_PrintSingleLOG += "预约婚庆单LOG‖" + StrIamgeLog + "∥";
- }
- else
- {
- strArray = model.PrintSet_PrintSingleLOG.Trim().Split( '∥' );
- for ( int i = 0; i < strArray.Length; i++ )
- {
- if ( strArray[i].Trim() != "" )
- {
- string[] StrArray2 = strArray[i].Trim().Split( '‖' );
- if ( StrArray2[0].Trim() == "预约婚庆单LOG" )
- {
- StrArray2[1] = StrIamgeLog;
- strArray[i] = string.Join( "‖", StrArray2 );
- model.PrintSet_PrintSingleLOG = string.Join( "∥", strArray );
- break;
- }
- }
- }
- }
- #endregion
- clist.Add( pstnbll.GetUpdateCommandInfo( model ) );
- break;
- }
- }
- #endregion
- if ( clist.Count > 0 )
- {
- if ( MessageBoxCustom.Show( "保存后,将覆盖'" + EnumPublic.PrintTypeEnum.订单预约单.ToString() + "'的所有'注意事项'、'打印单标题','字体大小','Log图片',你确定要继续保存吗?", "温馨提示", MessageBoxButtons.YesNo ) == DialogResult.No )
- {
- return;
- }
- if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) <= 0 )
- {
- MessageBoxCustom.Show( "保存全局预约单设置失败!" );
- return;
- }
- this.GetModelListPrinterSetNow();
- this.GetModelSystemConfigure();
- MessageBoxCustom.Show( "保存成功!" );
- }
- }
- /// <summary>
- /// 全局LOG下载
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnGlobalOrderDownloadLOG_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.DownloadLog( this.pictGlobalOrderLOG, "全局预约单LOG" );
- }
- /// <summary>
- /// 全局LOG浏览选择
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnGlobalOrderBrowseLOG_Click( object sender, EventArgs e )
- {
- this.BrowseLogPhoto( this.pictGlobalOrderLOG );
- }
- /// <summary>
- /// 全局LOG删除
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnGlobalOrderDeleteLOG_Click( object sender, EventArgs e )
- {
- this.pictGlobalOrderLOG.Image = null;
- }
- #endregion
- #region 绑定打印模拟数据
- /// <summary>
- /// 绑定新增的打印模板
- /// </summary>
- public void InitSqlPrintData()
- {
- LYFZ.BLL.BLL_ErpPrinterSetNow printSetNowBll = new BLL.BLL_ErpPrinterSetNow();
- LYFZ.BLL.BLL_ErpPrinterTemplateSet prinTemplateSetBll = new BLL.BLL_ErpPrinterTemplateSet();
- DataTable dtNow = printSetNowBll.GetList( " PrintSet_TemplateName='礼服出租清单_风格2' or PrintSet_TemplateName = '礼服出售清单_风格2' " ).Tables[0];
- DataTable dtTemplateSet = prinTemplateSetBll.GetList( " TptSet_TemplateName='礼服出租清单_风格2' or TptSet_TemplateName = '礼服出售清单_风格2' " ).Tables[0];
- DataRow[] drNowList = dtNow.Select( " PrintSet_TemplateName = '礼服出租清单_风格2' " );
- if ( drNowList.Length == 0 )
- {
- LYFZ.Model.Model_ErpPrinterSetNow printNowModel = new Model.Model_ErpPrinterSetNow();
- printNowModel.PrintSet_DividedShopNumber = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.CurrentCompanyInfoID;
- printNowModel.PrintSet_TemplateName = "礼服出租清单_风格2";
- printNowModel.PrintSet_MachineType = 1;
- printNowModel.PrintSet_TemplateParentNumber = 25;
- printNowModel.PrintSet_CreateName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- printNowModel.PrintSet_CreateDatetime = DateTime.Now;
- printSetNowBll.Add( printNowModel );
- LYFZ.Model.Model_ErpPrinterTemplateSet printTemplateModel = new Model.Model_ErpPrinterTemplateSet();
- printTemplateModel.TptSet_TemplateName = "礼服出租清单_风格2";
- printTemplateModel.TptSet_TemplateAliases = "礼服出租清单_风格A4";
- printTemplateModel.TptSet_TemplateType = 0;
- printTemplateModel.TptSet_MachineType = 1;
- printTemplateModel.TptSet_TemplateParentNumber = 25;
- printTemplateModel.TptSet_PrintTypeName = "礼服出租清单";
- prinTemplateSetBll.Add( printTemplateModel );
- }
- drNowList = dtNow.Select( " PrintSet_TemplateName = '礼服出售清单_风格2' " );
- if ( drNowList.Length == 0 )
- {
- LYFZ.Model.Model_ErpPrinterSetNow printNowModel = new Model.Model_ErpPrinterSetNow();
- printNowModel.PrintSet_DividedShopNumber = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.CurrentCompanyInfoID;
- printNowModel.PrintSet_TemplateName = "礼服出售清单_风格2";
- printNowModel.PrintSet_MachineType = 1;
- printNowModel.PrintSet_TemplateParentNumber = 26;
- printNowModel.PrintSet_CreateName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- printNowModel.PrintSet_CreateDatetime = DateTime.Now;
- printSetNowBll.Add( printNowModel );
- LYFZ.Model.Model_ErpPrinterTemplateSet printTemplateModel = new Model.Model_ErpPrinterTemplateSet();
- printTemplateModel.TptSet_TemplateName = "礼服出售清单_风格2";
- printTemplateModel.TptSet_TemplateAliases = "礼服出售清单_风格A4";
- printTemplateModel.TptSet_TemplateType = 0;
- printTemplateModel.TptSet_MachineType = 1;
- printTemplateModel.TptSet_TemplateParentNumber = 26;
- printTemplateModel.TptSet_PrintTypeName = "礼服出售清单";
- prinTemplateSetBll.Add( printTemplateModel );
- }
- }
- #endregion
- }
- }
|