1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291 |
- using LYFZ.ComponentLibrary;
- using LYFZ.Software.MainBusiness.DoorCityProcess;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Windows.Forms;
- using LYFZ.Model.CameraBook;
- using Newtonsoft.Json;
- namespace LYFZ.Software.MainBusiness.CameraControlBook
- {
- public partial class MainFrameFormMain : LYFZ.Software.UI.CameraControlBook.MainFrameFormMain
- {
- /*预约时间名称*/
- string strReservationTimeName = "拍摄时间";
- LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpOrderDigital odbll = new BLL.BLL_ErpOrderDigital();
- LYFZ.BLL.BLL_ErpWeddingService wsbll = new LYFZ.BLL.BLL_ErpWeddingService();
- LYFZ.BLL.BLL_ErpOrderProductList libll = new LYFZ.BLL.BLL_ErpOrderProductList();
- LYFZ.BLL.BLL_ErpOrderWorkAnPaiRecord ordwr = new BLL.BLL_ErpOrderWorkAnPaiRecord();
- LYFZ.BLL.BLL_ErpOrdersPhotography phbll = new LYFZ.BLL.BLL_ErpOrdersPhotography();
- public MainFrameFormMain()
- {
- #region 窗体事件
- this.Shown += MainFrameFormMain_Shown;
- this.Load += MainFrameFormMain_Load;
- //this.nudDate.KeyDown += nudDate_KeyDown;
- this.Resize += MainFrameFormMain_Resize;
- #endregion
- #region 头
- this.nudYears.ValueChanged += nudYears_ValueChanged;
- this.nudMonth.ValueChanged += nudMonth_ValueChanged;
- this.nudDate.ValueChanged += nudDate_ValueChanged;
- #endregion
- #region 左边
- this.rdoPhotographed.Click += rdoPhotographed_Click;
- this.rdoFilmSelection.Click += rdoFilmSelection_Click;
- this.rdoLookDesign.Click += rdoLookDesign_Click;
- this.rdoTotakePiece.Click += rdoTotakePiece_Click;
- this.rdoService.Click += rdoService_Click;
- this.rdoSelectDress.Click += rdoSelectDress_Click;
- this.rdoHospitalClient.Click += rdoHospitalClient_Click;
- this.rdoRecentBirthday.Click += rdoRecentBirthday_Click;
- this.chkNearlyOneWeek.Click += chkNearlyOneWeek_Click;
- this.chkNearlyHalfMonth.Click += chkNearlyHalfMonth_Click;
- this.chkDressVersion.Click += chkDressVersion_Click;
- this.chkKidsVersion.Click += chkKidsVersion_Click;
- this.chkPortraitVersion.Click += chkPortraitVersion_Click;
- #endregion
- #region 右边
- this.btnCharts.Click += btnCharts_Click;
- this.btnPrint.Click += btnPrint_Click;
- this.btnStatistic.Click += btnStatistic_Click;
- this.btnGuestsReservation.Click += btnGuestsReservation_Click;
- this.btnReschedule.Click += btnReschedule_Click;
- this.btnSMS.Click += btnSMS_Click;
- this.btnClose.Click += btnClose_Click;
- this.btnSelectedClothes.Click += btnSelectedClothes_Click;
- this.btnOverview.Click += btnOverview_Click;
- this.btnClientServiceAnPai.Click += btnClientServiceAnPai_Click;
- this.btnPersonSchedule.Click += btnPersonSchedule_Click;
- #endregion
- //this.GetDayData();
- this.cmbtreevStoreName.ComboBoxTree_NodeMouseClick += cmbtreevStoreName_ComboBoxTree_NodeMouseClick;
- this.dgvData.CellMouseDown += dgvData_CellMouseDown;
- this.dgvData.CellClick += dgvData_CellClick;
- this.dgvData.MouseDoubleClick += dgvData_MouseDoubleClick;
- this.chkWeddingCelebration.Click += chkWeddingCelebration_Click;
- this.btnExport.Click += btnExport_Click;
- this.btnAddRecord.Click += btnAddRecord_Click;
- this.btnCommunicateDetails.Click += btnCommunicateDetails_Click;
- this.FormClosed += MainFrameFormMain_FormClosed;
- this.dgvData.ColumnHeaderMouseClick += DgvData_ColumnHeaderMouseClick;
- //this.btnClientServiceAnPai.Visible = false;
- this.btn_Report.Click += Btn_Report_Click;
- this.btn_AnPai.Click += Btn_AnPai_Click;
- }
- private void Btn_AnPai_Click(object sender, EventArgs e)
- {
- frmPerturbedController perturbedController = new frmPerturbedController();
- perturbedController.ShowDialog();
- }
- private void Btn_Report_Click(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.WorkAnPaiRecordSuperSmallForm frm = new SuperSmallForm.WorkAnPaiRecordSuperSmallForm();
-
- frm.ShowDialog();
- }
- /// <summary>
- /// 排序顺序
- /// </summary>
- string StrSortOrder = "DESC";
- /// <summary>
- /// 当前点击的字段
- /// </summary>
- string StrCurrentClickField = "";
- /// <summary>
- /// 排序字段
- /// </summary>
- string StrSortField = "Ordpg_ReservationPhotographyTime,Ord_Number,Ordv_DigitalNumber DESC";
- private void DgvData_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
- {
- if (e.Button == MouseButtons.Left)
- {
- string StrColumnName = this.dgvData.Columns[e.ColumnIndex].Name.Trim();
- if (StrColumnName == this.StrCurrentClickField || this.dgvData.StrValueNullColumn.Trim().IndexOf(StrColumnName) != -1 || string.IsNullOrEmpty(this.StrCurrentClickField))
- {
- if (this.StrSortOrder == "ASC")
- this.StrSortOrder = "DESC";
- else
- this.StrSortOrder = "ASC";
- }
- else
- {
- this.StrSortOrder = "DESC";
- }
- this.StrSortField = StrColumnName + " " + this.StrSortOrder;
- this.StrCurrentClickField = StrColumnName;
- this.PublicFunctionRows();
- }
- }
- void GetDayData()
- {
- DateTime NowTime = SDateTime.Now;
- if (IsFirstLoad)
- { NowTime = Convert.ToDateTime(LYFZ.Command.Command_Validate.DateTimeToString(SDateTime.Now, "yyyy-MM-01")); }
- else
- { NowTime = Convert.ToDateTime(nudYears.Value + "-" + nudMonth.Value + "-01"); }
- System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(delegate ()
- {
- string ExecuteSql = "select Ord_Type,Ordpg_Number,Ordpg_ReservationPhotographyTime from dbo.tb_ErpOrdersPhotography Left Join dbo.tb_ErpOrder on Ord_Number = Ordpg_Number where 1=1 And (Ordpg_ReservationPhotographyDividedShop is null or Ordpg_ReservationPhotographyDividedShop = '" + this.LocalCompanyInfoID + "') and Ordpg_ReservationPhotographyTime between '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime, "yyyy-MM-dd HH:mm:ss") + "' and '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime.AddMonths(1).AddSeconds(-1), "yyyy-MM-dd HH:mm:ss") + "';";
- ExecuteSql += "select Ord_Type,Ordv_Number,Ordv_ReservationFilmSelectionTime from dbo.tb_ErpOrderDigital Left Join dbo.tb_ErpOrder on Ord_Number = Ordv_Number where 1=1 And (Ordv_ReservationFilmSelectionDividedShop is null or Ordv_ReservationFilmSelectionDividedShop = '" + this.LocalCompanyInfoID + "') and Ordv_ReservationFilmSelectionTime between '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime, "yyyy-MM-dd HH:mm:ss") + "' and '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime.AddMonths(1).AddSeconds(-1), "yyyy-MM-dd HH:mm:ss") + "';";
- ExecuteSql += "select Ord_Type,Ordv_Number,Ordv_ReservationLookDesignTime from dbo.tb_ErpOrderDigital Left Join dbo.tb_ErpOrder on Ord_Number = Ordv_Number where 1=1 And (Ordv_ReservationLookDesignDividedShop is null or Ordv_ReservationLookDesignDividedShop = '" + this.LocalCompanyInfoID + "') and Ordv_ReservationLookDesignTime between '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime, "yyyy-MM-dd HH:mm:ss") + "' and '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime.AddMonths(1).AddSeconds(-1), "yyyy-MM-dd HH:mm:ss") + "';";
- ExecuteSql += "select Ord_Type,OPlist_OrderNumber,OPlist_ReservationTakeTime from dbo.tb_ErpOrderProductList Left Join dbo.tb_ErpOrder on Ord_Number = OPlist_OrderNumber where 1=1 And (OPlist_ReservationTakeDividedShop is null or OPlist_ReservationTakeDividedShop = '" + this.LocalCompanyInfoID + "') and OPlist_ReservationTakeTime between '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime, "yyyy-MM-dd HH:mm:ss") + "' and '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime.AddMonths(1).AddSeconds(-1), "yyyy-MM-dd HH:mm:ss") + "' and OPlist_Type = '2';";
- ExecuteSql += "select Ord_Type,Ws_Number,Ws_WeddingDate from dbo.tb_ErpWeddingService Left Join dbo.tb_ErpOrder on Ord_Number = Ws_Number where 1=1 And (Ws_ReservationServiceDividedShop is null or Ws_ReservationServiceDividedShop = '" + this.LocalCompanyInfoID + "') and Ws_WeddingDate between '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime, "yyyy-MM-dd HH:mm:ss") + "' and '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime.AddMonths(1).AddSeconds(-1), "yyyy-MM-dd HH:mm:ss") + "';";
- ExecuteSql += "select Ord_Type,Ordv_Number,Ordv_ReservationClothingTime from dbo.tb_ErpOrderDigital Left Join dbo.tb_ErpOrder on Ord_Number = Ordv_Number where 1=1 And (Ordv_ReservationClothingDividedShop is null or Ordv_ReservationClothingDividedShop = '" + this.LocalCompanyInfoID + "') and Ordv_ReservationClothingTime between '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime, "yyyy-MM-dd HH:mm:ss") + "' and '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime.AddMonths(1).AddSeconds(-1), "yyyy-MM-dd HH:mm:ss") + "';";
- ExecuteSql += "select Hdr_DoorTime from dbo.tb_ErpHospitalDispatchDoor where (Hdr_DividedShop is null or Hdr_DividedShop = '" + this.LocalCompanyInfoID + "') And Hdr_DoorTime between '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime, "yyyy-MM-dd HH:mm:ss") + "' and '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime.AddMonths(1).AddSeconds(-1), "yyyy-MM-dd HH:mm:ss") + "';";
- DataSet dsData = orbll.GetView_Custom(ExecuteSql);
- }));
- t.Start();
- }
- /// <summary>
- /// 安排任务的任务类型
- /// </summary>
- public string StrClientServiceType = "";
- /// <summary>
- /// 是否首次加载
- /// </summary>
- bool IsFirstLoad = true;
- /// <summary>
- /// 员工编号
- /// </summary>
- string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- /// <summary>
- /// 当前登录的影楼
- /// </summary>
- string LocalCompanyInfoID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID();
- #region 窗体事件
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void MainFrameFormMain_Shown(object sender, EventArgs e)
- {
- this.panelEx9.BackColor = Color.Red;
- this.panelEx10.BackColor = Color.Coral;
- if (this.StrClientServiceType.Trim().Length > 0)
- {
- this.IsFirstLoad = false;
- switch (this.StrClientServiceType.Trim())
- {
- case "选衣服客人":
- this.rdoSelectDress.Checked = true;
- this.rdoSelectDress_Click(this, null);
- break;
- case "拍照客人":
- this.rdoPhotographed.Checked = true;
- this.rdoPhotographed_Click(this, null);
- break;
- case "选片客人":
- this.rdoFilmSelection.Checked = true;
- this.rdoFilmSelection_Click(this, null);
- break;
- case "看版客人":
- this.rdoLookDesign.Checked = true;
- this.rdoLookDesign_Click(this, null);
- break;
- case "取件客人":
- this.rdoTotakePiece.Checked = true;
- this.rdoTotakePiece_Click(this, null);
- break;
- case "服务客人":
- this.rdoService.Checked = true;
- this.rdoService_Click(this, null);
- break;
- case "摄控医院客人":
- this.rdoHospitalClient.Checked = true;
- this.rdoHospitalClient_Click(this, null);
- break;
- }
- }
- else
- {
- this.PaintingWeekly();
- this.IsFirstLoad = false;
- }
- }
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void MainFrameFormMain_Load(object sender, EventArgs e)
- {
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelSelectDressGuests);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.礼服管理, hideControl, null, null);
- hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelHospitalClient);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.医院跟踪系统意向单查询, hideControl, null, null);
- hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelRecentBirthday);
- hideControl.Add(this.btnCommunicateDetails);
- hideControl.Add(this.btnAddRecord);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.沟通助手, hideControl, null, null);
- hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.btnClientServiceAnPai);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.客服中心客服安排, hideControl, null, null);
- hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.btnPersonSchedule);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.员工考勤员工档期, hideControl, null, null);
- hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelEx9);
- hideControl.Add(this.labelEx3);
- hideControl.Add(this.panelEx10);
- hideControl.Add(this.labelEx2);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.订单拍照重拍标注, hideControl, null, null);
- try
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName(this.cmbtreevStoreName, StrKeyCode: "qt001");
- this.PublicFunctionRights();
- this.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- this.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- #region
- this.chkKidsVersion.Visible = false;
- this.chkDressVersion.Visible = false;
- this.chkPortraitVersion.Visible = false;
- this.chkNearlyHalfMonth.Visible = false;
- this.chkNearlyOneWeek.Visible = false;
- #endregion
- #region 图表
- this.btnCharts.Text = " 详 情";
- this.tblPanel.Controls.Clear();
- string[] RelationEnum = System.Enum.GetNames(typeof(LYFZ.EnumPublic.TotalWeeks));
- int panelCount = 0;
- this.nudYears.Value = SDateTime.Now.Year;
- this.nudMonth.Value = SDateTime.Now.Month;
- this.nudDate.Value = SDateTime.Now.Day;
- this.nudDate.Maximum = DateTime.DaysInMonth(Convert.ToInt32(nudYears.Value), Convert.ToInt32(nudMonth.Value));
- if (this.StrClientServiceType.Trim().Length > 0)
- { this.tblPanel.Visible = false; }
- else
- { this.tblPanel.Visible = true; }
- this.SetnudDate();
- #region 填充每天的Panel
- Panel panel = new Panel();
- Label lable = new Label();
- for (int i = 0; i < 7; i++)
- {
- for (int j = 0; j < 7; j++)
- {
- if (i == 0)
- {
- panel = new Panel();
- panel.BackColor = UIBlueThemeResources.SightsSelectTableBorderColor;
- panel.Margin = new System.Windows.Forms.Padding(1, 1, 1, 1);
- panel.Size = new Size((this.Width / 7) - 4, 40);
- panel.Dock = DockStyle.Fill;
- panel.Name = "AAAA" + i + j;
- lable = new Label();
- lable.Text = RelationEnum[j].Trim();
- lable.Size = new System.Drawing.Size((this.Width / 7) - 4, 30);
- lable.TextAlign = ContentAlignment.MiddleCenter;
- lable.Dock = DockStyle.Fill;
- lable.ForeColor = UIBlueThemeResources.DefaultReverseTextColor;
- lable.Font = new System.Drawing.Font("微软雅黑", 12F, FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel);
- panel.Controls.Add(lable);
- tblPanel.Controls.Add(panel);
- }
- else
- {
- CameraBookDayControl cbcPanel = new CameraBookDayControl();
- cbcPanel.BackColor = Color.Gainsboro;
- cbcPanel.Margin = new System.Windows.Forms.Padding(1, 1, 1, 1);
- cbcPanel.Size = new Size((this.Width / 7) - 4, (this.Height / 6));
- panelCount++;
- cbcPanel.Name = "panel" + panelCount;
- cbcPanel.Dock = DockStyle.Fill;
- //cbcPanel.DoubleClick += new EventHandler(panel_DoubleClick);
- cbcPanel.Click += new EventHandler(panel_Click);
- cbcPanel.ClickRemarkEvent += new CameraBookDayControl.ClickRemarkHandler(CameraBookDayControl_Click);
- cbcPanel.DoubleClickItemEvent += new CameraBookDayControl.DoubleClickItemHandler(CameraBookDayControl_DoubleClick);
- tblPanel.Controls.Add(cbcPanel);
- }
- }
- }
- #endregion
- this.nudDate.Focus();
- #endregion
- }
- catch (Exception ex)
- { MessageBoxCustom.Show(ex.ToString()); }
- btn_ColorSetting.Click += Btn_ColorSetting_Click;
- }
- private void Btn_ColorSetting_Click(object sender, EventArgs e)
- {
- SmallForm.frmColorManager frmColor = new SmallForm.frmColorManager();
- if(frmColor.ShowDialog()== DialogResult.OK)
- {
- }
- }
- private void CameraBookDayControl_DoubleClick(CameraBookDayControl pan, string dayNum, DayDataItemModel dayDataItem)
- {
- this.nudDate.Value = Convert.ToDecimal(dayNum);
- if (dayDataItem.Name.Contains("拍照"))
- {
- lbl_A_DoubleClick(null, null);
- }
- else if (dayDataItem.Name.Contains("选片"))
- {
- lbl_B_DoubleClick(null, null);
- }
- else if (dayDataItem.Name.Contains("看样"))
- {
- lbl_C_DoubleClick(null, null);
- }
- else if (dayDataItem.Name.Contains("取件"))
- {
- lbl_D_DoubleClick(null, null);
- }
- else if (dayDataItem.Name.Contains("服务"))
- {
- lbl_E_DoubleClick(null, null);
- }
- else if (dayDataItem.Name.Contains("选衣"))
- {
- lbl_F_DoubleClick(null, null);
- }
- else if (dayDataItem.Name.Contains("上门派单"))
- {
- lbl_G_DoubleClick(null, null);
- }
- else
- {
- panel_DoubleClick(null, null);
- }
- }
- private void CameraBookDayControl_Click(CameraBookDayControl pan, string day)
- {
- if (!this.cmbtreevStoreName.Text.Trim().Equals("全部") && this.cmbtreevStoreName.Text.Trim().Length > 0)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.CameraControlNotesSuperSmallForm frm = new SuperSmallForm.CameraControlNotesSuperSmallForm();
- frm.StrStoreName = this.cmbtreevStoreName.Tag.ToString().Trim();
- frm.StrDateValue = Convert.ToDateTime(this.nudYears.Value + "-" + this.nudMonth.Value + "-" + day).ToString("yyyy-MM-dd");
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- if (frm.intCurrentLength > 0)
- {
- pan.dayModel.remark = "保存备注";
- }
- else
- {
- pan.dayModel.remark = "";
- }
- pan.Refresh();
- }
- }
- }
- /// <summary>
- /// 分店选择查询数据
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbtreevStoreName_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
- {
- this.PublicFunctionRights();
- if (this.btnCharts.Text.Trim() == "图 表")
- { this.PublicFunctionRows(); }
- else if (this.btnCharts.Text.Trim() == "详 情")
- { this.PaintingWeekly(); }
- }
- /// <summary>
- /// 选择分店获取权限
- /// </summary>
- void PublicFunctionRights()
- {
- this.btnSMS.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "CameraControlBook", LYFZ.CustomAttributes.OperatingAuthority.SMSSend);
- this.btnPrint.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "CameraControlBook", LYFZ.CustomAttributes.OperatingAuthority.Print);
- this.btnSelectedClothes.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "CameraControlBook", LYFZ.CustomAttributes.OperatingAuthority.CameraControlBook_SelectDress);
- this.btnExport.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "CameraControlBook", LYFZ.CustomAttributes.OperatingAuthority.DataExport);
- #region 权限
- switch (LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- {
- case LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版:
- this.panelHospitalClient.Visible = false;
- break;
- }
- #endregion
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="IsVisible"></param>
- void SetnudDate(bool IsVisible = false)
- {
- if (!IsVisible)
- {
- this.nudDate.Visible = false;
- this.panelEx5.Width = 205;
- }
- else
- {
- this.nudDate.Visible = true;
- this.panelEx5.Width = 275;
- }
- }
- /// <summary>
- /// 绘出每日
- /// </summary>
- /// <param name="todays"></param>
- void PaintingCharts(int todays)
- {
- DateTime NowTime = Convert.ToDateTime(this.nudYears.Value + "-" + this.nudMonth.Value + "-01");
- string StrStoreNameWhere = PublicCodeClasses.GetGroupQueryWhere(this.cmbtreevStoreName, "StrStoreName", ConnectWord: "or");
- DataTable tbl_Photogr = null;
- DataTable tbl_FilmSelection = null;
- DataTable tbl_LookDesign = null;
- DataTable tbl_PickupDate = null;
- DataTable tbl_WeddingService = null;
- DataTable tbl_SelectDress = null;
- DataTable tbl_SendSingle = null;
- DataTable tbl_Notes = null;
- string Strwhere = "";
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate (object obj, BackgroundWorker backgroundWorker)
- {
- Strwhere = "between '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime, "yyyy-MM-dd HH:mm:ss") + "' and '" + LYFZ.Command.Command_Validate.DateTimeToString(NowTime.AddMonths(1).AddSeconds(-1), "yyyy-MM-dd HH:mm:ss") + "'";
- string ExecuteSql = "select Ord_Type,Ordpg_Number,Ordpg_ReservationPhotographyTime from dbo.tb_ErpOrdersPhotography Left Join dbo.tb_ErpOrder on Ord_Number = Ordpg_Number where 1=1 And (Ordpg_ReservationPhotographyDividedShop is null " + StrStoreNameWhere.Replace("StrStoreName", "Ordpg_ReservationPhotographyDividedShop") + ") and Ordpg_ReservationPhotographyTime " + Strwhere + ";";
- ExecuteSql += "select Ord_Type,Ordv_Number,Ordv_ReservationFilmSelectionTime from dbo.tb_ErpOrderDigital Left Join dbo.tb_ErpOrder on Ord_Number = Ordv_Number where 1=1 And (Ordv_ReservationFilmSelectionDividedShop is null " + StrStoreNameWhere.Replace("StrStoreName", "Ordv_ReservationFilmSelectionDividedShop") + ") and Ordv_ReservationFilmSelectionTime " + Strwhere + ";";
- ExecuteSql += "select Ord_Type,Ordv_Number,Ordv_ReservationLookDesignTime from dbo.tb_ErpOrderDigital Left Join dbo.tb_ErpOrder on Ord_Number = Ordv_Number where 1=1 And (Ordv_ReservationLookDesignDividedShop is null " + StrStoreNameWhere.Replace("StrStoreName", "Ordv_ReservationLookDesignDividedShop") + ") and Ordv_ReservationLookDesignTime " + Strwhere + ";";
- ExecuteSql += "select Ord_Type,OPlist_OrderNumber,OPlist_ReservationTakeTime from dbo.tb_ErpOrderProductList Left Join dbo.tb_ErpOrder on Ord_Number = OPlist_OrderNumber where 1=1 And (OPlist_ReservationTakeDividedShop is null " + StrStoreNameWhere.Replace("StrStoreName", "OPlist_ReservationTakeDividedShop") + ") and OPlist_ReservationTakeTime " + Strwhere + " and OPlist_Type = '2';";
- ExecuteSql += "select Ord_Type,Ws_Number,Ws_WeddingDate from dbo.tb_ErpWeddingService Left Join dbo.tb_ErpOrder on Ord_Number = Ws_Number where 1=1 And (Ws_ReservationServiceDividedShop is null " + StrStoreNameWhere.Replace("StrStoreName", "Ws_ReservationServiceDividedShop") + ") and Ws_WeddingDate " + Strwhere + ";";
- ExecuteSql += "select Ord_Type,Ordv_Number,Ordv_ReservationClothingTime from dbo.tb_ErpOrderDigital Left Join dbo.tb_ErpOrder on Ord_Number = Ordv_Number where 1=1 And (Ordv_ReservationClothingDividedShop is null " + StrStoreNameWhere.Replace("StrStoreName", "Ordv_ReservationClothingDividedShop") + ") and Ordv_ReservationClothingTime " + Strwhere + ";";
- ExecuteSql += "select Hdr_DoorTime from dbo.tb_ErpHospitalDispatchDoor where (Hdr_DividedShop is null " + StrStoreNameWhere.Replace("StrStoreName", "Hdr_DividedShop") + ") And Hdr_DoorTime " + Strwhere + ";";
- DataSet dsData = orbll.GetView_Custom(ExecuteSql);
- tbl_Photogr = dsData.Tables["ds"];
- tbl_FilmSelection = dsData.Tables["ds1"];
- tbl_LookDesign = dsData.Tables["ds2"];
- tbl_PickupDate = dsData.Tables["ds3"];
- tbl_WeddingService = dsData.Tables["ds4"];
- tbl_SelectDress = dsData.Tables["ds5"];
- tbl_SendSingle = dsData.Tables["ds6"];
- tbl_Notes = null;
- if (tbl_Notes == null)
- {
- string StrTableName = "select Ordrr_Remark,Ordrr_CreateDatetime from dbo.tb_ErpOrderRemarkRecord where Ordrr_ModuleName = '每日便签' And Ordrr_OrdNumber = '" + this.cmbtreevStoreName.Tag.ToString().Trim() + "' And Ordrr_CreateDatetime " + Strwhere + " and Ordrr_Remark !='' ;";
- tbl_Notes = orbll.GetView_Custom(StrTableName).Tables[0];
- tbl_Notes.PrimaryKey = new DataColumn[] { tbl_Notes.Columns["Ordrr_CreateDatetime"] };
- }
- try
- {
- List<Model.CameraBook.DayDataModel> dayModel = BinMouthData(todays, Strwhere, tbl_Photogr, tbl_FilmSelection, tbl_LookDesign, tbl_PickupDate, tbl_WeddingService, tbl_SelectDress, tbl_SendSingle, tbl_Notes);
- BindMouthControl3(todays, dayModel);
- }
- catch (Exception e) { }
- });
- }
- #region (旧)摄控本图表统计
- void BindMouthControl(int todays, string Strwhere, DataTable tbl_Photogr, DataTable tbl_FilmSelection, DataTable tbl_LookDesign, DataTable tbl_PickupDate, DataTable tbl_WeddingService, DataTable tbl_SelectDress, DataTable tbl_SendSingle, DataTable tbl_Notes)
- {
- this.Invoke(new LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.UpdateControl(delegate ()
- {
- int days = DateTime.DaysInMonth(Convert.ToInt32(this.nudYears.Value), Convert.ToInt32(this.nudMonth.Value));//这个月的天数
- int panellenght = 0;
- Size lblsize = new System.Drawing.Size(120, 17);
- Font lblfont = new System.Drawing.Font("微软雅黑", 14, FontStyle.Regular, GraphicsUnit.Pixel);
- int LineSpacing = (lblfont.Height / 2) + 2;
- int Location_X = 5;
- Label lbl_A = null;
- Label lbl_B = null;
- Label lbl_C = null;
- Label lbl_D = null;
- Label lbl_E = null;
- Label lbl_F = null;
- Label lbl_G = null;
- int lbl1_Width = 0;
- for (int i = 0; i < days; i++)
- {
- if (i == 0)
- { lblStart = todays; this.nudDataValue = todays; }
- panellenght++;
- Panel panel = (Panel)tblPanel.Controls["panel" + todays];
- DateTime Starttime = Convert.ToDateTime(this.nudYears.Value + "-" + this.nudMonth.Value + "-" + (i + 1));
- #region 日期
- Label lbl1 = new Label();
- lbl1.Text = (i + 1).ToString();
- lbl1.Name = "lbl" + i;
- lbl1.Location = new Point(Location_X, 2);
- lbl1.Size = new System.Drawing.Size(40, 20);
- lbl1.TextAlign = ContentAlignment.TopLeft;
- lbl1.DoubleClick += new EventHandler(lbl1_DoubleClick);
- lbl1.Click += new EventHandler(lbl1_Click);
- lbl1.Font = new System.Drawing.Font("宋体", 15, FontStyle.Bold);
- if (!this.cmbtreevStoreName.Text.Trim().Equals("全部") && this.cmbtreevStoreName.Text.Trim().Length > 0)
- {
- DataRow dtRow = tbl_Notes.Rows.Find(Starttime.ToString("yyyy-MM-dd HH:mm:ss"));
- if (dtRow != null && dtRow["Ordrr_Remark"].ToString().Trim().Length > 0)
- { lbl1.ForeColor = Color.Blue; }
- else
- { lbl1.ForeColor = Color.Red; }
- lbl1.Cursor = Cursors.Hand;
- lbl1.Tag = new LYFZ.ComponentLibrary.ExToolTipText("随笔便签");
- exToolTip1.SetToolTip(lbl1, "随笔便签");
- }
- else
- { lbl1.ForeColor = Color.Red; }
- panel.Controls.Add(lbl1);
- lbl1_Width = lbl1.Size.Width;
- #endregion
- #region 农历
- string StrText = LYFZ.Command.Command_CalendarTurnLunar.GetLunarNewYearMonthDay(nudYears.Value.ToString().Trim() + "-" + nudMonth.Value.ToString().Trim() + "-" + (i + 1));
- lbl1 = new Label();
- lbl1.Text = StrText;
- lbl1.Location = new Point(lbl1_Width + Location_X, 7);
- lbl1.AutoSize = false;
- lbl1.Size = new System.Drawing.Size(50, 17);
- lbl1.DoubleClick += new EventHandler(lbl1_DoubleClick);
- lbl1.Click += new EventHandler(lbl1_Click);
- lbl1.Font = new System.Drawing.Font("宋体", 8, FontStyle.Regular);
- panel.Controls.Add(lbl1);
- #endregion
- int Location_Y = 15;
- #region 拍照客人
- lbl_A = new Label();
- lbl_A.Cursor = Cursors.Hand;
- string P_StrMagess = "";
- int P_WCount = 0;
- int P_CCount = 0;
- int P_PCount = 0;
- int fordrcount = 0;
- //int intHoliday = 0;
- //if (this.cmbtreevStoreName.Tag != null && !string.IsNullOrEmpty(this.cmbtreevStoreName.Tag.ToString().Trim()))
- //{ dtHoliday.Select("StrStoreName = '" + this.cmbtreevStoreName.Tag.ToString().Trim() + "'"); }
- //else
- //{ dtHoliday.Select("StrStoreName = '" + LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID() + "' And ");
- //}
- if (tbl_Photogr.Rows.Count > 0)
- {
- List<DataRow> dr = tbl_Photogr.AsEnumerable().Where(
- p => p.Field<DateTime>("Ordpg_ReservationPhotographyTime") >= Starttime
- &&
- p.Field<DateTime>("Ordpg_ReservationPhotographyTime") <= Starttime.AddDays(1)).ToList<DataRow>();
- //for (int j = 0; j < dr.Count; j++)
- //{
- // if (j > 0)
- // {
- // if (dr[j]["Ordpg_Number"].ToString().Trim() != dr[j - 1]["Ordpg_Number"].ToString().Trim())
- // {
- // switch (dr[j]["Ord_Type"].ToString().Trim())
- // {
- // case "0": P_WCount++; break;
- // case "1": P_CCount++; break;
- // case "2": P_PCount++; break;
- // }
- // fordrcount++;
- // }
- // }
- // else
- // {
- // switch (dr[j]["Ord_Type"].ToString().Trim())
- // {
- // case "0": P_WCount++; break;
- // case "1": P_CCount++; break;
- // case "2": P_PCount++; break;
- // }
- // fordrcount++;
- // }
- //}
- //List<string> tempCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ordpg_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList();
- P_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ordpg_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- P_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ordpg_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- P_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ordpg_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- ;
- }
- if (P_WCount > 0)
- { P_StrMagess = "婚纱订单:" + P_WCount + " "; }
- if (P_CCount > 0)
- {
- if (P_StrMagess == "")
- { P_StrMagess += "儿童订单:" + P_CCount + " "; }
- else { P_StrMagess += "\r\n儿童订单:" + P_CCount + " "; }
- }
- if (P_PCount > 0)
- {
- if (P_StrMagess == "")
- { P_StrMagess += "写真订单:" + P_PCount + " "; }
- else { P_StrMagess += "\r\n写真订单:" + P_PCount + " "; }
- }
- if (P_StrMagess != "")
- { P_StrMagess = "拍照客人\r\n" + P_StrMagess; }
- lbl_A.Tag = new LYFZ.ComponentLibrary.ExToolTipText(P_StrMagess);
- exToolTip1.SetToolTip(lbl_A, P_StrMagess);
- lbl_A.Text = "拍照客人: " + (P_WCount + P_CCount + P_PCount);
- lbl_A.Location = new Point(Location_X, Location_Y + LineSpacing * 1);
- lbl_A.Size = lblsize;
- lbl_A.TextAlign = ContentAlignment.BottomLeft;
- lbl_A.DoubleClick += lbl_A_DoubleClick;
- lbl_A.Click += new EventHandler(lbl1_Click);
- lbl_A.Font = lblfont;
- panel.Controls.Add(lbl_A);
- Location_Y += LineSpacing;
- #endregion
- #region 选片客人
- lbl_B = new Label();
- lbl_B.Cursor = Cursors.Hand;
- string X_StrMagess = "";
- int X_WCount = 0;
- int X_CCount = 0;
- int X_PCount = 0;
- fordrcount = 0;
- if (tbl_FilmSelection.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_FilmSelection.Select("Ordv_ReservationFilmSelectionTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Ordv_ReservationFilmSelectionTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "Ordv_Number");
- List<DataRow> dr = tbl_FilmSelection.AsEnumerable().Where(
- p => p.Field<DateTime>("Ordv_ReservationFilmSelectionTime") >= Starttime
- &&
- p.Field<DateTime>("Ordv_ReservationFilmSelectionTime") <= Starttime.AddDays(1)).ToList<DataRow>();
- /*for (int j = 0; j < dr.Count; j++)
- {
- if (j > 0)
- {
- if (dr[j]["Ordv_Number"].ToString().Trim() != dr[j - 1]["Ordv_Number"].ToString().Trim())
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": X_WCount++; break;
- case "1": X_CCount++; break;
- case "2": X_PCount++; break;
- }
- fordrcount++;
- }
- }
- else
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": X_WCount++; break;
- case "1": X_CCount++; break;
- case "2": X_PCount++; break;
- }
- fordrcount++;
- }
- }*/
- X_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- X_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- X_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = X_WCount + X_CCount + X_PCount;
- }
- if (X_WCount > 0)
- {
- if (X_StrMagess == "")
- { X_StrMagess = "婚纱订单:" + X_WCount; }
- else
- { X_StrMagess = "\r\n婚纱订单:" + X_WCount; }
- }
- if (X_CCount > 0)
- {
- if (X_StrMagess == "")
- { X_StrMagess += "儿童订单:" + X_CCount; }
- else { X_StrMagess += "\r\n儿童订单:" + X_CCount; }
- }
- if (X_PCount > 0)
- {
- if (X_StrMagess == "")
- { X_StrMagess += "写真订单:" + X_PCount; }
- else
- { X_StrMagess += "\r\n写真订单:" + X_PCount; }
- }
- if (X_StrMagess != "")
- { X_StrMagess = "选片客人\r\n" + X_StrMagess; }
- lbl_B.Tag = new LYFZ.ComponentLibrary.ExToolTipText(X_StrMagess);
- exToolTip1.SetToolTip(lbl_B, X_StrMagess);
- lbl_B.Text = "选片客人: " + fordrcount;
- lbl_B.Location = new Point(Location_X, Location_Y + LineSpacing * 2);
- lbl_B.Size = lblsize;
- lbl_B.TextAlign = ContentAlignment.BottomLeft;
- lbl_B.DoubleClick += lbl_B_DoubleClick;
- lbl_B.Click += new EventHandler(lbl1_Click);
- lbl_B.Font = lblfont;
- panel.Controls.Add(lbl_B);
- Location_Y += LineSpacing;
- #endregion
- #region 看样客人
- lbl_C = new Label();
- lbl_C.Cursor = Cursors.Hand;
- string K_StrMagess = "";
- int K_WCount = 0;
- int K_CCount = 0;
- int K_PCount = 0;
- fordrcount = 0;
- if (tbl_LookDesign.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_LookDesign.Select("Ordv_ReservationLookDesignTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Ordv_ReservationLookDesignTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "Ordv_Number");
- List<DataRow> dr = tbl_LookDesign.AsEnumerable().Where(
- p => p.Field<DateTime>("Ordv_ReservationLookDesignTime") >= Starttime
- &&
- p.Field<DateTime>("Ordv_ReservationLookDesignTime") <= Starttime.AddDays(1)).ToList<DataRow>();
- /*for (int j = 0; j < dr.Count; j++)
- {
- if (j > 0)
- {
- if (dr[j]["Ordv_Number"].ToString().Trim() != dr[j - 1]["Ordv_Number"].ToString().Trim())
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": K_WCount++; break;
- case "1": K_CCount++; break;
- case "2": K_PCount++; break;
- }
- fordrcount++;
- }
- }
- else
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": K_WCount++; break;
- case "1": K_CCount++; break;
- case "2": K_PCount++; break;
- }
- fordrcount++;
- }
- }*/
- K_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- K_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- K_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = K_WCount + K_CCount + K_PCount;
- }
- if (K_WCount > 0)
- {
- if (K_StrMagess == "")
- { K_StrMagess = "婚纱订单:" + K_WCount; }
- else
- { K_StrMagess = "\r\n婚纱订单:" + K_WCount; }
- }
- if (K_CCount > 0)
- {
- if (K_StrMagess == "")
- { K_StrMagess += "儿童订单:" + K_CCount; }
- else
- { K_StrMagess += "\r\n儿童订单:" + K_CCount; }
- }
- if (K_PCount > 0)
- {
- if (K_StrMagess == "")
- { K_StrMagess += "写真订单:" + K_PCount; }
- else
- { K_StrMagess += "\r\n写真订单:" + K_PCount; }
- }
- if (K_StrMagess != "")
- { K_StrMagess = "看样客人\r\n" + K_StrMagess; }
- lbl_C.Tag = new LYFZ.ComponentLibrary.ExToolTipText(K_StrMagess);
- exToolTip1.SetToolTip(lbl_C, K_StrMagess);
- lbl_C.Text = "看样客人: " + fordrcount;
- lbl_C.Location = new Point(Location_X, Location_Y + LineSpacing * 3);
- lbl_C.Size = lblsize;
- lbl_C.TextAlign = ContentAlignment.BottomLeft;
- lbl_C.DoubleClick += lbl_C_DoubleClick;
- lbl_C.Click += new EventHandler(lbl1_Click);
- lbl_C.Font = lblfont;
- panel.Controls.Add(lbl_C);
- Location_Y += LineSpacing;
- #endregion
- #region 取件客人
- lbl_D = new Label();
- lbl_D.Cursor = Cursors.Hand;
- string Q_StrMagess = "";
- int Q_WCount = 0;
- int Q_CCount = 0;
- int Q_PCount = 0;
- fordrcount = 0;
- if (tbl_PickupDate.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_PickupDate.Select("OPlist_ReservationTakeTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and OPlist_ReservationTakeTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "OPlist_OrderNumber");
- List<DataRow> dr = tbl_PickupDate.AsEnumerable().Where(
- p => p.Field<DateTime>("OPlist_ReservationTakeTime") >= Starttime
- &&
- p.Field<DateTime>("OPlist_ReservationTakeTime") <= Starttime.AddDays(1)).ToList<DataRow>();
- /*for (int j = 0; j < dr.Count; j++)
- {
- if (j > 0)
- {
- if (dr[j]["OPlist_OrderNumber"].ToString().Trim() != dr[j - 1]["OPlist_OrderNumber"].ToString().Trim())
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": Q_WCount++; break;
- case "1": Q_CCount++; break;
- case "2": Q_PCount++; break;
- }
- fordrcount++;
- }
- }
- else
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": Q_WCount++; break;
- case "1": Q_CCount++; break;
- case "2": Q_PCount++; break;
- }
- fordrcount++;
- }
- }*/
- Q_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("OPlist_OrderNumber")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- Q_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("OPlist_OrderNumber")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- Q_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("OPlist_OrderNumber")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = Q_WCount + Q_CCount + Q_PCount;
- }
- if (Q_WCount > 0)
- {
- if (Q_StrMagess == "")
- { Q_StrMagess = "婚纱订单:" + Q_WCount; }
- else
- { Q_StrMagess = "\r\n婚纱订单:" + Q_WCount; }
- }
- if (Q_CCount > 0)
- {
- if (Q_StrMagess == "")
- { Q_StrMagess += "儿童订单:" + Q_CCount; }
- else
- { Q_StrMagess += "\r\n儿童订单:" + Q_CCount; }
- }
- if (Q_PCount > 0)
- {
- if (Q_StrMagess == "")
- { Q_StrMagess += "写真订单:" + Q_PCount; }
- else
- { Q_StrMagess += "\r\n写真订单:" + Q_PCount; }
- }
- if (Q_StrMagess != "")
- { Q_StrMagess = "取件客人\r\n" + Q_StrMagess; }
- lbl_D.Tag = new LYFZ.ComponentLibrary.ExToolTipText(Q_StrMagess);
- exToolTip1.SetToolTip(lbl_D, Q_StrMagess);
- lbl_D.Cursor = Cursors.Hand;
- lbl_D.Text = "取件客人: " + fordrcount;
- lbl_D.Location = new Point(Location_X, Location_Y + LineSpacing * 4);
- lbl_D.Size = lblsize;
- lbl_D.TextAlign = ContentAlignment.BottomLeft;
- lbl_D.DoubleClick += lbl_D_DoubleClick;
- lbl_D.Click += new EventHandler(lbl1_Click);
- lbl_D.Font = lblfont;
- panel.Controls.Add(lbl_D);
- Location_Y += LineSpacing;
- #endregion
- #region 服务客人
- lbl_E = new Label();
- lbl_E.Cursor = Cursors.Hand;
- string F_StrMagess = "";
- int F_WCount = 0;
- int F_CCount = 0;
- int F_PCount = 0;
- int F_FCount = 0;
- fordrcount = 0;
- if (tbl_WeddingService.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_WeddingService.Select("Ws_WeddingDate >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Ws_WeddingDate < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "Ws_Number");
- List<DataRow> dr = tbl_WeddingService.AsEnumerable().Where(
- p => p.Field<DateTime>("Ws_WeddingDate") >= Starttime
- &&
- p.Field<DateTime>("Ws_WeddingDate") <= Starttime.AddDays(1)).ToList<DataRow>();
- /*for (int j = 0; j < dr.Count; j++)
- {
- if (j > 0)
- {
- if (dr[j]["Ws_Number"].ToString().Trim() != dr[j - 1]["Ws_Number"].ToString().Trim())
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": F_WCount++; break;
- case "1": F_CCount++; break;
- case "2": F_PCount++; break;
- case "3": F_FCount++; break;
- }
- fordrcount++;
- }
- }
- else
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": F_WCount++; break;
- case "1": F_CCount++; break;
- case "2": F_PCount++; break;
- case "3": F_FCount++; break;
- }
- fordrcount++;
- }
- }*/
- F_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ws_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- F_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ws_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- F_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ws_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- F_FCount = dr.Where(p => p.Field<string>("Ord_Type") == "3").Select(p => p.Field<string>("Ws_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = F_WCount + F_CCount + F_PCount + F_FCount;
- }
- if (F_WCount > 0)
- {
- if (F_StrMagess == "")
- { F_StrMagess = "婚纱订单:" + F_WCount; }
- else { F_StrMagess = "\r\n婚纱订单:" + F_WCount; }
- }
- if (F_CCount > 0)
- {
- if (F_StrMagess == "")
- { F_StrMagess += "儿童订单:" + F_CCount; }
- else { F_StrMagess += "\r\n儿童订单:" + F_CCount; }
- }
- if (F_PCount > 0)
- {
- if (F_StrMagess == "")
- { F_StrMagess += "写真订单:" + F_PCount; }
- else { F_StrMagess += "\r\n写真订单:" + F_PCount; }
- }
- if (F_FCount > 0)
- {
- if (F_StrMagess == "")
- { F_StrMagess += "服务订单:" + F_FCount; }
- else { F_StrMagess += "\r\n服务订单:" + F_FCount; }
- }
- if (F_StrMagess != "")
- { F_StrMagess = "服务客人\r\n" + F_StrMagess; }
- lbl_E.Tag = new LYFZ.ComponentLibrary.ExToolTipText(F_StrMagess);
- exToolTip1.SetToolTip(lbl_E, F_StrMagess);
- lbl_E.Cursor = Cursors.Hand;
- lbl_E.Text = "服务客人: " + fordrcount;
- lbl_E.Location = new Point(Location_X, Location_Y + LineSpacing * 5);
- lbl_E.Size = lblsize;
- lbl_E.TextAlign = ContentAlignment.BottomLeft;
- lbl_E.DoubleClick += lbl_E_DoubleClick;
- lbl_E.Click += new EventHandler(lbl1_Click);
- lbl_E.Font = lblfont;
- panel.Controls.Add(lbl_E);
- Location_Y += LineSpacing;
- #endregion
- #region 选衣客人
- lbl_F = new Label();
- lbl_F.Cursor = Cursors.Hand;
- string S_StrMagess = "";
- int S_WCount = 0;
- int S_CCount = 0;
- int S_PCount = 0;
- int S_FCount = 0;
- fordrcount = 0;
- if (tbl_SelectDress.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_SelectDress.Select("Ordv_ReservationClothingTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Ordv_ReservationClothingTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "Ordv_Number");
- List<DataRow> dr = tbl_SelectDress.AsEnumerable().Where(
- p => p.Field<DateTime>("Ordv_ReservationClothingTime") >= Starttime
- &&
- p.Field<DateTime>("Ordv_ReservationClothingTime") <= Starttime.AddDays(1)).ToList<DataRow>();
- /* for (int j = 0; j < dr.Count; j++)
- {
- if (j > 0)
- {
- if (dr[j]["Ordv_Number"].ToString().Trim() != dr[j - 1]["Ordv_Number"].ToString().Trim())
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": S_WCount++; break;
- case "1": S_CCount++; break;
- case "2": S_PCount++; break;
- case "3": S_FCount++; break;
- }
- fordrcount++;
- }
- }
- else
- {
- switch (dr[j]["Ord_Type"].ToString().Trim())
- {
- case "0": S_WCount++; break;
- case "1": S_CCount++; break;
- case "2": S_PCount++; break;
- case "3": S_FCount++; break;
- }
- fordrcount++;
- }
- }*/
- S_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- S_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- S_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- S_FCount = dr.Where(p => p.Field<string>("Ord_Type") == "3").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = S_WCount + S_CCount + S_PCount + S_FCount;
- }
- if (S_WCount > 0)
- {
- if (S_StrMagess == "")
- { S_StrMagess = "婚纱订单:" + S_WCount; }
- else { S_StrMagess = "\r\n婚纱订单:" + S_WCount; }
- }
- if (S_CCount > 0)
- {
- if (S_StrMagess == "")
- { S_StrMagess += "儿童订单:" + S_CCount; }
- else { S_StrMagess += "\r\n儿童订单:" + S_CCount; }
- }
- if (S_PCount > 0)
- {
- if (S_StrMagess == "")
- { S_StrMagess += "写真订单:" + S_PCount; }
- else { S_StrMagess += "\r\n写真订单:" + S_PCount; }
- }
- if (S_StrMagess != "")
- { S_StrMagess = "选衣客人\r\n" + S_StrMagess; }
- lbl_F.Tag = new LYFZ.ComponentLibrary.ExToolTipText(S_StrMagess);
- exToolTip1.SetToolTip(lbl_F, S_StrMagess);
- lbl_F.Cursor = Cursors.Hand;
- lbl_F.Text = "选衣客人: " + fordrcount;
- lbl_F.Location = new Point(Location_X, Location_Y + LineSpacing * 6);
- lbl_F.Size = lblsize;
- lbl_F.TextAlign = ContentAlignment.BottomLeft;
- lbl_F.DoubleClick += lbl_F_DoubleClick;
- lbl_F.Click += new EventHandler(lbl1_Click);
- lbl_F.Font = lblfont;
- panel.Controls.Add(lbl_F);
- Location_Y += LineSpacing;
- #endregion
- #region 上门派单
- lbl_G = new Label();
- lbl_G.Cursor = Cursors.Hand;
- string SH_StrMagess = "";
- int SH_WCount = 0;
- if (tbl_SendSingle.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_SendSingle.Select("Hdr_DoorTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Hdr_DoorTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'");
- List<DataRow> dr = tbl_SendSingle.AsEnumerable().Where(
- p => p.Field<DateTime>("Hdr_DoorTime") >= Starttime
- &&
- p.Field<DateTime>("Hdr_DoorTime") <= Starttime.AddDays(1)).ToList<DataRow>();
- SH_WCount = dr.Count;
- if (dr.Count > 0)
- { SH_StrMagess = "上门派单:" + SH_WCount; }
- }
- lbl_G.Tag = new LYFZ.ComponentLibrary.ExToolTipText(SH_StrMagess);
- exToolTip1.SetToolTip(lbl_G, SH_StrMagess);
- lbl_G.Cursor = Cursors.Hand;
- lbl_G.Text = "上门派单: " + SH_WCount;
- lbl_G.Location = new Point(Location_X, Location_Y + LineSpacing * 7);
- lbl_G.Size = lblsize;
- lbl_G.TextAlign = ContentAlignment.BottomLeft;
- lbl_G.DoubleClick += lbl_G_DoubleClick;
- lbl_G.Click += new EventHandler(lbl1_Click);
- lbl_G.Font = lblfont;
- panel.Controls.Add(lbl_G);
- #endregion
- string H_StrMagess = "";
- if (P_StrMagess != "")
- {
- H_StrMagess += P_StrMagess;
- }
- if (X_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += X_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + X_StrMagess; }
- }
- if (K_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += K_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + K_StrMagess; }
- }
- if (Q_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += Q_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + Q_StrMagess; }
- }
- if (F_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += F_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + F_StrMagess; }
- }
- if (S_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += S_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + S_StrMagess; }
- }
- if (SH_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += SH_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + SH_StrMagess; }
- }
- //if (H_StrMagess != "")
- //{ H_StrMagess += "\r\n"; }
- panel.Tag = new LYFZ.ComponentLibrary.ExToolTipText(H_StrMagess);
- exToolTip1.SetToolTip(panel, H_StrMagess);
- Location_Y += LineSpacing;
- todays++;
- }
- Panel newpanel = (Panel)tblPanel.Controls["panel" + (Convert.ToInt32(this.nudDataValue + nudDate.Value - 1))];
- newpanel.BackColor = Color.SkyBlue;
- this.nudDataValue = Convert.ToInt32(newpanel.Name.Substring(5, newpanel.Name.Length - 5)) - lblStart;
- }));
- }
- #endregion
- #region 新摄控本图表统计
- List<Model.CameraBook.DayDataModel> BinMouthData(int todays, string Strwhere, DataTable tbl_Photogr, DataTable tbl_FilmSelection, DataTable tbl_LookDesign, DataTable tbl_PickupDate, DataTable tbl_WeddingService, DataTable tbl_SelectDress, DataTable tbl_SendSingle, DataTable tbl_Notes)
- {
- int days = DateTime.DaysInMonth(Convert.ToInt32(this.nudYears.Value), Convert.ToInt32(this.nudMonth.Value));//这个月的天数
- List<Model.CameraBook.DayDataModel> dayDataList = new List<Model.CameraBook.DayDataModel>();
- for (int i = 0; i < days; i++)
- {
- Model.CameraBook.DayDataModel dayModel = new Model.CameraBook.DayDataModel();
- if (i == 0)
- { lblStart = todays; this.nudDataValue = todays; }
- DateTime Starttime = Convert.ToDateTime(this.nudYears.Value + "-" + this.nudMonth.Value + "-" + (i + 1));
- #region 日期
- dayModel.dayNum = (i + 1).ToString();
- if (!this.cmbtreevStoreName.Text.Trim().Equals("全部") && this.cmbtreevStoreName.Text.Trim().Length > 0)
- {
- DataRow dtRow = tbl_Notes.Rows.Find(Starttime.ToString("yyyy-MM-dd HH:mm:ss"));
- if (dtRow != null && dtRow["Ordrr_Remark"].ToString().Trim().Length > 0)
- { dayModel.remark = dtRow["Ordrr_Remark"].ToString(); }
- }
- #endregion
- #region 农历
- string StrText = LYFZ.Command.Command_CalendarTurnLunar.GetLunarNewYearMonthDay(nudYears.Value.ToString().Trim() + "-" + nudMonth.Value.ToString().Trim() + "-" + (i + 1));
- dayModel.strLunar = StrText;
- #endregion
- string P_StrMagess = "";
- int P_WCount = 0;
- int P_CCount = 0;
- int P_PCount = 0;
- int fordrcount = 0;
- //int intHoliday = 0;
- //if (this.cmbtreevStoreName.Tag != null && !string.IsNullOrEmpty(this.cmbtreevStoreName.Tag.ToString().Trim()))
- //{ dtHoliday.Select("StrStoreName = '" + this.cmbtreevStoreName.Tag.ToString().Trim() + "'"); }
- //else
- //{ dtHoliday.Select("StrStoreName = '" + LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetLocalCompanyInfoID() + "' And ");
- //}
- if (tbl_Photogr.Rows.Count > 0)
- {
- List<DataRow> dr = tbl_Photogr.AsEnumerable().Where(
- p => p.Field<DateTime>("Ordpg_ReservationPhotographyTime") >= Starttime
- &&
- p.Field<DateTime>("Ordpg_ReservationPhotographyTime") < Starttime.AddDays(1)).ToList<DataRow>();
- P_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ordpg_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- P_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ordpg_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- P_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ordpg_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = P_WCount + P_CCount + P_PCount;
- }
- if (P_WCount > 0)
- { P_StrMagess = "婚纱订单:" + P_WCount + " "; }
- if (P_CCount > 0)
- {
- if (P_StrMagess == "")
- { P_StrMagess += "儿童订单:" + P_CCount + " "; }
- else { P_StrMagess += "\r\n儿童订单:" + P_CCount + " "; }
- }
- if (P_PCount > 0)
- {
- if (P_StrMagess == "")
- { P_StrMagess += "写真订单:" + P_PCount + " "; }
- else { P_StrMagess += "\r\n写真订单:" + P_PCount + " "; }
- }
- dayModel.list.Add(new Model.CameraBook.DayDataItemModel()
- {
- Name = "拍照客人: ",
- Number = fordrcount.ToString(),
- TipText = P_StrMagess
- });
- if (P_StrMagess != "")
- { P_StrMagess = "拍照客人\r\n" + P_StrMagess; }
- dayModel.TipText = P_StrMagess;
- #region 选片客人
- string X_StrMagess = "";
- int X_WCount = 0;
- int X_CCount = 0;
- int X_PCount = 0;
- fordrcount = 0;
- if (tbl_FilmSelection.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_FilmSelection.Select("Ordv_ReservationFilmSelectionTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Ordv_ReservationFilmSelectionTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "Ordv_Number");
- List<DataRow> dr = tbl_FilmSelection.AsEnumerable().Where(
- p => p.Field<DateTime>("Ordv_ReservationFilmSelectionTime") >= Starttime
- &&
- p.Field<DateTime>("Ordv_ReservationFilmSelectionTime") < Starttime.AddDays(1)).ToList<DataRow>();
- X_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- X_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- X_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = X_WCount + X_CCount + X_PCount;
- }
- if (X_WCount > 0)
- {
- if (X_StrMagess == "")
- { X_StrMagess = "婚纱订单:" + X_WCount; }
- else
- { X_StrMagess = "\r\n婚纱订单:" + X_WCount; }
- }
- if (X_CCount > 0)
- {
- if (X_StrMagess == "")
- { X_StrMagess += "儿童订单:" + X_CCount; }
- else { X_StrMagess += "\r\n儿童订单:" + X_CCount; }
- }
- if (X_PCount > 0)
- {
- if (X_StrMagess == "")
- { X_StrMagess += "写真订单:" + X_PCount; }
- else
- { X_StrMagess += "\r\n写真订单:" + X_PCount; }
- }
- dayModel.list.Add(new Model.CameraBook.DayDataItemModel()
- {
- Name = "选片客人: ",
- Number = fordrcount.ToString(),
- TipText = X_StrMagess
- });
- if (X_StrMagess != "")
- { X_StrMagess = "选片客人\r\n" + X_StrMagess; }
- dayModel.TipText = X_StrMagess;
- #endregion
- #region 看样客人
- string K_StrMagess = "";
- int K_WCount = 0;
- int K_CCount = 0;
- int K_PCount = 0;
- fordrcount = 0;
- if (tbl_LookDesign.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_LookDesign.Select("Ordv_ReservationLookDesignTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Ordv_ReservationLookDesignTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "Ordv_Number");
- List<DataRow> dr = tbl_LookDesign.AsEnumerable().Where(
- p => p.Field<DateTime>("Ordv_ReservationLookDesignTime") >= Starttime
- &&
- p.Field<DateTime>("Ordv_ReservationLookDesignTime") < Starttime.AddDays(1)).ToList<DataRow>();
- K_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- K_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- K_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = K_WCount + K_CCount + K_PCount;
- }
- if (K_WCount > 0)
- {
- if (K_StrMagess == "")
- { K_StrMagess = "婚纱订单:" + K_WCount; }
- else
- { K_StrMagess = "\r\n婚纱订单:" + K_WCount; }
- }
- if (K_CCount > 0)
- {
- if (K_StrMagess == "")
- { K_StrMagess += "儿童订单:" + K_CCount; }
- else
- { K_StrMagess += "\r\n儿童订单:" + K_CCount; }
- }
- if (K_PCount > 0)
- {
- if (K_StrMagess == "")
- { K_StrMagess += "写真订单:" + K_PCount; }
- else
- { K_StrMagess += "\r\n写真订单:" + K_PCount; }
- }
- dayModel.list.Add(new Model.CameraBook.DayDataItemModel()
- {
- Name = "看样客人: ",
- Number = fordrcount.ToString(),
- TipText = K_StrMagess
- });
- if (K_StrMagess != "")
- { K_StrMagess = "看样客人\r\n" + K_StrMagess; }
- dayModel.TipText = K_StrMagess;
- #endregion
- #region 取件客人
- string Q_StrMagess = "";
- int Q_WCount = 0;
- int Q_CCount = 0;
- int Q_PCount = 0;
- fordrcount = 0;
- if (tbl_PickupDate.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_PickupDate.Select("OPlist_ReservationTakeTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and OPlist_ReservationTakeTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "OPlist_OrderNumber");
- List<DataRow> dr = tbl_PickupDate.AsEnumerable().Where(
- p => p.Field<DateTime>("OPlist_ReservationTakeTime") >= Starttime
- &&
- p.Field<DateTime>("OPlist_ReservationTakeTime") < Starttime.AddDays(1)).ToList<DataRow>();
- Q_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("OPlist_OrderNumber")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- Q_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("OPlist_OrderNumber")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- Q_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("OPlist_OrderNumber")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = Q_WCount + Q_CCount + Q_PCount;
- }
- if (Q_WCount > 0)
- {
- if (Q_StrMagess == "")
- { Q_StrMagess = "婚纱订单:" + Q_WCount; }
- else
- { Q_StrMagess = "\r\n婚纱订单:" + Q_WCount; }
- }
- if (Q_CCount > 0)
- {
- if (Q_StrMagess == "")
- { Q_StrMagess += "儿童订单:" + Q_CCount; }
- else
- { Q_StrMagess += "\r\n儿童订单:" + Q_CCount; }
- }
- if (Q_PCount > 0)
- {
- if (Q_StrMagess == "")
- { Q_StrMagess += "写真订单:" + Q_PCount; }
- else
- { Q_StrMagess += "\r\n写真订单:" + Q_PCount; }
- }
- dayModel.list.Add(new Model.CameraBook.DayDataItemModel()
- {
- Name = "取件客人: ",
- Number = fordrcount.ToString(),
- TipText = Q_StrMagess
- });
- if (Q_StrMagess != "")
- { Q_StrMagess = "取件客人\r\n" + Q_StrMagess; }
- dayModel.TipText = X_StrMagess;
- #endregion
- #region 服务客人
- string F_StrMagess = "";
- int F_WCount = 0;
- int F_CCount = 0;
- int F_PCount = 0;
- int F_FCount = 0;
- int F_HCount = 0;
- fordrcount = 0;
- if (tbl_WeddingService.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_WeddingService.Select("Ws_WeddingDate >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Ws_WeddingDate < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "Ws_Number");
- List<DataRow> dr = tbl_WeddingService.AsEnumerable().Where(
- p => p.Field<DateTime>("Ws_WeddingDate") >= Starttime
- &&
- p.Field<DateTime>("Ws_WeddingDate") < Starttime.AddDays(1)).ToList<DataRow>();
- F_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ws_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- F_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ws_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- F_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ws_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- F_FCount = dr.Where(p => p.Field<string>("Ord_Type") == "3").Select(p => p.Field<string>("Ws_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- F_HCount = dr.Where(p => p.Field<string>("Ord_Type") == "4").Select(p => p.Field<string>("Ws_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = F_WCount + F_CCount + F_PCount + F_FCount+ F_HCount;
- }
- if (F_WCount > 0)
- {
- if (F_StrMagess == "")
- { F_StrMagess = "婚纱订单:" + F_WCount; }
- else { F_StrMagess = "\r\n婚纱订单:" + F_WCount; }
- }
- if (F_CCount > 0)
- {
- if (F_StrMagess == "")
- { F_StrMagess += "儿童订单:" + F_CCount; }
- else { F_StrMagess += "\r\n儿童订单:" + F_CCount; }
- }
- if (F_PCount > 0)
- {
- if (F_StrMagess == "")
- { F_StrMagess += "写真订单:" + F_PCount; }
- else { F_StrMagess += "\r\n写真订单:" + F_PCount; }
- }
- if (F_FCount > 0)
- {
- if (F_StrMagess == "")
- { F_StrMagess += "服务订单:" + F_FCount; }
- else { F_StrMagess += "\r\n服务订单:" + F_FCount; }
- }
- if (F_HCount > 0)
- {
- if (F_StrMagess == "")
- { F_StrMagess += "婚庆订单:" + F_HCount; }
- else { F_StrMagess += "\r\n服务订单:" + F_HCount; }
- }
- dayModel.list.Add(new Model.CameraBook.DayDataItemModel()
- {
- Name = "服务客人: ",
- Number = fordrcount.ToString(),
- TipText = F_StrMagess
- });
- if (F_StrMagess != "")
- { F_StrMagess = "服务客人\r\n" + F_StrMagess; }
- dayModel.TipText = F_StrMagess;
- #endregion
- #region 选衣客人
- string S_StrMagess = "";
- int S_WCount = 0;
- int S_CCount = 0;
- int S_PCount = 0;
- int S_FCount = 0;
- fordrcount = 0;
- if (tbl_SelectDress.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_SelectDress.Select("Ordv_ReservationClothingTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Ordv_ReservationClothingTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'", "Ordv_Number");
- List<DataRow> dr = tbl_SelectDress.AsEnumerable().Where(
- p => p.Field<DateTime>("Ordv_ReservationClothingTime") >= Starttime
- &&
- p.Field<DateTime>("Ordv_ReservationClothingTime") < Starttime.AddDays(1)).ToList<DataRow>();
- S_WCount = dr.Where(p => p.Field<string>("Ord_Type") == "0").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- S_CCount = dr.Where(p => p.Field<string>("Ord_Type") == "1").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- S_PCount = dr.Where(p => p.Field<string>("Ord_Type") == "2").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- S_FCount = dr.Where(p => p.Field<string>("Ord_Type") == "3").Select(p => p.Field<string>("Ordv_Number")).ToList<string>().GroupBy(t => t).Select(t => t.First()).ToList().Count();
- fordrcount = S_WCount + S_CCount + S_PCount + S_FCount;
- }
- if (S_WCount > 0)
- {
- if (S_StrMagess == "")
- { S_StrMagess = "婚纱订单:" + S_WCount; }
- else { S_StrMagess = "\r\n婚纱订单:" + S_WCount; }
- }
- if (S_CCount > 0)
- {
- if (S_StrMagess == "")
- { S_StrMagess += "儿童订单:" + S_CCount; }
- else { S_StrMagess += "\r\n儿童订单:" + S_CCount; }
- }
- if (S_PCount > 0)
- {
- if (S_StrMagess == "")
- { S_StrMagess += "写真订单:" + S_PCount; }
- else { S_StrMagess += "\r\n写真订单:" + S_PCount; }
- }
- dayModel.list.Add(new Model.CameraBook.DayDataItemModel()
- {
- Name = "选衣客人: ",
- Number = fordrcount.ToString(),
- TipText = S_StrMagess
- });
- if (S_StrMagess != "")
- { S_StrMagess = "选衣客人\r\n" + S_StrMagess; }
- dayModel.TipText = S_StrMagess;
- #endregion
- #region 上门派单
- string SH_StrMagess = "";
- int SH_WCount = 0;
- if (tbl_SendSingle.Rows.Count > 0)
- {
- //DataRow[] dr = tbl_SendSingle.Select("Hdr_DoorTime >= '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime, "yyyy-MM-dd HH:mm:ss") + "' and Hdr_DoorTime < '" + LYFZ.Command.Command_Validate.DateTimeToString(Starttime.AddDays(1), "yyyy-MM-dd HH:mm:ss") + "'");
- List<DataRow> dr = tbl_SendSingle.AsEnumerable().Where(
- p => p.Field<DateTime>("Hdr_DoorTime") >= Starttime
- &&
- p.Field<DateTime>("Hdr_DoorTime") < Starttime.AddDays(1)).ToList<DataRow>();
- SH_WCount = dr.Count;
- if (dr.Count > 0)
- {
- dayModel.list.Add(new Model.CameraBook.DayDataItemModel()
- {
- Name = "上门派单: ",
- Number = SH_WCount.ToString(),
- TipText = SH_StrMagess
- });
- if (SH_StrMagess != "")
- { SH_StrMagess = "上门派单\r\n" + SH_StrMagess; }
- dayModel.TipText = SH_StrMagess;
- }
- }
- else
- {
- dayModel.list.Add(new Model.CameraBook.DayDataItemModel()
- {
- Name = "上门派单: ",
- Number = "0",
- TipText = ""
- });
- if (SH_StrMagess != "")
- { SH_StrMagess = "上门派单\r\n" + SH_StrMagess; }
- dayModel.TipText = SH_StrMagess;
- }
- #endregion
- string H_StrMagess = "";
- if (P_StrMagess != "")
- {
- H_StrMagess += P_StrMagess;
- }
- if (X_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += X_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + X_StrMagess; }
- }
- if (K_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += K_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + K_StrMagess; }
- }
- if (Q_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += Q_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + Q_StrMagess; }
- }
- if (F_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += F_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + F_StrMagess; }
- }
- if (S_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += S_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + S_StrMagess; }
- }
- if (SH_StrMagess != "")
- {
- if (H_StrMagess == "")
- { H_StrMagess += SH_StrMagess; }
- else
- { H_StrMagess += "\r\n\r\n" + SH_StrMagess; }
- }
- //if (H_StrMagess != "")
- //{ H_StrMagess += "\r\n"; }
- dayModel.TipText = H_StrMagess;
- dayDataList.Add(dayModel);
- todays++;
- }
- return dayDataList;
- }
- void BindMouthControl3(int todays, List<Model.CameraBook.DayDataModel> dayModelList)
- {
- this.Invoke(new LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.UpdateControl(delegate ()
- {
- int days = DateTime.DaysInMonth(Convert.ToInt32(this.nudYears.Value), Convert.ToInt32(this.nudMonth.Value));//这个月的天数
- int panellenght = 0;
- Size lblsize = new System.Drawing.Size(120, 17);
- Font lblfont = new System.Drawing.Font("微软雅黑", 14, FontStyle.Regular, GraphicsUnit.Pixel);
- int LineSpacing = (lblfont.Height / 2) + 2;
- int Location_X = 5;
- Label lbl_A = null;
- int lbl1_Width = 0;
- for (int i = 0; i < days; i++)
- {
- Model.CameraBook.DayDataModel model = dayModelList[i];
- panellenght++;
- CameraBookDayControl panel = (CameraBookDayControl)tblPanel.Controls["panel" + (i + todays)];
- panel.SetDayDataModel(model);
- panel.Tag = model.TipText;
- if (DateTime.Now.ToString("yyyy-MM-dd") == (this.nudYears.Value.ToString("0000") + "-" + this.nudMonth.Value.ToString("00") + "-" + (i + 1).ToString("00")))
- {
- panel.BackColor = Color.SkyBlue;
- }
- }
- }));
- }
- #endregion
- //void BindMouthControl2(int todays, List<Model.CameraBook.DayDataModel> dayModelList)
- //{
- // this.Invoke(new LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.UpdateControl(delegate ()
- // {
- // int days = DateTime.DaysInMonth(Convert.ToInt32(this.nudYears.Value), Convert.ToInt32(this.nudMonth.Value));//这个月的天数
- // int panellenght = 0;
- // Size lblsize = new System.Drawing.Size(120, 17);
- // Font lblfont = new System.Drawing.Font("微软雅黑", 14, FontStyle.Regular, GraphicsUnit.Pixel);
- // int LineSpacing = (lblfont.Height / 2) + 2;
- // int Location_X = 5;
- // Label lbl_A = null;
- // int lbl1_Width = 0;
- // for (int i = 0; i < days; i++)
- // {
- // Model.CameraBook.DayDataModel model = dayModelList[i];
- // panellenght++;
- // Panel panel = (Panel)tblPanel.Controls["panel" + (i+ todays)];
- // Label lbl1 = new Label();
- // lbl1.Text = (i + 1).ToString();
- // lbl1.Name = "lbl" + i;
- // lbl1.Location = new Point(Location_X, 2);
- // lbl1.Size = new System.Drawing.Size(40, 20);
- // lbl1.TextAlign = ContentAlignment.TopLeft;
- // lbl1.DoubleClick += new EventHandler(lbl1_DoubleClick);
- // lbl1.Click += new EventHandler(lbl1_Click);
- // lbl1.Font = new System.Drawing.Font("宋体", 15, FontStyle.Bold);
- // if (!this.cmbtreevStoreName.Text.Trim().Equals("全部") && this.cmbtreevStoreName.Text.Trim().Length > 0)
- // {
- // //DataRow dtRow = tbl_Notes.Rows.Find(Starttime.ToString("yyyy-MM-dd HH:mm:ss"));
- // if (model.remark.Trim().Length > 0)
- // { lbl1.ForeColor = Color.Blue; }
- // else
- // { lbl1.ForeColor = Color.Red; }
- // lbl1.Cursor = Cursors.Hand;
- // lbl1.Tag = new LYFZ.ComponentLibrary.ExToolTipText("随笔便签");
- // exToolTip1.SetToolTip(lbl1, "随笔便签");
- // }
- // else
- // { lbl1.ForeColor = Color.Red; }
- // panel.Controls.Add(lbl1);
- // lbl1_Width = lbl1.Size.Width;
- // lbl1 = new Label();
- // lbl1.Text = model.strLunar;
- // lbl1.Location = new Point(lbl1_Width + Location_X, 7);
- // lbl1.AutoSize = false;
- // lbl1.Size = new System.Drawing.Size(50, 17);
- // lbl1.DoubleClick += new EventHandler(lbl1_DoubleClick);
- // lbl1.Click += new EventHandler(lbl1_Click);
- // lbl1.Font = new System.Drawing.Font("宋体", 8, FontStyle.Regular);
- // panel.Controls.Add(lbl1);
- // int Location_Y = 15;
- // int indx = 0;
- // foreach (var item in model.list)
- // {
- // indx++;
- // lbl_A = new Label();
- // lbl_A.Cursor = Cursors.Hand;
- // lbl_A.Tag = new LYFZ.ComponentLibrary.ExToolTipText(item.TipText);
- // exToolTip1.SetToolTip(lbl_A, item.TipText);
- // lbl_A.Text = item.Name + "" + item.Number;
- // lbl_A.Location = new Point(Location_X, Location_Y + LineSpacing * indx);
- // lbl_A.Size = lblsize;
- // lbl_A.TextAlign = ContentAlignment.BottomLeft;
- // if(item.Name.Contains("拍照"))
- // {
- // lbl_A.DoubleClick += lbl_A_DoubleClick;
- // }
- // else if (item.Name.Contains("选片"))
- // {
- // lbl_A.DoubleClick += lbl_B_DoubleClick;
- // }
- // else if (item.Name.Contains("看样"))
- // {
- // lbl_A.DoubleClick += lbl_C_DoubleClick;
- // }
- // else if (item.Name.Contains("取件"))
- // {
- // lbl_A.DoubleClick += lbl_D_DoubleClick;
- // }
- // else if (item.Name.Contains("服务"))
- // {
- // lbl_A.DoubleClick += lbl_E_DoubleClick;
- // }
- // else if (item.Name.Contains("选衣"))
- // {
- // lbl_A.DoubleClick += lbl_F_DoubleClick;
- // }
- // else if (item.Name.Contains("上门派单"))
- // {
- // lbl_A.DoubleClick += lbl_G_DoubleClick;
- // }
- // lbl_A.Click += new EventHandler(lbl1_Click);
- // lbl_A.Font = lblfont;
- // panel.Controls.Add(lbl_A);
- // Location_Y += LineSpacing;
- // }
- // panel.Tag = new LYFZ.ComponentLibrary.ExToolTipText(model.TipText);
- // exToolTip1.SetToolTip(panel, model.TipText);
- // }
- // Panel newpanel = (Panel)tblPanel.Controls["panel" + (Convert.ToInt32(this.nudDataValue + nudDate.Value - 1))];
- // newpanel.BackColor = Color.SkyBlue;
- // }));
- //}
- #endregion
- /// <summary>
- /// 拍照客人双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_A_DoubleClick(object sender, EventArgs e)
- {
- this.rdoPhotographed.Checked = true;
- this.rdoPhotographed_Click(this, null);
- }
- /// <summary>
- /// 选片客人双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_B_DoubleClick(object sender, EventArgs e)
- {
- this.rdoFilmSelection.Checked = true;
- this.rdoFilmSelection_Click(this, null);
- }
- /// <summary>
- /// 看样客人双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_C_DoubleClick(object sender, EventArgs e)
- {
- this.rdoLookDesign.Checked = true;
- this.rdoLookDesign_Click(this, null);
- }
- /// <summary>
- /// 取件客人双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_D_DoubleClick(object sender, EventArgs e)
- {
- this.rdoTotakePiece.Checked = true;
- this.rdoTotakePiece_Click(this, null);
- }
- /// <summary>
- /// 服务客人双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_E_DoubleClick(object sender, EventArgs e)
- {
- this.rdoService.Checked = true;
- this.rdoService_Click(this, null);
- }
- /// <summary>
- /// 选衣客人双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_F_DoubleClick(object sender, EventArgs e)
- {
- this.rdoSelectDress.Checked = true;
- this.rdoSelectDress_Click(this, null);
- }
- /// <summary>
- /// 上门派单双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl_G_DoubleClick(object sender, EventArgs e)
- {
- this.rdoHospitalClient.Checked = true;
- this.rdoHospitalClient_Click(this, null);
- }
- /// <summary>
- /// 绘出每周
- /// </summary>
- void PaintingWeekly()
- {
- //绑定数据
- for (int i = 1; i < 50; i++)
- {
- CameraBookDayControl newpanel = (CameraBookDayControl)tblPanel.Controls["panel" + i];
- if (newpanel == null)
- { continue; }
- newpanel.SetDayDataModel(null);
- for (int j = 0; j < newpanel.Controls.Count; j++)
- { newpanel.Controls.Clear(); }
- }
- DateTime dttime = Convert.ToDateTime(this.nudYears.Value.ToString().Trim() + "-" + this.nudMonth.Value.ToString().Trim() + "-" + 1);
- switch (dttime.DayOfWeek.ToString())
- {
- //星期日
- case "Sunday":
- this.PaintingCharts(1);
- break;
- //星期一
- case "Monday":
- this.PaintingCharts(2);
- break;
- //星期二
- case "Tuesday":
- this.PaintingCharts(3);
- break;
- //星期三
- case "Wednesday":
- this.PaintingCharts(4);
- break;
- //星期四
- case "Thursday":
- this.PaintingCharts(5);
- break;
- //星期五
- case "Friday":
- this.PaintingCharts(6);
- break;
- //星期六
- case "Saturday":
- this.PaintingCharts(7);
- break;
- }
- }
- /// <summary>
- /// 当月的第一天是从本星期的第几天开始绘画
- /// </summary>
- int lblStart = 0;
- /// <summary>
- /// 单击选中当天,调用panel_Click();
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl1_Click(object sender, EventArgs e)
- {
- this.nudDate.Focus();
- Label lbl = (Label)sender;
- Panel panel = (Panel)lbl.Parent;
- this.panel_Click(panel, e);
- if (!this.cmbtreevStoreName.Text.Trim().Equals("全部") && this.cmbtreevStoreName.Text.Trim().Length > 0 && lbl.Name.Trim().IndexOf("lbl") != -1)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.CameraControlNotesSuperSmallForm frm = new SuperSmallForm.CameraControlNotesSuperSmallForm();
- frm.StrStoreName = this.cmbtreevStoreName.Tag.ToString().Trim();
- frm.StrDateValue = Convert.ToDateTime(this.nudYears.Value + "-" + this.nudMonth.Value + "-" + lbl.Text.Trim()).ToString("yyyy-MM-dd");
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- if (frm.intCurrentLength > 0)
- { lbl.ForeColor = Color.Blue; }
- else
- { lbl.ForeColor = Color.Red; }
- }
- }
- }
- /// <summary>
- /// 双击Label时间调用panel_DoubleClick();
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void lbl1_DoubleClick(object sender, EventArgs e)
- {
- if (!this.cmbtreevStoreName.Text.Trim().Equals("全部") && this.cmbtreevStoreName.Text.Trim().Length > 0)
- { this.lbl1_Click(sender, e); }
- else
- {
- this.nudDate.Focus();
- Label lbl = (Label)sender;
- Panel panel = (Panel)lbl.Parent;
- this.panel_DoubleClick(panel, e);
- }
- }
- /// <summary>
- /// 选中当天,改变背景颜色
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void panel_Click(object sender, EventArgs e)
- {
- this.nudDate.Focus();
- Panel panel = sender as Panel;
- string panelName = panel.Name.Substring(0, 5);
- if (panel.Tag == null)
- { return; }
- for (int i = 1; i < 50; i++)
- {
- Panel newpanel = (Panel)tblPanel.Controls[panelName + i];
- if (newpanel != null)
- {
- newpanel.BackColor = Color.Gainsboro;
- }
- }
- /*
- * 摄控本旧统计图表 新功能暂时不用
- * int panelSub = Convert.ToInt32(panel.Name.Substring(5, panel.Name.Length - 5));
- Label lbl = (Label)panel.Controls["lbl" + (panelSub - lblStart)];
- if (lbl == null)
- { return; }
- this.nudDataValue = Convert.ToDecimal(lbl.Text);
- this.nudDate.Value = Convert.ToDecimal(lbl.Text);*/
- panel.BackColor = Color.SkyBlue;
- }
- /// <summary>
- /// 双击选中当天,去详情浏览
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void panel_DoubleClick(object sender, EventArgs e)
- {
- this.nudDate.Focus();
- Panel panel = sender as Panel;
- int panelSub = Convert.ToInt32(panel.Name.Substring(5, panel.Name.Length - 5));
- Label lbl = (Label)panel.Controls["lbl" + (panelSub - lblStart)];
- if (lbl != null)
- {
- nudDataValue = Convert.ToDecimal(lbl.Text);
- nudDate.Value = Convert.ToDecimal(lbl.Text);
- }
- this.SetnudDate(true);
- this.tblPanel.Visible = false;
- this.dgvData.Visible = true;
- this.chkPortraitVersion.Visible = true;
- this.chkDressVersion.Visible = true;
- this.chkKidsVersion.Visible = true;
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- this.btnAddRecord.Visible = true;
- this.btnCommunicateDetails.Visible = true;
- this.btnCharts.Text = " 图 表";
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(null, null);
- }
- /// <summary>
- /// 按下某键时发生
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void nudDate_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Left)
- {
- if (this.nudDate.Value > 1)
- { this.nudDate.Value -= 1; }
- }
- else if (e.KeyCode == Keys.Right)
- {
- int days = DateTime.DaysInMonth(Convert.ToInt32(this.nudYears.Value), Convert.ToInt32(this.nudMonth.Value));//这个月的天数
- if (this.nudDate.Value < days)
- { this.nudDate.Value += 1; }
- }
- else if (e.KeyCode == Keys.Enter)
- {
- //this.ucPagerEx1.Visible = true;
- this.tblPanel.Visible = false;
- this.dgvData.Visible = true;
- this.btnCharts.Text = " 图 表";
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(null, null);
- }
- this.nudDate.Focus();
- }
- /// <summary>
- /// 窗体大小变化
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void MainFrameFormMain_Resize(object sender, EventArgs e)
- {
- if (!this.dgvData.Visible)
- {
- this.IsCustomScrollBar = false;
- int panelWhith = 950;
- int panelHeight = 1300;
- if (this.Width > panelWhith)
- { this.tblPanel.Size = new Size(this.panelEx3.Width - 25, panelHeight - 100); }
- else
- { this.tblPanel.Size = new Size(this.panelEx3.Width, panelHeight - 100); }
- this.tblPanel.Location = this.dgvData.Location;
- this.nudDate.Focus();
- }
- }
- /// <summary>
- /// 窗体关闭后发生事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void MainFrameFormMain_FormClosed(object sender, FormClosedEventArgs e)
- {
- if (this.IsShowAssistant)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.A_EventAideFormMain frm = new A_EventAideFormMain();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.Show();
- }
- }
- /// <summary>
- /// 是否要跳转到沟通助手动去
- /// </summary>
- bool IsShowAssistant = false;
- #region 头
- /// <summary>
- /// 年
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void nudYears_ValueChanged(object sender, EventArgs e)
- {
- this.YearMonthValueChanged();
- }
- /// <summary>
- /// 月
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void nudMonth_ValueChanged(object sender, EventArgs e)
- {
- this.YearMonthValueChanged();
- }
- void YearMonthValueChanged()
- {
- if (this.nudYears.Value.ToString().Trim() != "" && this.nudMonth.Value.ToString().Trim() != "")
- {
- this.nudDate.Maximum = DateTime.DaysInMonth(Convert.ToInt32(this.nudYears.Value), Convert.ToInt32(this.nudMonth.Value));
- for (int i = 1; i < 50; i++)
- {
- Panel newpanel = (Panel)this.tblPanel.Controls["panel" + i];
- if (newpanel == null)
- { continue; }
- for (int j = 0; j < newpanel.Controls.Count; j++)
- {
- newpanel.BackColor = Color.Gainsboro;
- }
- }
- if (this.tblPanel.Controls.Count > 0) { this.PaintingWeekly(); }
- if (this.dgvData.Visible) { this.PublicFunctionRows(); }
- }
- }
- decimal nudDataValue = 0;
- /// <summary>
- /// 日
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void nudDate_ValueChanged(object sender, EventArgs e)
- {
- if (this.nudDate.Value.ToString().Trim() != "")
- {
- for (int i = 1; i < 50; i++)
- {
- Panel newpanel = (Panel)this.tblPanel.Controls["panel" + i];
- if (newpanel == null)
- { continue; }
- for (int j = 0; j < newpanel.Controls.Count; j++)
- {
- newpanel.BackColor = Color.Gainsboro;
- }
- }
- if (this.tblPanel.Controls.Count > 0)
- {
- Panel panel = (Panel)this.tblPanel.Controls["panel" + (Convert.ToInt32(this.nudDate.Value) + lblStart - 1)];
- panel.BackColor = Color.SkyBlue;
- this.nudDataValue = this.nudDate.Value;
- }
- if (this.dgvData.Visible) { this.PublicFunctionRows(); }
- }
- }
- #endregion
- #region 左边
- /// <summary>
- /// 拍照客人
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void rdoPhotographed_Click(object sender, EventArgs e)
- {
- strReservationTimeName = "拍摄时间";
- StrSortOrder = "DESC";
- StrCurrentClickField = "";
- this.StrSortField = "Ordpg_ReservationPhotographyTime,Ord_Number,Ordv_DigitalNumber";
- if (this.rdoPhotographed.Checked && !this.IsFirstLoad)
- {
- this.rdoHospitalClient.Checked = false;
- this.rdoLookDesign.Checked = false;
- this.rdoRecentBirthday.Checked = false;
- this.rdoSelectDress.Checked = false;
- this.rdoFilmSelection.Checked = false;
- this.rdoPhotographed.Checked = true;
- this.rdoTotakePiece.Checked = false;
- this.rdoService.Checked = false;
- this.SetnudDate(true);
- this.chkWeddingCelebration.Visible = false;
- this.btnOverview.Visible = true;
- this.btnSelectedClothes.Visible = false;
- this.btnCharts.Visible = true;
- this.btnPrint.Visible = true;
- this.btnStatistic.Visible = true;
- this.btnGuestsReservation.Visible = true;
- this.btnReschedule.Visible = true;
- this.btnSMS.Visible = true;
- this.btnAddRecord.Visible = true;
- this.btnCommunicateDetails.Visible = true;
- this.btnStatistic.Text = " 统计未拍";
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- this.btnCharts.Text = " 图 表";
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelRecentBirthday);
- hideControl.Add(this.btnCommunicateDetails);
- hideControl.Add(this.btnAddRecord);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.沟通助手, hideControl, null, null);
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(null, null);
- }
- }
- /// <summary>
- /// 选片客人
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void rdoFilmSelection_Click(object sender, EventArgs e)
- {
- strReservationTimeName = "选片时间";
- StrSortOrder = "DESC";
- StrCurrentClickField = "";
- this.StrSortField = "Ordv_ReservationFilmSelectionTime,Ord_Number,Ordv_DigitalNumber";
- if (this.rdoFilmSelection.Checked)
- {
- this.rdoHospitalClient.Checked = false;
- this.rdoLookDesign.Checked = false;
- this.rdoRecentBirthday.Checked = false;
- this.rdoSelectDress.Checked = false;
- this.rdoFilmSelection.Checked = true;
- this.rdoPhotographed.Checked = false;
- this.rdoTotakePiece.Checked = false;
- this.rdoService.Checked = false;
- this.SetnudDate(true);
- this.chkWeddingCelebration.Visible = false;
- this.btnOverview.Visible = true;
- this.btnSelectedClothes.Visible = false;
- this.btnCharts.Visible = true;
- this.btnPrint.Visible = true;
- this.btnStatistic.Visible = true;
- this.btnGuestsReservation.Visible = true;
- this.btnReschedule.Visible = true;
- this.btnSMS.Visible = true;
- this.btnAddRecord.Visible = true;
- this.btnCommunicateDetails.Visible = true;
- this.btnStatistic.Text = " 统计未选";
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- this.btnCharts.Text = " 图 表";
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelRecentBirthday);
- hideControl.Add(this.btnCommunicateDetails);
- hideControl.Add(this.btnAddRecord);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.沟通助手, hideControl, null, null);
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- }
- /// <summary>
- /// 看版客人
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void rdoLookDesign_Click(object sender, EventArgs e)
- {
- strReservationTimeName = "看版时间";
- StrSortOrder = "DESC";
- StrCurrentClickField = "";
- this.StrSortField = "Ordv_ReservationLookDesignTime,Ord_Number,Ordv_DigitalNumber";
- if (this.rdoLookDesign.Checked)
- {
- this.rdoHospitalClient.Checked = false;
- this.rdoLookDesign.Checked = true;
- this.rdoRecentBirthday.Checked = false;
- this.rdoSelectDress.Checked = false;
- this.rdoFilmSelection.Checked = false;
- this.rdoPhotographed.Checked = false;
- this.rdoTotakePiece.Checked = false;
- this.rdoService.Checked = false;
- this.SetnudDate(true);
- this.chkWeddingCelebration.Visible = false;
- this.btnOverview.Visible = true;
- this.btnSelectedClothes.Visible = false;
- this.btnCharts.Visible = true;
- this.btnPrint.Visible = true;
- this.btnStatistic.Visible = true;
- this.btnGuestsReservation.Visible = true;
- this.btnReschedule.Visible = true;
- this.btnSMS.Visible = true;
- this.btnAddRecord.Visible = true;
- this.btnCommunicateDetails.Visible = true;
- this.btnStatistic.Text = " 统计未看";
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- this.btnCharts.Text = " 图 表";
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelRecentBirthday);
- hideControl.Add(this.btnCommunicateDetails);
- hideControl.Add(this.btnAddRecord);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.沟通助手, hideControl, null, null);
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- }
- /// <summary>
- /// 取件客人
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void rdoTotakePiece_Click(object sender, EventArgs e)
- {
- strReservationTimeName = "取件时间";
- StrSortOrder = "DESC";
- StrCurrentClickField = "";
- this.StrSortField = "OPlist_ReservationTakeTime,Ord_Number,Ordv_DigitalNumber";
- if (rdoTotakePiece.Checked)
- {
- this.rdoHospitalClient.Checked = false;
- this.rdoLookDesign.Checked = false;
- this.rdoRecentBirthday.Checked = false;
- this.rdoSelectDress.Checked = false;
- this.rdoFilmSelection.Checked = false;
- this.rdoPhotographed.Checked = false;
- this.rdoTotakePiece.Checked = true;
- this.rdoService.Checked = false;
- this.SetnudDate(true);
- this.chkWeddingCelebration.Visible = true;
- this.btnOverview.Visible = true;
- this.btnSelectedClothes.Visible = false;
- this.btnCharts.Visible = true;
- this.btnPrint.Visible = true;
- this.btnStatistic.Visible = true;
- this.btnGuestsReservation.Visible = true;
- this.btnReschedule.Visible = true;
- this.btnSMS.Visible = true;
- this.btnAddRecord.Visible = true;
- this.btnCommunicateDetails.Visible = true;
- this.btnStatistic.Text = " 统计未取";
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- this.btnCharts.Text = " 图 表";
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelRecentBirthday);
- hideControl.Add(this.btnCommunicateDetails);
- hideControl.Add(this.btnAddRecord);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.沟通助手, hideControl, null, null);
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- }
- /// <summary>
- /// 服务客人
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void rdoService_Click(object sender, EventArgs e)
- {
- strReservationTimeName = "服务时间";
- StrSortOrder = "DESC";
- StrCurrentClickField = "";
- this.StrSortField = "Ws_WeddingDate,Ord_Number";
- if (this.rdoService.Checked)
- {
- this.rdoHospitalClient.Checked = false;
- this.rdoLookDesign.Checked = false;
- this.rdoRecentBirthday.Checked = false;
- this.rdoSelectDress.Checked = false;
- this.rdoFilmSelection.Checked = false;
- this.rdoPhotographed.Checked = false;
- this.rdoTotakePiece.Checked = false;
- this.rdoService.Checked = true;
- this.SetnudDate(true);
- this.btnOverview.Visible = true;
- this.btnSelectedClothes.Visible = false;
- this.btnCharts.Visible = true;
- this.btnPrint.Visible = true;
- this.btnStatistic.Visible = true;
- this.btnGuestsReservation.Visible = true;
- this.btnReschedule.Visible = true;
- this.btnSMS.Visible = true;
- this.btnAddRecord.Visible = true;
- this.btnCommunicateDetails.Visible = true;
- this.btnStatistic.Text = " 统计服务";
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);
- this.chkNearlyHalfMonth.Visible = false;
- this.chkNearlyOneWeek.Visible = false;
- this.chkWeddingCelebration.Visible = true;
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- this.btnCharts.Text = " 图 表";
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelRecentBirthday);
- hideControl.Add(this.btnCommunicateDetails);
- hideControl.Add(this.btnAddRecord);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.沟通助手, hideControl, null, null);
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- }
- /// <summary>
- /// 选礼服客人
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void rdoSelectDress_Click(object sender, EventArgs e)
- {
- strReservationTimeName = "选礼服时间";
- StrSortOrder = "DESC";
- StrCurrentClickField = "";
- this.StrSortField = "Ordv_ReservationClothingTime,Ord_Number";
- if (this.rdoSelectDress.Checked)
- {
- this.rdoHospitalClient.Checked = false;
- this.rdoLookDesign.Checked = false;
- this.rdoRecentBirthday.Checked = false;
- this.rdoSelectDress.Checked = true;
- this.rdoFilmSelection.Checked = false;
- this.rdoPhotographed.Checked = false;
- this.rdoTotakePiece.Checked = false;
- this.rdoService.Checked = false;
- this.SetnudDate(true);
- this.chkWeddingCelebration.Visible = false;
- this.btnOverview.Visible = true;
- this.btnSelectedClothes.Visible = true;
- this.btnCharts.Visible = true;
- this.btnPrint.Visible = true;
- this.btnStatistic.Visible = true;
- this.btnGuestsReservation.Visible = true;
- this.btnReschedule.Visible = true;
- this.btnSMS.Visible = true;
- this.btnAddRecord.Visible = true;
- this.btnCommunicateDetails.Visible = true;
- this.btnStatistic.Text = " 统计未选";
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- this.btnCharts.Text = " 图 表";
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelRecentBirthday);
- hideControl.Add(this.btnCommunicateDetails);
- hideControl.Add(this.btnAddRecord);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.沟通助手, hideControl, null, null);
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- }
- /// <summary>
- /// 纪念日
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void rdoRecentBirthday_Click(object sender, EventArgs e)
- {
- if (this.rdoRecentBirthday.Checked)
- {
- this.IsShowAssistant = true;
- this.Close();
- }
- }
- /// <summary>
- /// 医院客户
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void rdoHospitalClient_Click(object sender, EventArgs e)
- {
- StrSortOrder = "DESC";
- StrCurrentClickField = "";
- this.StrSortField = "Hdr_DoorTime,Ord_Number";
- if (this.rdoHospitalClient.Checked)
- {
- this.rdoHospitalClient.Checked = true;
- this.rdoLookDesign.Checked = false;
- this.rdoRecentBirthday.Checked = false;
- this.rdoSelectDress.Checked = false;
- this.rdoFilmSelection.Checked = false;
- this.rdoPhotographed.Checked = false;
- this.rdoTotakePiece.Checked = false;
- this.rdoService.Checked = false;
- this.SetnudDate(true);
- this.chkWeddingCelebration.Visible = false;
- this.btnOverview.Visible = false;
- this.btnSelectedClothes.Visible = false;
- this.btnCharts.Visible = true;
- this.btnPrint.Visible = false;
- this.btnStatistic.Visible = false;
- this.btnGuestsReservation.Visible = false;
- this.btnReschedule.Visible = true;
- this.btnSMS.Visible = true;
- this.btnAddRecord.Visible = true;
- this.btnCommunicateDetails.Visible = true;
- this.btnStatistic.Text = " ";
- this.chkPortraitVersion.Visible = false;
- this.chkDressVersion.Visible = false;
- this.chkKidsVersion.Visible = false;
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- this.btnCharts.Text = " 图 表";
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add(this.panelRecentBirthday);
- hideControl.Add(this.btnCommunicateDetails);
- hideControl.Add(this.btnAddRecord);
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.沟通助手, hideControl, null, null);
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- }
- /// <summary>
- /// 近一个星期
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkNearlyOneWeek_Click(object sender, EventArgs e)
- {
- if (this.chkNearlyOneWeek.Checked)
- { this.chkNearlyOneWeek.Checked = true; this.chkNearlyHalfMonth.Checked = false; }
- else
- { this.chkNearlyOneWeek.Checked = false; this.chkNearlyHalfMonth.Checked = false; }
- this.PublicFunctionRows();
- }
- /// <summary>
- /// 近半个月
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkNearlyHalfMonth_Click(object sender, EventArgs e)
- {
- if (this.chkNearlyHalfMonth.Checked)
- { this.chkNearlyOneWeek.Checked = false; this.chkNearlyHalfMonth.Checked = true; }
- else
- { this.chkNearlyOneWeek.Checked = false; this.chkNearlyHalfMonth.Checked = false; }
- this.PublicFunctionRows();
- }
- /// <summary>
- /// 婚纱版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkDressVersion_Click(object sender, EventArgs e)
- {
- if (this.chkDressVersion.Checked)
- {
- this.chkPortraitVersion.Checked = false;
- this.chkWeddingCelebration.Checked = false;//婚庆版
- this.chkKidsVersion.Checked = false;
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- }
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- /// <summary>
- /// 儿童版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkKidsVersion_Click(object sender, EventArgs e)
- {
- if (this.chkKidsVersion.Checked)
- {
- this.chkPortraitVersion.Checked = false;
- this.chkWeddingCelebration.Checked = false;//婚庆版
- this.chkDressVersion.Checked = false;
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- }
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- /// <summary>
- /// 写真版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkPortraitVersion_Click(object sender, EventArgs e)
- {
- if (this.chkPortraitVersion.Checked)
- {
- this.chkWeddingCelebration.Checked = false;//婚庆版
- this.chkDressVersion.Checked = false;//婚纱版
- this.chkKidsVersion.Checked = false;//儿童版
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- }
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- /// <summary>
- /// 婚庆版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkWeddingCelebration_Click(object sender, EventArgs e)
- {
- if (this.chkPortraitVersion.Checked)
- {
- this.chkPortraitVersion.Checked = false;//写真版
- this.chkDressVersion.Checked = false;//婚纱版
- this.chkKidsVersion.Checked = false;//儿童版
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- }
- this.PublicFunctionRows();
- this.MainFrameFormMain_Resize(this, null);
- }
- #endregion
- #region 右边
- /// <summary>
- /// 详情
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnCharts_Click(object sender, EventArgs e)
- {
- if (this.btnCharts.Text.Trim() == "详 情" || !this.dgvData.Visible)
- {
- this.SetnudDate(true);
- this.PublicFunctionRows();
- this.btnCharts.Text = " 图 表";
- this.dgvData.Visible = true;
- this.tblPanel.Visible = false;
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);
- this.chkNearlyHalfMonth.Visible = true;
- this.chkNearlyOneWeek.Visible = true;
- this.btnAddRecord.Visible = true;
- this.btnCommunicateDetails.Visible = true;
- }
- else
- {
- this.SetnudDate();
- this.btnCharts.Text = " 详 情";
- this.chkWeddingCelebration.Visible = false;
- this.panelEx1.Visible = false;
- this.dgvData.Visible = false;
- this.tblPanel.Visible = true;
- this.chkPortraitVersion.Visible = false;
- this.chkDressVersion.Visible = false;
- this.chkKidsVersion.Visible = false;
- this.chkNearlyHalfMonth.Visible = false;
- this.chkNearlyOneWeek.Visible = false;
- this.btnAddRecord.Visible = false;
- this.btnCommunicateDetails.Visible = false;
- this.PaintingWeekly();
- }
- this.MainFrameFormMain_Resize(this, null);
- }
- /// <summary>
- /// 打印
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnPrint_Click(object sender, EventArgs e)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- Hashtable htData = new Hashtable();
- if (this.chkPortraitVersion.Checked || LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.写真版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { htData["Ver"] = "2"; }
- else if (this.chkDressVersion.Checked || LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.婚纱版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { htData["Ver"] = "0"; }
- else if (this.chkKidsVersion.Checked || LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.儿童版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { htData["Ver"] = "1"; }
- else if ((!this.chkKidsVersion.Checked && !this.chkDressVersion.Checked && !this.chkPortraitVersion.Checked) || LYFZ.Software.MainBusiness.EnumPermissions.BusinessType.旗舰版 == LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessType())
- { htData["Ver"] = "-1"; }
- ArrayList Alist = new ArrayList();
- if (this.rdoService.Checked)//服务客人预约
- {
- for (int i = 0; i < this.dgvData.SelectedRows.Count; i++)
- {
- if (this.dgvData.SelectedRows[i].Visible)
- {
- if (Alist.Count > 0)
- {
- bool isTrue = true;
- for (int j = 0; j < Alist.Count; j++)
- {
- if (this.dgvData.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim() == Alist[j].ToString().Trim())
- { isTrue = false; break; }
- }
- if (isTrue)
- { Alist.Add(this.dgvData.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim()); }
- }
- else { Alist.Add(this.dgvData.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim()); }
- }
- }
- if (Alist.Count == 0)
- { return; }
- htData["Alist"] = Alist;
- LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintFixedFormat(LYFZ.EnumPublic.PrintTypeEnum.服务明细, ObjValue: htData);
- }
- else
- {
- if (this.rdoPhotographed.Checked)//拍照客人预约
- {
- for (int i = 0; i < this.dgvData.SelectedRows.Count; i++)
- {
- if (this.dgvData.SelectedRows[i].Visible)
- {
- string StrItem = this.dgvData.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "|" + this.dgvData.SelectedRows[i].Cells["拍摄名称"].Value.ToString().Trim();
- bool isTrue = true;
- if (Alist.Count > 0)
- {
- for (int j = 0; j < Alist.Count; j++)
- {
- if (StrItem == Alist[j].ToString().Trim())
- { isTrue = false; break; }
- }
- }
- if (isTrue)
- { Alist.Add(StrItem); }
- }
- }
- }
- else
- {
- for (int i = 0; i < this.dgvData.SelectedRows.Count; i++)
- {
- if (this.dgvData.SelectedRows[i].Visible)
- {
- if (Alist.Count > 0)
- {
- bool isTrue = true;
- for (int j = 0; j < Alist.Count; j++)
- {
- if (this.dgvData.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim() == Alist[j].ToString().Trim())
- { isTrue = false; break; }
- }
- if (isTrue)
- { Alist.Add(this.dgvData.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim()); }
- }
- else
- { Alist.Add(this.dgvData.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim()); }
- }
- }
- }
- if (Alist.Count == 0)
- { return; }
- htData["Alist"] = Alist;
- if (this.rdoPhotographed.Checked)//拍照客人预约
- {
- htData["StrDate"] = this.nudYears.Value + "-" + this.nudMonth.Value + "-" + this.nudDate.Value;
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.SelectPrintTypeSuperSmallForm frm = new SuperSmallForm.SelectPrintTypeSuperSmallForm();
- frm.ShowDialog();
- if (frm.IsOk)
- {
- if (frm.StrEnumType == EnumPublic.PrintTypeEnum.订单预约单)
- {
- if (this.dgvData.SelectedRows.Count == 1)
- {
- string orderNumber = this.dgvData.SelectedRows[0].Cells["Ord_Number"].Value.ToString();
- BtnPrint_Click(orderNumber);
- }
- else {
- MessageBoxCustom.Show("打印“订单预约单”时间只能选择一个订单");
- }
- }
- else
- {
- LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintFixedFormat(frm.StrEnumType, ObjValue: htData);
- }
- }
- }
- else if (this.rdoFilmSelection.Checked)//选片客人
- { LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintFixedFormat(LYFZ.EnumPublic.PrintTypeEnum.选片明细表, ObjValue: htData); }
- else if (this.rdoLookDesign.Checked)//看版客人
- { LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintFixedFormat(LYFZ.EnumPublic.PrintTypeEnum.看设计明细表, ObjValue: htData); }
- else if (rdoTotakePiece.Checked)//取件客人
- {
- htData["TakePieceDate"] = this.nudYears.Value + "-" + this.nudMonth.Value + "-" + this.nudDate.Value;
- LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintFixedFormat(LYFZ.EnumPublic.PrintTypeEnum.取件明细表, ObjValue: htData);
- }
- else
- { MessageBoxCustom.Show("此功能暂未开放"); }
- }
- }
- }
- LYFZ.BLL.BLL_ErpOrder orderBll = new BLL.BLL_ErpOrder();
- /// <summary>
- /// 打印订单(打印预约单)
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void BtnPrint_Click(string OrderNumber)
- {
- if (!String.IsNullOrEmpty(OrderNumber))
- {
- LYFZ.Model.Model_ErpOrder currentOrderModel = orderBll.GetModel(OrderNumber);
- if (currentOrderModel.ID > 0)
- {
- EnumPublic.OrderType OrderType = (EnumPublic.OrderType)Convert.ToInt32(currentOrderModel.Ord_Type);
- Hashtable htData = new Hashtable();
- htData["strNumber"] = OrderNumber.Trim();
- htData["strOrdType"] = OrderType.ToString().Trim();
- // 获取全部景点;
- List<ReportPrint.SetSmallForm.PrintPreviewSmallForm.ScenicSpot2> listScenicSpot = null;
- if (OrderType == EnumPublic.OrderType.儿童订单)
- {
- listScenicSpot = new List<ReportPrint.SetSmallForm.PrintPreviewSmallForm.ScenicSpot2>();
- DataTable tb_Data = DAL.DAL_ErpOrder.GetOrdersPhotographyData(OrderNumber);
- for (int i = 0; i < tb_Data.Rows.Count; i++)
- {
- ReportPrint.SetSmallForm.PrintPreviewSmallForm.ScenicSpot2 scenic = new ReportPrint.SetSmallForm.PrintPreviewSmallForm.ScenicSpot2();
- scenic.strScenicName = tb_Data.Rows[i]["景点名"].ToString();
- scenic.strViceNumber = tb_Data.Rows[i]["子单号"].ToString();
- listScenicSpot.Add(scenic);
- }
- }
- LYFZ.Software.MainBusiness.ReportPrint.ReportFixedFormat.PrintFixedFormat(LYFZ.EnumPublic.PrintTypeEnum.订单预约单, htData, listScenicSpot);
- }
- else {
- MessageBoxCustom.Show("找不到要打印的订单号“"+OrderNumber+"”的订单");
- }
- }
- else {
- MessageBoxCustom.Show("订单号不能为空");
- }
- }
- /// <summary>
- /// 统计
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnStatistic_Click(object sender, EventArgs e)
- {
- bool IsSaveed = false;
- //拍照客人预约
- if (this.rdoPhotographed.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.CameraControlQuerySmallForm frm = new SmallForm.CameraControlQuerySmallForm();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.ShowDialog();
- IsSaveed = frm.IsSaveed;
- }
- //选片客人
- else if (this.rdoFilmSelection.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.FilmsSelectionReservationQuerySmallForm frm = new SmallForm.FilmsSelectionReservationQuerySmallForm();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.ShowDialog();
- IsSaveed = frm.IsSaveed;
- }
- //看版客人
- else if (this.rdoLookDesign.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.LookSampleReservationQuerySmallForm frm = new SmallForm.LookSampleReservationQuerySmallForm();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- //取件客人
- else if (rdoTotakePiece.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.TakePiecesReservationQuerySmallForm frm = new SmallForm.TakePiecesReservationQuerySmallForm();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.ShowDialog();
- IsSaveed = frm.IsSaveed;
- }
- //服务客人预约
- else if (this.rdoService.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.WeddingReservationQuerySmallForm frm = new SmallForm.WeddingReservationQuerySmallForm();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.ShowDialog();
- IsSaveed = frm.IsSaveed;
- }
- //选礼服客人
- else if (this.rdoSelectDress.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.SelectDressReservationQuerySmallForm frm = new SmallForm.SelectDressReservationQuerySmallForm();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.ShowDialog();
- IsSaveed = frm.IsSaveed;
- }
- if (IsSaveed)
- {
- if (this.dgvData.Visible)
- { this.PublicFunctionRows(); }
- else
- { this.PaintingWeekly(); }
- }
- }
- /// <summary>
- /// 客人预约
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnGuestsReservation_Click(object sender, EventArgs e)
- {
- bool IsSaveed = false;
- //拍照客人预约
- if (this.rdoPhotographed.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.PhotographedReservationSmallForm frm = new SmallForm.PhotographedReservationSmallForm();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- //选片客人
- else if (this.rdoFilmSelection.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.FilmsSelectionReservationSmallForm frm = new SmallForm.FilmsSelectionReservationSmallForm();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- //看版客人
- else if (this.rdoLookDesign.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.LookDesignReservationSmallForm frm = new SmallForm.LookDesignReservationSmallForm();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- //取件客人
- else if (rdoTotakePiece.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.TakePiecesReservationSmallForm frm = new SmallForm.TakePiecesReservationSmallForm();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- //服务客人预约
- else if (this.rdoService.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.WeddingReservationSmallForm frm = new SmallForm.WeddingReservationSmallForm();
- frm.ShowDialog();
- IsSaveed = frm.IsSaveed;
- }
- //选礼服客人
- else if (this.rdoSelectDress.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.SelectDressReservationSmallForm frm = new SmallForm.SelectDressReservationSmallForm();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- if (IsSaveed)
- {
- if (this.dgvData.Visible)
- { this.PublicFunctionRows(); }
- else
- { this.PaintingWeekly(); }
- }
- }
- /// <summary>
- /// 重新安排
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnReschedule_Click(object sender, EventArgs e)
- {
- if (this.dgvData.Visible == true)
- {
- if (this.dgvData.Rows.Count > 0)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- bool IsSaveed = false;
- //拍照客人预约
- if (this.rdoPhotographed.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.PhotographedReservationSmallForm frm = new SmallForm.PhotographedReservationSmallForm();
- frm.OrdNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- //选片客人
- else if (this.rdoFilmSelection.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.FilmsSelectionReservationSmallForm frm = new SmallForm.FilmsSelectionReservationSmallForm();
- frm.OrdViceNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- //看版客人
- else if (this.rdoLookDesign.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.LookDesignReservationSmallForm frm = new SmallForm.LookDesignReservationSmallForm();
- frm.OrdViceNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- //取件客人
- else if (rdoTotakePiece.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.TakePiecesReservationSmallForm frm = new SmallForm.TakePiecesReservationSmallForm();
- frm.OrdNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- //服务客人预约
- else if (this.rdoService.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.WeddingReservationSmallForm frm = new SmallForm.WeddingReservationSmallForm();
- frm.OrdNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- frm.ShowDialog();
- IsSaveed = frm.IsSaveed;
- }
- //选礼服客人
- else if (this.rdoSelectDress.Checked)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.SelectDressReservationSmallForm frm = new SmallForm.SelectDressReservationSmallForm();
- frm.OrdViceNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- frm.ShowDialog();
- IsSaveed = frm.IsSave;
- }
- else if (this.rdoHospitalClient.Checked)
- {
- LYFZ.Software.MainBusiness.HospitalTrackingSystem.DispatchDoor frm = new HospitalTrackingSystem.DispatchDoor();
- frm.StrOrderNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- frm.ShowDialog();
- IsSaveed = frm.IsSaveed;
- }
- if (IsSaveed)
- {
- if (this.dgvData.Visible)
- { this.PublicFunctionRows(); }
- else
- { this.PaintingWeekly(); }
- }
- return;
- }
- }
- }
- MessageBoxCustom.Show("请选择您要安排的客人");
- }
- /// <summary>
- /// 短信
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSMS_Click(object sender, EventArgs e)
- {
- if (this.dgvData.Rows.Count > 0)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- if (this.dgvData.Columns.Contains("客户电话"))
- {
- String StrTelephone = "";
- for (int i = 0; i < this.dgvData.SelectedRows.Count; i++)
- { StrTelephone += this.dgvData.SelectedRows[i].Cells["客户电话"].Value.ToString().Trim() + ","; }
- LYFZ.Software.MainBusiness.SMSManagement.SmsSend.FrmSendSms SendSMS = new SMSManagement.SmsSend.FrmSendSms();
- SendSMS.Phone = StrTelephone.TrimEnd(',');
- SendSMS.ShowDialog();
- return;
- }
- else
- { MessageBoxCustom.Show("找不到电话列,或已被您隐藏了!"); }
- }
- }
- MessageBoxCustom.Show("请选中您要发送短信的客人");
- }
- /// <summary>
- /// 关闭
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnClose_Click(object sender, EventArgs e)
- { this.Close(); }
- /// <summary>
- /// 总览
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOverview_Click(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.CameraControlBookOverviewSmallForm frm = new SmallForm.CameraControlBookOverviewSmallForm();
- frm.StrDate = this.nudYears.Value + "-" + this.nudMonth.Value + "-" + this.nudDate.Value;
- frm.ShowDialog();
- }
- /// <summary>
- /// 确认选衣状态
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSelectedClothes_Click(object sender, EventArgs e)
- {
- if (this.dgvData.Rows.Count > 0)
- {
- if (this.dgvData.CurrentCell.ColumnIndex >= 0 && this.dgvData.CurrentRow.Index >= 0)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.SelectDressConfirmSmallForm frm = new SmallForm.SelectDressConfirmSmallForm();
- frm.strViceNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString();
- frm.ShowDialog();
- if (frm.IsSave)
- { this.PublicFunctionRows(); }
- }
- }
- }
- }
- /// <summary>
- /// 导出
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnExport_Click(object sender, EventArgs e)
- {
- if (this.dgvData.Visible)
- { this.dgvData.ExportDataTable(); }
- }
- /// <summary>
- /// 添加记录
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnAddRecord_Click(object sender, EventArgs e)
- {
- BLL.BLL_ErpCompanyInfo companyBll = new BLL.BLL_ErpCompanyInfo();
- if (this.dgvData.Visible == true)
- {
- if (this.dgvData.Rows.Count > 0)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- string StrOrdNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- if (!this.rdoHospitalClient.Checked)
- {
- LYFZ.EnumPublic.ClientServiceTaskItem inputType = EnumPublic.ClientServiceTaskItem.拍照客人;
- //拍照客人预约
- if (this.rdoPhotographed.Checked)
- { inputType = EnumPublic.ClientServiceTaskItem.拍照客人; }
- //选片客人
- else if (this.rdoFilmSelection.Checked)
- { inputType = EnumPublic.ClientServiceTaskItem.选片客人; }
- //看版客人
- else if (this.rdoLookDesign.Checked)
- { inputType = EnumPublic.ClientServiceTaskItem.看版客人; }
- //取件客人
- else if (rdoTotakePiece.Checked)
- { inputType = EnumPublic.ClientServiceTaskItem.取件客人; }
- //服务客人预约
- else if (this.rdoService.Checked)
- { inputType = EnumPublic.ClientServiceTaskItem.服务客人; }
- //选礼服客人
- else if (this.rdoSelectDress.Checked)
- { inputType = EnumPublic.ClientServiceTaskItem.选衣服客人; }
- if (StrOrdNumber != "")
- {
- DataTable tbl = orbll.GetView_Custom("tb_ErpCustomerGroup", StrWhere: "GP_OrderNumber = '" + StrOrdNumber + "'", ShowColumnName: "GP_CustomerGroupID").Tables[0];
- if (tbl.Rows.Count > 0)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.A_AddCommunicateRecords frm = new SuperSmallForm.A_AddCommunicateRecords();
- frm.StrClientNumber = tbl.Rows[0]["GP_CustomerGroupID"].ToString().Trim();
- frm.EnumClientServiceTaskType = EnumPublic.ClientServiceTaskType.摄控确认;
- frm.EnumClientServiceTaskItem = inputType;
- frm.Areminderdate = true;
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- #region 将预约安排时间改为下次提醒时间
- if (frm.StrNextTime.Trim().Length > 0)
- {
- string StrCurrentDateTime = Convert.ToDateTime(this.nudYears.Value + "-" + this.nudMonth.Value + "-" + this.nudDate.Value).ToYYYY_MM_dd();
- List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- string StrViceNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- string storaRecord = "";
- //拍照客人预约
- if (this.rdoPhotographed.Checked)
- {
- DataTable dtData = orbll.GetView_Custom("tb_ErpOrdersPhotography", StrWhere: "Ordpg_ViceNumber = '" + StrViceNumber + "'", ShowColumnName: "*").Tables[0];
-
- foreach (DataRow dtRow in dtData.Rows)
- {
- if (dtRow["Ordpg_ReservationPhotographyTime"].ToString().Trim().Length > 0 && dtRow["Ordpg_PhotographyStatus"].ToString().Trim() != "1")
- {
- if (StrCurrentDateTime == Convert.ToDateTime(dtRow["Ordpg_ReservationPhotographyTime"]).ToYYYY_MM_dd())
- {
- LYFZ.Model.Model_ErpOrdersPhotography model = phbll.DataRowToModel(dtRow);
- model.Ordpg_ReservationPhotographyTime = Convert.ToDateTime(frm.StrNextTime.Trim() + " " + model.Ordpg_ReservationPhotographyTime.ToString("HH:mm:ss"));
- model.Ordpg_UpdateDateTime = SDateTime.Now;
- model.Ordpg_UpdateName = this.StrUserID;
- if (model.Ordpg_Remark.Trim().Length > 0)
- { model.Ordpg_Remark += ";"; }
- model.Ordpg_Remark += "安排日期由'" + LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["Ordpg_ReservationPhotographyTime"]) + "'改为'" + LYFZ.BLL.OtherCommonModel.DateTimeToString(model.Ordpg_ReservationPhotographyTime) + "'";
- clist.Add(phbll.GetUpdateCommandInfo(model));
- if (!string.IsNullOrEmpty(model.Ordpg_ReservationPhotographyDividedShop))
- {
- storaRecord = "门店:" + companyBll.GetModel("Company_DividedShop", model.Ordpg_ReservationPhotographyDividedShop).Company_Name;
- }
- Model.Model_ErpOrderWorkAnPaiRecord modelRecord = new Model.Model_ErpOrderWorkAnPaiRecord();
- modelRecord.Ordwr_Number = "OWPR_" + LYFZ.BLL.BLL_ErpCustomer.GetClientNumber();
- modelRecord.Ordwr_WorkNumber = model.Ordpg_IDNumber;
- modelRecord.Ordwr_OrdNumber = model.Ordpg_Number;
- modelRecord.Ordwr_ViceNumber = model.Ordpg_ViceNumber;
- modelRecord.Ordwr_ModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排拍照客人.ToString();
- modelRecord.Ordwr_UpdateOrderName = model.Ordpg_Sights;
- modelRecord.Ordwr_UpdateAgoPerson = model.Ordpg_Dispatcher;
- modelRecord.Ordwr_UpdateAgoTime = model.Ordpg_DispatchTime;
- modelRecord.Ordwr_UpdateAgoData = storaRecord +" " + model.Ordpg_Remark;
- modelRecord.Ordwr_CreateDatetime = SDateTime.Now;
- modelRecord.Ordwr_CreateName = StrUserID;
- clist.Add(ordwr.GetAddCommandInfo(modelRecord));
- }
- }
- }
- }
- //取件客人
- else if (rdoTotakePiece.Checked)
- {
- DataTable dtData = orbll.GetView_Custom("tb_ErpOrderProductList", StrWhere: "OPlist_ViceNumber = '" + StrViceNumber + "' And OPlist_Type = '2'", ShowColumnName: "*").Tables[0];
- foreach (DataRow dtRow in dtData.Rows)
- {
- if (dtRow["OPlist_ReservationTakeTime"].ToString().Trim().Length > 0 && dtRow["OPlist_PickupStatus"].ToString().Trim() != "1")
- {
- if (StrCurrentDateTime == Convert.ToDateTime(dtRow["OPlist_ReservationTakeTime"]).ToYYYY_MM_dd())
- {
- LYFZ.Model.Model_ErpOrderProductList model = libll.DataRowToModel(dtRow);
- model.OPlist_ReservationTakeTime = Convert.ToDateTime(frm.StrNextTime.Trim() + " " + model.OPlist_ReservationTakeTime.ToString("HH:mm:ss"));
- model.OPlist_UpdateDateTime = SDateTime.Now;
- model.OPlist_UpdateName = this.StrUserID;
- if (model.OPlist_ArrangeRemark.Trim().Length > 0)
- { model.OPlist_ArrangeRemark += ";"; }
- model.OPlist_ArrangeRemark += "安排日期由'" + LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["OPlist_ReservationTakeTime"]) + "'转移到'" + LYFZ.BLL.OtherCommonModel.DateTimeToString(model.OPlist_ReservationTakeTime) + "'";
- clist.Add(libll.GetUpdateCommandInfo(model));
- if (!string.IsNullOrEmpty(model.OPlist_ReservationTakeDividedShop))
- {
- storaRecord = "门店:" + companyBll.GetModel("Company_DividedShop", model.OPlist_ReservationTakeDividedShop).Company_Name;
- }
- LYFZ.Model.Model_ErpOrderWorkAnPaiRecord modelRecord = new Model.Model_ErpOrderWorkAnPaiRecord();
- modelRecord.Ordwr_Number = "OWPR_" + LYFZ.BLL.BLL_ErpCustomer.GetClientNumber();
- modelRecord.Ordwr_WorkNumber = model.ID.ToString().Trim();
- modelRecord.Ordwr_OrdNumber = model.OPlist_OrderNumber;
- modelRecord.Ordwr_ViceNumber = model.OPlist_ViceNumber;
- modelRecord.Ordwr_ModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排取件客人.ToString();
- modelRecord.Ordwr_UpdateOrderName = model.OPlist_PickupName;
- modelRecord.Ordwr_UpdateAgoPerson = dtRow["OPlist_UpdateName"].ToString_s();
- modelRecord.Ordwr_UpdateAgoTime = (dtRow["OPlist_UpdateDateTime"].ToString_s()==""?new DateTime(): Convert.ToDateTime(dtRow["OPlist_UpdateDateTime"].ToString_s()));
- modelRecord.Ordwr_UpdateAgoData = storaRecord + " " + model.OPlist_ArrangeRemark;
- modelRecord.Ordwr_CreateDatetime = SDateTime.Now;
- modelRecord.Ordwr_CreateName = StrUserID;
- clist.Add(ordwr.GetAddCommandInfo(modelRecord));
- }
- }
- }
- }
- //服务客人预约
- else if (this.rdoService.Checked)
- {
- DataTable dtData = orbll.GetView_Custom("tb_ErpWeddingService", StrWhere: "Ws_ViceNumber = '" + StrViceNumber + "' And Ws_Status = '0'", ShowColumnName: "*").Tables[0];
- foreach (DataRow dtRow in dtData.Rows)
- {
- if (dtRow["Ws_WeddingDate"].ToString().Trim().Length > 0 && dtRow["Ws_Status"].ToString().Trim() != "1")
- {
- if (StrCurrentDateTime == Convert.ToDateTime(dtRow["Ws_WeddingDate"]).ToYYYY_MM_dd())
- {
- LYFZ.Model.Model_ErpWeddingService model = wsbll.DataRowToModel(dtRow);
- model.Ws_WeddingDate = Convert.ToDateTime(frm.StrNextTime.Trim() + " " + Convert.ToDateTime(model.Ws_WeddingDate).ToString("HH:mm:ss"));
- model.Ws_UpdateDateTime = SDateTime.Now;
- model.Ws_UpdateName = this.StrUserID;
- if (model.Ws_Remark.Trim().Length > 0)
- { model.Ws_Remark += ";"; }
- model.Ws_Remark += "安排日期由'" + LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["Ws_WeddingDate"]) + "'转移到'" + LYFZ.BLL.OtherCommonModel.DateTimeToString(model.Ws_WeddingDate) + "'";
- clist.Add(wsbll.GetUpdateCommandInfo(model));
- if(!string.IsNullOrEmpty(model.Ws_ReservationServiceDividedShop))
- {
- storaRecord = "门店:" + companyBll.GetModel("Company_DividedShop", model.Ws_ReservationServiceDividedShop).Company_Name;
- }
- LYFZ.Model.Model_ErpOrderWorkAnPaiRecord modelRecord = new Model.Model_ErpOrderWorkAnPaiRecord();
- modelRecord.Ordwr_Number = "OWPR_" + LYFZ.BLL.BLL_ErpCustomer.GetClientNumber();
- modelRecord.Ordwr_WorkNumber = model.ID.ToString().Trim();
- modelRecord.Ordwr_OrdNumber = model.Ws_Number;
- modelRecord.Ordwr_ViceNumber = model.Ws_ViceNumber;
- modelRecord.Ordwr_ModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排服务客人.ToString();
- modelRecord.Ordwr_UpdateOrderName = model.Ws_ProdName;
- modelRecord.Ordwr_UpdateAgoPerson = model.Ws_WeddingDispatcher;
- modelRecord.Ordwr_UpdateAgoTime = model.Ws_WeddingDispatchDate;
- modelRecord.Ordwr_UpdateAgoData = storaRecord + " " + model.Ws_Remark;
- modelRecord.Ordwr_CreateDatetime = SDateTime.Now;
- modelRecord.Ordwr_CreateName = StrUserID;
- clist.Add(ordwr.GetAddCommandInfo(modelRecord));
- }
- }
- }
- }
- else
- {
- DataTable dtData = orbll.GetView_Custom("tb_ErpOrderDigital", StrWhere: "Ordv_ViceNumber = '" + StrViceNumber + "'", ShowColumnName: "*").Tables[0];
- //选片客人
- if (this.rdoFilmSelection.Checked)
- {
- foreach (DataRow dtRow in dtData.Rows)
- {
- if (dtRow["Ordv_ReservationFilmSelectionTime"].ToString().Trim().Length > 0 && dtRow["Ordv_FilmSelectionStatus"].ToString().Trim() != "1")
- {
- if (StrCurrentDateTime == Convert.ToDateTime(dtRow["Ordv_ReservationFilmSelectionTime"]).ToYYYY_MM_dd())
- {
- LYFZ.Model.Model_ErpOrderDigital model = odbll.DataRowToModel(dtRow);
- model.Ordv_ReservationFilmSelectionTime = Convert.ToDateTime(frm.StrNextTime.Trim() + " " + Convert.ToDateTime(model.Ordv_ReservationFilmSelectionTime).ToString("HH:mm:ss"));
- model.Ordv_UpdateDateTime = SDateTime.Now;
- model.Ordv_UpdateName = this.StrUserID;
- clist.Add(odbll.GetUpdateCommandInfo(model));
- if (!string.IsNullOrEmpty(model.Ordv_ReservationFilmSelectionDividedShop))
- {
- storaRecord = "门店:" + companyBll.GetModel("Company_DividedShop", model.Ordv_ReservationFilmSelectionDividedShop).Company_Name;
- }
- LYFZ.Model.Model_ErpOrderWorkAnPaiRecord modelRecord = new Model.Model_ErpOrderWorkAnPaiRecord();
- modelRecord.Ordwr_Number = "OWPR_" + LYFZ.BLL.BLL_ErpCustomer.GetClientNumber();
- modelRecord.Ordwr_WorkNumber = model.Ordv_ViceNumber;
- modelRecord.Ordwr_OrdNumber = model.Ordv_Number;
- modelRecord.Ordwr_ViceNumber = model.Ordv_ViceNumber;
- modelRecord.Ordwr_ModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排选片客人.ToString();
- DataTable dtName = orbll.GetView_Custom("tb_ErpOrderDigitalStatus", StrWhere: "Ords_ViceNumber = '" + model.Ordv_ViceNumber + "'", ShowColumnName: "Ords_SightsName").Tables[0];
- if (dtName.Rows.Count > 0)
- {
- modelRecord.Ordwr_UpdateOrderName = dtName.Rows[0]["Ords_SightsName"].ToString().Trim();
- }
- else
- {
- modelRecord.Ordwr_UpdateOrderName = "";
- }
- modelRecord.Ordwr_UpdateAgoPerson = model.Ordv_FilmSelectionDispatcher;
- modelRecord.Ordwr_UpdateAgoTime = model.Ordv_FilmSelectionDispatchTime;
- modelRecord.Ordwr_UpdateAgoData = storaRecord + " " + "安排日期由'" + LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["Ordv_ReservationFilmSelectionTime"]) + "'转移到'" + model.Ordv_ReservationFilmSelectionTime + "'";
- modelRecord.Ordwr_CreateDatetime = SDateTime.Now;
- modelRecord.Ordwr_CreateName = StrUserID;
- clist.Add(ordwr.GetAddCommandInfo(modelRecord));
- }
- }
- }
- }
- //看版客人
- else if (this.rdoLookDesign.Checked)
- {
- foreach (DataRow dtRow in dtData.Rows)
- {
- if (dtRow["Ordv_ReservationLookDesignTime"].ToString().Trim().Length > 0 && dtRow["Ordv_LookDesignStatus"].ToString().Trim() != "1")
- {
- if (StrCurrentDateTime == Convert.ToDateTime(dtRow["Ordv_ReservationLookDesignTime"]).ToYYYY_MM_dd())
- {
- LYFZ.Model.Model_ErpOrderDigital model = odbll.DataRowToModel(dtRow);
- model.Ordv_ReservationLookDesignTime = Convert.ToDateTime(frm.StrNextTime.Trim() + " " + Convert.ToDateTime(model.Ordv_ReservationLookDesignTime).ToString("HH:mm:ss"));
- model.Ordv_UpdateDateTime = SDateTime.Now;
- model.Ordv_UpdateName = this.StrUserID;
- clist.Add(odbll.GetUpdateCommandInfo(model));
- if (!string.IsNullOrEmpty(model.Ordv_ReservationLookDesignDividedShop))
- {
- storaRecord = "门店:" + companyBll.GetModel("Company_DividedShop", model.Ordv_ReservationLookDesignDividedShop).Company_Name;
- }
- LYFZ.Model.Model_ErpOrderWorkAnPaiRecord modelRecord = new Model.Model_ErpOrderWorkAnPaiRecord();
- modelRecord.Ordwr_Number = "OWPR_" + LYFZ.BLL.BLL_ErpCustomer.GetClientNumber();
- modelRecord.Ordwr_WorkNumber = model.Ordv_ViceNumber;
- modelRecord.Ordwr_OrdNumber = model.Ordv_Number;
- modelRecord.Ordwr_ViceNumber = model.Ordv_ViceNumber;
- modelRecord.Ordwr_ModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排看版客人.ToString();
- DataTable dtName = orbll.GetView_Custom("tb_ErpOrderDigitalStatus", StrWhere: "Ords_ViceNumber = '" + model.Ordv_ViceNumber + "'", ShowColumnName: "Ords_SightsName").Tables[0];
- if (dtName.Rows.Count > 0)
- {
- modelRecord.Ordwr_UpdateOrderName = dtName.Rows[0]["Ords_SightsName"].ToString().Trim();
- }
- else
- {
- modelRecord.Ordwr_UpdateOrderName = "";
- }
- modelRecord.Ordwr_UpdateAgoPerson = model.Ordv_LookDesignDispatcher;
- modelRecord.Ordwr_UpdateAgoTime = model.Ordv_LookDesignDispatchTime;
- modelRecord.Ordwr_UpdateAgoData = storaRecord + " " + "安排日期由'" + LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["Ordv_ReservationLookDesignTime"]) + "'转移到'" + model.Ordv_ReservationLookDesignTime + "'";
- modelRecord.Ordwr_CreateDatetime = SDateTime.Now;
- modelRecord.Ordwr_CreateName = StrUserID;
- clist.Add(ordwr.GetAddCommandInfo(modelRecord));
- }
- }
- }
- }
- //选礼服客人
- else if (this.rdoSelectDress.Checked)
- {
- foreach (DataRow dtRow in dtData.Rows)
- {
- if (dtRow["Ordv_ReservationClothingTime"].ToString().Trim().Length > 0 && dtRow["Ordv_ClothingStatus"].ToString().Trim() != "1")
- {
- if (StrCurrentDateTime == Convert.ToDateTime(dtRow["Ordv_ReservationClothingTime"]).ToYYYY_MM_dd())
- {
- LYFZ.Model.Model_ErpOrderDigital model = odbll.DataRowToModel(dtRow);
- model.Ordv_ReservationClothingTime = Convert.ToDateTime(frm.StrNextTime.Trim() + " " + Convert.ToDateTime(model.Ordv_ReservationClothingTime).ToString("HH:mm:ss"));
- model.Ordv_UpdateDateTime = SDateTime.Now;
- model.Ordv_UpdateName = this.StrUserID;
- clist.Add(odbll.GetUpdateCommandInfo(model));
- if (!string.IsNullOrEmpty(model.Ordv_ReservationClothingDividedShop))
- {
- storaRecord = "门店:" + companyBll.GetModel("Company_DividedShop", model.Ordv_ReservationClothingDividedShop).Company_Name;
- }
- LYFZ.Model.Model_ErpOrderWorkAnPaiRecord modelRecord = new Model.Model_ErpOrderWorkAnPaiRecord();
- modelRecord.Ordwr_Number = "OWPR_" + LYFZ.BLL.BLL_ErpCustomer.GetClientNumber();
- modelRecord.Ordwr_WorkNumber = model.Ordv_ViceNumber;
- modelRecord.Ordwr_OrdNumber = model.Ordv_Number;
- modelRecord.Ordwr_ViceNumber = model.Ordv_ViceNumber;
- modelRecord.Ordwr_ModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排选礼服客人.ToString();
- DataTable dtName = orbll.GetView_Custom("tb_ErpOrderDigitalStatus", StrWhere: "Ords_ViceNumber = '" + model.Ordv_ViceNumber + "'", ShowColumnName: "Ords_SightsName").Tables[0];
- if (dtName.Rows.Count > 0)
- {
- modelRecord.Ordwr_UpdateOrderName = dtName.Rows[0]["Ords_SightsName"].ToString().Trim();
- }
- else
- {
- modelRecord.Ordwr_UpdateOrderName = "";
- }
- modelRecord.Ordwr_UpdateAgoPerson = model.Ordv_ClothingDispatcher;
- modelRecord.Ordwr_UpdateAgoTime = model.Ordv_ClothingDispatchTime;
- modelRecord.Ordwr_UpdateAgoData = storaRecord + " " + "安排日期由'" + LYFZ.BLL.OtherCommonModel.DateTimeToString(dtRow["Ordv_ReservationClothingTime"]) + "'转移到'" + model.Ordv_ReservationClothingTime + "'";
- modelRecord.Ordwr_CreateDatetime = SDateTime.Now;
- modelRecord.Ordwr_CreateName = StrUserID;
- clist.Add(ordwr.GetAddCommandInfo(modelRecord));
- }
- }
- }
- }
- }
- if (clist.Count > 0)
- {
- if (LYFZ.BLL.BaseBllOperate.ExecuteSqlTran(clist) > 0)
- { MessageBoxCustom.Show("已将您沟通的客户‘" + this.dgvData.CurrentRow.Cells["客户姓名"].Value.ToString().Trim() + "’的摄控预约日期改为‘" + frm.StrNextTime + "’"); }
- }
- }
- #endregion
- this.PublicFunctionRows();
- }
- }
- }
- }
- else if (this.rdoHospitalClient.Checked)
- {
- if (this.dgvData.Columns["ID"] != null)
- {
- string StrOrderID = this.dgvData.CurrentRow.Cells["ID"].Value.ToString().Trim();
- LYFZ.Software.MainBusiness.HospitalTrackingSystem.AddingTrackRecord frm = new HospitalTrackingSystem.AddingTrackRecord();
- frm.IsShowDatimeRemind = false;
- frm.StrOrderNumber = StrOrdNumber;
- frm.IsGoForm = false;
- frm.intDispatchDoorID = Convert.ToInt32(StrOrderID);
- frm.ShowDialog();
- if (frm.IsSaveed)
- { this.PublicFunctionRows(); }
- }
- else
- { MessageBoxCustom.Show("版本数据不正确,请重置列表标!"); }
- }
- }
- }
- }
- }
- /// <summary>
- /// 沟通详情
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnCommunicateDetails_Click(object sender, EventArgs e)
- {
- if (this.dgvData.Visible == true)
- {
- if (this.dgvData.Rows.Count > 0)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- string StrOrdNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- if (StrOrdNumber != "")
- {
- if (this.rdoHospitalClient.Checked)
- {
- LYFZ.Software.MainBusiness.HospitalTrackingSystem.IntentionsEntered frm = new HospitalTrackingSystem.IntentionsEntered();
- frm.StrOrdNumber = StrOrdNumber;
- frm.ShowDialog();
- if (frm.IsSaveed)
- { this.PublicFunctionRows(); }
- }
- else
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.A_CommunicationDetails frm = new SuperSmallForm.A_CommunicationDetails();
- frm.StrNumber = StrOrdNumber;
- frm.ShowDialog();
- if (frm.IsSaveed)
- { this.PublicFunctionRows(); }
- }
- }
- }
- }
- }
- }
- /// <summary>
- /// 安排客服
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnClientServiceAnPai_Click(object sender, EventArgs e)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ClientServiceTaskAnPaiSmallForm frm = new DoorCityProcess.SetSmallForm.ClientServiceTaskAnPaiSmallForm();
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- LYFZ.EnumPublic.ClientServiceTaskItem ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.拍照客人;
- if (this.rdoFilmSelection.Checked)
- { ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.选片客人; }
- else if (this.rdoLookDesign.Checked)
- { ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.看版客人; }
- else if (this.rdoSelectDress.Checked)
- { ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.选衣服客人; }
- else if (this.rdoService.Checked)
- { ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.服务客人; }
- else if (this.rdoTotakePiece.Checked)
- { ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.取件客人; }
- else if (this.rdoHospitalClient.Checked)
- { ClientServiceAnPai = EnumPublic.ClientServiceTaskItem.摄控医院客人; }
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ClientServiceAnPai(this.dgvData, LYFZ.EnumPublic.ClientServiceTaskType.摄控确认, frm.model, ClientServiceAnPai);
- }
- }
- }
- /// <summary>
- /// 员工档期
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnPersonSchedule_Click(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SmallForm.A_EmployeeScheduleSmallForm frm = new SmallForm.A_EmployeeScheduleSmallForm();
- frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- frm.ShowDialog();
- }
- #endregion
- #region 数据处理
- bool GetIsWorkChange(int eRowIndex, ref string StrModuleName)
- {
- string StrModuleNameWhere = "";
- if (this.rdoFilmSelection.Checked)
- {
- StrModuleNameWhere = " And Ordwr_ModuleName = '" + LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排选片客人.ToString() + "' ";
- StrModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排选片客人.ToString();
- }
- else if (this.rdoLookDesign.Checked)
- {
- StrModuleNameWhere = " And Ordwr_ModuleName = '" + LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排看版客人.ToString() + "' ";
- StrModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排看版客人.ToString();
- }
- else if (this.rdoPhotographed.Checked)
- {
- StrModuleNameWhere = " And Ordwr_ModuleName = '" + LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排拍照客人.ToString() + "' ";
- StrModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排拍照客人.ToString();
- }
- else if (this.rdoSelectDress.Checked)
- {
- StrModuleNameWhere = " And Ordwr_ModuleName = '" + LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排选礼服客人.ToString() + "' ";
- StrModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排选礼服客人.ToString();
- }
- else if (this.rdoService.Checked)
- {
- StrModuleNameWhere = " And Ordwr_ModuleName = '" + LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排服务客人.ToString() + "' ";
- StrModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排服务客人.ToString();
- }
- else if (this.rdoTotakePiece.Checked)
- {
- StrModuleNameWhere = " And Ordwr_ModuleName = '" + LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排取件客人.ToString() + "' ";
- StrModuleName = LYFZ.EnumPublic.WorkAnPaiChangeLogEnum.摄控安排取件客人.ToString();
- }
- if (StrModuleName.Trim().Length > 0)
- {
- DataTable dt = orbll.GetView_Custom("tb_ErpOrderWorkAnPaiRecord", StrWhere: "Ordwr_ViceNumber = '" + this.dgvData.Rows[eRowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "'" + StrModuleNameWhere, ShowColumnName: "ID", filedOrder: "Ordwr_CreateDatetime DESC").Tables[0];
- if (dt.Rows.Count > 0)
- {
- return true;
- }
- }
- return false;
- }
- /// <summary>
- /// 右键菜单
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
- {
- if (e.Button == MouseButtons.Right)
- {
- if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- bool IsFind = false;
- Hashtable htData = null;
- ToolStripMenuItem item = null;
- if (this.rdoPhotographed.Checked)
- {
- bool IsPhotographRetake = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotographRetake);
- if (IsPhotographRetake && this.dgvData.Rows[e.RowIndex].Cells["拍摄状态"].Value.ToString().Trim() != "未拍" && this.dgvData.Rows[e.RowIndex].DefaultCellStyle.ForeColor != Color.Coral)
- {
- item = new ToolStripMenuItem();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrSightsIDNumber"] = this.dgvData.Rows[e.RowIndex].Cells["VID"].Value.ToString().Trim();
- item.Text = "重拍";
- item.Tag = htData;
- item.Name = "Remake";
- this.dgvData.conMenu.Items.Add(item);
- IsFind = true;
- }
- DataTable dt = orbll.GetView_Custom("tb_ErpOrdersPhotography", StrWhere: "ID = '" + this.dgvData.Rows[e.RowIndex].Cells["VID"].Value.ToString().Trim() + "'", ShowColumnName: "Ordpg_IDNumber").Tables[0];
- if (dt.Rows.Count > 0)
- {
- DataTable odt = orbll.GetView_Custom("tb_ErpOrderRetakeRecord", StrWhere: "Ordrr_SightsIDNumber = '" + dt.Rows[0]["Ordpg_IDNumber"].ToString().Trim() + "'", ShowColumnName: "Count(ID) AS CountID").Tables[0];
- if (odt.Rows.Count > 0)
- {
- if (Convert.ToInt32(odt.Rows[0]["CountID"]) > 0)
- {
- item = new ToolStripMenuItem();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- htData["StrSightsIDNumber"] = dt.Rows[0]["Ordpg_IDNumber"].ToString().Trim();
- htData["IsCompetence"] = IsPhotographRetake;
- item.Text = "重拍记录";
- item.Tag = htData;
- item.Name = "RemakeRecord";
- this.dgvData.conMenu.Items.Add(item);
- IsFind = true;
- }
- }
- }
- }
- if (this.dgvData.SelectedRows.Count == 1 && !this.rdoHospitalClient.Checked)
- {
- item = new ToolStripMenuItem();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- item.Text = "订单备注";
- item.Tag = htData;
- item.Name = "OrderRemark";
- this.dgvData.conMenu.Items.Add(item);
- IsFind = true;
- string StrModuleName = "";
- if (this.GetIsWorkChange(e.RowIndex, ref StrModuleName))
- {
- item = new ToolStripMenuItem();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- htData["StrModuleName"] = StrModuleName;
- item.Text = "安排变更记录";
- item.Tag = htData;
- item.Name = "WorkLog";
- this.dgvData.conMenu.Items.Add(item);
- }
- }
- if (IsFind)
- {
- // this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
- this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
- // this.dgvData.conMenu.Show();
- if (!this.dgvData.conMenu.Visible)
- {
- this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- }
- }
- }
- }
- else
- {
- this.dgvData.conMenu.Items.Clear();
- ToolStripMenuItem item = new ToolStripMenuItem();
- item.Text = "设置标题";
- item.Tag = "SetColumnShow";
- item.Name = "SetColumnShow";
- this.dgvData.conMenu.Items.Add(item);
- // this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
- this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
- // this.dgvData.conMenu.Show();
- if (!this.dgvData.conMenu.Visible)
- {
- this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- }
- }
- ToolStripMenuItem stripItem = new ToolStripMenuItem();
- stripItem.Text = "颜色";
- this.dgvData.conMenu.Items.Add(stripItem);
- BLL.BLL_ColorSetting bLL_Color = new BLL.BLL_ColorSetting();
- System.Data.DataTable dtList = bLL_Color.GetAllList().Tables[0];
- List<ToolStripItem> items = new List<ToolStripItem>();
- ToolStripMenuItem stripItem0 = new ToolStripMenuItem();
- stripItem0.Text = "清除";
- items.Add(stripItem0);
- stripItem0.Click += StripItem0_Click;
- foreach (System.Data.DataRow dr in dtList.Rows)
- {
- ToolStripMenuItem stripItem1 = new ToolStripMenuItem();
- stripItem1.Text = dr["InfoText"].ToString();
- dynamic dyColor = JsonConvert.DeserializeObject(dr["ColorText"].ToString());
- stripItem1.BackColor = Color.FromArgb(
- Convert.ToInt32(dyColor.A),
- Convert.ToInt32(dyColor.R),
- Convert.ToInt32(dyColor.G),
- Convert.ToInt32(dyColor.B)
- );
- stripItem1.Tag = dr;
- stripItem1.Click += StripItem1_Click;
- items.Add(stripItem1);
- }
- stripItem.DropDownItems.AddRange(items.ToArray());
- }
- }
- private void StripItem0_Click(object sender, EventArgs e)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- BLL.BLL_ErpOrder bllErpOrder = new BLL.BLL_ErpOrder();
- string OrdNumber = this.dgvData.SelectedRows[0].Cells["Ord_Number"].Value.ToString();
- Model.Model_ErpOrder model_ErpOrder = bllErpOrder.GetModel(OrdNumber);
- model_ErpOrder.ord_AutoColor = "";
- bllErpOrder.Update(model_ErpOrder);
- PublicFunctionRows();
- }
- }
- private void StripItem1_Click(object sender, EventArgs e)
- {
- if (this.dgvData.SelectedRows.Count > 0)
- {
- BLL.BLL_ErpOrder bllErpOrder = new BLL.BLL_ErpOrder();
- string OrdNumber = this.dgvData.SelectedRows[0].Cells["Ord_Number"].Value.ToString();
- Model.Model_ErpOrder model_ErpOrder = bllErpOrder.GetModel(OrdNumber);
- DataRow dr = (DataRow)((ToolStripItem)sender).Tag;
- string colorText = dr["ColorText"].ToString();
- model_ErpOrder.ord_AutoColor = colorText;
- bllErpOrder.Update(model_ErpOrder);
- PublicFunctionRows();
- }
-
- }
- /// <summary>
- /// 列表单击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_CellClick(object sender, DataGridViewCellEventArgs e)
- {
- try
- {
- if (this.dgvData.Columns.Contains("订单号"))
- {
- string StrNumber = this.dgvData.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- if (string.IsNullOrEmpty(StrNumber) || StrNumber.Trim() == "(取件OK)")
- {
- bool IsFind = false;
- int i = this.dgvData.CurrentRow.Index;
- while (!IsFind)
- {
- i = i - 1;
- if (!string.IsNullOrEmpty(this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim()))
- { StrNumber = this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim(); IsFind = true; }
- }
- }
- LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = StrNumber;
- }
- }
- catch
- { }
- }
- /// <summary>
- /// 对列表控件双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- Point hit = this.dgvData.PointToClient(Cursor.Position);
- DataGridView.HitTestInfo hitTest = this.dgvData.HitTest(hit.X, hit.Y);
- if (hitTest.RowIndex < 0 && hitTest.ColumnIndex < 0)
- { LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = ""; }
- }
- /// <summary>
- /// 右键菜单选择项事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_DataGridViewConMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
- {
- ToolStripItem item = e.ClickedItem;
- if (item.Name.Trim() == "SetColumnShow")
- {
- string strEnabled = "";
- if (this.dgvData.Columns.Contains("拍摄状态"))
- {
- strEnabled = "拍摄状态";
- }
- if (LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ShowDataGridViewSetColumn(this.dgvData, StrEnabled: strEnabled))
- {
- this.PublicFunctionRows();
- }
- }
- else if (item.Name.Trim() == "Remake")
- {
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.OrderSightsRetakeSmallForm frm = new DoorCityProcess.SetSmallForm.OrderSightsRetakeSmallForm();
- frm.StrOrdNumber = htData["StrNumber"].ToString().Trim();
- frm.StrSightsID = htData["StrSightsIDNumber"].ToString().Trim();
- frm.StrRetakeType = EnumPublic.EnumRetakeType.拍照重拍;
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- this.PublicFunctionRows();
- }
- }
- else if (item.Name.Trim() == "RemakeRecord")
- {
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.OrderSightsRemakeRecordSmallForm frm = new DoorCityProcess.SetSmallForm.OrderSightsRemakeRecordSmallForm();
- frm.StrRemakeRecordType = EnumPublic.EnumRetakeType.拍照重拍;
- frm.StrOrdNumber = htData["StrNumber"].ToString().Trim();
- frm.StrSightsID = htData["StrSightsIDNumber"].ToString().Trim();
- frm.IsCompetence = Convert.ToBoolean(htData["IsCompetence"]);
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- this.PublicFunctionRows();
- }
- }
- else if (item.Name.Trim() == "OrderRemark")
- {
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OrderRemarkRecordAddSuperSmallForm frm = new DoorCityProcess.SuperSmallForm.OrderRemarkRecordAddSuperSmallForm();
- frm.StrOrderNumber = htData["StrNumber"].ToString().Trim();
- frm.StrOrdViceNumber = htData["StrViceNumber"].ToString().Trim();
- if (this.rdoPhotographed.Checked)
- {
- frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.预约拍照.ToString().Trim();
- }
- else if (this.rdoFilmSelection.Checked)
- {
- frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.预约选片.ToString().Trim();
- }
- else if (this.rdoLookDesign.Checked)
- {
- frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.预约看版.ToString().Trim();
- }
- else if (this.rdoSelectDress.Checked)
- {
- frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.预约选衣.ToString().Trim();
- }
- else if (this.rdoTotakePiece.Checked)
- {
- frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.预约取件.ToString().Trim();
- }
- else if (this.rdoService.Checked)
- {
- frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.预约服务.ToString().Trim();
- }
- frm.ShowDialog();
- }
- else if (item.Name.Trim() == "WorkLog")
- {
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.WorkAnPaiRecordSuperSmallForm frm = new SuperSmallForm.WorkAnPaiRecordSuperSmallForm();
- frm.StrOrdNumber = htData["StrNumber"].ToString().Trim();
- frm.StrViceNumber = htData["StrViceNumber"].ToString().Trim();
- frm.StrModuleName = htData["StrModuleName"].ToString().Trim();
- frm.ShowDialog();
- }
- }
- /// <summary>
- /// 创建行
- /// </summary>
- void PublicFunctionRows()
- {
-
- string StrFixedHideColumn = "";
- string StrVersion = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);//获取版本
- if (StrVersion == "1")
- { StrFixedHideColumn = ",婚期"; }
- if (this.chkWeddingCelebration.Checked)
- { StrFixedHideColumn += ",拍摄名称"; }
- if (this.rdoPhotographed.Checked)
- {
- this.panelEx8.Visible = true;
- this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Class,Ord_Type,VID,Ord_Number,Ordv_ViceNumber,ord_AutoColor,订单号,客户姓名,客户性别,客户电话,年龄,订单类型,接单人,套系名称,套系价格,婚期,欠款,拍摄名称,服装套数,拍摄状态,摄影时间,摄影师,摄影师满意度,摄影助理,摄影助理满意度,化妆师,化妆师满意度,化妆助理,化妆助理满意度,引导师,引导师满意度,引导助理,引导助理满意度,录入备注,安排人,安排时间,客服人员,沟通时间,沟通状态,沟通备注";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0011.ToString().Trim();
- this.dgvData.dgvFixedHideColumn = "Ord_Class,Ord_Type,VID,Ord_Number,ord_AutoColor,Ordv_ViceNumber" + StrFixedHideColumn;
- this.dgvData.dgvGuidName = StrGuidName;
- this.dgvData.dgvUserEmployeeID = this.StrUserID;
- this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,年龄,订单类型,接单人,套系名称,套系价格,婚期,欠款";
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
- this.dgvData.dictShowColumName = dictColumns;
- LYFZ.ComponentLibrary.DataGridOrderView.GetData_CameraControlBookPhotographed(this.dgvData, dictColumns, this.GetWhereStr(), this.StrSortField);//"Ordpg_ReservationPhotographyTime,Ord_Number,Ordv_DigitalNumber");
- }
- else
- {
- this.panelEx8.Visible = false;
- if (this.rdoFilmSelection.Checked)
- {
- this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Type,Ord_Number,Ordv_ViceNumber,ord_AutoColor,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,欠款,拍摄名称,拍照状态,摄影师,化妆师,初修状态,选片状态,选片师,选片师满意度,选片时间,安排人,安排时间,客服人员,沟通时间,沟通状态,沟通备注";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0012.ToString().Trim();
- this.dgvData.dgvFixedHideColumn = "Ord_Type,Ord_Number,ord_AutoColor,Ordv_ViceNumber" + StrFixedHideColumn;
- this.dgvData.dgvGuidName = StrGuidName;
- this.dgvData.dgvUserEmployeeID = this.StrUserID;
- this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,欠款";
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
- this.dgvData.dictShowColumName = dictColumns;
- LYFZ.ComponentLibrary.DataGridOrderView.GetData_CameraControlBookFilmSelection(this.dgvData, dictColumns, this.GetWhereStr(), this.StrSortField);//"Ordv_ReservationFilmSelectionTime,Ord_Number,Ordv_DigitalNumber");
- }
- else if (this.rdoLookDesign.Checked)
- {
- this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Type,Ord_Number,Ordv_ViceNumber,ord_AutoColor,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,欠款,拍摄名称,设计状态,看版状态,看版师,看版师满意度,看版时间,安排人,安排时间,客服人员,沟通时间,沟通状态,沟通备注";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0013.ToString().Trim();
- this.dgvData.dgvFixedHideColumn = "Ord_Type,Ord_Number,ord_AutoColor,Ordv_ViceNumber" + StrFixedHideColumn;
- this.dgvData.dgvGuidName = StrGuidName;
- this.dgvData.dgvUserEmployeeID = this.StrUserID;
- this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,欠款";
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
- this.dgvData.dictShowColumName = dictColumns;
- LYFZ.ComponentLibrary.DataGridOrderView.GetData_CameraControlBookLookDesign(this.dgvData, dictColumns, this.GetWhereStr(), this.StrSortField);//"Ordv_ReservationLookDesignTime,Ord_Number,Ordv_DigitalNumber");
- }
- else if (this.rdoTotakePiece.Checked)
- {
- this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Type,Ord_Number,Ordv_ViceNumber,ord_AutoColor,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,欠款,拍摄名称,商品名称,取件时间,取件人,取件状态,完成状态,安排人,安排时间,客服人员,沟通时间,沟通状态,沟通备注";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0014.ToString().Trim();
- this.dgvData.dgvFixedHideColumn = "Ord_Type,Ord_Number,ord_AutoColor,Ordv_ViceNumber" + StrFixedHideColumn;
- this.dgvData.dgvGuidName = StrGuidName;
- this.dgvData.dgvUserEmployeeID = this.StrUserID;
- this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,欠款";
- this.dgvData.StrSecondStageNull = "拍摄名称";
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
- this.dgvData.dictShowColumName = dictColumns;
- LYFZ.ComponentLibrary.DataGridOrderView.GetData_CameraControlBookTotakePiece(this.dgvData, dictColumns, this.GetWhereStr(), this.StrSortField);//"OPlist_ReservationTakeTime,Ord_Number,Ordv_DigitalNumber");
-
-
- }
- else if (this.rdoService.Checked)
- {
- this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Type,Ord_Number,Ordv_ViceNumber,ord_AutoColor,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,欠款,拍摄名称,服务内容,服务状态,服务日期,服务人员1,服务人员1满意度,服务人员2,服务人员2满意度,安排人,安排时间,服务备注,客服人员,沟通时间,沟通状态,沟通备注";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0015.ToString().Trim();
- this.dgvData.dgvFixedHideColumn = "Ord_Type,Ord_Number,ord_AutoColor,Ordv_ViceNumber" + StrFixedHideColumn;
- this.dgvData.dgvGuidName = StrGuidName;
- this.dgvData.dgvUserEmployeeID = this.StrUserID;
- this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,欠款";
- this.dgvData.StrSecondStageNull = "拍摄名称";
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
- this.dgvData.dictShowColumName = dictColumns;
- LYFZ.ComponentLibrary.DataGridOrderView.GetData_CameraControlBookService(this.dgvData, dictColumns, this.GetWhereStr(), this.StrSortField);//"Ws_WeddingDate,Ord_Number,Ords_DigitalNumber");
- }
- else if (this.rdoSelectDress.Checked)
- {
- this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Type,Ord_Number,Ordv_ViceNumber,ord_AutoColor,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期,拍摄名称,服装套数,选礼服状态,预约选礼服师,预约选礼服时间,确认选礼服师,确认选礼服时间,礼服师满意度,安排人,安排时间,客服人员,沟通时间,沟通状态,沟通备注";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0016.ToString().Trim();
- this.dgvData.dgvFixedHideColumn = "Ord_Type,Ord_Number,ord_AutoColor,Ordv_ViceNumber" + StrFixedHideColumn;
- this.dgvData.dgvGuidName = StrGuidName;
- this.dgvData.dgvUserEmployeeID = this.StrUserID;
- this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,婚期";
- this.dgvData.StrSecondStageNull = "拍摄名称";
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
- this.dgvData.dictShowColumName = dictColumns;
- LYFZ.ComponentLibrary.DataGridOrderView.GetData_CameraControlBookSelectDress(this.dgvData, dictColumns, this.GetWhereStr(), this.StrSortField);//"Ordv_ReservationClothingTime,Ord_Number,Ords_DigitalNumber");
- }
- else if (this.rdoHospitalClient.Checked)
- {
- this.dgvData.dgvCurrentColumnOriginalSet = "ID,Ord_Number,ord_AutoColor,订单号,客户姓名,客户电话,宝贝名称,上门时间,上门状态,车辆,上门人员1,上门人员2,上门人员3,上门人员4,派单备注,客服人员,录入时间,沟通备注";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0043.ToString().Trim();
- this.dgvData.dgvFixedHideColumn = "ID,ord_AutoColor,Ord_Number";
- this.dgvData.dgvGuidName = StrGuidName;
- this.dgvData.dgvUserEmployeeID = this.StrUserID;
- this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户电话,宝贝名称";
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
- this.dgvData.dictShowColumName = dictColumns;
- LYFZ.ComponentLibrary.DataGridOrderView.GetData_CameraControlBookUpDoorSendSingle(this.dgvData, dictColumns, this.GetWhereStr(), this.StrSortField);//"Hdr_DoorTime,Ord_Number");
- }
- }
- this.StatisticQuantity();
- this.dgvData.ClearSelection();
- if (!this.dgvData.Visible)
- {
- this.tblPanel.Visible = false;
- this.dgvData.Visible = true;
- }
- this.panelEx1.Visible = true;
-
- Dictionary<string, int> dicList = GetDataRowByChangeTime(dgvData);
- foreach (DataGridViewRow row in dgvData.Rows)
- {
- if (!this.rdoHospitalClient.Checked)
- {
- if (row.Cells["ord_AutoColor"].Value!=null&&!string.IsNullOrEmpty(row.Cells["ord_AutoColor"].Value.ToString()))
- {
- dynamic dyColor = JsonConvert.DeserializeObject(row.Cells["ord_AutoColor"].Value.ToString());
- row.DefaultCellStyle.BackColor = Color.FromArgb(Convert.ToInt32(dyColor.A), Convert.ToInt32(dyColor.R), Convert.ToInt32(dyColor.G), Convert.ToInt32(dyColor.B));
- row.Tag = dyColor;
- }
- else
- {
- string viceNumber = row.Cells["Ordv_ViceNumber"].Value.ToString();
- if (dicList.ContainsKey(viceNumber))
- {
- if (dicList[viceNumber] > 2)
- {
- row.DefaultCellStyle.BackColor = Color.YellowGreen;
- }
- }
- }
- }
- }
- this.Refresh();
- this.dgvData.Refresh();
- }
- Dictionary<string, int> GetDataRowByChangeTime(DataGridViewEc dgvData)
- {
- LYFZ.BLL.BLL_ErpOrderWorkAnPaiRecord recordBll = new BLL.BLL_ErpOrderWorkAnPaiRecord();
- List<string> dgvNumberList = new List<string>();
- Dictionary<string, int> dicList = new Dictionary<string, int>();
- if (!this.rdoHospitalClient.Checked)
- {
- foreach (DataGridViewRow item in dgvData.Rows)
- {
- string viceNumber = item.Cells["Ordv_ViceNumber"].Value.ToString();
- if (dgvNumberList.IndexOf(viceNumber) == -1)
- {
- dgvNumberList.Add(viceNumber);
- }
- }
- dicList = recordBll.GetCustomerChangeTimeControl(dgvNumberList, strReservationTimeName);
- }
- return dicList;
- }
- /// <summary>
- /// 统计订单分类数量
- /// </summary>
- void StatisticQuantity()
- {
- Hashtable htDataA = new Hashtable();
- Hashtable htDataB = new Hashtable();
- Hashtable htDataC = new Hashtable();
- Hashtable htDataD = new Hashtable();
- Hashtable htDataE = new Hashtable();
- Hashtable htDataO = new Hashtable();
- for (int i = 0; i < this.dgvData.Rows.Count; i++)
- {
- if (this.rdoHospitalClient.Checked)
- { htDataO[this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim()] = this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim(); }
- else
- {
- switch ((LYFZ.EnumPublic.OrderType)Enum.Parse(typeof(LYFZ.EnumPublic.OrderType), this.dgvData.Rows[i].Cells["Ord_Type"].Value.ToString()))
- {
- case EnumPublic.OrderType.婚纱订单:
- htDataA[this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim()] = this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim();
- break;
- case EnumPublic.OrderType.儿童订单:
- htDataB[this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim()] = this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim();
- break;
- case EnumPublic.OrderType.写真订单:
- htDataC[this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim()] = this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim();
- break;
- case EnumPublic.OrderType.婚庆订单:
- htDataD[this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim()] = this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim();
- break;
- case EnumPublic.OrderType.服务订单:
- htDataE[this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim()] = this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString().Trim();
- break;
- }
- }
- }
- if (this.rdoHospitalClient.Checked)
- { this.txtOrderQuantity.Text = " 订单统计(订单数:" + htDataO.Count + ")"; }
- else
- { this.txtOrderQuantity.Text = " 订单统计(婚纱单:" + htDataA.Count + " 儿童单:" + htDataB.Count + " 写真单:" + htDataC.Count + " 婚庆单:" + htDataD.Count + " 服务单:" + htDataE.Count + " 共" + (htDataA.Count + htDataB.Count + htDataC.Count + htDataD.Count + htDataE.Count) + "个订单)"; }
- }
- /// <summary>
- /// 返回要操作的条件
- /// </summary>
- /// <returns></returns>
- string GetWhereStr()
- {
- DateTime dttime = Convert.ToDateTime(this.nudYears.Value.ToString().Trim() + "-" + this.nudMonth.Value.ToString().Trim() + "-" + this.nudDate.Value.ToString().Trim());
- string StrWhere = PublicCodeClasses.GetGroupQueryWhere(this.cmbtreevStoreName, "OrdDividedShop");
- int IntAddDay = 1;
- if (this.chkNearlyOneWeek.Checked)
- { IntAddDay = 8; }
- else if (this.chkNearlyHalfMonth.Checked)
- { IntAddDay = 16; }
- //拍照客人
- if (this.rdoPhotographed.Checked)
- {
- StrWhere = StrWhere.Replace("OrdDividedShop", "Ordpg_ReservationPhotographyDividedShop");
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Ordpg_ReservationPhotographyTime", dttime.ToString(), dttime.ToString(), DateAddDays: IntAddDay);
- }
- //选片客人
- else if (this.rdoFilmSelection.Checked)
- {
- StrWhere = StrWhere.Replace("OrdDividedShop", "Ordv_ReservationFilmSelectionDividedShop");
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Ordv_ReservationFilmSelectionTime", dttime.ToString(), dttime.ToString(), DateAddDays: IntAddDay);
- }
- //看版客人
- else if (this.rdoLookDesign.Checked)
- {
- StrWhere = StrWhere.Replace("OrdDividedShop", "Ordv_ReservationLookDesignDividedShop");
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Ordv_ReservationLookDesignTime", dttime.ToString(), dttime.ToString(), DateAddDays: IntAddDay);
- }
- //取件客人
- else if (this.rdoTotakePiece.Checked)
- {
- StrWhere = StrWhere.Replace("OrdDividedShop", "OPlist_ReservationTakeDividedShop");
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("OPlist_ReservationTakeTime", dttime.ToString(), dttime.ToString(), DateAddDays: IntAddDay);
- }
- //服务客人
- else if (this.rdoService.Checked)
- {
- StrWhere = StrWhere.Replace("OrdDividedShop", "Ws_ReservationServiceDividedShop");
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Ws_WeddingDate", dttime.ToString(), dttime.ToString(), DateAddDays: IntAddDay);
- }
- //选礼服客人
- else if (this.rdoSelectDress.Checked)
- {
- StrWhere = StrWhere.Replace("OrdDividedShop", "Ordv_ReservationClothingDividedShop");
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Ordv_ReservationClothingTime", dttime.ToString(), dttime.ToString(), DateAddDays: IntAddDay);
- }
- else if (this.rdoHospitalClient.Checked)
- {
- StrWhere = StrWhere.Replace("OrdDividedShop", "Hdr_DividedShop");
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Hdr_DoorTime", dttime.ToString(), dttime.ToString(), DateAddDays: IntAddDay);
- }
- if (!this.rdoHospitalClient.Checked)
- { StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, chkWeddingCelebration: this.chkWeddingCelebration); }
- return StrWhere;
- }
- #endregion
- //private void InitializeComponent()
- //{
- // System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainFrameFormMain));
- // this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
- // this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
- // this.panelEx3.SuspendLayout();
- // ((System.ComponentModel.ISupportInitialize)(this.nudDate)).BeginInit();
- // ((System.ComponentModel.ISupportInitialize)(this.nudYears)).BeginInit();
- // ((System.ComponentModel.ISupportInitialize)(this.nudMonth)).BeginInit();
- // this.panelEx8.SuspendLayout();
- // this.panelEx1.SuspendLayout();
- // this.plExMainContainer.SuspendLayout();
- // this.plFormMainContent.SuspendLayout();
- // this.SuspendLayout();
- // //
- // // txtOrderQuantity
- // //
- // this.txtOrderQuantity.Lines = new string[0];
- // this.txtOrderQuantity.Size = new System.Drawing.Size(1286, 25);
- // //
- // // panelEx8
- // //
- // this.panelEx8.Location = new System.Drawing.Point(1286, 1);
- // //
- // // panelEx1
- // //
- // this.panelEx1.Size = new System.Drawing.Size(1469, 27);
- // //
- // // btn_ColorSetting
- // //
- // this.btn_ColorSetting.BackImg = ((System.Drawing.Bitmap)(resources.GetObject("btn_ColorSetting.BackImg")));
- // //
- // // btnAppFormExit
- // //
- // this.btnAppFormExit.BackImg = ((System.Drawing.Bitmap)(resources.GetObject("btnAppFormExit.BackImg")));
- // //
- // // btnAppFormMinimize
- // //
- // this.btnAppFormMinimize.BackImg = ((System.Drawing.Bitmap)(resources.GetObject("btnAppFormMinimize.BackImg")));
- // //
- // // toolStripMenuItem2
- // //
- // this.toolStripMenuItem2.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- // this.toolStripMenuItem3});
- // this.toolStripMenuItem2.Name = "toolStripMenuItem2";
- // this.toolStripMenuItem2.Size = new System.Drawing.Size(152, 22);
- // this.toolStripMenuItem2.Text = "1";
- // //
- // // toolStripMenuItem3
- // //
- // this.toolStripMenuItem3.Name = "toolStripMenuItem3";
- // this.toolStripMenuItem3.Size = new System.Drawing.Size(152, 22);
- // this.toolStripMenuItem3.Text = "2";
- // //
- // // MainFrameFormMain
- // //
- // this.BottomBgImage = ((System.Drawing.Bitmap)(resources.GetObject("$this.BottomBgImage")));
- // this.ClientSize = new System.Drawing.Size(1485, 610);
- // this.CustomBorderStyles.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(109)))), ((int)(((byte)(139)))));
- // this.Name = "MainFrameFormMain";
- // this.TitleBgImage = ((System.Drawing.Bitmap)(resources.GetObject("$this.TitleBgImage")));
- // this.Controls.SetChildIndex(this.btnAppFormMaximize, 0);
- // this.Controls.SetChildIndex(this.btnAppFormExit, 0);
- // this.Controls.SetChildIndex(this.btnAppFormMinimize, 0);
- // this.Controls.SetChildIndex(this.btnAppFormMenu, 0);
- // this.Controls.SetChildIndex(this.btnAppFormSkin, 0);
- // this.Controls.SetChildIndex(this.plFormMainContent, 0);
- // this.panelEx3.ResumeLayout(false);
- // ((System.ComponentModel.ISupportInitialize)(this.nudDate)).EndInit();
- // ((System.ComponentModel.ISupportInitialize)(this.nudYears)).EndInit();
- // ((System.ComponentModel.ISupportInitialize)(this.nudMonth)).EndInit();
- // this.panelEx8.ResumeLayout(false);
- // this.panelEx8.PerformLayout();
- // this.panelEx1.ResumeLayout(false);
- // this.plExMainContainer.ResumeLayout(false);
- // this.plFormMainContent.ResumeLayout(false);
- // this.ResumeLayout(false);
- //}
- }
- }
|