FrmLabMecDataCJAuditMJ.cs 359 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Format;
  3. using Core.Mes.Client.Comm.Server;
  4. using Core.Mes.Client.Comm.Tool;
  5. using CoreFS.CA06;
  6. using Infragistics.Win;
  7. using Infragistics.Win.UltraWinGrid;
  8. using System;
  9. using System.Collections;
  10. using System.Collections.Generic;
  11. using System.ComponentModel;
  12. using System.Data;
  13. using System.Drawing;
  14. using System.IO;
  15. using System.Linq;
  16. using System.Net;
  17. using System.Text;
  18. using System.Windows.Forms;
  19. namespace Core.StlMes.Client.Lims.Data.PipeAndOutdec
  20. {
  21. public partial class FrmLabMecDataCJAuditMJ : FrmBase
  22. {
  23. public FrmLabMecDataCJAuditMJ()
  24. {
  25. InitializeComponent();
  26. }
  27. private string[] arrId;//数据权限
  28. private string[] plineCodes = { };
  29. private void FrmLabMecDataCJAuditMJ_Load(object sender, EventArgs e)
  30. {
  31. //arrId = new string[] { "002001007009", "002023003002" };//力学项目
  32. arrId = this.ValidDataPurviewIds;//力学项目
  33. plineCodes = comm.GetPlineCode(ValidDataPurviewIds, ob);
  34. EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid1.DisplayLayout.Bands[0]);
  35. EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid2.DisplayLayout.Bands[0]);
  36. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid3.DisplayLayout.Bands[0]);
  37. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid4.DisplayLayout.Bands[0]);
  38. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid5.DisplayLayout.Bands[0]);
  39. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid6.DisplayLayout.Bands[0]);
  40. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid7.DisplayLayout.Bands[0]);
  41. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid8.DisplayLayout.Bands[0]);
  42. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid9.DisplayLayout.Bands[0]);
  43. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid10.DisplayLayout.Bands[0]);
  44. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid11.DisplayLayout.Bands[0]);
  45. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid12.DisplayLayout.Bands[0]);
  46. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid13.DisplayLayout.Bands[0]);
  47. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid53.DisplayLayout.Bands[0]);
  48. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid58.DisplayLayout.Bands[0]);
  49. EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid14.DisplayLayout.Bands[0]);
  50. EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid15.DisplayLayout.Bands[0]);
  51. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid16.DisplayLayout.Bands[0]);
  52. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid17.DisplayLayout.Bands[0]);
  53. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid18.DisplayLayout.Bands[0]);
  54. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid19.DisplayLayout.Bands[0]);
  55. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid20.DisplayLayout.Bands[0]);
  56. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid21.DisplayLayout.Bands[0]);
  57. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid22.DisplayLayout.Bands[0]);
  58. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid23.DisplayLayout.Bands[0]);
  59. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid24.DisplayLayout.Bands[0]);
  60. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid25.DisplayLayout.Bands[0]);
  61. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid26.DisplayLayout.Bands[0]);
  62. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid55.DisplayLayout.Bands[0]);
  63. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid59.DisplayLayout.Bands[0]);
  64. EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid27.DisplayLayout.Bands[0]);
  65. //EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid27.DisplayLayout.Bands[1]);
  66. EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid28.DisplayLayout.Bands[0]);
  67. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid29.DisplayLayout.Bands[0]);
  68. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid30.DisplayLayout.Bands[0]);
  69. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid31.DisplayLayout.Bands[0]);
  70. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid32.DisplayLayout.Bands[0]);
  71. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid33.DisplayLayout.Bands[0]);
  72. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid34.DisplayLayout.Bands[0]);
  73. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid35.DisplayLayout.Bands[0]);
  74. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid36.DisplayLayout.Bands[0]);
  75. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid37.DisplayLayout.Bands[0]);
  76. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid38.DisplayLayout.Bands[0]);
  77. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid39.DisplayLayout.Bands[0]);
  78. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid56.DisplayLayout.Bands[0]);
  79. EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid40.DisplayLayout.Bands[0]);
  80. //EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid40.DisplayLayout.Bands[1]);
  81. EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid41.DisplayLayout.Bands[0]);
  82. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid60.DisplayLayout.Bands[0]);
  83. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid42.DisplayLayout.Bands[0]);
  84. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid43.DisplayLayout.Bands[0]);
  85. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid44.DisplayLayout.Bands[0]);
  86. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid45.DisplayLayout.Bands[0]);
  87. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid46.DisplayLayout.Bands[0]);
  88. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid47.DisplayLayout.Bands[0]);
  89. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid48.DisplayLayout.Bands[0]);
  90. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid49.DisplayLayout.Bands[0]);
  91. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid50.DisplayLayout.Bands[0]);
  92. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid51.DisplayLayout.Bands[0]);
  93. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid52.DisplayLayout.Bands[0]);
  94. EntityHelper.ShowGridCaption<PipeCheckconsignDetailEntity>(ultraGrid54.DisplayLayout.Bands[0]);
  95. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid57.DisplayLayout.Bands[0]);
  96. EntityHelper.ShowGridCaption<PipeCheckconsignPhydetailEntity>(ultraGrid61.DisplayLayout.Bands[0]);
  97. DateTime now = DateTime.Now;
  98. DateTime dt1 = new DateTime(now.Year, now.Month, 1);//当月第一天
  99. DateTime dt2 = dt1.AddMonths(1).AddDays(-1);//当月最后一天
  100. this.RegStartTime.Value = DateTime.Parse(dt1.ToString("yyyy-MM-dd") + " 00:00:00");
  101. this.RegEndTime.Value = DateTime.Parse(dt2.ToString("yyyy-MM-dd") + " 23:59:59");
  102. //initCheckEqiupment();
  103. string lsRecord = "";//拉伸试验记录
  104. DataTable dt = null;
  105. if (this.UserInfo.GetDeptid().Equals("002001007009"))
  106. {
  107. dt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100118" }, this.ob);
  108. }
  109. else
  110. {
  111. dt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100140" }, this.ob);
  112. }
  113. if (dt != null && dt.Rows.Count > 0)
  114. {
  115. lsRecord = dt.Rows[0]["BASENAME"].ToString();
  116. }
  117. this.ultraTabControl3.Tabs[0].Text = "拉伸试验记录(" + lsRecord + ")";
  118. string cjRecord = "";//冲击试验记录
  119. DataTable cjdt = null;
  120. if (this.UserInfo.GetDeptid().Equals("002001007009"))
  121. {
  122. cjdt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100119" }, this.ob);
  123. }
  124. else
  125. {
  126. cjdt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100141" }, this.ob);
  127. }
  128. if (cjdt != null && cjdt.Rows.Count > 0)
  129. {
  130. cjRecord = cjdt.Rows[0]["BASENAME"].ToString();
  131. }
  132. this.ultraTabControl3.Tabs[1].Text = "冲击试验记录(" + cjRecord + ")";
  133. string ydRecord = "";//硬度试验记录
  134. DataTable yddt = null;
  135. if (this.UserInfo.GetDeptid().Equals("002001007009"))
  136. {
  137. yddt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100120" }, this.ob);
  138. }
  139. else
  140. {
  141. yddt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100142" }, this.ob);
  142. }
  143. if (yddt != null && yddt.Rows.Count > 0)
  144. {
  145. ydRecord = yddt.Rows[0]["BASENAME"].ToString();
  146. }
  147. this.ultraTabControl3.Tabs[2].Text = "硬度试验记录(" + ydRecord + ")";
  148. this.ultraTabControl3.Tabs[3].Text = "硬度试验记录(" + ydRecord + ")";
  149. this.ultraTabControl3.Tabs[4].Text = "硬度试验记录(" + ydRecord + ")";
  150. string jxRecord = "";//金相试验记录
  151. DataTable jxdt = null;
  152. if (this.UserInfo.GetDeptid().Equals("002001007009"))
  153. {
  154. jxdt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100121" }, this.ob);
  155. }
  156. else
  157. {
  158. jxdt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100143" }, this.ob);
  159. }
  160. if (jxdt != null && jxdt.Rows.Count > 0)
  161. {
  162. jxRecord = jxdt.Rows[0]["BASENAME"].ToString();
  163. }
  164. this.ultraTabControl3.Tabs[5].Text = "金相试验记录(" + jxRecord + ")";
  165. this.ultraTabControl3.Tabs[6].Text = "金相试验记录(" + jxRecord + ")";
  166. this.ultraTabControl3.Tabs[7].Text = "金相试验记录(" + jxRecord + ")";
  167. string gyRecord = "";//工艺试验记录
  168. DataTable gydt = null;
  169. if (this.UserInfo.GetDeptid().Equals("002001007009"))
  170. {
  171. gydt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100122" }, this.ob);
  172. }
  173. else
  174. {
  175. gydt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.queryRecord", new Object[] { "100144" }, this.ob);
  176. }
  177. if (gydt != null && gydt.Rows.Count > 0)
  178. {
  179. gyRecord = gydt.Rows[0]["BASENAME"].ToString();
  180. }
  181. this.ultraTabControl3.Tabs[8].Text = "工艺试验记录(" + gyRecord + ")";
  182. this.ultraTabControl3.Tabs[9].Text = "工艺试验记录(" + gyRecord + ")";
  183. this.ultraTabControl3.Tabs[10].Text = "工艺试验记录(" + gyRecord + ")";
  184. ClsBaseInfo.SetComboItemHeight(ultraComMethod);
  185. ClsBaseInfo.SetComboItemHeight(ultraComMethod1);
  186. }
  187. /// <summary>
  188. /// 重写基类方法
  189. /// </summary>
  190. /// <param name="sender"></param>
  191. /// <param name="ToolbarKey"></param>
  192. public override void ToolBar_Click(object sender, string ToolbarKey)
  193. {
  194. //查询、确认、退出
  195. switch (ToolbarKey)
  196. {
  197. case "Query":
  198. if (ultraTabControl1.SelectedTab.Index == 0)
  199. {
  200. QueryCheckConsignBaseDetail("2","0");
  201. }
  202. else if (ultraTabControl1.SelectedTab.Index == 1)
  203. {
  204. QueryCheckConsignBaseDetail("3","0");
  205. }
  206. else if (ultraTabControl1.SelectedTab.Index == 2)
  207. {
  208. QueryCheckConsignBaseDetailNoFrim("3");
  209. }
  210. else if (ultraTabControl1.SelectedTab.Index == 3)
  211. {
  212. QueryCheckConsignBaseDetailYesFrim("4");
  213. }
  214. break;
  215. case "Add":
  216. AddPhyData();
  217. break;
  218. case "Update":
  219. UpdateCheckConsignProcessResult();
  220. break;
  221. case "Delete":
  222. DeleteCheckConsignProcessResult();
  223. break;
  224. case "Audit":
  225. auditCheckConsignDetail();
  226. break;
  227. case "CancelAudit":
  228. cancelAuditCheckConsignDetail();
  229. break;
  230. case "PrintMechanics":
  231. printMechanics();
  232. break;
  233. case"PrintPicture":
  234. printPicture();
  235. break;
  236. case "UpFile":
  237. UpFile();
  238. break;
  239. case"UpPicture":
  240. upPicture();
  241. break;
  242. case "UpRecord":
  243. upRecord();
  244. break;
  245. case "PrintRecord":
  246. printRecord();
  247. break;
  248. case "QueryRecord":
  249. QueryCheckConsignBaseDetail("3", "1");
  250. break;
  251. case "Close":
  252. this.Close();
  253. break;
  254. }
  255. }
  256. private string fileName = "";//路径
  257. /// <summary>
  258. /// 上传图片
  259. /// </summary>
  260. private void upPicture()
  261. {
  262. this.ultraGrid40.UpdateData();
  263. UltraGridRow row = ultraGrid40.ActiveRow;
  264. string checkNo = row.Cells["CheckNo"].Value.ToString();
  265. string filePath = "Lims/pipe/caili2/" + checkNo + "/";
  266. if (checkNo.Equals(""))
  267. {
  268. MessageUtil.ShowTips("没有用户不允许上传!");
  269. return;
  270. }
  271. FormFileDown down = new FormFileDown(this.ob, filePath);
  272. down.CtrlFileDown1.FilePath = filePath;
  273. List<FileBean> list = new List<FileBean>();
  274. FileBean bean = new FileBean();
  275. OpenFileDialog file = new OpenFileDialog();
  276. file.Multiselect = false;
  277. DialogResult drStat;
  278. drStat = file.ShowDialog();
  279. if (drStat == DialogResult.OK)
  280. {
  281. fileName = file.FileName;
  282. FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
  283. //long s = fs.Length;
  284. //if (s / 1024.0 > 500)
  285. //{
  286. // MessageUtil.ShowTips("图片大于50KB,请重新上传!");
  287. // return;
  288. //}
  289. string filena = System.IO.Path.GetFileName(fileName);
  290. bean = new FileBean();
  291. bean.setFileName(filena);
  292. bean.setPathName(filePath);
  293. bean.setFile(FileHelper.FileToArray(fileName));
  294. list.Add(bean);
  295. bool isSuccess = Core.Mes.Client.Comm.Server.FileHelper.Upload(list);
  296. if (isSuccess)
  297. {
  298. CoreClientParam ccp = new CoreClientParam();
  299. ccp.ServerName = "com.steering.lims.data.pipe.FrmLabDateParm";
  300. ccp.MethodName = "updatePipeReport";
  301. ccp.ServerParams = new object[] { checkNo, "", "", "CAILI_PATH_FUJIAN", filePath };
  302. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  303. if (ccp.ReturnCode != -1)
  304. {
  305. if (ccp.ReturnInfo.Equals("上传成功!"))
  306. {
  307. MessageUtil.ShowTips(ccp.ReturnInfo);
  308. SelectFile(filePath);
  309. }
  310. else
  311. {
  312. MessageUtil.ShowTips(ccp.ReturnInfo);
  313. }
  314. }
  315. }
  316. else
  317. {
  318. MessageBox.Show("上传失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
  319. }
  320. //ultraGrid1.ActiveCell.Value = filena;
  321. //ultraGrid1.ActiveRow.Cells["SignaturePath"].Value = filePath + filena;
  322. }
  323. }
  324. /// <summary>
  325. /// 打印
  326. /// </summary>
  327. private void printMechanics()
  328. {
  329. this.ultraGrid40.UpdateData();
  330. IQueryable<UltraGridRow> checkMagRows = this.ultraGrid40.Rows.AsQueryable().Where(" CHK = 'True'");
  331. //if (checkMagRows.Count() == 0)
  332. //{
  333. // MessageUtil.ShowTips("请选择需要打印的信息");
  334. // return;
  335. //}
  336. //if (checkMagRows.Count() > 1)
  337. //{
  338. // MessageUtil.ShowTips("打印时只允许选择一个检验编号进行打印");
  339. // return;
  340. //}
  341. //if (this.cmbPrint.Text == "")
  342. //{
  343. // MessageUtil.ShowTips("请选择打印模板!");
  344. // return;
  345. //}
  346. string version = "";
  347. if (this.chkPrintK.Checked)
  348. {
  349. if (this.cmbPrintK.Text == "")
  350. {
  351. MessageUtil.ShowTips("请选择报告类型!");
  352. return;
  353. }
  354. else
  355. {
  356. version = this.cmbPrintK.Value.ToString();
  357. }
  358. }
  359. else
  360. {
  361. version = "MPA";
  362. }
  363. string checkNo = this.ultraGrid40.ActiveRow.Cells["CheckNo"].Text;
  364. string contractNo = this.ultraGrid40.ActiveRow.Cells["ContractNo"].Text;
  365. string strSUPPLY_UNIT = this.ultraGrid40.ActiveRow.Cells["SupplyUnit"].Text;
  366. DataTable ds = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.doQueryIsAudit", new object[] { checkNo,arrId }, ob);
  367. if(int.Parse(ds.Rows[0][0].ToString()) > 0)
  368. {
  369. MessageUtil.ShowTips("还有未审核试样组,不允许打印报告!");
  370. return;
  371. }
  372. string strurl = "";
  373. if (strSUPPLY_UNIT.Equals("江苏天淮钢管有限公司"))
  374. {
  375. strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeLXTH.cpt&bypagesize=false" + "&CHECK_NO=" + checkNo + "&version=" + version + "&ORDER_NO=" + contractNo;
  376. }
  377. else
  378. {
  379. strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeLX.cpt&bypagesize=false" + "&CHECK_NO=" + checkNo + "&version=" + version + "&ORDER_NO=" + contractNo;
  380. }
  381. //if (this.cmbPrint.Value.ToString2().Equals("0"))
  382. //{
  383. // strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeMetallographicPG.cpt&bypagesize=false" + "&CHECK_NO=" + checkNo;
  384. //}
  385. //else if (this.cmbPrint.Value.ToString2().Equals("1"))
  386. //{
  387. // strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeMetallographicZYG.cpt&bypagesize=false" + "&CHECK_NO=" + checkNo;
  388. //}
  389. //else if (this.cmbPrint.Value.ToString2().Equals("2"))
  390. //{
  391. // strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeHardness.cpt&bypagesize=false" + "&CHECK_NO=" + checkNo;
  392. //}
  393. FrmRepExcel fre = new FrmRepExcel(this.ob, strurl);
  394. fre.AutoSize = true;
  395. fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
  396. fre.WindowState = FormWindowState.Maximized;
  397. fre.Show();
  398. }
  399. /// <summary>
  400. /// 打印附件
  401. /// </summary>
  402. private void printPicture()
  403. {
  404. this.ultraGrid40.UpdateData();
  405. string checkNo = this.ultraGrid40.ActiveRow.Cells["CheckNo"].Text;
  406. string filePath = "Lims/pipe/caili2/" + checkNo + "/";
  407. DataTable ds = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.doQueryIsAudit", new object[] { checkNo, arrId }, ob);
  408. if (int.Parse(ds.Rows[0][0].ToString()) > 0)
  409. {
  410. MessageUtil.ShowTips("还有未审核试样组,不允许打印报告!");
  411. return;
  412. }
  413. string strurl = filePath;
  414. dlgOrderAskDown down = new dlgOrderAskDown(this.ob, filePath);
  415. down.ShowDialog();
  416. //FrmRepExcel fre = new FrmRepExcel(this.ob, strurl);
  417. //fre.AutoSize = true;
  418. //fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
  419. //fre.WindowState = FormWindowState.Maximized;
  420. //fre.Show();
  421. }
  422. /// <summary>
  423. /// 上传原始记录
  424. /// </summary>
  425. private void upRecord()
  426. {
  427. this.ultraGrid40.UpdateData();
  428. UltraGridRow row = ultraGrid40.ActiveRow;
  429. string checkNo = row.Cells["CheckNo"].Value.ToString();
  430. string filePath = "Lims/pipe/caili3/" + checkNo + "/";
  431. if (checkNo.Equals(""))
  432. {
  433. MessageUtil.ShowTips("没有用户不允许上传!");
  434. return;
  435. }
  436. FormFileDown down = new FormFileDown(this.ob, filePath);
  437. down.CtrlFileDown1.FilePath = filePath;
  438. List<FileBean> list = new List<FileBean>();
  439. FileBean bean = new FileBean();
  440. OpenFileDialog file = new OpenFileDialog();
  441. file.Multiselect = false;
  442. DialogResult drStat;
  443. drStat = file.ShowDialog();
  444. if (drStat == DialogResult.OK)
  445. {
  446. fileName = file.FileName;
  447. FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
  448. string filena = System.IO.Path.GetFileName(fileName);
  449. bean = new FileBean();
  450. bean.setFileName(filena);
  451. bean.setPathName(filePath);
  452. bean.setFile(FileHelper.FileToArray(fileName));
  453. list.Add(bean);
  454. bool isSuccess = Core.Mes.Client.Comm.Server.FileHelper.Upload(list);
  455. if (isSuccess)
  456. {
  457. CoreClientParam ccp = new CoreClientParam();
  458. ccp.ServerName = "com.steering.lims.data.pipe.FrmLabDateParm";
  459. ccp.MethodName = "updatePipeReport";
  460. ccp.ServerParams = new object[] { checkNo, "", "", "CAILI_PATH_RECORD", filePath };
  461. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  462. if (ccp.ReturnCode != -1)
  463. {
  464. if (ccp.ReturnInfo.Equals("上传成功!"))
  465. {
  466. MessageUtil.ShowTips(ccp.ReturnInfo);
  467. SelectFile(filePath);
  468. }
  469. else
  470. {
  471. MessageUtil.ShowTips(ccp.ReturnInfo);
  472. }
  473. }
  474. }
  475. else
  476. {
  477. MessageBox.Show("上传失败", "提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
  478. }
  479. }
  480. }
  481. /// <summary>
  482. /// 打印原始记录
  483. /// </summary>
  484. private void printRecord()
  485. {
  486. this.ultraGrid40.UpdateData();
  487. string checkNo = this.ultraGrid40.ActiveRow.Cells["CheckNo"].Text;
  488. string filePath = "Lims/pipe/caili3/" + checkNo + "/";
  489. DataTable ds = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.doQueryIsAudit", new object[] { checkNo, arrId }, ob);
  490. if (int.Parse(ds.Rows[0][0].ToString()) > 0)
  491. {
  492. MessageUtil.ShowTips("还有未审核试样组,不允许打印报告!");
  493. return;
  494. }
  495. string strurl = filePath;
  496. dlgOrderAskDown down = new dlgOrderAskDown(this.ob, filePath);
  497. down.ShowDialog();
  498. }
  499. //查询上传的PDF文件
  500. /// <summary>
  501. /// 查询上传的PDF文件
  502. /// </summary>
  503. private void SelectFile(string filePathNew)
  504. {
  505. dlgOrderAskDown down = new dlgOrderAskDown(this.ob, filePathNew);
  506. down.DeleteButton.Visible = false;
  507. down.ShowDialog();
  508. }
  509. //上传
  510. /// <summary>
  511. /// 上传
  512. /// </summary>
  513. private void UpFile()
  514. {
  515. this.ultraGrid40.UpdateData();
  516. IQueryable<UltraGridRow> checkMagRows = this.ultraGrid40.Rows.AsQueryable().Where(" CHK = 'True'");
  517. WebClient webClient = new WebClient();
  518. List<FileBean> listPdf = new List<FileBean>();
  519. string date = DateTime.Now.ToString("yyyyMMdd");
  520. string url = "";
  521. string filePathNew = ""; //报告目录
  522. string reportNo = ""; //报告编号
  523. string version = "";
  524. if (this.chkPrintK.Checked)
  525. {
  526. if (this.cmbPrintK.Text == "")
  527. {
  528. MessageUtil.ShowTips("请选择报告类型!");
  529. return;
  530. }
  531. else
  532. {
  533. version = this.cmbPrintK.Value.ToString();
  534. }
  535. }
  536. else
  537. {
  538. version = "MPA";
  539. }
  540. string checkNo = this.ultraGrid40.ActiveRow.Cells["CheckNo"].Text;
  541. string contractNo = this.ultraGrid40.ActiveRow.Cells["ContractNo"].Text;
  542. string strSUPPLY_UNIT = this.ultraGrid40.ActiveRow.Cells["SupplyUnit"].Text;
  543. DataTable ds = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.doQueryIsAudit", new object[] { checkNo, arrId }, ob);
  544. if (int.Parse(ds.Rows[0][0].ToString()) > 0)
  545. {
  546. MessageUtil.ShowTips("还有未审核试样组,不允许上传报告!");
  547. return;
  548. }
  549. string strurl = "";
  550. if (strSUPPLY_UNIT.Equals("江苏天淮钢管有限公司"))
  551. {
  552. strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeLXTH.cpt&format=pdf" + "&CHECK_NO=" + checkNo + "&version=" + version + "&ORDER_NO=" + contractNo;
  553. }
  554. else
  555. {
  556. strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeLX.cpt&format=pdf" + "&CHECK_NO=" + checkNo + "&version=" + version + "&ORDER_NO=" + contractNo;
  557. }
  558. reportNo = checkNo + "LX";
  559. //if (this.cmbPrint.Value.ToString2().Equals("0"))
  560. //{
  561. // strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeMetallographicPG.cpt&format=pdf" + "&CHECK_NO=" + checkNo;
  562. // reportNo = checkNo + "PG";
  563. //}
  564. //else if (this.cmbPrint.Value.ToString2().Equals("1"))
  565. //{
  566. // strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeMetallographicZYG.cpt&format=pdf" + "&CHECK_NO=" + checkNo;
  567. // reportNo = checkNo + "ZYG";
  568. //}
  569. //else if (this.cmbPrint.Value.ToString2().Equals("2"))
  570. //{
  571. // strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeHardness.cpt&format=pdf" + "&CHECK_NO=" + checkNo;
  572. // reportNo = checkNo + "Hardness";
  573. //}
  574. if (strurl == "")
  575. {
  576. MessageUtil.ShowTips("请先选择上传报告的模版!");
  577. return;
  578. }
  579. filePathNew = "Lims/pipe/caili/" + checkNo + "/";
  580. byte[] pdf = webClient.DownloadData(strurl);
  581. FileBean fileBean = new FileBean();
  582. fileBean.setFile(pdf);
  583. fileBean.setFileName(reportNo + ".pdf");
  584. fileBean.setPathName(filePathNew);
  585. listPdf.Add(fileBean);
  586. webClient.Dispose();
  587. bool a = FileHelper.Upload(listPdf);
  588. if (a)
  589. {
  590. CoreClientParam ccp = new CoreClientParam();
  591. ccp.ServerName = "com.steering.lims.data.pipe.FrmLabDateParm";
  592. ccp.MethodName = "updatePipeReport";
  593. ccp.ServerParams = new object[] { checkNo, "", "", "CAILI_PATH", filePathNew };
  594. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  595. if (ccp.ReturnCode != -1)
  596. {
  597. if (ccp.ReturnInfo.Equals("上传成功!"))
  598. {
  599. MessageUtil.ShowTips(ccp.ReturnInfo);
  600. SelectFile(filePathNew);
  601. }
  602. else
  603. {
  604. MessageUtil.ShowTips(ccp.ReturnInfo);
  605. }
  606. }
  607. }
  608. else
  609. {
  610. MessageUtil.ShowError("系统生成PDF失败,请稍后再试!");
  611. return;
  612. }
  613. }
  614. //上传
  615. /// <summary>
  616. /// 上传
  617. /// </summary>
  618. private bool UpFile(string checkNo, string contractNo)
  619. {
  620. WebClient webClient = new WebClient();
  621. List<FileBean> listPdf = new List<FileBean>();
  622. string date = DateTime.Now.ToString("yyyyMMdd");
  623. string filePathNew = ""; //报告目录
  624. string reportNo = ""; //报告编号
  625. string strurl = "";
  626. //DataTable ds = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.doQueryIsAudit", new object[] { checkNo, arrId }, ob);
  627. //if(int.Parse(ds.Rows[0][0].ToString()) >0)
  628. //{
  629. // return false;
  630. //}
  631. strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepLimsPipeLX.cpt&format=pdf" + "&CHECK_NO=" + checkNo + "&version=" + "MPA" + "&ORDER_NO=" + contractNo;
  632. reportNo = checkNo + "LX";
  633. filePathNew = "Lims/pipe/caili/" + checkNo + "/";
  634. byte[] pdf = webClient.DownloadData(strurl);
  635. FileBean fileBean = new FileBean();
  636. fileBean.setFile(pdf);
  637. fileBean.setFileName(reportNo + ".pdf");
  638. fileBean.setPathName(filePathNew);
  639. listPdf.Add(fileBean);
  640. webClient.Dispose();
  641. bool a = FileHelper.Upload(listPdf);
  642. if (a)
  643. {
  644. CoreClientParam ccp = new CoreClientParam();
  645. ccp.ServerName = "com.steering.lims.data.pipe.FrmLabDateParm";
  646. ccp.MethodName = "updatePipeReport";
  647. ccp.ServerParams = new object[] { checkNo, "", "", "CAILI_PATH", filePathNew };
  648. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  649. if (ccp.ReturnCode != -1)
  650. {
  651. if (ccp.ReturnInfo.Equals("上传成功!"))
  652. {
  653. return true;
  654. }
  655. else
  656. {
  657. MessageUtil.ShowTips(ccp.ReturnInfo);
  658. return false;
  659. }
  660. }
  661. return true;
  662. }
  663. else
  664. {
  665. MessageUtil.ShowError("系统生成PDF失败,请稍后再试!");
  666. return false;
  667. }
  668. }
  669. /// <summary>
  670. /// 审核
  671. /// </summary>
  672. private void auditCheckConsignDetail()
  673. {
  674. this.ultraGrid27.UpdateData();
  675. this.ultraGrid28.UpdateData();
  676. UltraGridRow uRow = this.ultraGrid27.ActiveRow;
  677. if (uRow == null) return;
  678. IQueryable<UltraGridRow> checkMagRows = this.ultraGrid28.Rows.AsQueryable().Where(a => a.GetValue("CHK") == "True");
  679. if (checkMagRows.Count() == 0)
  680. {
  681. return;
  682. }
  683. //if (cmbPrint.Text == "")
  684. //{
  685. // MessageUtil.ShowTips("请先选择上传报告的模版!");
  686. // return;
  687. //}
  688. foreach (UltraGridRow row in ultraGrid29.Rows)
  689. {
  690. if (row.Cells["SampleType"].Text.ToString().Equals("") || row.Cells["PhyDir"].Text.ToString().Equals(""))
  691. {
  692. MessageUtil.ShowTips("请先录入试验方向和试验尺寸!");
  693. return;
  694. }
  695. }
  696. ArrayList parmList = new ArrayList();
  697. foreach (UltraGridRow row in checkMagRows)
  698. {
  699. PipeCheckconsignDetailEntity pipeCheckDetialTity = (PipeCheckconsignDetailEntity)row.ListObject;
  700. pipeCheckDetialTity.AuditName = UserInfo.GetUserName();
  701. pipeCheckDetialTity.Flag = "4";
  702. string pipeDetailEntity = JSONFormat.Format(pipeCheckDetialTity);
  703. parmList.Add(pipeDetailEntity);
  704. }
  705. if (MessageUtil.ShowYesNoAndQuestion("是否确认审核?") == DialogResult.No)
  706. {
  707. return;
  708. }
  709. //if (!UpFile(uRow.Cells["CheckNo"].Text))
  710. //{
  711. // return;
  712. //}
  713. CoreClientParam ccp = new CoreClientParam();
  714. ccp.ServerName = "com.steering.lims.data.pipe.FrmDataCJBase";
  715. ccp.MethodName = "auditPhyDetial";
  716. ccp.ServerParams = new object[] { parmList,UserInfo.GetUserName() };
  717. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  718. if (ccp.ReturnCode != -1)
  719. {
  720. if (ccp.ReturnInfo.Equals("审核成功!"))
  721. {
  722. if (!UpFile(uRow.Cells["CheckNo"].Text, uRow.Cells["ContractNo"].Text))
  723. {
  724. MessageUtil.ShowTips("自动上传失败,请手动上传!");
  725. }
  726. QueryCheckConsignBaseDetailNoFrim("3");
  727. MessageUtil.ShowTips(ccp.ReturnInfo);
  728. }
  729. else
  730. {
  731. MessageUtil.ShowTips(ccp.ReturnInfo);
  732. }
  733. }
  734. }
  735. /// <summary>
  736. /// 取消审核
  737. /// </summary>
  738. private void cancelAuditCheckConsignDetail()
  739. {
  740. this.ultraGrid41.UpdateData();
  741. IQueryable<UltraGridRow> checkMagRows = this.ultraGrid41.Rows.AsQueryable().Where(" CHK = 'True'");
  742. if (checkMagRows.Count() == 0)
  743. {
  744. return;
  745. }
  746. ArrayList parmList = new ArrayList();
  747. foreach (UltraGridRow row in checkMagRows)
  748. {
  749. PipeCheckconsignDetailEntity pipeCheckDetialTity = (PipeCheckconsignDetailEntity)row.ListObject;
  750. string pipeDetailEntity = JSONFormat.Format(pipeCheckDetialTity);
  751. parmList.Add(pipeDetailEntity);
  752. }
  753. if (MessageUtil.ShowYesNoAndQuestion("是否取消审核?") == DialogResult.No)
  754. {
  755. return;
  756. }
  757. CoreClientParam ccp = new CoreClientParam();
  758. ccp.ServerName = "com.steering.lims.data.pipe.FrmDataCJBase";
  759. ccp.MethodName = "cancelAuditPhyDetial";
  760. ccp.ServerParams = new object[] { parmList };
  761. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  762. if (ccp.ReturnCode != -1)
  763. {
  764. if (ccp.ReturnInfo.Equals("取消审核成功!"))
  765. {
  766. QueryCheckConsignBaseDetailYesFrim("4");
  767. MessageUtil.ShowTips(ccp.ReturnInfo);
  768. }
  769. else
  770. {
  771. MessageUtil.ShowTips(ccp.ReturnInfo);
  772. }
  773. }
  774. }
  775. /// <summary>
  776. /// 删除检验结果
  777. /// </summary>
  778. private void DeleteCheckConsignProcessResult()
  779. {
  780. ultraGrid16.UpdateData();
  781. ultraGrid17.UpdateData();
  782. ultraGrid18.UpdateData();
  783. ultraGrid19.UpdateData();
  784. ultraGrid20.UpdateData();
  785. ultraGrid21.UpdateData();
  786. ultraGrid22.UpdateData();
  787. ultraGrid23.UpdateData();
  788. ultraGrid55.UpdateData();
  789. ultraGrid59.UpdateData();
  790. UltraGridRow uRow = this.ultraGrid15.ActiveRow;
  791. RowsCollection uRow1 = null;
  792. if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))
  793. {
  794. uRow1 = this.ultraGrid16.Rows;
  795. }
  796. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))
  797. {
  798. uRow1 = this.ultraGrid17.Rows;
  799. }
  800. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))
  801. {
  802. uRow1 = this.ultraGrid20.Rows;
  803. }
  804. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))
  805. {
  806. uRow1 = this.ultraGrid18.Rows;
  807. }
  808. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))
  809. {
  810. uRow1 = this.ultraGrid19.Rows;
  811. }
  812. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))
  813. {
  814. uRow1 = this.ultraGrid21.Rows;
  815. }
  816. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))
  817. {
  818. uRow1 = this.ultraGrid22.Rows;
  819. }
  820. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0016"))
  821. {
  822. uRow1 = this.ultraGrid23.Rows;
  823. }
  824. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0009"))
  825. {
  826. uRow1 = this.ultraGrid24.Rows;
  827. }
  828. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0027") || uRow.Cells["PhyCodeMax"].Value.Equals("C0038") || uRow.Cells["PhyCodeMax"].Value.Equals("C0082") || uRow.Cells["PhyCodeMax"].Value.Equals("C0083") || uRow.Cells["PhyCodeMax"].Value.Equals("C0098"))
  829. {
  830. uRow1 = this.ultraGrid25.Rows;
  831. }
  832. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0026") || uRow.Cells["PhyCodeMax"].Value.Equals("C0039") || uRow.Cells["PhyCodeMax"].Value.Equals("C0040") || uRow.Cells["PhyCodeMax"].Value.Equals("C0041"))
  833. {
  834. uRow1 = this.ultraGrid26.Rows;
  835. }
  836. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))
  837. {
  838. uRow1 = this.ultraGrid55.Rows;
  839. }
  840. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0066"))
  841. {
  842. uRow1 = this.ultraGrid59.Rows;
  843. }
  844. ArrayList parmList = new ArrayList();
  845. foreach (UltraGridRow row in uRow1)
  846. {
  847. PipeCheckconsignPhydetailEntity pipeCheckTity = (PipeCheckconsignPhydetailEntity)row.ListObject;
  848. pipeCheckTity.CheckNo = uRow.Cells["CheckNo"].Text;
  849. pipeCheckTity.SampleNo = uRow.Cells["SampleNo"].Text;
  850. pipeCheckTity.PhyCodeMin = uRow.Cells["PhyCodeMin"].Text;//试样组
  851. pipeCheckTity.PhyNameMin = uRow.Cells["PhyNameMin"].Text;
  852. string phyEntity = JSONFormat.Format(pipeCheckTity);
  853. parmList.Add(phyEntity);
  854. }
  855. PipeCheckconsignDetailEntity pipeDetailTity = (PipeCheckconsignDetailEntity)uRow.ListObject;
  856. string pipeDetailEntity = JSONFormat.Format(pipeDetailTity);
  857. CoreClientParam ccp = new CoreClientParam();
  858. ccp.ServerName = "com.steering.lims.data.pipe.FrmDataCJBase";
  859. ccp.MethodName = "deletePhyDetial";
  860. ccp.ServerParams = new object[] { pipeDetailEntity, parmList };
  861. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  862. if (ccp.ReturnCode != -1)
  863. {
  864. if (ccp.ReturnInfo.Equals("删除成功!"))
  865. {
  866. QueryCheckConsignBaseDetail("3", "0");
  867. MessageUtil.ShowTips(ccp.ReturnInfo);
  868. }
  869. else
  870. {
  871. MessageUtil.ShowTips(ccp.ReturnInfo);
  872. }
  873. }
  874. }
  875. /// <summary>
  876. /// 修改检验结果
  877. /// </summary>
  878. private void UpdateCheckConsignProcessResult()
  879. {
  880. ultraGrid16.UpdateData();
  881. ultraGrid17.UpdateData();
  882. ultraGrid18.UpdateData();
  883. ultraGrid19.UpdateData();
  884. ultraGrid20.UpdateData();
  885. ultraGrid21.UpdateData();
  886. ultraGrid22.UpdateData();
  887. ultraGrid23.UpdateData();
  888. ultraGrid55.UpdateData();
  889. ultraGrid59.UpdateData();
  890. UltraGridRow uRow = this.ultraGrid15.ActiveRow;
  891. RowsCollection uRow1 = null;
  892. if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))
  893. {
  894. uRow1 = this.ultraGrid16.Rows;
  895. }
  896. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))
  897. {
  898. uRow1 = this.ultraGrid17.Rows;
  899. }
  900. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))
  901. {
  902. uRow1 = this.ultraGrid20.Rows;
  903. }
  904. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))
  905. {
  906. uRow1 = this.ultraGrid18.Rows;
  907. }
  908. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))
  909. {
  910. uRow1 = this.ultraGrid19.Rows;
  911. }
  912. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))
  913. {
  914. uRow1 = this.ultraGrid21.Rows;
  915. }
  916. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))
  917. {
  918. uRow1 = this.ultraGrid22.Rows;
  919. }
  920. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0016"))
  921. {
  922. uRow1 = this.ultraGrid23.Rows;
  923. }
  924. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0009"))
  925. {
  926. uRow1 = this.ultraGrid24.Rows;
  927. }
  928. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0027") || uRow.Cells["PhyCodeMax"].Value.Equals("C0038") || uRow.Cells["PhyCodeMax"].Value.Equals("C0082") || uRow.Cells["PhyCodeMax"].Value.Equals("C0083") || uRow.Cells["PhyCodeMax"].Value.Equals("C0098"))
  929. {
  930. uRow1 = this.ultraGrid25.Rows;
  931. }
  932. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0026") || uRow.Cells["PhyCodeMax"].Value.Equals("C0039") || uRow.Cells["PhyCodeMax"].Value.Equals("C0040") || uRow.Cells["PhyCodeMax"].Value.Equals("C0041"))
  933. {
  934. uRow1 = this.ultraGrid26.Rows;
  935. }
  936. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))
  937. {
  938. uRow1 = this.ultraGrid55.Rows;
  939. }
  940. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0066"))
  941. {
  942. uRow1 = this.ultraGrid59.Rows;
  943. }
  944. PipeCheckconsignDetailEntity pipeDetailTity = new PipeCheckconsignDetailEntity();
  945. ArrayList parmList = new ArrayList();
  946. foreach (UltraGridRow row in uRow1)
  947. {
  948. PipeCheckconsignPhydetailEntity pipeCheckTity = (PipeCheckconsignPhydetailEntity)row.ListObject;
  949. pipeCheckTity.Value1 = pipeCheckTity.Value1.Replace('<', '-');
  950. pipeCheckTity.Value2 = pipeCheckTity.Value2.Replace('<', '-');
  951. pipeCheckTity.Value3 = pipeCheckTity.Value3.Replace('<', '-');
  952. pipeCheckTity.Value4 = pipeCheckTity.Value4.Replace('<', '-');
  953. pipeCheckTity.AverageValue = pipeCheckTity.AverageValue.Replace('<', '-');
  954. pipeCheckTity.CheckNo = uRow.Cells["CheckNo"].Text;
  955. pipeCheckTity.SampleNo = uRow.Cells["SampleNo"].Text;
  956. pipeCheckTity.PhyCodeMin = uRow.Cells["PhyCodeMin"].Text;//试样组
  957. pipeCheckTity.PhyNameMin = uRow.Cells["PhyNameMin"].Text;
  958. pipeCheckTity.PhyNameDir = row.Cells["PhyCodeDir"].Text.Trim();
  959. if (uRow.Cells["PhyCodeMax"].Value.Equals("C0009"))//压扁试验
  960. {
  961. pipeCheckTity.Value8 = this.ultraTxtYbSpac.Text.Trim();
  962. pipeCheckTity.IsGood = this.ultraTxtYbQualfiled.Value.ToString2();
  963. pipeCheckTity.IsDefect = this.ultraTxtYbDefect.Value.ToString2();
  964. pipeCheckTity.Remark = this.ultraTxtYbMemo.Text.Trim();
  965. }
  966. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0027") || uRow.Cells["PhyCodeMax"].Value.Equals("C0038") || uRow.Cells["PhyCodeMax"].Value.Equals("C0082") || uRow.Cells["PhyCodeMax"].Value.Equals("C0083") || uRow.Cells["PhyCodeMax"].Value.Equals("C0098"))//弯曲试验
  967. {
  968. pipeCheckTity.Value9 = this.ultraTxtWqDiameter.Text.Trim();
  969. pipeCheckTity.Value10 = this.ultraTxtWqAngle.Text.Trim();
  970. pipeCheckTity.IsGood = this.ultraTxtWqQualfiled.Value.ToString2();
  971. pipeCheckTity.Remark = this.ultraTxtWqMemo.Text.Trim();
  972. }
  973. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0026") || uRow.Cells["PhyCodeMax"].Value.Equals("C0039") || uRow.Cells["PhyCodeMax"].Value.Equals("C0040") || uRow.Cells["PhyCodeMax"].Value.Equals("C0041"))//扩口试验
  974. {
  975. pipeCheckTity.Value11 = this.ultraTxtKkTop.Text.Trim();
  976. pipeCheckTity.Value12 = this.ultraTxtKkFlarRate.Text.Trim();
  977. pipeCheckTity.IsGood = this.ultraTxtKkGood.Value.ToString2();
  978. pipeCheckTity.Remark = this.ultraTxtKkMemo.Text.Trim();
  979. }
  980. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0073") || uRow.Cells["PhyCodeMax"].Value.Equals("C0163") || uRow.Cells["PhyCodeMax"].Value.Equals("C0166") || uRow.Cells["PhyCodeMax"].Value.Equals("C0167"))//落锤试验
  981. {
  982. pipeCheckTity.SampleJb = this.ultraSAMPLE_JB.Text.Trim();
  983. pipeCheckTity.NotchShape = this.ultraNOTCH_SHAPE.Text.Trim();
  984. pipeCheckTity.NotchType = this.ultraNOTCH_TYPE.Text.Trim();
  985. }
  986. string phyEntity = JSONFormat.Format(pipeCheckTity);
  987. parmList.Add(phyEntity);
  988. }
  989. pipeDetailTity.CheckNo = uRow.Cells["CheckNo"].Text;
  990. pipeDetailTity.SampleNo = uRow.Cells["SampleNo"].Text;
  991. pipeDetailTity.PhyCodeMin = uRow.Cells["PhyCodeMin"].Text;//检验大项
  992. pipeDetailTity.PhyCodeMax = uRow.Cells["PhyCodeMax"].Text;//试样组
  993. pipeDetailTity.CheckTemp = this.txtCHECK_TEMP1.Text.Trim();
  994. pipeDetailTity.DeviceNo = this.ultraDEVICE_NAME1.Value.ToString2();
  995. pipeDetailTity.DeviceName = this.ultraDEVICE_NAME1.Text.Trim();
  996. pipeDetailTity.FormualNo = this.ultraComMethod1.Value.ToString2();
  997. pipeDetailTity.FormualName = this.ultraComMethod1.Text.Trim();
  998. pipeDetailTity.CheckName = this.UserInfo.GetUserName();
  999. pipeDetailTity.CheckShift = this.UserInfo.GetUserOrder();
  1000. pipeDetailTity.CheckClass = this.UserInfo.GetUserGroup();
  1001. pipeDetailTity.Remark = this.txtREMARK1.Text;
  1002. pipeDetailTity.HardnessType = this.ultraComFormual1.Text;
  1003. pipeDetailTity.StdSteelNo = this.txtStdSteelNo1.Text.Trim();
  1004. pipeDetailTity.StdSteelType = this.cmbStdSteelType1.Text;
  1005. pipeDetailTity.StdSteelValue = txtStdSteelValue1.Text.Trim();
  1006. pipeDetailTity.ActualValue = txtActualValue1.Text.Trim();
  1007. string pipeDetailEntity = JSONFormat.Format(pipeDetailTity);
  1008. CoreClientParam ccp = new CoreClientParam();
  1009. ccp.ServerName = "com.steering.lims.data.pipe.FrmDataCJBase";
  1010. ccp.MethodName = "updatePhyDetial";
  1011. ccp.ServerParams = new object[] { pipeDetailEntity,parmList,UserInfo.GetUserName() };
  1012. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  1013. if (ccp.ReturnCode != -1)
  1014. {
  1015. if (ccp.ReturnInfo.Equals("修改成功!"))
  1016. {
  1017. QueryCheckConsignBaseDetail("3", "0");
  1018. MessageUtil.ShowTips(ccp.ReturnInfo);
  1019. }
  1020. else
  1021. {
  1022. MessageUtil.ShowTips(ccp.ReturnInfo);
  1023. }
  1024. }
  1025. }
  1026. /// <summary>
  1027. ///保存理化录入值
  1028. /// </summary>
  1029. private void AddPhyData()
  1030. {
  1031. this.ultraGrid3.UpdateData();
  1032. this.ultraGrid4.UpdateData();
  1033. this.ultraGrid5.UpdateData();
  1034. this.ultraGrid6.UpdateData();
  1035. this.ultraGrid7.UpdateData();
  1036. this.ultraGrid8.UpdateData();
  1037. this.ultraGrid9.UpdateData();
  1038. this.ultraGrid10.UpdateData();
  1039. this.ultraGrid53.UpdateData();
  1040. this.ultraGrid58.UpdateData();
  1041. UltraGridRow uRow = this.ultraGrid2.ActiveRow;
  1042. RowsCollection uRow1 = null;
  1043. if(uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))
  1044. {
  1045. uRow1 = this.ultraGrid3.Rows;
  1046. }
  1047. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))
  1048. {
  1049. uRow1 = this.ultraGrid4.Rows;
  1050. }
  1051. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))
  1052. {
  1053. uRow1 = this.ultraGrid6.Rows;
  1054. }
  1055. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))
  1056. {
  1057. uRow1 = this.ultraGrid5.Rows;
  1058. }
  1059. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))
  1060. {
  1061. uRow1 = this.ultraGrid7.Rows;
  1062. }
  1063. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))
  1064. {
  1065. uRow1 = this.ultraGrid8.Rows;
  1066. }
  1067. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))
  1068. {
  1069. uRow1 = this.ultraGrid10.Rows;
  1070. }
  1071. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0016"))
  1072. {
  1073. uRow1 = this.ultraGrid9.Rows;
  1074. }
  1075. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0009"))
  1076. {
  1077. uRow1 = this.ultraGrid13.Rows;
  1078. }
  1079. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0027") || uRow.Cells["PhyCodeMax"].Value.Equals("C0038") || uRow.Cells["PhyCodeMax"].Value.Equals("C0082") || uRow.Cells["PhyCodeMax"].Value.Equals("C0083") || uRow.Cells["PhyCodeMax"].Value.Equals("C0098"))
  1080. {
  1081. uRow1 = this.ultraGrid11.Rows;
  1082. }
  1083. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0026") || uRow.Cells["PhyCodeMax"].Value.Equals("C0039") || uRow.Cells["PhyCodeMax"].Value.Equals("C0040") || uRow.Cells["PhyCodeMax"].Value.Equals("C0041"))
  1084. {
  1085. uRow1 = this.ultraGrid12.Rows;
  1086. }
  1087. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))
  1088. {
  1089. uRow1 = this.ultraGrid53.Rows;
  1090. }
  1091. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0066"))
  1092. {
  1093. uRow1 = this.ultraGrid58.Rows;
  1094. }
  1095. if (!checkData())
  1096. {
  1097. return;
  1098. }
  1099. ArrayList parmList = new ArrayList();
  1100. PipeCheckconsignDetailEntity pipeDetailTity = new PipeCheckconsignDetailEntity();
  1101. //ArrayList tempList = new ArrayList();
  1102. foreach (UltraGridRow row in uRow1)
  1103. {
  1104. PipeCheckconsignPhydetailEntity pipeCheckTity = (PipeCheckconsignPhydetailEntity)row.ListObject;
  1105. pipeCheckTity.CheckNo = uRow.Cells["CheckNo"].Text;
  1106. pipeCheckTity.SampleNo = uRow.Cells["SampleNo"].Text;
  1107. pipeCheckTity.PhyCodeMin = uRow.Cells["PhyCodeMax"].Text;//试样组
  1108. pipeCheckTity.PhyNameMin = uRow.Cells["PhyNameMax"].Text;
  1109. pipeCheckTity.PhyNameDir = row.Cells["PhyCodeDir"].Text.Trim();
  1110. if (uRow.Cells["PhyCodeMax"].Value.Equals("C0009"))//压扁试验
  1111. {
  1112. pipeCheckTity.Value8 = this.TxtYbSpac.Text.Trim();
  1113. pipeCheckTity.Value7 = this.TxtYbC.Text.Trim();
  1114. pipeCheckTity.IsGood = this.TxtYbQualfiled.Value.ToString2();
  1115. pipeCheckTity.IsDefect = this.TxtYbDefect.Value.ToString2();
  1116. pipeCheckTity.CalculationFormula = this.TxtYbEuestion.Text;
  1117. pipeCheckTity.Remark = this.TxtYbMemo.Text.Trim();
  1118. }
  1119. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0027") || uRow.Cells["PhyCodeMax"].Value.Equals("C0038") || uRow.Cells["PhyCodeMax"].Value.Equals("C0082") || uRow.Cells["PhyCodeMax"].Value.Equals("C0083") || uRow.Cells["PhyCodeMax"].Value.Equals("C0098"))//弯曲试验
  1120. {
  1121. pipeCheckTity.Value9 = this.TxtWqDiameter.Text.Trim();
  1122. pipeCheckTity.Value10 = this.TxtWqAngle.Text.Trim();
  1123. pipeCheckTity.IsGood = this.TxtWqQualfiled.Value.ToString2();
  1124. pipeCheckTity.Remark = this.TxtWqMemo.Text.Trim();
  1125. }
  1126. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0026") || uRow.Cells["PhyCodeMax"].Value.Equals("C0039") || uRow.Cells["PhyCodeMax"].Value.Equals("C0040") || uRow.Cells["PhyCodeMax"].Value.Equals("C0041"))//扩口试验
  1127. {
  1128. pipeCheckTity.Value11 = this.TxtKkTop.Text.Trim();
  1129. pipeCheckTity.Value12 = this.TxtKkFlarRate.Text.Trim();
  1130. pipeCheckTity.IsGood = this.TxtKkGood.Value.ToString2();
  1131. pipeCheckTity.Remark = this.TxtKkMemo.Text.Trim();
  1132. }
  1133. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0073") || uRow.Cells["PhyCodeMax"].Value.Equals("C0163") || uRow.Cells["PhyCodeMax"].Value.Equals("C0166") || uRow.Cells["PhyCodeMax"].Value.Equals("C0167"))//落锤试验
  1134. {
  1135. pipeCheckTity.SampleJb = this.TxtSAMPLE_JB.Text.Trim();
  1136. pipeCheckTity.NotchShape = this.TxtNOTCH_SHAPE.Text.Trim();
  1137. pipeCheckTity.NotchType = this.TxtNOTCH_TYPE.Text.Trim();
  1138. }
  1139. string phyEntity = JSONFormat.Format(pipeCheckTity);
  1140. parmList.Add(phyEntity);
  1141. }
  1142. pipeDetailTity.CheckNo = uRow.Cells["CheckNo"].Text;
  1143. pipeDetailTity.SampleNo = uRow.Cells["SampleNo"].Text;
  1144. pipeDetailTity.PhyCodeMin = uRow.Cells["PhyCodeMin"].Text;//检验大项
  1145. pipeDetailTity.PhyCodeMax = uRow.Cells["PhyCodeMax"].Text;//试样组
  1146. pipeDetailTity.CheckTemp = this.txtCHECK_TEMP.Text.Trim();
  1147. pipeDetailTity.DeviceNo = this.ultraDEVICE_NAME.Value.ToString2();
  1148. pipeDetailTity.DeviceName = this.ultraDEVICE_NAME.Text.Trim();
  1149. pipeDetailTity.FormualNo = this.ultraComMethod.Value.ToString2();
  1150. pipeDetailTity.FormualName = this.ultraComMethod.Text.Trim();
  1151. pipeDetailTity.CheckName = this.txtChemUser.Text.Trim();
  1152. pipeDetailTity.CheckShift = this.cmbChemOrder.Value.ToString2();
  1153. pipeDetailTity.CheckClass = this.cmbChemGroup.Value.ToString2();
  1154. pipeDetailTity.StdSteelNo = this.txtStdSteelNo.Text.Trim();
  1155. pipeDetailTity.StdSteelType = this.cmbStdSteelType.Text.Trim();
  1156. pipeDetailTity.StdSteelValue = this.txtStdSteelValue.Text.Trim();
  1157. pipeDetailTity.ActualValue = this.txtActualValue.Text.Trim();
  1158. pipeDetailTity.HardnessType = this.ultraComFormual.Text.Trim();
  1159. pipeDetailTity.CheckName = this.UserInfo.GetUserName();
  1160. pipeDetailTity.PhyDir = this.txtPHY_DIR.Text.Trim();
  1161. pipeDetailTity.SampleType = this.txtSAMPLE_TYPE.Text.Trim();
  1162. if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))
  1163. {
  1164. pipeDetailTity.SampleStyle = this.ultraSAMPLE_STYLE.Value.ToString().Trim();
  1165. //if (this.txtPHY_DIR.Text.Trim().Equals("") || this.txtSAMPLE_TYPE.Text.Trim().Equals("") || this.ultraSAMPLE_STYLE.Text.Trim().Equals(""))
  1166. //{
  1167. // MessageUtil.ShowTips("试验方向,试验尺寸和试样形状不能为空");
  1168. // return;
  1169. //}
  1170. }
  1171. //pipeDetailTity.PHYCO = this.ultraPHY_CODE_DIR.Text.Trim();
  1172. if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))
  1173. {
  1174. if (this.txtPHY_DIR.Text.Trim().Equals("") || this.txtSAMPLE_TYPE.Text.Trim().Equals("") )
  1175. {
  1176. MessageUtil.ShowTips("试验方向,试验尺寸和试样形状不能为空");
  1177. return;
  1178. }
  1179. }
  1180. pipeDetailTity.Flag = "3";//录入状态
  1181. string pipeDetailEntity = JSONFormat.Format(pipeDetailTity);
  1182. CoreClientParam ccp = new CoreClientParam();
  1183. ccp.ServerName = "com.steering.lims.data.pipe.FrmDataCJBase";
  1184. ccp.MethodName = "addPhyDataNew";
  1185. ccp.ServerParams = new object[] { pipeDetailEntity, parmList };
  1186. ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  1187. if (ccp.ReturnCode != -1)
  1188. {
  1189. if (ccp.ReturnInfo.Equals("保存成功!"))
  1190. {
  1191. this.txtStdSteelNo.Text = "";
  1192. this.cmbStdSteelType.Text = "";
  1193. this.txtStdSteelValue.Text = "";
  1194. this.txtActualValue.Text = "";
  1195. QueryCheckConsignBaseDetail("2", "0");
  1196. MessageUtil.ShowTips(ccp.ReturnInfo);
  1197. }
  1198. else
  1199. {
  1200. MessageUtil.ShowTips(ccp.ReturnInfo);
  1201. }
  1202. }
  1203. }
  1204. /// <summary>
  1205. /// 数据验证
  1206. /// </summary>
  1207. /// <returns></returns>
  1208. private bool checkData()
  1209. {
  1210. UltraGridRow uRow = this.ultraGrid2.ActiveRow;
  1211. if (this.txtCHECK_TEMP.Text.Trim() == "")
  1212. {
  1213. MessageUtil.ShowTips("试验温度不允许为空!");
  1214. return false;
  1215. }
  1216. if (this.ultraDEVICE_NAME.Text.Trim() == "")
  1217. {
  1218. MessageUtil.ShowTips("试验设备不允许为空!");
  1219. return false;
  1220. }
  1221. if (this.ultraComMethod.Text.Trim() == "")
  1222. {
  1223. MessageUtil.ShowTips("试验方法不允许为空!");
  1224. return false;
  1225. }
  1226. if (this.cmbChemOrder.Text == "" || this.cmbChemGroup.Text == "")
  1227. {
  1228. MessageUtil.ShowTips("班次班组不允许为空!");
  1229. return false;
  1230. }
  1231. if (txtChemUser.Text.Trim() == "")
  1232. {
  1233. MessageUtil.ShowTips("试验人不允许为空!");
  1234. return false;
  1235. }
  1236. if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))//拉伸试验
  1237. {
  1238. foreach(UltraGridRow row in this.ultraGrid3.Rows)
  1239. {
  1240. if(row.Cells["Value1"].Text.ToString() == "")
  1241. {
  1242. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1243. return false;
  1244. }
  1245. }
  1246. }
  1247. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))//夏比冲击试验
  1248. {
  1249. foreach (UltraGridRow row in this.ultraGrid4.Rows)
  1250. {
  1251. if (row.Cells["Value1"].Text.ToString() == "" || row.Cells["Value2"].Text.ToString() == "" || row.Cells["Value3"].Text.ToString() == "")
  1252. {
  1253. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1254. return false;
  1255. }
  1256. }
  1257. }
  1258. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0004"))//洛氏硬度
  1259. {
  1260. //if (ultraComFormual.Text == "")
  1261. //{
  1262. // MessageUtil.ShowTips("硬度类型不能为空!");
  1263. // return false;
  1264. //}
  1265. if (txtStdSteelNo.Text.Trim() == "")
  1266. {
  1267. MessageUtil.ShowTips("标钢编号不能为空!");
  1268. return false;
  1269. }
  1270. if (cmbStdSteelType.Text.Trim() == "")
  1271. {
  1272. MessageUtil.ShowTips("标钢类型不能为空!");
  1273. return false;
  1274. }
  1275. if (txtStdSteelValue.Text.Trim() == "")
  1276. {
  1277. MessageUtil.ShowTips("标钢标准值不能为空!");
  1278. return false;
  1279. }
  1280. if (txtActualValue.Text.Trim() == "")
  1281. {
  1282. MessageUtil.ShowTips("标钢实测值不能为空!");
  1283. return false;
  1284. }
  1285. foreach (UltraGridRow row in this.ultraGrid5.Rows)
  1286. {
  1287. if (row.Cells["Value1"].Text.ToString() == "" || row.Cells["Value2"].Text.ToString() == "" || row.Cells["Value3"].Text.ToString() == "")
  1288. {
  1289. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1290. return false;
  1291. }
  1292. }
  1293. }
  1294. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))//维氏硬度
  1295. {
  1296. if (ultraComFormual.Text == "")
  1297. {
  1298. MessageUtil.ShowTips("硬度类型不能为空!");
  1299. return false;
  1300. }
  1301. if (txtStdSteelNo.Text.Trim() == "")
  1302. {
  1303. MessageUtil.ShowTips("标钢编号不能为空!");
  1304. return false;
  1305. }
  1306. if (cmbStdSteelType.Text.Trim() == "")
  1307. {
  1308. MessageUtil.ShowTips("标钢类型不能为空!");
  1309. return false;
  1310. }
  1311. if (txtStdSteelValue.Text.Trim() == "")
  1312. {
  1313. MessageUtil.ShowTips("标钢标准值不能为空!");
  1314. return false;
  1315. }
  1316. if (txtActualValue.Text.Trim() == "")
  1317. {
  1318. MessageUtil.ShowTips("标钢实测值不能为空!");
  1319. return false;
  1320. }
  1321. foreach (UltraGridRow row in this.ultraGrid7.Rows)
  1322. {
  1323. if (row.Cells["Value1"].Text.ToString() == "" || row.Cells["Value2"].Text.ToString() == "" || row.Cells["Value3"].Text.ToString() == ""||row.Cells["Value4"].Text.ToString()== "")
  1324. {
  1325. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1326. return false;
  1327. }
  1328. }
  1329. }
  1330. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))//布氏硬度
  1331. {
  1332. if (ultraComFormual.Text == "")
  1333. {
  1334. MessageUtil.ShowTips("硬度类型不能为空!");
  1335. return false;
  1336. }
  1337. if (txtStdSteelNo.Text.Trim() == "")
  1338. {
  1339. MessageUtil.ShowTips("标钢编号不能为空!");
  1340. return false;
  1341. }
  1342. if (cmbStdSteelType.Text.Trim() == "")
  1343. {
  1344. MessageUtil.ShowTips("标钢类型不能为空!");
  1345. return false;
  1346. }
  1347. if (txtStdSteelValue.Text.Trim() == "")
  1348. {
  1349. MessageUtil.ShowTips("标钢标准值不能为空!");
  1350. return false;
  1351. }
  1352. if (txtActualValue.Text.Trim() == "")
  1353. {
  1354. MessageUtil.ShowTips("标钢实测值不能为空!");
  1355. return false;
  1356. }
  1357. foreach (UltraGridRow row in this.ultraGrid6.Rows)
  1358. {
  1359. if (row.Cells["Value1"].Text.ToString() == "" || row.Cells["Value2"].Text.ToString() == "" || row.Cells["Value3"].Text.ToString() == "")
  1360. {
  1361. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1362. return false;
  1363. }
  1364. }
  1365. }
  1366. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))//夹杂物
  1367. {
  1368. foreach (UltraGridRow row in this.ultraGrid8.Rows)
  1369. {
  1370. if (uRow.Cells["PhyCodeMax"].Value.ToString().Equals("C0011"))
  1371. {
  1372. if (row.Cells["Value1"].Text.ToString() == "")
  1373. {
  1374. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1375. return false;
  1376. }
  1377. }
  1378. else if (uRow.Cells["PhyCodeMax"].Value.ToString().Equals("C0115"))
  1379. {
  1380. if (row.Cells["Value1"].Text.ToString() == "" || row.Cells["Value2"].Text.ToString()== "" || row.Cells["Value3"].Text.ToString() == "" ||row.Cells["Value4"].Text.ToString() == "")
  1381. {
  1382. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1383. return false;
  1384. }
  1385. }
  1386. }
  1387. }
  1388. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))//晶粒度
  1389. {
  1390. foreach (UltraGridRow row in this.ultraGrid10.Rows)
  1391. {
  1392. if (row.Cells["Value1"].Text.ToString() == "")
  1393. {
  1394. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1395. return false;
  1396. }
  1397. }
  1398. }
  1399. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0014"))//组织
  1400. {
  1401. foreach (UltraGridRow row in this.ultraGrid9.Rows)
  1402. {
  1403. if (row.Cells["Value1"].Text.ToString() == "")
  1404. {
  1405. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1406. return false;
  1407. }
  1408. }
  1409. }
  1410. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0009"))
  1411. {
  1412. ultraGrid13.UpdateData();
  1413. if (this.ultraGrid13.ActiveRow.Cells["PhyCode"].Text.Equals("P0330"))
  1414. {
  1415. if (this.TxtYbSpac.Text.Trim() == "" || this.TxtYbQualfiled.Value.ToString2() == "" || this.TxtYbDefect.Value.ToString2() == "")
  1416. {
  1417. MessageUtil.ShowTips("压扁试验时压扁间距以及是否完好、是否缺陷不能为空!");
  1418. return false;
  1419. }
  1420. }
  1421. else
  1422. {
  1423. if (this.TxtYbSpac.Text.Trim() == "" || this.TxtYbQualfiled.Value.ToString2() == "")
  1424. {
  1425. MessageUtil.ShowTips("压扁试验时压扁间距以及是否完好、是否缺陷不能为空!");
  1426. return false;
  1427. }
  1428. }
  1429. }
  1430. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0027") || uRow.Cells["PhyCodeMax"].Value.Equals("C0038") || uRow.Cells["PhyCodeMax"].Value.Equals("C0082") || uRow.Cells["PhyCodeMax"].Value.Equals("C0083") || uRow.Cells["PhyCodeMax"].Value.Equals("C0098"))
  1431. {
  1432. if (this.TxtWqDiameter.Text.Trim() == "" || this.TxtWqAngle.Value.ToString2() == "" || this.TxtWqQualfiled.Value.ToString2() == "")
  1433. {
  1434. MessageUtil.ShowTips("弯曲试验时弯曲直径、弯曲角度、是否完好不能为空!");
  1435. return false;
  1436. }
  1437. }
  1438. else if (uRow.Cells["PhyCodeMax"].Value.Equals("C0026") || uRow.Cells["PhyCodeMax"].Value.Equals("C0039") || uRow.Cells["PhyCodeMax"].Value.Equals("C0040") || uRow.Cells["PhyCodeMax"].Value.Equals("C0041"))
  1439. {
  1440. if (this.TxtKkTop.Text.Trim() == "" || this.TxtKkFlarRate.Text.Trim() == "" || this.TxtKkGood.Value.ToString2() == "")
  1441. {
  1442. MessageUtil.ShowTips("扩口试验时顶芯角度、扩口率、是否完好不能为空!");
  1443. return false;
  1444. }
  1445. }
  1446. else if (uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || uRow.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))
  1447. {
  1448. foreach (UltraGridRow row in this.ultraGrid53.Rows)
  1449. {
  1450. if (row.Cells["Value1"].Text.ToString() == "" || row.Cells["Value2"].Text.ToString() == "" || row.Cells["Value3"].Text.ToString() == "")
  1451. {
  1452. MessageUtil.ShowTips("黄色区域有数据未录入,请核实!");
  1453. return false;
  1454. }
  1455. }
  1456. }
  1457. return true;
  1458. }
  1459. //查询
  1460. /// <summary>
  1461. ///
  1462. /// </summary>
  1463. /// <param name="flag"></param>
  1464. /// <param name="isAll"></param> 是否查全部,1-查全部,包含审核后的数据,0-只查未审核的数据
  1465. private void QueryCheckConsignBaseDetail(string flag,string isAll)
  1466. {
  1467. string startTim = "";
  1468. string endTim = "";
  1469. string checkNo = "";
  1470. string judgeNo = "";
  1471. string sampleNo = "";
  1472. string steelName = "";
  1473. string specName = "";
  1474. string orderNo = "";
  1475. string checkPhy = "";
  1476. string txtGroup = "";
  1477. string ispodutor = "";
  1478. var status = new List<string> { };
  1479. if (chkType.Checked)
  1480. {
  1481. status = cmbType.CheckedItems.Select(p => p.DataValue.ToString()).ToList();
  1482. if (!status.Any()) status = new List<string> { "0", "1", "2", "3", "4", "5" };
  1483. }
  1484. ArrayList parmList = new ArrayList();
  1485. if(chkRegTime.Checked)
  1486. {
  1487. startTim = this.RegStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  1488. endTim = this.RegEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  1489. }
  1490. if(chkCheckNo.Checked && this.txtCheckNo.Text.Trim() != "")
  1491. {
  1492. checkNo = this.txtCheckNo.Text.Trim();
  1493. }
  1494. if(chkJudgeNo.Checked && this.txtJudgeNo.Text != "")
  1495. {
  1496. judgeNo = this.txtJudgeNo.Text.Trim();
  1497. }
  1498. if(chkSampleNo.Checked && this.txtSampleNo.Text.Trim() != "")
  1499. {
  1500. sampleNo = txtSampleNo.Text.Trim();
  1501. }
  1502. if(chkOrderNo.Checked && this.txtOrderNo.Text != "")
  1503. {
  1504. orderNo = txtOrderNo.Text.Trim();
  1505. }
  1506. if(chkSteel.Checked && this.txtSteel.Text.Trim() != "")
  1507. {
  1508. steelName = this.txtSteel.Text.Trim();
  1509. }
  1510. if(chkSpec.Checked && this.txtSpec.Text.Trim() != "")
  1511. {
  1512. specName = this.txtSpec.Text.Trim();
  1513. }
  1514. if(chkGroup.Checked && this.cmbGroup.Text != "")
  1515. {
  1516. txtGroup = this.cmbGroup.Value.ToString2();
  1517. }
  1518. if (chkIsProuctor.Checked && this.cmbIsProductor.Text != "")
  1519. {
  1520. ispodutor = this.cmbIsProductor.Value.ToString2();
  1521. }
  1522. checkPhy = ultraOptionSet1.CheckedItem.DataValue.ToString();
  1523. parmList.Add(startTim);
  1524. parmList.Add(endTim);
  1525. parmList.Add(checkNo);
  1526. parmList.Add(judgeNo);
  1527. parmList.Add(sampleNo);
  1528. parmList.Add(orderNo);
  1529. parmList.Add(steelName);
  1530. parmList.Add(specName);
  1531. parmList.Add(txtGroup);
  1532. parmList.Add(ispodutor);
  1533. parmList.Add(checkPhy);
  1534. if (UserInfo.GetDeptid().Equals("002001007009"))
  1535. {
  1536. parmList.Add("1");//天管要求加入实验项目才可以做实验
  1537. }
  1538. else
  1539. {
  1540. parmList.Add("0");
  1541. }
  1542. if (flag.Equals("2"))
  1543. {
  1544. PipeCheckconsignDetailEntitybindingSource1.Clear();
  1545. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  1546. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetail", new object[] { parmList, arrId,plineCodes, "2", isAll, status.ToArray() ,this.CustomInfo.ToString()}, this.ob);
  1547. PipeCheckconsignDetailEntitybindingSource.DataSource = listSource;
  1548. }
  1549. else if (flag.Equals("3"))
  1550. {
  1551. PipeCheckconsignDetailEntitybindingSource4.Clear();
  1552. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  1553. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetail", new object[] { parmList, arrId, plineCodes, "3", isAll, status.ToArray(), this.CustomInfo.ToString() }, this.ob);
  1554. RecordedSource.DataSource = listSource;
  1555. }
  1556. }
  1557. /// <summary>
  1558. /// 查询未审核数据
  1559. /// </summary>
  1560. /// <param name="p"></param>
  1561. private void QueryCheckConsignBaseDetailNoFrim(string flag)
  1562. {
  1563. string startTim = "";
  1564. string endTim = "";
  1565. string checkNo = "";
  1566. string judgeNo = "";
  1567. string sampleNo = "";
  1568. string steelName = "";
  1569. string specName = "";
  1570. string orderNo = "";
  1571. string txtGroup = "";
  1572. string ispodutor = "";
  1573. string checkPhy = "";
  1574. ArrayList parmList = new ArrayList();
  1575. var status = new List<string> { };
  1576. if (chkType.Checked)
  1577. {
  1578. status = cmbType.CheckedItems.Select(p => p.DataValue.ToString()).ToList();
  1579. if (!status.Any()) status = new List<string> { "0", "1", "2", "3", "4", "5" };
  1580. }
  1581. if (chkRegTime.Checked)
  1582. {
  1583. startTim = this.RegStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  1584. endTim = this.RegEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  1585. }
  1586. if (chkCheckNo.Checked && this.txtCheckNo.Text.Trim() != "")
  1587. {
  1588. checkNo = this.txtCheckNo.Text.Trim();
  1589. }
  1590. if (chkJudgeNo.Checked && this.txtJudgeNo.Text != "")
  1591. {
  1592. judgeNo = this.txtJudgeNo.Text.Trim();
  1593. }
  1594. if (chkSampleNo.Checked && this.txtSampleNo.Text.Trim() != "")
  1595. {
  1596. sampleNo = txtSampleNo.Text.Trim();
  1597. }
  1598. if (chkOrderNo.Checked && this.txtOrderNo.Text != "")
  1599. {
  1600. orderNo = txtOrderNo.Text.Trim();
  1601. }
  1602. if (chkSteel.Checked && this.txtSteel.Text.Trim() != "")
  1603. {
  1604. steelName = this.txtSteel.Text.Trim();
  1605. }
  1606. if (chkSpec.Checked && this.txtSpec.Text.Trim() != "")
  1607. {
  1608. specName = this.txtSpec.Text.Trim();
  1609. }
  1610. if (chkGroup.Checked && this.cmbGroup.Text != "")
  1611. {
  1612. txtGroup = this.cmbGroup.Value.ToString2();
  1613. }
  1614. if (chkIsProuctor.Checked && this.cmbIsProductor.Text != "")
  1615. {
  1616. ispodutor = this.cmbIsProductor.Value.ToString2();
  1617. }
  1618. checkPhy = ultraOptionSet1.CheckedItem.DataValue.ToString();
  1619. parmList.Add(startTim);
  1620. parmList.Add(endTim);
  1621. parmList.Add(checkNo);
  1622. parmList.Add(judgeNo);
  1623. parmList.Add(sampleNo);
  1624. parmList.Add(orderNo);
  1625. parmList.Add(steelName);
  1626. parmList.Add(specName);
  1627. parmList.Add(txtGroup);
  1628. parmList.Add(ispodutor);
  1629. parmList.Add(checkPhy);
  1630. PipeCheckconsignDetailEntitybindingSource2.Clear();
  1631. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  1632. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailNoFrim", new object[] { parmList, arrId,plineCodes, status.ToArray() ,this.CustomInfo.ToString()}, this.ob);
  1633. pipeCheckconsignDetailEntityBindingSource5.DataSource = listSource;
  1634. foreach (UltraGridRow row in ultraGrid27.Rows)
  1635. {
  1636. if (int.Parse(row.Cells["heatNo"].Text.ToString3()) > 0)
  1637. {
  1638. row.RowSelectorAppearance.BackColor = Color.Red; ;
  1639. }
  1640. }
  1641. }
  1642. /// <summary>
  1643. /// 查询已审核数据
  1644. /// </summary>
  1645. /// <param name="p"></param>
  1646. private void QueryCheckConsignBaseDetailYesFrim(string flag)
  1647. {
  1648. string startTim = "";
  1649. string endTim = "";
  1650. string checkNo = "";
  1651. string judgeNo = "";
  1652. string sampleNo = "";
  1653. string steelName = "";
  1654. string specName = "";
  1655. string orderNo = "";
  1656. string txtGroup = "";
  1657. string ispodutor = "";
  1658. string checkPhy = "";
  1659. ArrayList parmList = new ArrayList();
  1660. var status = new List<string> { };
  1661. if (chkType.Checked)
  1662. {
  1663. status = cmbType.CheckedItems.Select(p => p.DataValue.ToString()).ToList();
  1664. if (!status.Any()) status = new List<string> { "0", "1", "2", "3", "4", "5" };
  1665. }
  1666. if (chkRegTime.Checked)
  1667. {
  1668. startTim = this.RegStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  1669. endTim = this.RegEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
  1670. }
  1671. if (chkCheckNo.Checked && this.txtCheckNo.Text.Trim() != "")
  1672. {
  1673. checkNo = this.txtCheckNo.Text.Trim();
  1674. }
  1675. if (chkJudgeNo.Checked && this.txtJudgeNo.Text != "")
  1676. {
  1677. judgeNo = this.txtJudgeNo.Text.Trim();
  1678. }
  1679. if (chkSampleNo.Checked && this.txtSampleNo.Text.Trim() != "")
  1680. {
  1681. sampleNo = txtSampleNo.Text.Trim();
  1682. }
  1683. if (chkOrderNo.Checked && this.txtOrderNo.Text != "")
  1684. {
  1685. orderNo = txtOrderNo.Text.Trim();
  1686. }
  1687. if (chkSteel.Checked && this.txtSteel.Text.Trim() != "")
  1688. {
  1689. steelName = this.txtSteel.Text.Trim();
  1690. }
  1691. if (chkSpec.Checked && this.txtSpec.Text.Trim() != "")
  1692. {
  1693. specName = this.txtSpec.Text.Trim();
  1694. }
  1695. if (chkGroup.Checked && this.cmbGroup.Text != "")
  1696. {
  1697. txtGroup = this.cmbGroup.Value.ToString2();
  1698. }
  1699. if (chkIsProuctor.Checked && this.cmbIsProductor.Text != "")
  1700. {
  1701. ispodutor = this.cmbIsProductor.Value.ToString2();
  1702. }
  1703. checkPhy = ultraOptionSet1.CheckedItem.DataValue.ToString();
  1704. parmList.Add(startTim);
  1705. parmList.Add(endTim);
  1706. parmList.Add(checkNo);
  1707. parmList.Add(judgeNo);
  1708. parmList.Add(sampleNo);
  1709. parmList.Add(orderNo);
  1710. parmList.Add(steelName);
  1711. parmList.Add(specName);
  1712. parmList.Add(txtGroup);
  1713. parmList.Add(ispodutor);
  1714. parmList.Add(checkPhy);
  1715. PipeCheckconsignDetailEntitybindingSource3.Clear();
  1716. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  1717. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailFrim", new object[] { parmList, arrId,plineCodes, status.ToArray() }, this.ob);
  1718. pipeCheckconsignDetailEntityBindingSource6.DataSource = listSource;
  1719. foreach (UltraGridRow row in ultraGrid40.Rows)
  1720. {
  1721. if (int.Parse(row.Cells["Remark"].Text.ToString3()) > 0)
  1722. {
  1723. row.RowSelectorAppearance.BackColor = Color.GreenYellow; ;
  1724. }
  1725. if (int.Parse(row.Cells["heatNo"].Text.ToString3()) > 0)
  1726. {
  1727. row.RowSelectorAppearance.BackColor = Color.Red; ;
  1728. }
  1729. }
  1730. }
  1731. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  1732. {
  1733. UltraGridRow uRow = this.ultraGrid1.ActiveRow;
  1734. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  1735. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPHY", new object[] { uRow.Cells["CheckNo"].Value.ToString(), uRow.Cells["SampleNo"].Value.ToString(), "2", arrId, ultraOptionSet1.CheckedItem.DataValue.ToString2()}, this.ob);
  1736. PipeCheckconsignDetailEntitybindingSource1.DataSource = listSource;
  1737. }
  1738. /// <summary>
  1739. /// 加载试验设备
  1740. /// </summary>
  1741. /// <param name="phyCode"></param>
  1742. private void initCheckEqiupment(string phyCodeMax)
  1743. {
  1744. DataTable dt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.initCheckEquipment", new object[] { arrId, phyCodeMax }, ob);
  1745. if (dt != null && dt.Rows.Count > 0)
  1746. {
  1747. if (ultraTabControl1.SelectedTab.Key == "0")
  1748. {
  1749. ultraDEVICE_NAME.DataSource = dt;
  1750. ultraDEVICE_NAME.ValueMember = "DEVICE_NO";
  1751. }
  1752. else if (ultraTabControl1.SelectedTab.Key == "1")
  1753. {
  1754. ultraDEVICE_NAME1.DataSource = dt;
  1755. ultraDEVICE_NAME1.ValueMember = "DEVICE_NO";
  1756. }
  1757. }
  1758. this.cmbChemOrder.Value = UserInfo.GetUserOrder();
  1759. this.cmbChemGroup.Value = UserInfo.GetUserGroup();
  1760. this.txtChemUser.Text = UserInfo.GetUserName();
  1761. }
  1762. /// <summary>
  1763. /// 加载试验方法
  1764. /// </summary>
  1765. /// <param name="phyCode"></param>
  1766. /// <param name="text">试验标准</param>
  1767. private void initCheckMethod(string phyCode,String text)
  1768. {
  1769. ultraComMethod.DataSource = null;
  1770. ultraComMethod1.DataSource = null;
  1771. DataTable dt = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.initCheckMethod", new object[] { phyCode, arrId }, ob);
  1772. if (dt != null && dt.Rows.Count > 0)
  1773. {
  1774. if (!String.IsNullOrEmpty(text))
  1775. {
  1776. bool falg = false;// 试验标准是否存在
  1777. for (int i = 0; i < dt.Rows.Count; i++)
  1778. {
  1779. if (dt.Select()[i].ItemArray.Contains(text))
  1780. {
  1781. falg = true;
  1782. }
  1783. }
  1784. if (!falg)
  1785. {
  1786. dt.Rows.Add(text);
  1787. }
  1788. }
  1789. if (ultraTabControl1.SelectedTab.Key == "0")
  1790. {
  1791. ultraComMethod.DataSource = dt;
  1792. ultraComMethod.ValueMember = "CHECK_METHOD_NO";
  1793. ultraComMethod.Text = text;
  1794. }
  1795. else if (ultraTabControl1.SelectedTab.Key == "1")
  1796. {
  1797. ultraComMethod1.DataSource = dt;
  1798. ultraComMethod1.ValueMember = "CHECK_METHOD_NO";
  1799. ultraComMethod1.Text = text;
  1800. }
  1801. }
  1802. }
  1803. private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
  1804. {
  1805. ultraTabControl2.Visible = true;
  1806. ultraTabControl3.Visible = false;
  1807. ultraTabControl4.Visible = false;
  1808. ultraTabControl5.Visible = false;
  1809. UltraGridRow row = this.ultraGrid2.ActiveRow;
  1810. initCheckMethod(row.Cells["PhyCodeMax"].Value.ToString(), row.Cells["checkStd"].Text);//根据试样组加载试验方法
  1811. initCheckEqiupment(row.Cells["PhyCodeMax"].Value.ToString());//根据试样组加载试验设备
  1812. List<PipeCheckconsignPhydetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignPhydetailEntity>(
  1813. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPhyItem", new object[] { row.Cells["CheckNo"].Value.ToString(), row.Cells["SampleNo"].Value.ToString(), row.Cells["PhyCodeMax"].Value.ToString() }, this.ob);
  1814. if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))//拉伸
  1815. {
  1816. PipeCheckconsignPhydetailEntitybindingSource.DataSource = listSource;
  1817. ultraTabControl2.Tabs["0"].Selected = true;
  1818. ultraTabControl2.Tabs["0"].Visible = true;
  1819. ultraTabControl2.Tabs["1"].Visible = false;
  1820. ultraTabControl2.Tabs["2"].Visible = false;
  1821. ultraTabControl2.Tabs["3"].Visible = false;
  1822. ultraTabControl2.Tabs["4"].Visible = false;
  1823. ultraTabControl2.Tabs["5"].Visible = false;
  1824. ultraTabControl2.Tabs["6"].Visible = false;
  1825. ultraTabControl2.Tabs["7"].Visible = false;
  1826. ultraTabControl2.Tabs["8"].Visible = false;
  1827. ultraTabControl2.Tabs["9"].Visible = false;
  1828. ultraTabControl2.Tabs["10"].Visible = false;
  1829. ultraTabControl2.Tabs["11"].Visible = false;
  1830. ultraTabControl2.Tabs["12"].Visible = false;
  1831. this.ultraLabel36.Visible = false;
  1832. this.ultraComFormual.Visible = false;
  1833. this.cmbStdSteelType.Visible = false;
  1834. this.txtStdSteelNo.Visible = false;
  1835. this.txtStdSteelValue.Visible = false;
  1836. this.txtActualValue.Visible = false;
  1837. ultraLabel46.Visible = false;
  1838. ultraLabel48.Visible = false;
  1839. ultraLabel47.Visible = false;
  1840. ultraLabel49.Visible = false;
  1841. ultraLabel37.Visible = true;
  1842. ultraLabel39.Visible = true;
  1843. ultraLabel40.Visible = true;
  1844. this.txtPHY_DIR.Visible = true;
  1845. this.txtSAMPLE_TYPE.Visible = true;
  1846. this.ultraSAMPLE_STYLE.Visible = true;
  1847. txtSAMPLE_TYPE.Items.Clear();
  1848. txtSAMPLE_TYPE.Items.Add("S1");
  1849. txtSAMPLE_TYPE.Items.Add("S2");
  1850. txtSAMPLE_TYPE.Items.Add("S3");
  1851. txtSAMPLE_TYPE.Items.Add("S4");
  1852. txtSAMPLE_TYPE.Items.Add("S5");
  1853. txtSAMPLE_TYPE.Items.Add("S6");
  1854. txtSAMPLE_TYPE.Items.Add("R4");
  1855. txtSAMPLE_TYPE.Items.Add("R5");
  1856. txtSAMPLE_TYPE.Items.Add("bo=19.0mm Lo=50mm");
  1857. txtSAMPLE_TYPE.Items.Add("bo=25.4mm Lo=50mm");
  1858. txtSAMPLE_TYPE.Items.Add("bo=38.1mm Lo=50mm");
  1859. txtSAMPLE_TYPE.Items.Add("do=12.7mm Lo=50mm");
  1860. txtPHY_DIR.Items.Clear();
  1861. txtPHY_DIR.Items.Add("纵向");
  1862. txtPHY_DIR.Items.Add("横向");
  1863. this.txtPHY_DIR.Text = row.Cells["PhyDir"].Value.ToString();
  1864. this.txtSAMPLE_TYPE.Text = row.Cells["SampleType"].Value.ToString();
  1865. }
  1866. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))//冲击
  1867. {
  1868. //if (listSource.Count<3)
  1869. //{
  1870. // listSource.Add(new PipeCheckconsignPhydetailEntity() { PhyName = "剪切面积百分比" });
  1871. // listSource.Add(new PipeCheckconsignPhydetailEntity() { PhyName = "ak" });
  1872. // listSource.Add(new PipeCheckconsignPhydetailEntity() { PhyName = "膨胀量" });
  1873. //}
  1874. PipeCheckconsignPhydetailEntityCjbindingSource.DataSource = listSource;
  1875. ultraTabControl2.Tabs["1"].Selected = true;
  1876. ultraTabControl2.Tabs["0"].Visible = false;
  1877. ultraTabControl2.Tabs["1"].Visible = true;
  1878. ultraTabControl2.Tabs["2"].Visible = false;
  1879. ultraTabControl2.Tabs["3"].Visible = false;
  1880. ultraTabControl2.Tabs["4"].Visible = false;
  1881. ultraTabControl2.Tabs["5"].Visible = false;
  1882. ultraTabControl2.Tabs["6"].Visible = false;
  1883. ultraTabControl2.Tabs["7"].Visible = false;
  1884. ultraTabControl2.Tabs["8"].Visible = false;
  1885. ultraTabControl2.Tabs["9"].Visible = false;
  1886. ultraTabControl2.Tabs["10"].Visible = false;
  1887. ultraTabControl2.Tabs["11"].Visible = false;
  1888. ultraTabControl2.Tabs["12"].Visible = false;
  1889. this.ultraLabel36.Visible = false;
  1890. this.ultraComFormual.Visible = false;
  1891. this.cmbStdSteelType.Visible = false;
  1892. this.txtStdSteelNo.Visible = false;
  1893. this.txtStdSteelValue.Visible = false;
  1894. this.txtActualValue.Visible = false;
  1895. ultraLabel46.Visible = false;
  1896. ultraLabel48.Visible = false;
  1897. ultraLabel47.Visible = false;
  1898. ultraLabel49.Visible = false;
  1899. ultraLabel40.Visible = false;
  1900. this.ultraSAMPLE_STYLE.Visible = false;
  1901. ultraLabel37.Visible = true;
  1902. ultraLabel39.Visible = true;
  1903. this.txtPHY_DIR.Visible = true;
  1904. this.txtSAMPLE_TYPE.Visible = true;
  1905. txtSAMPLE_TYPE.Items.Clear();
  1906. txtSAMPLE_TYPE.Items.Add("10mm×10mm");
  1907. txtSAMPLE_TYPE.Items.Add("10mm×7.5mm");
  1908. txtSAMPLE_TYPE.Items.Add("10mm×6.7mm");
  1909. txtSAMPLE_TYPE.Items.Add("10mm×6.67mm");
  1910. txtSAMPLE_TYPE.Items.Add("10mm×5mm");
  1911. txtSAMPLE_TYPE.Items.Add("10mm×3.3mm");
  1912. txtSAMPLE_TYPE.Items.Add("10mm×3mm");
  1913. txtSAMPLE_TYPE.Items.Add("10mm×2.5mm");
  1914. txtPHY_DIR.Items.Clear();
  1915. txtPHY_DIR.Items.Add("纵向");
  1916. txtPHY_DIR.Items.Add("横向");
  1917. this.txtPHY_DIR.Text = row.Cells["PhyDir"].Value.ToString();
  1918. this.txtSAMPLE_TYPE.Text = row.Cells["SampleType"].Value.ToString();
  1919. //ultraLabel1.Text = "试验温度";
  1920. }
  1921. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))//布氏
  1922. {
  1923. cmbStdSteelType.Items.Clear();
  1924. ultraComFormual.Items.Clear();
  1925. PipeCheckconsignPhydetailEntityBSbindingSource.DataSource = listSource;
  1926. MergedCell(ultraGrid6, new string[] { "PhyName" });
  1927. ultraTabControl2.Tabs["4"].Selected = true;
  1928. ultraTabControl2.Tabs["0"].Visible = false;
  1929. ultraTabControl2.Tabs["1"].Visible = false;
  1930. ultraTabControl2.Tabs["2"].Visible = false;
  1931. ultraTabControl2.Tabs["3"].Visible = false;
  1932. ultraTabControl2.Tabs["4"].Visible = true;
  1933. ultraTabControl2.Tabs["5"].Visible = false;
  1934. ultraTabControl2.Tabs["6"].Visible = false;
  1935. ultraTabControl2.Tabs["7"].Visible = false;
  1936. ultraTabControl2.Tabs["8"].Visible = false;
  1937. ultraTabControl2.Tabs["9"].Visible = false;
  1938. ultraTabControl2.Tabs["10"].Visible = false;
  1939. ultraTabControl2.Tabs["11"].Visible = false;
  1940. ultraTabControl2.Tabs["12"].Visible = false;
  1941. this.ultraLabel36.Visible = true;
  1942. this.ultraComFormual.Visible = true;
  1943. this.cmbStdSteelType.Visible = true;
  1944. this.txtStdSteelNo.Visible = true;
  1945. this.txtStdSteelValue.Visible = true;
  1946. this.txtActualValue.Visible = true;
  1947. ultraLabel46.Visible = true;
  1948. ultraLabel48.Visible = true;
  1949. ultraLabel47.Visible = true;
  1950. ultraLabel49.Visible = true;
  1951. ultraLabel37.Visible = false;
  1952. ultraLabel39.Visible = false;
  1953. this.txtPHY_DIR.Visible = false;
  1954. this.txtSAMPLE_TYPE.Visible = false;
  1955. ultraLabel40.Visible = false;
  1956. this.ultraSAMPLE_STYLE.Visible = false;
  1957. ultraComFormual.Items.Clear();
  1958. cmbStdSteelType.Items.Clear();
  1959. if (this.UserInfo.GetDeptid().Equals("002001007009"))
  1960. {
  1961. ultraComFormual.Items.Add("HBW2.5");
  1962. ultraComFormual.Items.Add("HBW5");
  1963. ultraComFormual.Items.Add("HBW10");
  1964. cmbStdSteelType.Items.Add("HBW2.5/187.5");
  1965. cmbStdSteelType.Items.Add("HBW 5/750");
  1966. cmbStdSteelType.Items.Add("HBW 10/1000");
  1967. }
  1968. else
  1969. {
  1970. ultraComFormual.Items.Add("HBW 2.5/187.5");
  1971. ultraComFormual.Items.Add("HBW 5/750");
  1972. ultraComFormual.Items.Add("HBW 10/3000");
  1973. cmbStdSteelType.Items.Add("HBW 2.5/187.5");
  1974. cmbStdSteelType.Items.Add("HBW 5/750");
  1975. cmbStdSteelType.Items.Add("HBW 10/3000");
  1976. }
  1977. }
  1978. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))//洛氏
  1979. {
  1980. cmbStdSteelType.Items.Clear();
  1981. PipeCheckconsignPhydetailEntityLSbindingSource.DataSource = listSource;
  1982. MergedCell(ultraGrid5, new string[] { "PhyName" });
  1983. ultraTabControl2.Tabs["2"].Selected = true;
  1984. ultraTabControl2.Tabs["0"].Visible = false;
  1985. ultraTabControl2.Tabs["1"].Visible = false;
  1986. ultraTabControl2.Tabs["2"].Visible = true;
  1987. ultraTabControl2.Tabs["3"].Visible = false;
  1988. ultraTabControl2.Tabs["4"].Visible = false;
  1989. ultraTabControl2.Tabs["5"].Visible = false;
  1990. ultraTabControl2.Tabs["6"].Visible = false;
  1991. ultraTabControl2.Tabs["7"].Visible = false;
  1992. ultraTabControl2.Tabs["8"].Visible = false;
  1993. ultraTabControl2.Tabs["9"].Visible = false;
  1994. ultraTabControl2.Tabs["10"].Visible = false;
  1995. ultraTabControl2.Tabs["11"].Visible = false;
  1996. ultraTabControl2.Tabs["12"].Visible = false;
  1997. this.ultraLabel36.Visible = false;
  1998. this.ultraComFormual.Visible = false;
  1999. this.cmbStdSteelType.Visible = true;
  2000. this.txtStdSteelNo.Visible = true;
  2001. this.txtStdSteelValue.Visible = true;
  2002. this.txtActualValue.Visible = true;
  2003. ultraLabel46.Visible = true;
  2004. ultraLabel48.Visible = true;
  2005. ultraLabel47.Visible = true;
  2006. ultraLabel49.Visible = true;
  2007. ultraLabel37.Visible = false;
  2008. ultraLabel39.Visible = false;
  2009. this.txtPHY_DIR.Visible = false;
  2010. this.txtSAMPLE_TYPE.Visible = false;
  2011. ultraLabel40.Visible = false;
  2012. this.ultraSAMPLE_STYLE.Visible = false;
  2013. cmbStdSteelType.Items.Clear();
  2014. cmbStdSteelType.Items.Add("HRA");
  2015. cmbStdSteelType.Items.Add("HRB");
  2016. cmbStdSteelType.Items.Add("HRC");
  2017. }
  2018. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))//维氏
  2019. {
  2020. ultraComFormual.Items.Clear();
  2021. cmbStdSteelType.Items.Clear();
  2022. PipeCheckconsignPhydetailEntityWSbindingSource.DataSource = listSource;
  2023. MergedCell(ultraGrid5, new string[] { "PhyName" });
  2024. ultraTabControl2.Tabs["3"].Selected = true;
  2025. ultraTabControl2.Tabs["0"].Visible = false;
  2026. ultraTabControl2.Tabs["1"].Visible = false;
  2027. ultraTabControl2.Tabs["2"].Visible = false;
  2028. ultraTabControl2.Tabs["3"].Visible = true;
  2029. ultraTabControl2.Tabs["4"].Visible = false;
  2030. ultraTabControl2.Tabs["5"].Visible = false;
  2031. ultraTabControl2.Tabs["6"].Visible = false;
  2032. ultraTabControl2.Tabs["7"].Visible = false;
  2033. ultraTabControl2.Tabs["8"].Visible = false;
  2034. ultraTabControl2.Tabs["9"].Visible = false;
  2035. ultraTabControl2.Tabs["10"].Visible = false;
  2036. ultraTabControl2.Tabs["11"].Visible = false;
  2037. ultraTabControl2.Tabs["12"].Visible = false;
  2038. this.ultraLabel36.Visible = true;
  2039. this.ultraComFormual.Visible = true;
  2040. this.cmbStdSteelType.Visible = true;
  2041. this.txtStdSteelNo.Visible = true;
  2042. this.txtStdSteelValue.Visible = true;
  2043. this.txtActualValue.Visible = true;
  2044. ultraLabel46.Visible = true;
  2045. ultraLabel48.Visible = true;
  2046. ultraLabel47.Visible = true;
  2047. ultraLabel49.Visible = true;
  2048. ultraLabel37.Visible = false;
  2049. ultraLabel39.Visible = false;
  2050. this.txtPHY_DIR.Visible = false;
  2051. this.txtSAMPLE_TYPE.Visible = false;
  2052. ultraLabel40.Visible = false;
  2053. this.ultraSAMPLE_STYLE.Visible = false;
  2054. ultraComFormual.Items.Clear();
  2055. ultraComFormual.Items.Add("HV5");
  2056. ultraComFormual.Items.Add("HV10");
  2057. cmbStdSteelType.Items.Clear();
  2058. cmbStdSteelType.Items.Add("HV5");
  2059. cmbStdSteelType.Items.Add("HV10");
  2060. cmbStdSteelType.Items.Add("HV0.2");
  2061. }
  2062. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0016") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0031"))//组织
  2063. {
  2064. PipeCheckconsignPhydetailEntityZZbindingSource.DataSource = listSource;
  2065. ultraTabControl2.Tabs["7"].Selected = true;
  2066. ultraTabControl2.Tabs["0"].Visible = false;
  2067. ultraTabControl2.Tabs["1"].Visible = false;
  2068. ultraTabControl2.Tabs["2"].Visible = false;
  2069. ultraTabControl2.Tabs["3"].Visible = false;
  2070. ultraTabControl2.Tabs["4"].Visible = false;
  2071. ultraTabControl2.Tabs["5"].Visible = false;
  2072. ultraTabControl2.Tabs["6"].Visible = false;
  2073. ultraTabControl2.Tabs["7"].Visible = true;
  2074. ultraTabControl2.Tabs["8"].Visible = false;
  2075. ultraTabControl2.Tabs["9"].Visible = false;
  2076. ultraTabControl2.Tabs["10"].Visible = false;
  2077. ultraTabControl2.Tabs["11"].Visible = false;
  2078. ultraTabControl2.Tabs["12"].Visible = false;
  2079. this.ultraLabel36.Visible = false;
  2080. this.ultraComFormual.Visible = false;
  2081. this.cmbStdSteelType.Visible = false;
  2082. this.txtStdSteelNo.Visible = false;
  2083. this.txtStdSteelValue.Visible = false;
  2084. this.txtActualValue.Visible = false;
  2085. ultraLabel46.Visible = false;
  2086. ultraLabel48.Visible = false;
  2087. ultraLabel47.Visible = false;
  2088. ultraLabel49.Visible = false;
  2089. ultraLabel37.Visible = false;
  2090. ultraLabel39.Visible = false;
  2091. this.txtPHY_DIR.Visible = false;
  2092. this.txtSAMPLE_TYPE.Visible = false;
  2093. ultraLabel40.Visible = false;
  2094. this.ultraSAMPLE_STYLE.Visible = false;
  2095. }
  2096. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))//晶粒度
  2097. {
  2098. PipeCheckconsignPhydetailEntityJLDbindingSource.DataSource = listSource;
  2099. ultraTabControl2.Tabs["6"].Selected = true;
  2100. ultraTabControl2.Tabs["0"].Visible = false;
  2101. ultraTabControl2.Tabs["1"].Visible = false;
  2102. ultraTabControl2.Tabs["2"].Visible = false;
  2103. ultraTabControl2.Tabs["3"].Visible = false;
  2104. ultraTabControl2.Tabs["4"].Visible = false;
  2105. ultraTabControl2.Tabs["5"].Visible = false;
  2106. ultraTabControl2.Tabs["6"].Visible = true;
  2107. ultraTabControl2.Tabs["7"].Visible = false;
  2108. ultraTabControl2.Tabs["8"].Visible = false;
  2109. ultraTabControl2.Tabs["9"].Visible = false;
  2110. ultraTabControl2.Tabs["10"].Visible = false;
  2111. ultraTabControl2.Tabs["11"].Visible = false;
  2112. ultraTabControl2.Tabs["12"].Visible = false;
  2113. this.ultraLabel36.Visible = false;
  2114. this.ultraComFormual.Visible = false;
  2115. this.cmbStdSteelType.Visible = false;
  2116. this.txtStdSteelNo.Visible = false;
  2117. this.txtStdSteelValue.Visible = false;
  2118. this.txtActualValue.Visible = false;
  2119. ultraLabel46.Visible = false;
  2120. ultraLabel48.Visible = false;
  2121. ultraLabel47.Visible = false;
  2122. ultraLabel49.Visible = false;
  2123. ultraLabel37.Visible = false;
  2124. ultraLabel39.Visible = false;
  2125. this.txtPHY_DIR.Visible = false;
  2126. this.txtSAMPLE_TYPE.Visible = false;
  2127. ultraLabel40.Visible = false;
  2128. this.ultraSAMPLE_STYLE.Visible = false;
  2129. }
  2130. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))//夹杂
  2131. {
  2132. PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource = listSource;
  2133. ultraTabControl2.Tabs["5"].Selected = true;
  2134. ultraTabControl2.Tabs["0"].Visible = false;
  2135. ultraTabControl2.Tabs["1"].Visible = false;
  2136. ultraTabControl2.Tabs["2"].Visible = false;
  2137. ultraTabControl2.Tabs["3"].Visible = false;
  2138. ultraTabControl2.Tabs["4"].Visible = false;
  2139. ultraTabControl2.Tabs["5"].Visible = true;
  2140. ultraTabControl2.Tabs["6"].Visible = false;
  2141. ultraTabControl2.Tabs["7"].Visible = false;
  2142. ultraTabControl2.Tabs["8"].Visible = false;
  2143. ultraTabControl2.Tabs["9"].Visible = false;
  2144. ultraTabControl2.Tabs["10"].Visible = false;
  2145. ultraTabControl2.Tabs["11"].Visible = false;
  2146. ultraTabControl2.Tabs["12"].Visible = false;
  2147. this.ultraLabel36.Visible = false;
  2148. this.ultraComFormual.Visible = false;
  2149. this.cmbStdSteelType.Visible = false;
  2150. this.txtStdSteelNo.Visible = false;
  2151. this.txtStdSteelValue.Visible = false;
  2152. this.txtActualValue.Visible = false;
  2153. ultraLabel46.Visible = false;
  2154. ultraLabel48.Visible = false;
  2155. ultraLabel47.Visible = false;
  2156. ultraLabel49.Visible = false;
  2157. ultraLabel37.Visible = false;
  2158. ultraLabel39.Visible = false;
  2159. this.txtPHY_DIR.Visible = false;
  2160. this.txtSAMPLE_TYPE.Visible = false;
  2161. ultraLabel40.Visible = false;
  2162. this.ultraSAMPLE_STYLE.Visible = false;
  2163. ultraGrid8.DisplayLayout.Bands[0].Columns["Value1"].Header.Caption = "一象限";
  2164. ultraGrid8.DisplayLayout.Bands[0].Columns["Value2"].Header.Caption = "二象限";
  2165. ultraGrid8.DisplayLayout.Bands[0].Columns["Value3"].Header.Caption = "三象限";
  2166. ultraGrid8.DisplayLayout.Bands[0].Columns["Value4"].Header.Caption = "四象限";
  2167. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0115"))
  2168. {
  2169. ultraGrid8.DisplayLayout.Bands[0].Columns["Value2"].Hidden = false;
  2170. ultraGrid8.DisplayLayout.Bands[0].Columns["Value3"].Hidden = false;
  2171. ultraGrid8.DisplayLayout.Bands[0].Columns["Value4"].Hidden = false;
  2172. }
  2173. else
  2174. {
  2175. ultraGrid8.DisplayLayout.Bands[0].Columns["Value2"].Hidden = true;
  2176. ultraGrid8.DisplayLayout.Bands[0].Columns["Value3"].Hidden = true;
  2177. ultraGrid8.DisplayLayout.Bands[0].Columns["Value4"].Hidden = true;
  2178. }
  2179. }
  2180. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0010"))//工艺
  2181. {
  2182. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0027") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0038") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0082") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0083") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0098"))//弯曲
  2183. {
  2184. PipeCheckconsignPhydetailEntityWQbindingSource.DataSource = listSource;
  2185. ultraTabControl2.Tabs["9"].Selected = true;
  2186. ultraTabControl2.Tabs["0"].Visible = false;
  2187. ultraTabControl2.Tabs["1"].Visible = false;
  2188. ultraTabControl2.Tabs["2"].Visible = false;
  2189. ultraTabControl2.Tabs["3"].Visible = false;
  2190. ultraTabControl2.Tabs["4"].Visible = false;
  2191. ultraTabControl2.Tabs["5"].Visible = false;
  2192. ultraTabControl2.Tabs["6"].Visible = false;
  2193. ultraTabControl2.Tabs["7"].Visible = false;
  2194. ultraTabControl2.Tabs["8"].Visible = false;
  2195. ultraTabControl2.Tabs["9"].Visible = true;
  2196. ultraTabControl2.Tabs["10"].Visible = false;
  2197. ultraTabControl2.Tabs["11"].Visible = false;
  2198. ultraTabControl2.Tabs["12"].Visible = false;
  2199. this.ultraLabel36.Visible = false;
  2200. this.ultraComFormual.Visible = false;
  2201. this.cmbStdSteelType.Visible = false;
  2202. this.txtStdSteelNo.Visible = false;
  2203. this.txtStdSteelValue.Visible = false;
  2204. this.txtActualValue.Visible = false;
  2205. ultraLabel46.Visible = false;
  2206. ultraLabel48.Visible = false;
  2207. ultraLabel47.Visible = false;
  2208. ultraLabel49.Visible = false;
  2209. ultraLabel37.Visible = false;
  2210. ultraLabel39.Visible = false;
  2211. this.txtPHY_DIR.Visible = false;
  2212. this.txtSAMPLE_TYPE.Visible = false;
  2213. ultraLabel40.Visible = false;
  2214. this.ultraSAMPLE_STYLE.Visible = false;
  2215. }
  2216. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0009"))//压扁
  2217. {
  2218. TxtYbEuestion.Text = "";
  2219. TxtYbD.Text = "";
  2220. TxtYbS.Text = "";
  2221. TxtYbC.Text = "";
  2222. TxtYbSpac.Text = "";
  2223. TxtYbQualfiled.Text = "";
  2224. TxtYbDefect.Text = "";
  2225. TxtYbMemo.Text = "";
  2226. PipeCheckconsignPhydetailEntityYBbindingSource.DataSource = listSource;
  2227. ultraTabControl2.Tabs["8"].Selected = true;
  2228. ultraTabControl2.Tabs["0"].Visible = false;
  2229. ultraTabControl2.Tabs["1"].Visible = false;
  2230. ultraTabControl2.Tabs["2"].Visible = false;
  2231. ultraTabControl2.Tabs["3"].Visible = false;
  2232. ultraTabControl2.Tabs["4"].Visible = false;
  2233. ultraTabControl2.Tabs["5"].Visible = false;
  2234. ultraTabControl2.Tabs["6"].Visible = false;
  2235. ultraTabControl2.Tabs["7"].Visible = false;
  2236. ultraTabControl2.Tabs["8"].Visible = true;
  2237. ultraTabControl2.Tabs["9"].Visible = false;
  2238. ultraTabControl2.Tabs["10"].Visible = false;
  2239. ultraTabControl2.Tabs["11"].Visible = false;
  2240. this.ultraLabel36.Visible = false;
  2241. this.ultraComFormual.Visible = false;
  2242. this.cmbStdSteelType.Visible = false;
  2243. this.txtStdSteelNo.Visible = false;
  2244. this.txtStdSteelValue.Visible = false;
  2245. this.txtActualValue.Visible = false;
  2246. ultraLabel46.Visible = false;
  2247. ultraLabel48.Visible = false;
  2248. ultraLabel47.Visible = false;
  2249. ultraLabel49.Visible = false;
  2250. ultraLabel37.Visible = false;
  2251. ultraLabel39.Visible = false;
  2252. this.txtPHY_DIR.Visible = false;
  2253. this.txtSAMPLE_TYPE.Visible = false;
  2254. ultraLabel40.Visible = false;
  2255. this.ultraSAMPLE_STYLE.Visible = false;
  2256. int x = row.Cells["SpecName"].Text.IndexOf('x');
  2257. TxtYbD.Text = row.Cells["SpecName"].Text.Substring(0,x);
  2258. TxtYbS.Text = row.Cells["SpecName"].Text.Substring(x + 1);
  2259. ultraGrid13.DisplayLayout.Bands[0].Columns["IsGood"].Header.Caption = "试验结果(一次)";
  2260. ultraGrid13.DisplayLayout.Bands[0].Columns["IsDefect"].Header.Caption = "试验结果(二次)";
  2261. }
  2262. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0026"))//扩口
  2263. {
  2264. PipeCheckconsignPhydetailEntityKKbindingSource.DataSource = listSource;
  2265. ultraTabControl2.Tabs["10"].Selected = true;
  2266. ultraTabControl2.Tabs["0"].Visible = false;
  2267. ultraTabControl2.Tabs["1"].Visible = false;
  2268. ultraTabControl2.Tabs["2"].Visible = false;
  2269. ultraTabControl2.Tabs["3"].Visible = false;
  2270. ultraTabControl2.Tabs["4"].Visible = false;
  2271. ultraTabControl2.Tabs["5"].Visible = false;
  2272. ultraTabControl2.Tabs["6"].Visible = false;
  2273. ultraTabControl2.Tabs["7"].Visible = false;
  2274. ultraTabControl2.Tabs["8"].Visible = false;
  2275. ultraTabControl2.Tabs["9"].Visible = false;
  2276. ultraTabControl2.Tabs["10"].Visible = true;
  2277. ultraTabControl2.Tabs["11"].Visible = false;
  2278. ultraTabControl2.Tabs["12"].Visible = false;
  2279. this.ultraLabel36.Visible = false;
  2280. this.ultraComFormual.Visible = false;
  2281. this.cmbStdSteelType.Visible = false;
  2282. this.txtStdSteelNo.Visible = false;
  2283. this.txtStdSteelValue.Visible = false;
  2284. this.txtActualValue.Visible = false;
  2285. ultraLabel46.Visible = false;
  2286. ultraLabel48.Visible = false;
  2287. ultraLabel47.Visible = false;
  2288. ultraLabel49.Visible = false;
  2289. ultraLabel37.Visible = false;
  2290. ultraLabel39.Visible = false;
  2291. this.txtPHY_DIR.Visible = false;
  2292. this.txtSAMPLE_TYPE.Visible = false;
  2293. ultraLabel40.Visible = false;
  2294. this.ultraSAMPLE_STYLE.Visible = false;
  2295. }
  2296. }
  2297. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))//断裂力学试验,大应变试验
  2298. {
  2299. pipeCheckconsignPhydetailEntityQTBindingSource.DataSource = listSource;
  2300. ultraTabControl2.Tabs["11"].Selected = true;
  2301. ultraTabControl2.Tabs["0"].Visible = false;
  2302. ultraTabControl2.Tabs["1"].Visible = false;
  2303. ultraTabControl2.Tabs["2"].Visible = false;
  2304. ultraTabControl2.Tabs["3"].Visible = false;
  2305. ultraTabControl2.Tabs["4"].Visible = false;
  2306. ultraTabControl2.Tabs["5"].Visible = false;
  2307. ultraTabControl2.Tabs["6"].Visible = false;
  2308. ultraTabControl2.Tabs["7"].Visible = false;
  2309. ultraTabControl2.Tabs["8"].Visible = false;
  2310. ultraTabControl2.Tabs["9"].Visible = false;
  2311. ultraTabControl2.Tabs["10"].Visible = false;
  2312. ultraTabControl2.Tabs["11"].Visible = true;
  2313. ultraTabControl2.Tabs["12"].Visible = false;
  2314. ultraGrid53.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  2315. this.ultraLabel36.Visible = false;
  2316. this.ultraComFormual.Visible = false;
  2317. this.cmbStdSteelType.Visible = false;
  2318. this.txtStdSteelNo.Visible = false;
  2319. this.txtStdSteelValue.Visible = false;
  2320. this.txtActualValue.Visible = false;
  2321. ultraLabel46.Visible = false;
  2322. ultraLabel48.Visible = false;
  2323. ultraLabel47.Visible = false;
  2324. ultraLabel49.Visible = false;
  2325. ultraLabel37.Visible = false;
  2326. ultraLabel39.Visible = false;
  2327. this.txtPHY_DIR.Visible = false;
  2328. this.txtSAMPLE_TYPE.Visible = false;
  2329. ultraLabel40.Visible = false;
  2330. this.ultraSAMPLE_STYLE.Visible = false;
  2331. }
  2332. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0066"))//落锤试验
  2333. {
  2334. PipeCheckconsignDetailEntityLCbindingSource.DataSource = listSource;
  2335. ultraTabControl2.Tabs["12"].Selected = true;
  2336. ultraTabControl2.Tabs["0"].Visible = false;
  2337. ultraTabControl2.Tabs["1"].Visible = false;
  2338. ultraTabControl2.Tabs["2"].Visible = false;
  2339. ultraTabControl2.Tabs["3"].Visible = false;
  2340. ultraTabControl2.Tabs["4"].Visible = false;
  2341. ultraTabControl2.Tabs["5"].Visible = false;
  2342. ultraTabControl2.Tabs["6"].Visible = false;
  2343. ultraTabControl2.Tabs["7"].Visible = false;
  2344. ultraTabControl2.Tabs["8"].Visible = false;
  2345. ultraTabControl2.Tabs["9"].Visible = false;
  2346. ultraTabControl2.Tabs["10"].Visible = false;
  2347. ultraTabControl2.Tabs["11"].Visible = false;
  2348. ultraTabControl2.Tabs["12"].Visible = true;
  2349. //ultraGrid53.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  2350. this.ultraLabel36.Visible = false;
  2351. this.ultraComFormual.Visible = false;
  2352. this.cmbStdSteelType.Visible = false;
  2353. this.txtStdSteelNo.Visible = false;
  2354. this.txtStdSteelValue.Visible = false;
  2355. this.txtActualValue.Visible = false;
  2356. ultraLabel46.Visible = false;
  2357. ultraLabel48.Visible = false;
  2358. ultraLabel47.Visible = false;
  2359. ultraLabel49.Visible = false;
  2360. ultraLabel37.Visible = true;
  2361. ultraLabel39.Visible = true;
  2362. this.txtPHY_DIR.Visible = true;
  2363. txtPHY_DIR.Items.Clear();
  2364. txtPHY_DIR.Items.Add("纵向");
  2365. txtPHY_DIR.Items.Add("横向");
  2366. this.txtPHY_DIR.Text = row.Cells["PhyDir"].Value.ToString();
  2367. this.txtSAMPLE_TYPE.Visible = true;
  2368. txtSAMPLE_TYPE.Items.Clear();
  2369. string specName = row.Cells["SpecName"].Text.Trim();//规格
  2370. if (!specName.Equals(""))
  2371. {
  2372. int x = specName.IndexOf("x");//x位置
  2373. string width = specName.Substring(0, x);
  2374. string height = specName.Substring(x + 1);
  2375. txtSAMPLE_TYPE.Items.Add("305*76.2*" + height);
  2376. }
  2377. txtSAMPLE_TYPE.Items.Add("305*76.2*19");
  2378. ultraLabel40.Visible = false;
  2379. this.ultraSAMPLE_STYLE.Visible = false;
  2380. }
  2381. }
  2382. /// <summary>
  2383. /// 合并单元格
  2384. /// </summary>
  2385. /// <param name="ug"></param>
  2386. /// <param name="columnKeys"></param>
  2387. private void MergedCell(UltraGrid ug, string[] columnKeys)
  2388. {
  2389. if (columnKeys.Length == 0)
  2390. {
  2391. return;
  2392. }
  2393. ug.DisplayLayout.Override.MergedCellStyle = MergedCellStyle.Never;
  2394. for (int i = 0; i < columnKeys.Length; i++)
  2395. {
  2396. ug.DisplayLayout.Bands[0].Columns[columnKeys[i]].MergedCellStyle = MergedCellStyle.Always;
  2397. }
  2398. }
  2399. private void ultraTabControl1_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  2400. {
  2401. if (toolMenu == null) return;
  2402. if (ultraTabControl1.SelectedTab.Index == 0)
  2403. {
  2404. if (toolMenu.Toolbars[0].Tools.Exists("Query"))
  2405. {
  2406. toolMenu.Toolbars[0].Tools["Query"].InstanceProps.Visible = DefaultableBoolean.True;
  2407. }
  2408. if (toolMenu.Toolbars[0].Tools.Exists("QueryRecord"))
  2409. {
  2410. toolMenu.Toolbars[0].Tools["QueryRecord"].InstanceProps.Visible = DefaultableBoolean.False;
  2411. }
  2412. if (toolMenu.Toolbars[0].Tools.Exists("Add"))
  2413. {
  2414. this.toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.True;
  2415. }
  2416. if (toolMenu.Toolbars[0].Tools.Exists("Update"))
  2417. {
  2418. toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.False;
  2419. }
  2420. if (toolMenu.Toolbars[0].Tools.Exists("Delete"))
  2421. {
  2422. toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.False;
  2423. }
  2424. if (toolMenu.Toolbars[0].Tools.Exists("Audit"))
  2425. {
  2426. toolMenu.Toolbars[0].Tools["Audit"].InstanceProps.Visible = DefaultableBoolean.False;
  2427. }
  2428. if (toolMenu.Toolbars[0].Tools.Exists("CancelAudit"))
  2429. {
  2430. toolMenu.Toolbars[0].Tools["CancelAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2431. }
  2432. if (toolMenu.Toolbars[0].Tools.Exists("SingleAudit"))
  2433. {
  2434. toolMenu.Toolbars[0].Tools["SingleAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2435. }
  2436. if (toolMenu.Toolbars[0].Tools.Exists("CancelSingleAudit"))
  2437. {
  2438. toolMenu.Toolbars[0].Tools["CancelSingleAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2439. }
  2440. if (toolMenu.Toolbars[0].Tools.Exists("PrintMechanics"))
  2441. {
  2442. toolMenu.Toolbars[0].Tools["PrintMechanics"].InstanceProps.Visible = DefaultableBoolean.False;
  2443. }
  2444. if (toolMenu.Toolbars[0].Tools.Exists("UpFile"))
  2445. {
  2446. toolMenu.Toolbars[0].Tools["UpFile"].InstanceProps.Visible = DefaultableBoolean.False;
  2447. }
  2448. if (toolMenu.Toolbars[0].Tools.Exists("UpPicture"))
  2449. {
  2450. toolMenu.Toolbars[0].Tools["UpPicture"].InstanceProps.Visible = DefaultableBoolean.False;
  2451. }
  2452. if (toolMenu.Toolbars[0].Tools.Exists("PrintPicture"))
  2453. {
  2454. toolMenu.Toolbars[0].Tools["PrintPicture"].InstanceProps.Visible = DefaultableBoolean.False;
  2455. }
  2456. ultraOptionSet1.Visible = true;
  2457. chkRegTime.Text = "收样日期";
  2458. this.chkPrintK.Visible = true;
  2459. this.cmbPrintK.Visible = true;
  2460. }
  2461. else if (ultraTabControl1.SelectedTab.Index == 1)
  2462. {
  2463. if (toolMenu.Toolbars[0].Tools.Exists("Query"))
  2464. {
  2465. toolMenu.Toolbars[0].Tools["Query"].InstanceProps.Visible = DefaultableBoolean.True;
  2466. }
  2467. if (toolMenu.Toolbars[0].Tools.Exists("QueryRecord"))
  2468. {
  2469. toolMenu.Toolbars[0].Tools["QueryRecord"].InstanceProps.Visible = DefaultableBoolean.True;
  2470. }
  2471. if (toolMenu.Toolbars[0].Tools.Exists("Add"))
  2472. {
  2473. this.toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.False;
  2474. }
  2475. if (toolMenu.Toolbars[0].Tools.Exists("Update"))
  2476. {
  2477. toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.True;
  2478. }
  2479. if (toolMenu.Toolbars[0].Tools.Exists("Delete"))
  2480. {
  2481. toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.True;
  2482. }
  2483. if (toolMenu.Toolbars[0].Tools.Exists("Audit"))
  2484. {
  2485. toolMenu.Toolbars[0].Tools["Audit"].InstanceProps.Visible = DefaultableBoolean.False;
  2486. }
  2487. if (toolMenu.Toolbars[0].Tools.Exists("CancelAudit"))
  2488. {
  2489. toolMenu.Toolbars[0].Tools["CancelAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2490. }
  2491. if (toolMenu.Toolbars[0].Tools.Exists("SingleAudit"))
  2492. {
  2493. toolMenu.Toolbars[0].Tools["SingleAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2494. }
  2495. if (toolMenu.Toolbars[0].Tools.Exists("CancelSingleAudit"))
  2496. {
  2497. toolMenu.Toolbars[0].Tools["CancelSingleAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2498. }
  2499. if (toolMenu.Toolbars[0].Tools.Exists("PrintMechanics"))
  2500. {
  2501. toolMenu.Toolbars[0].Tools["PrintMechanics"].InstanceProps.Visible = DefaultableBoolean.False;
  2502. }
  2503. if (toolMenu.Toolbars[0].Tools.Exists("UpFile"))
  2504. {
  2505. toolMenu.Toolbars[0].Tools["UpFile"].InstanceProps.Visible = DefaultableBoolean.False;
  2506. }
  2507. if (toolMenu.Toolbars[0].Tools.Exists("UpPicture"))
  2508. {
  2509. toolMenu.Toolbars[0].Tools["UpPicture"].InstanceProps.Visible = DefaultableBoolean.False;
  2510. }
  2511. if (toolMenu.Toolbars[0].Tools.Exists("PrintPicture"))
  2512. {
  2513. toolMenu.Toolbars[0].Tools["PrintPicture"].InstanceProps.Visible = DefaultableBoolean.False;
  2514. }
  2515. ultraOptionSet1.Visible = true;
  2516. chkRegTime.Text = "收样日期";
  2517. this.chkPrintK.Visible = true;
  2518. this.cmbPrintK.Visible = true;
  2519. }
  2520. else if (ultraTabControl1.SelectedTab.Index == 2)
  2521. {
  2522. if (toolMenu.Toolbars[0].Tools.Exists("Query"))
  2523. {
  2524. toolMenu.Toolbars[0].Tools["Query"].InstanceProps.Visible = DefaultableBoolean.True;
  2525. }
  2526. if (toolMenu.Toolbars[0].Tools.Exists("QueryRecord"))
  2527. {
  2528. toolMenu.Toolbars[0].Tools["QueryRecord"].InstanceProps.Visible = DefaultableBoolean.False;
  2529. }
  2530. if (toolMenu.Toolbars[0].Tools.Exists("Add"))
  2531. {
  2532. this.toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.False;
  2533. }
  2534. if (toolMenu.Toolbars[0].Tools.Exists("Update"))
  2535. {
  2536. toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.False;
  2537. }
  2538. if (toolMenu.Toolbars[0].Tools.Exists("Delete"))
  2539. {
  2540. toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.False;
  2541. }
  2542. if (toolMenu.Toolbars[0].Tools.Exists("Audit"))
  2543. {
  2544. toolMenu.Toolbars[0].Tools["Audit"].InstanceProps.Visible = DefaultableBoolean.True;
  2545. }
  2546. if (toolMenu.Toolbars[0].Tools.Exists("CancelAudit"))
  2547. {
  2548. toolMenu.Toolbars[0].Tools["CancelAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2549. }
  2550. if (toolMenu.Toolbars[0].Tools.Exists("SingleAudit"))
  2551. {
  2552. toolMenu.Toolbars[0].Tools["SingleAudit"].InstanceProps.Visible = DefaultableBoolean.True;
  2553. }
  2554. if (toolMenu.Toolbars[0].Tools.Exists("CancelSingleAudit"))
  2555. {
  2556. toolMenu.Toolbars[0].Tools["CancelSingleAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2557. }
  2558. if (toolMenu.Toolbars[0].Tools.Exists("PrintMechanics"))
  2559. {
  2560. toolMenu.Toolbars[0].Tools["PrintMechanics"].InstanceProps.Visible = DefaultableBoolean.False;
  2561. }
  2562. if (toolMenu.Toolbars[0].Tools.Exists("UpFile"))
  2563. {
  2564. toolMenu.Toolbars[0].Tools["UpFile"].InstanceProps.Visible = DefaultableBoolean.False;
  2565. }
  2566. if (toolMenu.Toolbars[0].Tools.Exists("UpPicture"))
  2567. {
  2568. toolMenu.Toolbars[0].Tools["UpPicture"].InstanceProps.Visible = DefaultableBoolean.False;
  2569. }
  2570. if (toolMenu.Toolbars[0].Tools.Exists("PrintPicture"))
  2571. {
  2572. toolMenu.Toolbars[0].Tools["PrintPicture"].InstanceProps.Visible = DefaultableBoolean.False;
  2573. }
  2574. this.chkPrintK.Visible = false;
  2575. this.cmbPrintK.Visible = false;
  2576. //ultraOptionSet1.Visible = false;
  2577. chkRegTime.Text = "录入日期";
  2578. }
  2579. else if (ultraTabControl1.SelectedTab.Index == 3)
  2580. {
  2581. if (toolMenu.Toolbars[0].Tools.Exists("Query"))
  2582. {
  2583. toolMenu.Toolbars[0].Tools["Query"].InstanceProps.Visible = DefaultableBoolean.True;
  2584. }
  2585. if (toolMenu.Toolbars[0].Tools.Exists("QueryRecord"))
  2586. {
  2587. toolMenu.Toolbars[0].Tools["QueryRecord"].InstanceProps.Visible = DefaultableBoolean.False;
  2588. }
  2589. if (toolMenu.Toolbars[0].Tools.Exists("Add"))
  2590. {
  2591. this.toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.False;
  2592. }
  2593. if (toolMenu.Toolbars[0].Tools.Exists("Update"))
  2594. {
  2595. toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.False;
  2596. }
  2597. if (toolMenu.Toolbars[0].Tools.Exists("Delete"))
  2598. {
  2599. toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.False;
  2600. }
  2601. if (toolMenu.Toolbars[0].Tools.Exists("Audit"))
  2602. {
  2603. toolMenu.Toolbars[0].Tools["Audit"].InstanceProps.Visible = DefaultableBoolean.False;
  2604. }
  2605. if (toolMenu.Toolbars[0].Tools.Exists("CancelAudit"))
  2606. {
  2607. toolMenu.Toolbars[0].Tools["CancelAudit"].InstanceProps.Visible = DefaultableBoolean.True;
  2608. }
  2609. if (toolMenu.Toolbars[0].Tools.Exists("SingleAudit"))
  2610. {
  2611. toolMenu.Toolbars[0].Tools["SingleAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2612. }
  2613. if (toolMenu.Toolbars[0].Tools.Exists("CancelSingleAudit"))
  2614. {
  2615. toolMenu.Toolbars[0].Tools["CancelSingleAudit"].InstanceProps.Visible = DefaultableBoolean.True;
  2616. }
  2617. if (toolMenu.Toolbars[0].Tools.Exists("PrintMechanics"))
  2618. {
  2619. toolMenu.Toolbars[0].Tools["PrintMechanics"].InstanceProps.Visible = DefaultableBoolean.True;
  2620. }
  2621. if (toolMenu.Toolbars[0].Tools.Exists("UpFile"))
  2622. {
  2623. toolMenu.Toolbars[0].Tools["UpFile"].InstanceProps.Visible = DefaultableBoolean.True;
  2624. }
  2625. if (toolMenu.Toolbars[0].Tools.Exists("UpPicture"))
  2626. {
  2627. toolMenu.Toolbars[0].Tools["UpPicture"].InstanceProps.Visible = DefaultableBoolean.True;
  2628. }
  2629. if (toolMenu.Toolbars[0].Tools.Exists("PrintPicture"))
  2630. {
  2631. toolMenu.Toolbars[0].Tools["PrintPicture"].InstanceProps.Visible = DefaultableBoolean.True;
  2632. }
  2633. //ultraOptionSet1.Visible = false;
  2634. this.chkPrintK.Visible = true;
  2635. this.cmbPrintK.Visible = true;
  2636. chkRegTime.Text = "审核日期";
  2637. }
  2638. }
  2639. private void FrmLabMecDataCJAuditMJ_Shown(object sender, EventArgs e)
  2640. {
  2641. if (toolMenu == null) return;
  2642. if (toolMenu.Toolbars[0].Tools.Exists("Query"))
  2643. {
  2644. toolMenu.Toolbars[0].Tools["Query"].InstanceProps.Visible = DefaultableBoolean.True;
  2645. }
  2646. if (toolMenu.Toolbars[0].Tools.Exists("Add"))
  2647. {
  2648. this.toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.True;
  2649. }
  2650. if (toolMenu.Toolbars[0].Tools.Exists("Update"))
  2651. {
  2652. toolMenu.Toolbars[0].Tools["Update"].InstanceProps.Visible = DefaultableBoolean.False;
  2653. }
  2654. if (toolMenu.Toolbars[0].Tools.Exists("Delete"))
  2655. {
  2656. toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.False;
  2657. }
  2658. if (toolMenu.Toolbars[0].Tools.Exists("Audit"))
  2659. {
  2660. toolMenu.Toolbars[0].Tools["Audit"].InstanceProps.Visible = DefaultableBoolean.False;
  2661. }
  2662. if (toolMenu.Toolbars[0].Tools.Exists("CancelAudit"))
  2663. {
  2664. toolMenu.Toolbars[0].Tools["CancelAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2665. }
  2666. if (toolMenu.Toolbars[0].Tools.Exists("SingleAudit"))
  2667. {
  2668. toolMenu.Toolbars[0].Tools["SingleAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2669. }
  2670. if (toolMenu.Toolbars[0].Tools.Exists("CancelSingleAudit"))
  2671. {
  2672. toolMenu.Toolbars[0].Tools["CancelSingleAudit"].InstanceProps.Visible = DefaultableBoolean.False;
  2673. }
  2674. if (toolMenu.Toolbars[0].Tools.Exists("PrintMechanics"))
  2675. {
  2676. toolMenu.Toolbars[0].Tools["PrintMechanics"].InstanceProps.Visible = DefaultableBoolean.False;
  2677. }
  2678. if (toolMenu.Toolbars[0].Tools.Exists("UpFile"))
  2679. {
  2680. toolMenu.Toolbars[0].Tools["UpFile"].InstanceProps.Visible = DefaultableBoolean.False;
  2681. }
  2682. if (toolMenu.Toolbars[0].Tools.Exists("UpPicture"))
  2683. {
  2684. toolMenu.Toolbars[0].Tools["UpPicture"].InstanceProps.Visible = DefaultableBoolean.False;
  2685. }
  2686. if (toolMenu.Toolbars[0].Tools.Exists("PrintPicture"))
  2687. {
  2688. toolMenu.Toolbars[0].Tools["PrintPicture"].InstanceProps.Visible = DefaultableBoolean.False;
  2689. }
  2690. this.chkPrintK.Visible = true;
  2691. this.cmbPrintK.Visible = true;
  2692. }
  2693. private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  2694. {
  2695. UltraGridRow uRow = this.ultraGrid2.ActiveRow;
  2696. if (uRow.Cells["CraftFileNo"].Text.Trim() == "" || uRow.Cells["CraftPath"].Text.Trim() == "")
  2697. {
  2698. return;
  2699. }
  2700. PublicPipeAndOutdec.ViewCarft_No(uRow.Cells["CraftPath"].Text.Trim());
  2701. }
  2702. private void ultraTextEditor3_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  2703. {
  2704. UltraGridRow uRow = this.ultraGrid15.ActiveRow;
  2705. if (uRow.Cells["CraftFileNo"].Text.Trim() == "" || uRow.Cells["CraftPath"].Text.Trim() == "")
  2706. {
  2707. return;
  2708. }
  2709. PublicPipeAndOutdec.ViewCarft_No(uRow.Cells["CraftPath"].Text.Trim());
  2710. }
  2711. private void ultraTextEditor4_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  2712. {
  2713. UltraGridRow uRow = this.ultraGrid28.ActiveRow;
  2714. if (uRow.Cells["CraftFileNo"].Text.Trim() == "" || uRow.Cells["CraftPath"].Text.Trim() == "")
  2715. {
  2716. return;
  2717. }
  2718. PublicPipeAndOutdec.ViewCarft_No(uRow.Cells["CraftPath"].Text.Trim());
  2719. }
  2720. private void ultraTextEditor5_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  2721. {
  2722. UltraGridRow uRow = this.ultraGrid41.ActiveRow;
  2723. if (uRow.Cells["CraftFileNo"].Text.Trim() == "" || uRow.Cells["CraftPath"].Text.Trim() == "")
  2724. {
  2725. return;
  2726. }
  2727. PublicPipeAndOutdec.ViewCarft_No(uRow.Cells["CraftPath"].Text.Trim());
  2728. }
  2729. private void ultraGrid4_CellChange(object sender, CellEventArgs e)
  2730. {
  2731. this.ultraGrid4.UpdateData();
  2732. UltraGridRow ur = this.ultraGrid4.ActiveRow;
  2733. UltraGridRow uRow = this.ultraGrid2.ActiveRow;
  2734. string specName = uRow.Cells["ItemNameS"].Text.Trim();//试验尺寸
  2735. int x = specName.IndexOf("×");//x位置
  2736. string width = specName.Substring(0, x).Replace("m","");
  2737. string height = specName.Substring(x + 1).Replace("m","");
  2738. int m = 1;
  2739. string ak1 = "";//真实值
  2740. string ak2 = "";
  2741. string ak3 = "";
  2742. int akNum = 0;
  2743. foreach(UltraGridRow row in this.ultraGrid4.Rows)
  2744. {
  2745. m = 1;
  2746. if (row.Cells["PhyName"].Text.Contains("侧膨胀值"))
  2747. {
  2748. //akNum = akNum + 1;
  2749. if (e.Cell.Column.Key == "Value1")
  2750. {
  2751. if (row.Cells["Value2"].Text != "")
  2752. {
  2753. m = m + 1;
  2754. }
  2755. if (row.Cells["Value3"].Text != "")
  2756. {
  2757. m = m + 1;
  2758. }
  2759. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3()) + double.Parse(row.Cells["Value3"].Text.ToString3())) / m), 2).ToString();
  2760. }
  2761. if (e.Cell.Column.Key == "Value2")
  2762. {
  2763. if (row.Cells["Value1"].Text != "")
  2764. {
  2765. m = m + 1;
  2766. }
  2767. if (row.Cells["Value3"].Text != "")
  2768. {
  2769. m = m + 1;
  2770. }
  2771. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3()) + double.Parse(row.Cells["Value3"].Text.ToString3())) / m), 2).ToString();
  2772. }
  2773. if (e.Cell.Column.Key == "Value3")
  2774. {
  2775. if (row.Cells["Value1"].Text != "")
  2776. {
  2777. m = m + 1;
  2778. }
  2779. if (row.Cells["Value2"].Text != "")
  2780. {
  2781. m = m + 1;
  2782. }
  2783. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3()) + double.Parse(row.Cells["Value3"].Text.ToString3())) / m), 2).ToString();
  2784. }
  2785. }
  2786. else
  2787. {
  2788. if (e.Cell.Column.Key == "Value1")
  2789. {
  2790. if (row.Cells["Value2"].Text != "")
  2791. {
  2792. m = m + 1;
  2793. }
  2794. if (row.Cells["Value3"].Text != "")
  2795. {
  2796. m = m + 1;
  2797. }
  2798. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3()) + double.Parse(row.Cells["Value3"].Text.ToString3())) / m)).ToString();
  2799. }
  2800. if (e.Cell.Column.Key == "Value2")
  2801. {
  2802. if (row.Cells["Value1"].Text != "")
  2803. {
  2804. m = m + 1;
  2805. }
  2806. if (row.Cells["Value3"].Text != "")
  2807. {
  2808. m = m + 1;
  2809. }
  2810. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3()) + double.Parse(row.Cells["Value3"].Text.ToString3())) / m)).ToString();
  2811. }
  2812. if (e.Cell.Column.Key == "Value3")
  2813. {
  2814. if (row.Cells["Value1"].Text != "")
  2815. {
  2816. m = m + 1;
  2817. }
  2818. if (row.Cells["Value2"].Text != "")
  2819. {
  2820. m = m + 1;
  2821. }
  2822. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3()) + double.Parse(row.Cells["Value3"].Text.ToString3())) / m)).ToString();
  2823. }
  2824. }
  2825. }
  2826. //if (akNum > 0 && ur.Cells["PhyName"].Text.Contains("侧膨胀值"))
  2827. //{
  2828. // if (e.Cell.Column.Key == "Value1")
  2829. // {
  2830. // if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3())) return;
  2831. // ak1 = (Math.Round(100 * double.Parse(ur.Cells["Value1"].Text.Trim().ToString3()) / (double.Parse(width) * (double.Parse(height) - 2)), 0)).ToString();
  2832. // foreach (UltraGridRow akRow in this.ultraGrid4.Rows)
  2833. // {
  2834. // //if (akRow.Cells["PhyName"].Text.Contains("ak"))
  2835. // //{
  2836. // // akRow.Cells["Value1"].Value = ak1;
  2837. // if (akRow.Cells["Value2"].Text != "")
  2838. // {
  2839. // m = m + 1;
  2840. // }
  2841. // if (akRow.Cells["Value3"].Text != "")
  2842. // {
  2843. // m = m + 1;
  2844. // }
  2845. // m = m + 1;
  2846. // akRow.Cells["AverageValue"].Value = Math.Round(((double.Parse(akRow.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(akRow.Cells["Value2"].Text.ToString3()) + double.Parse(akRow.Cells["Value3"].Text.ToString3())) / m), 2).ToString();
  2847. // //}
  2848. // }
  2849. // }
  2850. // if (e.Cell.Column.Key == "Value2")
  2851. // {
  2852. // if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value2"].Value.ToString3())) return;
  2853. // ak2 = (Math.Round(100 * double.Parse(ur.Cells["Value2"].Text.Trim().ToString3()) / (double.Parse(width) * (double.Parse(height) - 2)), 0)).ToString();
  2854. // foreach (UltraGridRow akRow in this.ultraGrid4.Rows)
  2855. // {
  2856. // //if (akRow.Cells["PhyName"].Text.Contains("ak"))
  2857. // //{
  2858. // // akRow.Cells["Value2"].Value = ak2;
  2859. // if (ur.Cells["Value1"].Text != "")
  2860. // {
  2861. // m = m + 1;
  2862. // }
  2863. // if (ur.Cells["Value3"].Text != "")
  2864. // {
  2865. // m = m + 1;
  2866. // }
  2867. // m = m + 1;
  2868. // akRow.Cells["AverageValue"].Value = Math.Round(((double.Parse(akRow.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(akRow.Cells["Value2"].Text.ToString3()) + double.Parse(akRow.Cells["Value3"].Text.ToString3())) / m), 2).ToString();
  2869. // //}
  2870. // }
  2871. // }
  2872. // if (e.Cell.Column.Key == "Value3")
  2873. // {
  2874. // if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value3"].Value.ToString3())) return;
  2875. // ak3 = (Math.Round(100 * double.Parse(ur.Cells["Value3"].Text.Trim().ToString3()) / (double.Parse(width) * (double.Parse(height) - 2)), 0)).ToString();
  2876. // foreach (UltraGridRow akRow in this.ultraGrid4.Rows)
  2877. // {
  2878. // //if (akRow.Cells["PhyName"].Text.Contains("ak"))
  2879. // //{
  2880. // // akRow.Cells["Value3"].Value = ak3;
  2881. // if (akRow.Cells["Value1"].Text != "")
  2882. // {
  2883. // m = m + 1;
  2884. // }
  2885. // if (akRow.Cells["Value2"].Text != "")
  2886. // {
  2887. // m = m + 1;
  2888. // }
  2889. // m = m + 1;
  2890. // akRow.Cells["AverageValue"].Value = Math.Round(((double.Parse(akRow.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(akRow.Cells["Value2"].Text.ToString3()) + double.Parse(akRow.Cells["Value3"].Text.ToString3())) / m), 2).ToString();
  2891. // //}
  2892. // }
  2893. // }
  2894. //}
  2895. //else
  2896. //{
  2897. // if (e.Cell.Column.Key == "Value1" || e.Cell.Column.Key == "Value2" || e.Cell.Column.Key == "Value3")
  2898. // {
  2899. // if (ur.Cells["Value1"].Text != "")
  2900. // {
  2901. // m = m + 1;
  2902. // }
  2903. // if (ur.Cells["Value2"].Text != "")
  2904. // {
  2905. // m = m + 1;
  2906. // }
  2907. // if (ur.Cells["Value3"].Text != "")
  2908. // {
  2909. // m = m + 1;
  2910. // }
  2911. // ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(ur.Cells["Value2"].Text.Trim().ToString3()) + double.Parse(ur.Cells["Value3"].Text.Trim().ToString3())) / m)).ToString();
  2912. // }
  2913. //}
  2914. }
  2915. private void ultraGrid5_CellChange(object sender, CellEventArgs e)
  2916. {
  2917. this.ultraGrid5.UpdateData();
  2918. UltraGridRow ur = this.ultraGrid5.ActiveRow;
  2919. int m = 0;
  2920. if (e.Cell.Column.Key == "Value1" || e.Cell.Column.Key == "Value2" || e.Cell.Column.Key == "Value3" || e.Cell.Column.Key == "Value4")
  2921. {
  2922. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value2"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value3"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value4"].Value.ToString3()))
  2923. {
  2924. return;
  2925. }
  2926. if (ur.Cells["Value1"].Text != "")
  2927. {
  2928. m = m + 1;
  2929. }
  2930. if (ur.Cells["Value2"].Text != "")
  2931. {
  2932. m = m + 1;
  2933. }
  2934. if (ur.Cells["Value3"].Text != "")
  2935. {
  2936. m = m + 1;
  2937. }
  2938. if (ur.Cells["Value4"].Text != "")
  2939. {
  2940. m = m + 1;
  2941. }
  2942. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3())) / m), 1).ToString();
  2943. }
  2944. }
  2945. private void ultraGrid7_CellChange(object sender, CellEventArgs e)
  2946. {
  2947. this.ultraGrid7.UpdateData();
  2948. UltraGridRow ur = this.ultraGrid7.ActiveRow;
  2949. int m = 0;
  2950. string comFormual = this.ultraComFormual.Text.Trim();
  2951. if (e.Cell.Column.Key == "Value1D1" || e.Cell.Column.Key == "Value1D2")
  2952. {
  2953. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value1D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value1D2"].Value.ToString3()))
  2954. {
  2955. return;
  2956. }
  2957. if (comFormual.Equals("HV5"))
  2958. {
  2959. ur.Cells["Value1"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3()))/2,2),0);
  2960. }
  2961. else if (comFormual.Equals("HV10"))
  2962. {
  2963. ur.Cells["Value1"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3())) / 2, 2), 0);
  2964. }
  2965. else
  2966. {
  2967. MessageUtil.ShowTips("公式选择错误!");
  2968. return;
  2969. }
  2970. if (ur.Cells["Value1"].Text != "")
  2971. {
  2972. m = m + 1;
  2973. }
  2974. if (ur.Cells["Value2"].Text != "")
  2975. {
  2976. m = m + 1;
  2977. }
  2978. if (ur.Cells["Value3"].Text != "")
  2979. {
  2980. m = m + 1;
  2981. }
  2982. if (ur.Cells["Value4"].Text != "")
  2983. {
  2984. m = m + 1;
  2985. }
  2986. if (ur.Cells["Value5"].Text != "")
  2987. {
  2988. m = m + 1;
  2989. }
  2990. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3()) + double.Parse(ur.Cells["Value5"].Text.ToString3())) / m), 0).ToString();
  2991. }
  2992. if (e.Cell.Column.Key == "Value2D1" || e.Cell.Column.Key == "Value2D2")
  2993. {
  2994. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value2D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value2D2"].Value.ToString3()))
  2995. {
  2996. return;
  2997. }
  2998. if (comFormual.Equals("HV5"))
  2999. {
  3000. ur.Cells["Value2"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3())) / 2, 2), 0);
  3001. }
  3002. else if (comFormual.Equals("HV10"))
  3003. {
  3004. ur.Cells["Value2"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3())) / 2, 2), 0);
  3005. }
  3006. else
  3007. {
  3008. MessageUtil.ShowTips("公式选择错误!");
  3009. return;
  3010. }
  3011. if (ur.Cells["Value1"].Text != "")
  3012. {
  3013. m = m + 1;
  3014. }
  3015. if (ur.Cells["Value2"].Text != "")
  3016. {
  3017. m = m + 1;
  3018. }
  3019. if (ur.Cells["Value3"].Text != "")
  3020. {
  3021. m = m + 1;
  3022. }
  3023. if (ur.Cells["Value4"].Text != "")
  3024. {
  3025. m = m + 1;
  3026. }
  3027. if (ur.Cells["Value5"].Text != "")
  3028. {
  3029. m = m + 1;
  3030. }
  3031. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3()) + double.Parse(ur.Cells["Value5"].Text.ToString3())) / m), 0).ToString();
  3032. }
  3033. if (e.Cell.Column.Key == "Value3D1" || e.Cell.Column.Key == "Value3D2")
  3034. {
  3035. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value3D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value3D2"].Value.ToString3()))
  3036. {
  3037. return;
  3038. }
  3039. if (comFormual.Equals("HV5"))
  3040. {
  3041. ur.Cells["Value3"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3())) / 2, 2), 0);
  3042. }
  3043. else if (comFormual.Equals("HV10"))
  3044. {
  3045. ur.Cells["Value3"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3())) / 2, 2), 0);
  3046. }
  3047. else
  3048. {
  3049. MessageUtil.ShowTips("公式选择错误!");
  3050. return;
  3051. }
  3052. if (ur.Cells["Value1"].Text != "")
  3053. {
  3054. m = m + 1;
  3055. }
  3056. if (ur.Cells["Value2"].Text != "")
  3057. {
  3058. m = m + 1;
  3059. }
  3060. if (ur.Cells["Value3"].Text != "")
  3061. {
  3062. m = m + 1;
  3063. }
  3064. if (ur.Cells["Value4"].Text != "")
  3065. {
  3066. m = m + 1;
  3067. }
  3068. if (ur.Cells["Value5"].Text != "")
  3069. {
  3070. m = m + 1;
  3071. }
  3072. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3()) + double.Parse(ur.Cells["Value5"].Text.ToString3())) / m), 0).ToString();
  3073. }
  3074. if (e.Cell.Column.Key == "Value4D1" || e.Cell.Column.Key == "Value4D2")
  3075. {
  3076. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value4D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value4D2"].Value.ToString3()))
  3077. {
  3078. return;
  3079. }
  3080. if (comFormual.Equals("HV5"))
  3081. {
  3082. ur.Cells["Value4"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value4D1"].Text.ToString3()) + double.Parse(ur.Cells["Value4D2"].Text.ToString3())) / 2, 2), 0);
  3083. }
  3084. else if (comFormual.Equals("HV10"))
  3085. {
  3086. ur.Cells["Value4"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value4D1"].Text.ToString3()) + double.Parse(ur.Cells["Value4D2"].Text.ToString3())) / 2, 2), 0);
  3087. }
  3088. else
  3089. {
  3090. MessageUtil.ShowTips("公式选择错误!");
  3091. return;
  3092. }
  3093. if (ur.Cells["Value1"].Text != "")
  3094. {
  3095. m = m + 1;
  3096. }
  3097. if (ur.Cells["Value2"].Text != "")
  3098. {
  3099. m = m + 1;
  3100. }
  3101. if (ur.Cells["Value3"].Text != "")
  3102. {
  3103. m = m + 1;
  3104. }
  3105. if (ur.Cells["Value4"].Text != "")
  3106. {
  3107. m = m + 1;
  3108. }
  3109. if (ur.Cells["Value5"].Text != "")
  3110. {
  3111. m = m + 1;
  3112. }
  3113. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3()) + double.Parse(ur.Cells["Value5"].Text.ToString3())) / m), 0).ToString();
  3114. }
  3115. if (e.Cell.Column.Key == "Value5D1" || e.Cell.Column.Key == "Value5D2")
  3116. {
  3117. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value5D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value5D2"].Value.ToString3()))
  3118. {
  3119. return;
  3120. }
  3121. if (comFormual.Equals("HV5"))
  3122. {
  3123. ur.Cells["Value5"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value5D1"].Text.ToString3()) + double.Parse(ur.Cells["Value5D2"].Text.ToString3())) / 2, 2), 0);
  3124. }
  3125. else if (comFormual.Equals("HV10"))
  3126. {
  3127. ur.Cells["Value5"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value5D1"].Text.ToString3()) + double.Parse(ur.Cells["Value5D2"].Text.ToString3())) / 2, 2), 0);
  3128. }
  3129. else
  3130. {
  3131. MessageUtil.ShowTips("公式选择错误!");
  3132. return;
  3133. }
  3134. if (ur.Cells["Value1"].Text != "")
  3135. {
  3136. m = m + 1;
  3137. }
  3138. if (ur.Cells["Value2"].Text != "")
  3139. {
  3140. m = m + 1;
  3141. }
  3142. if (ur.Cells["Value3"].Text != "")
  3143. {
  3144. m = m + 1;
  3145. }
  3146. if (ur.Cells["Value4"].Text != "")
  3147. {
  3148. m = m + 1;
  3149. }
  3150. if (ur.Cells["Value5"].Text != "")
  3151. {
  3152. m = m + 1;
  3153. }
  3154. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3()) + double.Parse(ur.Cells["Value5"].Text.ToString3())) / m), 0).ToString();
  3155. }
  3156. if (e.Cell.Column.Key == "Value1" || e.Cell.Column.Key == "Value2" || e.Cell.Column.Key == "Value3" || e.Cell.Column.Key == "Value4" || e.Cell.Column.Key == "Value5")
  3157. {
  3158. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value2"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value3"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value4"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value5"].Value.ToString3()))
  3159. {
  3160. return;
  3161. }
  3162. if (ur.Cells["Value1"].Text != "")
  3163. {
  3164. m = m + 1;
  3165. }
  3166. if (ur.Cells["Value2"].Text != "")
  3167. {
  3168. m = m + 1;
  3169. }
  3170. if (ur.Cells["Value3"].Text != "")
  3171. {
  3172. m = m + 1;
  3173. }
  3174. if (ur.Cells["Value4"].Text != "")
  3175. {
  3176. m = m + 1;
  3177. }
  3178. if (ur.Cells["Value5"].Text != "")
  3179. {
  3180. m = m + 1;
  3181. }
  3182. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3()) + double.Parse(ur.Cells["Value5"].Text.ToString3())) / m), 0).ToString();
  3183. }
  3184. }
  3185. private void ultraGrid6_CellChange(object sender, CellEventArgs e)
  3186. {
  3187. this.ultraGrid6.UpdateData();
  3188. UltraGridRow ur = this.ultraGrid6.ActiveRow;
  3189. int m = 0;
  3190. string comFormual = this.ultraComFormual.Text.Trim();
  3191. if (e.Cell.Column.Key == "Value1D1" || e.Cell.Column.Key == "Value1D2")
  3192. {
  3193. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value1D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value1D2"].Value.ToString3()))
  3194. {
  3195. return;
  3196. }
  3197. if (comFormual.Equals("HBW2.5"))
  3198. {
  3199. ur.Cells["Value1"].Value = (Math.Round(0.102 * 2 * 1838.75 / (2.5 * 3.142 * (2.5 - Math.Sqrt(6.25 - Math.Pow(double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3200. }
  3201. else if (comFormual.Equals("HBW5"))
  3202. {
  3203. ur.Cells["Value1"].Value = (Math.Round(0.102 * 2 * 7355 / (5 * 3.142 * (5 - Math.Sqrt(25 - Math.Pow(double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3204. }
  3205. else if (comFormual.Equals("HBW10"))
  3206. {
  3207. ur.Cells["Value1"].Value = (Math.Round(0.102 * 2 * 29420 / (10 * 3.142 * (10 - Math.Sqrt(100 - Math.Pow(double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3208. }
  3209. else
  3210. {
  3211. MessageUtil.ShowTips("公式选择错误!");
  3212. return;
  3213. }
  3214. if (ur.Cells["Value1"].Text != "")
  3215. {
  3216. m = m + 1;
  3217. }
  3218. if (ur.Cells["Value2"].Text != "")
  3219. {
  3220. m = m + 1;
  3221. }
  3222. if (ur.Cells["Value3"].Text != "")
  3223. {
  3224. m = m + 1;
  3225. }
  3226. if (ur.Cells["Value4"].Text != "")
  3227. {
  3228. m = m + 1;
  3229. }
  3230. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3())) / m), 0).ToString();
  3231. }
  3232. if (e.Cell.Column.Key == "Value2D1" || e.Cell.Column.Key == "Value2D2")
  3233. {
  3234. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value2D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value2D2"].Value.ToString3()))
  3235. {
  3236. return;
  3237. }
  3238. if (comFormual.Equals("HBW2.5"))
  3239. {
  3240. ur.Cells["Value2"].Value = (Math.Round(0.102 * 2 * 1838.75 / (2.5 * 3.142 * (2.5 - Math.Sqrt(6.25 - Math.Pow(double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3241. }
  3242. else if (comFormual.Equals("HBW5"))
  3243. {
  3244. ur.Cells["Value2"].Value = (Math.Round(0.102 * 2 * 7355 / (5 * 3.142 * (5 - Math.Sqrt(25 - Math.Pow(double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3245. }
  3246. else if (comFormual.Equals("HBW10"))
  3247. {
  3248. ur.Cells["Value2"].Value = (Math.Round(0.102 * 2 * 29420 / (10 * 3.142 * (10 - Math.Sqrt(100 - Math.Pow(double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3249. }
  3250. else
  3251. {
  3252. MessageUtil.ShowTips("公式选择错误!");
  3253. return;
  3254. }
  3255. if (ur.Cells["Value1"].Text != "")
  3256. {
  3257. m = m + 1;
  3258. }
  3259. if (ur.Cells["Value2"].Text != "")
  3260. {
  3261. m = m + 1;
  3262. }
  3263. if (ur.Cells["Value3"].Text != "")
  3264. {
  3265. m = m + 1;
  3266. }
  3267. if (ur.Cells["Value4"].Text != "")
  3268. {
  3269. m = m + 1;
  3270. }
  3271. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3())) / m), 0).ToString();
  3272. }
  3273. if (e.Cell.Column.Key == "Value3D1" || e.Cell.Column.Key == "Value3D2")
  3274. {
  3275. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value3D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value3D2"].Value.ToString3()))
  3276. {
  3277. return;
  3278. }
  3279. if (comFormual.Equals("HBW2.5"))
  3280. {
  3281. ur.Cells["Value3"].Value = (Math.Round(0.102 * 2 * 1838.75 / (2.5 * 3.142 * (2.5 - Math.Sqrt(6.25 - Math.Pow(double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3282. }
  3283. else if (comFormual.Equals("HBW5"))
  3284. {
  3285. ur.Cells["Value3"].Value = (Math.Round(0.102 * 2 * 7355 / (5 * 3.142 * (5 - Math.Sqrt(25 - Math.Pow(double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3286. }
  3287. else if (comFormual.Equals("HBW10"))
  3288. {
  3289. ur.Cells["Value3"].Value = (Math.Round(0.102 * 2 * 29420 / (10 * 3.142 * (10 - Math.Sqrt(100 - Math.Pow(double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3290. }
  3291. else
  3292. {
  3293. MessageUtil.ShowTips("公式选择错误!");
  3294. return;
  3295. }
  3296. if (ur.Cells["Value1"].Text != "")
  3297. {
  3298. m = m + 1;
  3299. }
  3300. if (ur.Cells["Value2"].Text != "")
  3301. {
  3302. m = m + 1;
  3303. }
  3304. if (ur.Cells["Value3"].Text != "")
  3305. {
  3306. m = m + 1;
  3307. }
  3308. if(ur.Cells["Value4"].Text != "")
  3309. {
  3310. m = m + 1;
  3311. }
  3312. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3())) / m), 0).ToString();
  3313. }
  3314. if (e.Cell.Column.Key == "Value4D1" || e.Cell.Column.Key == "Value4D2")
  3315. {
  3316. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value4D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value4D2"].Value.ToString3()))
  3317. {
  3318. return;
  3319. }
  3320. if (comFormual.Equals("HBW2.5"))
  3321. {
  3322. ur.Cells["Value4"].Value = (Math.Round(0.102 * 2 * 1838.75 / (2.5 * 3.142 * (2.5 - Math.Sqrt(6.25 - Math.Pow(double.Parse(ur.Cells["Value4D1"].Text.ToString3()) + double.Parse(ur.Cells["Value4D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3323. }
  3324. else if (comFormual.Equals("HBW5"))
  3325. {
  3326. ur.Cells["Value4"].Value = (Math.Round(0.102 * 2 * 7355 / (5 * 3.142 * (5 - Math.Sqrt(25 - Math.Pow(double.Parse(ur.Cells["Value4D1"].Text.ToString3()) + double.Parse(ur.Cells["Value4D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3327. }
  3328. else if (comFormual.Equals("HBW10"))
  3329. {
  3330. ur.Cells["Value4"].Value = (Math.Round(0.102 * 2 * 29420 / (10 * 3.142 * (10 - Math.Sqrt(100 - Math.Pow(double.Parse(ur.Cells["Value4D1"].Text.ToString3()) + double.Parse(ur.Cells["Value4D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3331. }
  3332. else
  3333. {
  3334. MessageUtil.ShowTips("公式选择错误!");
  3335. return;
  3336. }
  3337. if (ur.Cells["Value1"].Text != "")
  3338. {
  3339. m = m + 1;
  3340. }
  3341. if (ur.Cells["Value2"].Text != "")
  3342. {
  3343. m = m + 1;
  3344. }
  3345. if (ur.Cells["Value3"].Text != "")
  3346. {
  3347. m = m + 1;
  3348. }
  3349. if (ur.Cells["Value4"].Text != "")
  3350. {
  3351. m = m + 1;
  3352. }
  3353. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3())) / m), 0).ToString();
  3354. }
  3355. if (e.Cell.Column.Key == "Value1" || e.Cell.Column.Key == "Value2" || e.Cell.Column.Key == "Value3" || e.Cell.Column.Key == "Value4")
  3356. {
  3357. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value2"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value3"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value4"].Value.ToString3()))
  3358. {
  3359. return;
  3360. }
  3361. if (ur.Cells["Value1"].Text != "")
  3362. {
  3363. m = m + 1;
  3364. }
  3365. if (ur.Cells["Value2"].Text != "")
  3366. {
  3367. m = m + 1;
  3368. }
  3369. if (ur.Cells["Value3"].Text != "")
  3370. {
  3371. m = m + 1;
  3372. }
  3373. if (ur.Cells["Value4"].Text != "")
  3374. {
  3375. m = m + 1;
  3376. }
  3377. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.ToString3()) + double.Parse(ur.Cells["Value2"].Text.ToString3()) + double.Parse(ur.Cells["Value3"].Text.ToString3()) + double.Parse(ur.Cells["Value4"].Text.ToString3())) / m), 0).ToString();
  3378. }
  3379. }
  3380. private void ultraButton1_Click(object sender, EventArgs e)
  3381. {
  3382. if (this.TxtYbEuestion.Text.Trim() == "")
  3383. {
  3384. MessageUtil.ShowTips("请选择计算公式!");
  3385. return;
  3386. }
  3387. double d = 0.0;
  3388. double c = 0.0;
  3389. double t = 0.0;
  3390. if(this.TxtYbEuestion.Text.Trim() == "0.65*D" || this.TxtYbEuestion.Text.Trim() == "7*D/8" ||this.TxtYbEuestion.Text.Trim() == "2*D/3")
  3391. {
  3392. if(this.TxtYbD.Text.Trim() == "")
  3393. {
  3394. MessageUtil.ShowTips("请输入管子公称外径!");
  3395. return;
  3396. }
  3397. }else if(this.TxtYbEuestion.Text.Trim() == "(1+C)*T/(C+T/D)")
  3398. {
  3399. if(this.TxtYbD.Text.Trim() == "" || this.TxtYbC.Text.Trim() == "" || this.TxtYbS.Text.Trim() == "")
  3400. {
  3401. MessageUtil.ShowTips("请输入管子的公称外径壁厚以及压扁系数!");
  3402. return;
  3403. }
  3404. }
  3405. d = double.Parse(this.TxtYbD.Text.Trim().ToString3());
  3406. t = double.Parse(this.TxtYbS.Text.Trim().ToString3());
  3407. c = double.Parse(this.TxtYbC.Text.Trim().ToString3());
  3408. if (this.TxtYbEuestion.Text.Trim() == "0.65*D")
  3409. {
  3410. this.TxtYbSpac.Text = Math.Ceiling((0.65 * d)).ToString();
  3411. }
  3412. else if (this.TxtYbEuestion.Text.Trim() == "7*D/8")
  3413. {
  3414. this.TxtYbSpac.Text = Math.Ceiling(((7 * d) / 8)).ToString();
  3415. }
  3416. else if (this.TxtYbEuestion.Text.Trim() == "2*D/3")
  3417. {
  3418. this.TxtYbSpac.Text = Math.Ceiling(((2 * d) / 3)).ToString();
  3419. }
  3420. else if (this.TxtYbEuestion.Text.Trim() == "(1+C)*T/(C+T/D)")
  3421. {
  3422. this.TxtYbSpac.Text = Math.Floor((((1 + c) * t) / (c + t / d))).ToString();
  3423. }
  3424. }
  3425. /**
  3426. * 验证字符串 如:1<2
  3427. *
  3428. * @param strA
  3429. * 数字字符串
  3430. * @param sign
  3431. * 符号
  3432. * @param strB
  3433. * 数字字符串
  3434. * @return true Or false
  3435. */
  3436. private bool checkStr(string strA, string sign, string strB)
  3437. {
  3438. if (strA.Length == 0 || strB.Length == 0)
  3439. {
  3440. return true;
  3441. }
  3442. if (!StringUtil.IsDouble(strB) || !StringUtil.IsDouble(strA))
  3443. {
  3444. return true;
  3445. }
  3446. double a = double.Parse(strA);
  3447. double b = double.Parse(strB);
  3448. if (sign.Equals("="))
  3449. {
  3450. if (a == b)
  3451. {
  3452. return true;
  3453. }
  3454. else
  3455. {
  3456. return false;
  3457. }
  3458. }
  3459. if (sign.Equals(">"))
  3460. {
  3461. if (a > b)
  3462. {
  3463. return true;
  3464. }
  3465. else
  3466. {
  3467. return false;
  3468. }
  3469. }
  3470. if (sign.Equals(">="))
  3471. {
  3472. if (a >= b)
  3473. {
  3474. return true;
  3475. }
  3476. else
  3477. {
  3478. return false;
  3479. }
  3480. }
  3481. if (sign.Equals("<"))
  3482. {
  3483. if (a < b)
  3484. {
  3485. return true;
  3486. }
  3487. else
  3488. {
  3489. return false;
  3490. }
  3491. }
  3492. if (sign.Equals("<="))
  3493. {
  3494. if (a <= b)
  3495. {
  3496. return true;
  3497. }
  3498. else
  3499. {
  3500. return false;
  3501. }
  3502. }
  3503. return false;
  3504. }
  3505. private void ultraGrid15_AfterRowActivate(object sender, EventArgs e)
  3506. {
  3507. ultraTabControl3.Visible = true;
  3508. ultraTabControl4.Visible = false;
  3509. ultraTabControl5.Visible = false;
  3510. ultraTabControl2.Visible = false;
  3511. UltraGridRow row = this.ultraGrid15.ActiveRow;
  3512. if (row == null) return;
  3513. initCheckMethod(row.Cells["PhyCodeMax"].Value.ToString(), row.Cells["checkStd"].Text);//根据试样组加载试验方法
  3514. initCheckEqiupment(row.Cells["PhyCodeMax"].Value.ToString());//根据试样组加载试验设备
  3515. List<PipeCheckconsignPhydetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignPhydetailEntity>(
  3516. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPhyItem", new object[] { row.Cells["CheckNo"].Value.ToString(), row.Cells["SampleNo"].Value.ToString(), row.Cells["PhyCodeMax"].Value.ToString() }, this.ob);
  3517. if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))//拉伸
  3518. {
  3519. PipeCheckconsignPhydetailEntitybindingSource.DataSource = listSource;
  3520. foreach (UltraGridRow forRow in ultraGrid16.Rows)
  3521. {
  3522. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3523. {
  3524. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3525. }
  3526. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3527. {
  3528. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3529. }
  3530. }
  3531. ultraTabControl3.Tabs["0"].Selected = true;
  3532. ultraTabControl3.Tabs["0"].Visible = true;
  3533. ultraTabControl3.Tabs["1"].Visible = false;
  3534. ultraTabControl3.Tabs["2"].Visible = false;
  3535. ultraTabControl3.Tabs["3"].Visible = false;
  3536. ultraTabControl3.Tabs["4"].Visible = false;
  3537. ultraTabControl3.Tabs["5"].Visible = false;
  3538. ultraTabControl3.Tabs["6"].Visible = false;
  3539. ultraTabControl3.Tabs["7"].Visible = false;
  3540. ultraTabControl3.Tabs["8"].Visible = false;
  3541. ultraTabControl3.Tabs["9"].Visible = false;
  3542. ultraTabControl3.Tabs["10"].Visible = false;
  3543. ultraTabControl3.Tabs["11"].Visible = false;
  3544. ultraTabControl3.Tabs["12"].Visible = false;
  3545. this.ultraComFormual1.Visible = false;
  3546. this.cmbStdSteelType1.Visible = false;
  3547. this.txtStdSteelNo1.Visible = false;
  3548. this.txtStdSteelValue1.Visible = false;
  3549. this.txtActualValue1.Visible = false;
  3550. ultraLabel59.Visible = false;
  3551. ultraLabel53.Visible = false;
  3552. ultraLabel52.Visible = false;
  3553. ultraLabel51.Visible = false;
  3554. ultraLabel50.Visible = false;
  3555. }
  3556. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))//冲击
  3557. {
  3558. PipeCheckconsignPhydetailEntityCjbindingSource.DataSource = listSource;
  3559. foreach (UltraGridRow forRow in ultraGrid17.Rows)
  3560. {
  3561. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3562. {
  3563. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3564. }
  3565. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3566. {
  3567. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3568. }
  3569. //力学实验冲击,硬度单点值,平均值超上限都变红。
  3570. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3571. {
  3572. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3573. }
  3574. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3575. {
  3576. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3577. }
  3578. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3579. {
  3580. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3581. }
  3582. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3583. {
  3584. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3585. }
  3586. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3587. {
  3588. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3589. }
  3590. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3591. {
  3592. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3593. }
  3594. }
  3595. ultraTabControl3.Tabs["1"].Selected = true;
  3596. ultraTabControl3.Tabs["0"].Visible = false;
  3597. ultraTabControl3.Tabs["1"].Visible = true;
  3598. ultraTabControl3.Tabs["2"].Visible = false;
  3599. ultraTabControl3.Tabs["3"].Visible = false;
  3600. ultraTabControl3.Tabs["4"].Visible = false;
  3601. ultraTabControl3.Tabs["5"].Visible = false;
  3602. ultraTabControl3.Tabs["6"].Visible = false;
  3603. ultraTabControl3.Tabs["7"].Visible = false;
  3604. ultraTabControl3.Tabs["8"].Visible = false;
  3605. ultraTabControl3.Tabs["9"].Visible = false;
  3606. ultraTabControl3.Tabs["10"].Visible = false;
  3607. ultraTabControl3.Tabs["11"].Visible = false;
  3608. ultraTabControl3.Tabs["12"].Visible = false;
  3609. this.ultraComFormual1.Visible = false;
  3610. this.cmbStdSteelType1.Visible = false;
  3611. this.txtStdSteelNo1.Visible = false;
  3612. this.txtStdSteelValue1.Visible = false;
  3613. this.txtActualValue1.Visible = false;
  3614. ultraLabel59.Visible = false;
  3615. ultraLabel53.Visible = false;
  3616. ultraLabel52.Visible = false;
  3617. ultraLabel51.Visible = false;
  3618. ultraLabel50.Visible = false;
  3619. }
  3620. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))//布氏
  3621. {
  3622. ultraComFormual1.Items.Clear();
  3623. cmbStdSteelType1.Items.Clear();
  3624. PipeCheckconsignPhydetailEntityBSbindingSource.DataSource = listSource;
  3625. MergedCell(ultraGrid6, new string[] { "PhyName" });
  3626. foreach (UltraGridRow forRow in ultraGrid20.Rows)
  3627. {
  3628. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3629. {
  3630. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3631. }
  3632. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3633. {
  3634. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3635. }
  3636. //力学实验冲击,硬度单点值,平均值超上限都变红。
  3637. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3638. {
  3639. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3640. }
  3641. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3642. {
  3643. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3644. }
  3645. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3646. {
  3647. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3648. }
  3649. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3650. {
  3651. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3652. }
  3653. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3654. {
  3655. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3656. }
  3657. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3658. {
  3659. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3660. }
  3661. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3662. {
  3663. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3664. }
  3665. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3666. {
  3667. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3668. }
  3669. }
  3670. ultraTabControl3.Tabs["4"].Selected = true;
  3671. ultraTabControl3.Tabs["0"].Visible = false;
  3672. ultraTabControl3.Tabs["1"].Visible = false;
  3673. ultraTabControl3.Tabs["2"].Visible = false;
  3674. ultraTabControl3.Tabs["3"].Visible = false;
  3675. ultraTabControl3.Tabs["4"].Visible = true;
  3676. ultraTabControl3.Tabs["5"].Visible = false;
  3677. ultraTabControl3.Tabs["6"].Visible = false;
  3678. ultraTabControl3.Tabs["7"].Visible = false;
  3679. ultraTabControl3.Tabs["8"].Visible = false;
  3680. ultraTabControl3.Tabs["9"].Visible = false;
  3681. ultraTabControl3.Tabs["10"].Visible = false;
  3682. ultraTabControl3.Tabs["11"].Visible = false;
  3683. ultraTabControl3.Tabs["12"].Visible = false;
  3684. this.ultraComFormual1.Visible = true;
  3685. this.cmbStdSteelType1.Visible = true;
  3686. this.txtStdSteelNo1.Visible = true;
  3687. this.txtStdSteelValue1.Visible = true;
  3688. this.txtActualValue1.Visible = true;
  3689. ultraLabel59.Visible = true;
  3690. ultraLabel53.Visible = true;
  3691. ultraLabel52.Visible = true;
  3692. ultraLabel51.Visible = true;
  3693. ultraLabel50.Visible = true;
  3694. if (this.UserInfo.GetDeptid().Equals("002001007009"))
  3695. {
  3696. ultraComFormual1.Items.Add("HBW2.5");
  3697. ultraComFormual1.Items.Add("HBW5");
  3698. ultraComFormual1.Items.Add("HBW10");
  3699. cmbStdSteelType1.Items.Add("HBW2.5/187.5");
  3700. cmbStdSteelType1.Items.Add("HBW 5/750");
  3701. cmbStdSteelType1.Items.Add("HBW 10/1000");
  3702. }
  3703. else
  3704. {
  3705. ultraComFormual1.Items.Add("HBW 2.5/187.5");
  3706. ultraComFormual1.Items.Add("HBW 5/750");
  3707. ultraComFormual1.Items.Add("HBW 10/3000");
  3708. cmbStdSteelType1.Items.Add("HBW 2.5/187.5");
  3709. cmbStdSteelType1.Items.Add("HBW 5/750");
  3710. cmbStdSteelType1.Items.Add("HBW 10/3000");
  3711. }
  3712. }
  3713. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))//洛氏
  3714. {
  3715. cmbStdSteelType1.Items.Clear();
  3716. PipeCheckconsignPhydetailEntityLSbindingSource.DataSource = listSource;
  3717. MergedCell(ultraGrid5, new string[] { "PhyName" });
  3718. foreach (UltraGridRow forRow in ultraGrid18.Rows)
  3719. {
  3720. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3721. {
  3722. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3723. }
  3724. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3725. {
  3726. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3727. }
  3728. //力学实验冲击,硬度单点值,平均值超上限都变红。
  3729. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3730. {
  3731. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3732. }
  3733. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3734. {
  3735. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3736. }
  3737. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3738. {
  3739. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3740. }
  3741. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3742. {
  3743. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3744. }
  3745. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3746. {
  3747. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3748. }
  3749. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3750. {
  3751. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3752. }
  3753. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3754. {
  3755. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3756. }
  3757. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3758. {
  3759. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3760. }
  3761. }
  3762. ultraTabControl3.Tabs["2"].Selected = true;
  3763. ultraTabControl3.Tabs["0"].Visible = false;
  3764. ultraTabControl3.Tabs["1"].Visible = false;
  3765. ultraTabControl3.Tabs["2"].Visible = true;
  3766. ultraTabControl3.Tabs["3"].Visible = false;
  3767. ultraTabControl3.Tabs["4"].Visible = false;
  3768. ultraTabControl3.Tabs["5"].Visible = false;
  3769. ultraTabControl3.Tabs["6"].Visible = false;
  3770. ultraTabControl3.Tabs["7"].Visible = false;
  3771. ultraTabControl3.Tabs["8"].Visible = false;
  3772. ultraTabControl3.Tabs["9"].Visible = false;
  3773. ultraTabControl3.Tabs["10"].Visible = false;
  3774. ultraTabControl3.Tabs["11"].Visible = false;
  3775. ultraTabControl3.Tabs["12"].Visible = false;
  3776. this.ultraComFormual1.Visible = false;
  3777. this.cmbStdSteelType1.Visible = true;
  3778. this.txtStdSteelNo1.Visible = true;
  3779. this.txtStdSteelValue1.Visible = true;
  3780. this.txtActualValue1.Visible = true;
  3781. ultraLabel59.Visible = false;
  3782. ultraLabel53.Visible = true;
  3783. ultraLabel52.Visible = true;
  3784. ultraLabel51.Visible = true;
  3785. ultraLabel50.Visible = true;
  3786. cmbStdSteelType1.Items.Add("HRA");
  3787. cmbStdSteelType1.Items.Add("HRB");
  3788. cmbStdSteelType1.Items.Add("HRC");
  3789. }
  3790. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))//维氏
  3791. {
  3792. ultraComFormual1.Items.Clear();
  3793. cmbStdSteelType1.Items.Clear();
  3794. PipeCheckconsignPhydetailEntityWSbindingSource.DataSource = listSource;
  3795. MergedCell(ultraGrid5, new string[] { "PhyName" });
  3796. foreach (UltraGridRow forRow in ultraGrid19.Rows)
  3797. {
  3798. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3799. {
  3800. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3801. }
  3802. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3803. {
  3804. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3805. }
  3806. //力学实验冲击,硬度单点值,平均值超上限都变红。
  3807. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3808. {
  3809. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3810. }
  3811. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3812. {
  3813. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3814. }
  3815. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3816. {
  3817. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3818. }
  3819. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3820. {
  3821. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3822. }
  3823. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3824. {
  3825. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3826. }
  3827. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3828. {
  3829. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3830. }
  3831. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3832. {
  3833. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3834. }
  3835. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3836. {
  3837. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3838. }
  3839. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3840. {
  3841. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3842. }
  3843. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3844. {
  3845. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3846. }
  3847. }
  3848. ultraTabControl3.Tabs["3"].Selected = true;
  3849. ultraTabControl3.Tabs["0"].Visible = false;
  3850. ultraTabControl3.Tabs["1"].Visible = false;
  3851. ultraTabControl3.Tabs["2"].Visible = false;
  3852. ultraTabControl3.Tabs["3"].Visible = true;
  3853. ultraTabControl3.Tabs["4"].Visible = false;
  3854. ultraTabControl3.Tabs["5"].Visible = false;
  3855. ultraTabControl3.Tabs["6"].Visible = false;
  3856. ultraTabControl3.Tabs["7"].Visible = false;
  3857. ultraTabControl3.Tabs["8"].Visible = false;
  3858. ultraTabControl3.Tabs["9"].Visible = false;
  3859. ultraTabControl3.Tabs["10"].Visible = false;
  3860. ultraTabControl3.Tabs["11"].Visible = false;
  3861. ultraTabControl3.Tabs["12"].Visible = false;
  3862. this.ultraComFormual1.Visible = true;
  3863. this.cmbStdSteelType1.Visible = true;
  3864. this.txtStdSteelNo1.Visible = true;
  3865. this.txtStdSteelValue1.Visible = true;
  3866. this.txtActualValue1.Visible = true;
  3867. ultraLabel59.Visible = true;
  3868. ultraLabel53.Visible = true;
  3869. ultraLabel52.Visible = true;
  3870. ultraLabel51.Visible = true;
  3871. ultraLabel50.Visible = true;
  3872. ultraComFormual1.Items.Add("HV5");
  3873. ultraComFormual1.Items.Add("HV10");
  3874. cmbStdSteelType1.Items.Add("HV5");
  3875. cmbStdSteelType1.Items.Add("HV10");
  3876. cmbStdSteelType1.Items.Add("HV0.2");
  3877. }
  3878. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0016") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0031"))//组织
  3879. {
  3880. PipeCheckconsignPhydetailEntityZZbindingSource.DataSource = listSource;
  3881. foreach (UltraGridRow forRow in ultraGrid23.Rows)
  3882. {
  3883. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3884. {
  3885. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3886. }
  3887. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3888. {
  3889. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3890. }
  3891. }
  3892. ultraTabControl3.Tabs["7"].Selected = true;
  3893. ultraTabControl3.Tabs["0"].Visible = false;
  3894. ultraTabControl3.Tabs["1"].Visible = false;
  3895. ultraTabControl3.Tabs["2"].Visible = false;
  3896. ultraTabControl3.Tabs["3"].Visible = false;
  3897. ultraTabControl3.Tabs["4"].Visible = false;
  3898. ultraTabControl3.Tabs["5"].Visible = false;
  3899. ultraTabControl3.Tabs["6"].Visible = false;
  3900. ultraTabControl3.Tabs["7"].Visible = true;
  3901. ultraTabControl3.Tabs["8"].Visible = false;
  3902. ultraTabControl3.Tabs["9"].Visible = false;
  3903. ultraTabControl3.Tabs["10"].Visible = false;
  3904. ultraTabControl3.Tabs["11"].Visible = false;
  3905. ultraTabControl3.Tabs["12"].Visible = false;
  3906. this.ultraComFormual1.Visible = false;
  3907. this.cmbStdSteelType1.Visible = false;
  3908. this.txtStdSteelNo1.Visible = false;
  3909. this.txtStdSteelValue1.Visible = false;
  3910. this.txtActualValue1.Visible = false;
  3911. ultraLabel59.Visible = false;
  3912. ultraLabel53.Visible = false;
  3913. ultraLabel52.Visible = false;
  3914. ultraLabel51.Visible = false;
  3915. ultraLabel50.Visible = false;
  3916. }
  3917. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))//晶粒度
  3918. {
  3919. PipeCheckconsignPhydetailEntityJLDbindingSource.DataSource = listSource;
  3920. foreach (UltraGridRow forRow in ultraGrid22.Rows)
  3921. {
  3922. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3923. {
  3924. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3925. }
  3926. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3927. {
  3928. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3929. }
  3930. }
  3931. ultraTabControl3.Tabs["6"].Selected = true;
  3932. ultraTabControl3.Tabs["0"].Visible = false;
  3933. ultraTabControl3.Tabs["1"].Visible = false;
  3934. ultraTabControl3.Tabs["2"].Visible = false;
  3935. ultraTabControl3.Tabs["3"].Visible = false;
  3936. ultraTabControl3.Tabs["4"].Visible = false;
  3937. ultraTabControl3.Tabs["5"].Visible = false;
  3938. ultraTabControl3.Tabs["6"].Visible = true;
  3939. ultraTabControl3.Tabs["7"].Visible = false;
  3940. ultraTabControl3.Tabs["8"].Visible = false;
  3941. ultraTabControl3.Tabs["9"].Visible = false;
  3942. ultraTabControl3.Tabs["10"].Visible = false;
  3943. ultraTabControl3.Tabs["11"].Visible = false;
  3944. ultraTabControl3.Tabs["12"].Visible = false;
  3945. this.ultraComFormual1.Visible = false;
  3946. this.cmbStdSteelType1.Visible = true;
  3947. this.txtStdSteelNo1.Visible = true;
  3948. this.txtStdSteelValue1.Visible = true;
  3949. this.txtActualValue1.Visible = true;
  3950. ultraLabel59.Visible = false;
  3951. ultraLabel53.Visible = false;
  3952. ultraLabel52.Visible = false;
  3953. ultraLabel51.Visible = false;
  3954. ultraLabel50.Visible = false;
  3955. }
  3956. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))//夹杂
  3957. {
  3958. PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource = listSource;
  3959. foreach (UltraGridRow forRow in ultraGrid21.Rows)
  3960. {
  3961. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3962. {
  3963. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3964. }
  3965. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3966. {
  3967. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3968. }
  3969. if (forRow.Cells["PhyCode"].Text.ToString().Equals("P0618") || forRow.Cells["PhyCode"].Text.ToString().Equals("P0619"))
  3970. {
  3971. if (!forRow.Cells["Value1"].Text.ToString().Equals("是") && !forRow.Cells["Value1"].Text.ToString().Equals("否"))
  3972. {
  3973. forRow.RowSelectorAppearance.BackColor = Color.Red; ;
  3974. }
  3975. }
  3976. }
  3977. ultraTabControl3.Tabs["5"].Selected = true;
  3978. ultraTabControl3.Tabs["0"].Visible = false;
  3979. ultraTabControl3.Tabs["1"].Visible = false;
  3980. ultraTabControl3.Tabs["2"].Visible = false;
  3981. ultraTabControl3.Tabs["3"].Visible = false;
  3982. ultraTabControl3.Tabs["4"].Visible = false;
  3983. ultraTabControl3.Tabs["5"].Visible = true;
  3984. ultraTabControl3.Tabs["6"].Visible = false;
  3985. ultraTabControl3.Tabs["7"].Visible = false;
  3986. ultraTabControl3.Tabs["8"].Visible = false;
  3987. ultraTabControl3.Tabs["9"].Visible = false;
  3988. ultraTabControl3.Tabs["10"].Visible = false;
  3989. ultraTabControl3.Tabs["11"].Visible = false;
  3990. ultraTabControl3.Tabs["12"].Visible = false;
  3991. this.ultraComFormual1.Visible = false;
  3992. this.cmbStdSteelType1.Visible = false;
  3993. this.txtStdSteelNo1.Visible = false;
  3994. this.txtStdSteelValue1.Visible = false;
  3995. this.txtActualValue1.Visible = false;
  3996. ultraLabel59.Visible = false;
  3997. ultraLabel53.Visible = false;
  3998. ultraLabel52.Visible = false;
  3999. ultraLabel51.Visible = false;
  4000. ultraLabel50.Visible = false;
  4001. ultraGrid21.DisplayLayout.Bands[0].Columns["Value1"].Header.Caption = "一象限";
  4002. ultraGrid21.DisplayLayout.Bands[0].Columns["Value2"].Header.Caption = "二象限";
  4003. ultraGrid21.DisplayLayout.Bands[0].Columns["Value3"].Header.Caption = "三象限";
  4004. ultraGrid21.DisplayLayout.Bands[0].Columns["Value4"].Header.Caption = "四象限";
  4005. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0115"))
  4006. {
  4007. ultraGrid21.DisplayLayout.Bands[0].Columns["Value2"].Hidden = false;
  4008. ultraGrid21.DisplayLayout.Bands[0].Columns["Value3"].Hidden = false;
  4009. ultraGrid21.DisplayLayout.Bands[0].Columns["Value4"].Hidden = false;
  4010. }
  4011. else
  4012. {
  4013. ultraGrid21.DisplayLayout.Bands[0].Columns["Value2"].Hidden = true;
  4014. ultraGrid21.DisplayLayout.Bands[0].Columns["Value3"].Hidden = true;
  4015. ultraGrid21.DisplayLayout.Bands[0].Columns["Value4"].Hidden = true;
  4016. }
  4017. }
  4018. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0010"))//工艺
  4019. {
  4020. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0027") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0038") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0082") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0083") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0098"))//弯曲
  4021. {
  4022. PipeCheckconsignPhydetailEntityWQbindingSource.DataSource = listSource;
  4023. ultraTabControl3.Tabs["9"].Selected = true;
  4024. for (int i = 0; i < ultraGrid25.Rows.Count; i++)
  4025. {
  4026. if (this.ultraGrid25.Rows[i].Cells["IsGood"].Text == "不符合")
  4027. {
  4028. ultraGrid25.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4029. }
  4030. }
  4031. ultraTabControl3.Tabs["0"].Visible = false;
  4032. ultraTabControl3.Tabs["1"].Visible = false;
  4033. ultraTabControl3.Tabs["2"].Visible = false;
  4034. ultraTabControl3.Tabs["3"].Visible = false;
  4035. ultraTabControl3.Tabs["4"].Visible = false;
  4036. ultraTabControl3.Tabs["5"].Visible = false;
  4037. ultraTabControl3.Tabs["6"].Visible = false;
  4038. ultraTabControl3.Tabs["7"].Visible = false;
  4039. ultraTabControl3.Tabs["8"].Visible = false;
  4040. ultraTabControl3.Tabs["9"].Visible = true;
  4041. ultraTabControl3.Tabs["10"].Visible = false;
  4042. ultraTabControl3.Tabs["11"].Visible = false;
  4043. ultraTabControl3.Tabs["12"].Visible = false;
  4044. this.ultraComFormual1.Visible = false;
  4045. this.cmbStdSteelType1.Visible = false;
  4046. this.txtStdSteelNo1.Visible = false;
  4047. this.txtStdSteelValue1.Visible = false;
  4048. this.txtActualValue1.Visible = false;
  4049. }
  4050. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0009"))//压扁
  4051. {
  4052. ultraTxtYbEuestion.Text = "";
  4053. ultraTxtYbD.Text = "";
  4054. ultraTxtYbS.Text = "";
  4055. ultraTxtYbC.Text = "";
  4056. ultraTxtYbSpac.Text = "";
  4057. ultraTxtYbQualfiled.Text = "";
  4058. ultraTxtYbDefect.Text = "";
  4059. ultraTxtYbMemo.Text = "";
  4060. PipeCheckconsignPhydetailEntityYBbindingSource.DataSource = listSource;
  4061. ultraTabControl3.Tabs["8"].Selected = true;
  4062. for (int i = 0; i < ultraGrid24.Rows.Count; i++)
  4063. {
  4064. if (this.ultraGrid24.Rows[i].Cells["IsGood"].Text == "不符合" || this.ultraGrid24.Rows[i].Cells["IsDefect"].Text == "不符合")
  4065. {
  4066. ultraGrid24.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4067. }
  4068. }
  4069. ultraTabControl3.Tabs["0"].Visible = false;
  4070. ultraTabControl3.Tabs["1"].Visible = false;
  4071. ultraTabControl3.Tabs["2"].Visible = false;
  4072. ultraTabControl3.Tabs["3"].Visible = false;
  4073. ultraTabControl3.Tabs["4"].Visible = false;
  4074. ultraTabControl3.Tabs["5"].Visible = false;
  4075. ultraTabControl3.Tabs["6"].Visible = false;
  4076. ultraTabControl3.Tabs["7"].Visible = false;
  4077. ultraTabControl3.Tabs["8"].Visible = true;
  4078. ultraTabControl3.Tabs["9"].Visible = false;
  4079. ultraTabControl3.Tabs["10"].Visible = false;
  4080. ultraTabControl3.Tabs["11"].Visible = false;
  4081. ultraTabControl3.Tabs["12"].Visible = false;
  4082. this.ultraComFormual1.Visible = false;
  4083. this.cmbStdSteelType1.Visible = false;
  4084. this.txtStdSteelNo1.Visible = false;
  4085. this.txtStdSteelValue1.Visible = false;
  4086. this.txtActualValue1.Visible = false;
  4087. ultraLabel59.Visible = false;
  4088. ultraLabel53.Visible = false;
  4089. ultraLabel52.Visible = false;
  4090. ultraLabel51.Visible = false;
  4091. ultraLabel50.Visible = false;
  4092. int x = row.Cells["SpecName"].Text.IndexOf('x');
  4093. ultraTxtYbD.Text = row.Cells["SpecName"].Text.Substring(0, x);
  4094. ultraTxtYbS.Text = row.Cells["SpecName"].Text.Substring(x + 1);
  4095. ultraGrid24.DisplayLayout.Bands[0].Columns["IsGood"].Header.Caption = "试验结果(一次)";
  4096. ultraGrid24.DisplayLayout.Bands[0].Columns["IsDefect"].Header.Caption = "试验结果(二次)";
  4097. }
  4098. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0026"))//扩口
  4099. {
  4100. PipeCheckconsignPhydetailEntityKKbindingSource.DataSource = listSource;
  4101. ultraTabControl3.Tabs["10"].Selected = true;
  4102. for (int i = 0; i < ultraGrid26.Rows.Count; i++)
  4103. {
  4104. if (this.ultraGrid26.Rows[i].Cells["IsGood"].Text == "不符合")
  4105. {
  4106. ultraGrid26.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4107. }
  4108. }
  4109. ultraTabControl3.Tabs["0"].Visible = false;
  4110. ultraTabControl3.Tabs["1"].Visible = false;
  4111. ultraTabControl3.Tabs["2"].Visible = false;
  4112. ultraTabControl3.Tabs["3"].Visible = false;
  4113. ultraTabControl3.Tabs["4"].Visible = false;
  4114. ultraTabControl3.Tabs["5"].Visible = false;
  4115. ultraTabControl3.Tabs["6"].Visible = false;
  4116. ultraTabControl3.Tabs["7"].Visible = false;
  4117. ultraTabControl3.Tabs["8"].Visible = false;
  4118. ultraTabControl3.Tabs["9"].Visible = false;
  4119. ultraTabControl3.Tabs["10"].Visible = true;
  4120. ultraTabControl3.Tabs["11"].Visible = false;
  4121. ultraTabControl3.Tabs["12"].Visible = false;
  4122. this.ultraComFormual1.Visible = false;
  4123. this.cmbStdSteelType1.Visible = false;
  4124. this.txtStdSteelNo1.Visible = false;
  4125. this.txtStdSteelValue1.Visible = false;
  4126. this.txtActualValue1.Visible = false;
  4127. ultraLabel59.Visible = false;
  4128. ultraLabel53.Visible = false;
  4129. ultraLabel52.Visible = false;
  4130. ultraLabel51.Visible = false;
  4131. ultraLabel50.Visible = false;
  4132. }
  4133. }
  4134. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))
  4135. {
  4136. pipeCheckconsignPhydetailEntityQTBindingSource.DataSource = listSource;
  4137. ultraTabControl3.Tabs["11"].Selected = true;
  4138. ultraTabControl3.Tabs["0"].Visible = false;
  4139. ultraTabControl3.Tabs["1"].Visible = false;
  4140. ultraTabControl3.Tabs["2"].Visible = false;
  4141. ultraTabControl3.Tabs["3"].Visible = false;
  4142. ultraTabControl3.Tabs["4"].Visible = false;
  4143. ultraTabControl3.Tabs["5"].Visible = false;
  4144. ultraTabControl3.Tabs["6"].Visible = false;
  4145. ultraTabControl3.Tabs["7"].Visible = false;
  4146. ultraTabControl3.Tabs["8"].Visible = false;
  4147. ultraTabControl3.Tabs["9"].Visible = false;
  4148. ultraTabControl3.Tabs["10"].Visible = false;
  4149. ultraTabControl3.Tabs["11"].Visible = true;
  4150. ultraTabControl3.Tabs["12"].Visible = false;
  4151. ultraGrid55.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  4152. this.ultraComFormual1.Visible = false;
  4153. this.cmbStdSteelType1.Visible = false;
  4154. this.txtStdSteelNo1.Visible = false;
  4155. this.txtStdSteelValue1.Visible = false;
  4156. this.txtActualValue1.Visible = false;
  4157. ultraLabel59.Visible = false;
  4158. ultraLabel53.Visible = false;
  4159. ultraLabel52.Visible = false;
  4160. ultraLabel51.Visible = false;
  4161. ultraLabel50.Visible = false;
  4162. }
  4163. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0066"))//落锤试验
  4164. {
  4165. PipeCheckconsignDetailEntityLCbindingSource.DataSource = listSource;
  4166. ultraTabControl3.Tabs["12"].Selected = true;
  4167. ultraTabControl3.Tabs["0"].Visible = false;
  4168. ultraTabControl3.Tabs["1"].Visible = false;
  4169. ultraTabControl3.Tabs["2"].Visible = false;
  4170. ultraTabControl3.Tabs["3"].Visible = false;
  4171. ultraTabControl3.Tabs["4"].Visible = false;
  4172. ultraTabControl3.Tabs["5"].Visible = false;
  4173. ultraTabControl3.Tabs["6"].Visible = false;
  4174. ultraTabControl3.Tabs["7"].Visible = false;
  4175. ultraTabControl3.Tabs["8"].Visible = false;
  4176. ultraTabControl3.Tabs["9"].Visible = false;
  4177. ultraTabControl3.Tabs["10"].Visible = false;
  4178. ultraTabControl3.Tabs["11"].Visible = false;
  4179. ultraTabControl3.Tabs["12"].Visible = true;
  4180. //ultraGrid55.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  4181. this.ultraComFormual1.Visible = false;
  4182. this.cmbStdSteelType1.Visible = false;
  4183. this.txtStdSteelNo1.Visible = false;
  4184. this.txtStdSteelValue1.Visible = false;
  4185. this.txtActualValue1.Visible = false;
  4186. ultraLabel59.Visible = false;
  4187. ultraLabel53.Visible = false;
  4188. ultraLabel52.Visible = false;
  4189. ultraLabel51.Visible = false;
  4190. ultraLabel50.Visible = false;
  4191. }
  4192. initCheckData(row);//加载编辑区信息
  4193. }
  4194. private void initCheckData(UltraGridRow row)
  4195. {
  4196. this.txtCHECK_TEMP1.Text = row.Cells["CheckTemp"].Text;
  4197. this.ultraDEVICE_NAME1.Value = row.Cells["DeviceNo"].Text;
  4198. if (!String.IsNullOrEmpty(row.Cells["FormualNo"].Text))
  4199. {
  4200. this.ultraComMethod1.Value = row.Cells["FormualNo"].Text;
  4201. }
  4202. this.cmbChemOrder1.Value = row.Cells["CheckShift"].Text;
  4203. this.cmbChemGroup1.Value = row.Cells["CheckClass"].Text;
  4204. this.txtChemUser1.Text = row.Cells["CheckName"].Text;
  4205. this.ultraComFormual1.Text = row.Cells["HardnessType"].Text;
  4206. cmbStdSteelType1.Text = row.Cells["StdSteelType"].Text;
  4207. this.txtStdSteelNo1.Text = row.Cells["StdSteelNo"].Text;
  4208. this.txtStdSteelValue1.Text = row.Cells["StdSteelValue"].Text;
  4209. this.txtActualValue1.Text = row.Cells["ActualValue"].Text;
  4210. this.ultraComFormual1.Text = row.Cells["HardnessType"].Text;
  4211. }
  4212. private void ultraGrid28_AfterRowActivate(object sender, EventArgs e)
  4213. {
  4214. ultraTabControl3.Visible = false;
  4215. ultraTabControl4.Visible = true;
  4216. ultraTabControl5.Visible = false;
  4217. ultraTabControl2.Visible = false;
  4218. UltraGridRow row = this.ultraGrid28.ActiveRow;
  4219. List<PipeCheckconsignPhydetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignPhydetailEntity>(
  4220. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPhyItem", new object[] { row.Cells["CheckNo"].Value.ToString(), row.Cells["SampleNo"].Value.ToString(), row.Cells["PhyCodeMax"].Value.ToString() }, this.ob);
  4221. if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))//拉伸
  4222. {
  4223. PipeCheckconsignPhydetailEntitybindingSource.DataSource = listSource;
  4224. ultraTabControl4.Tabs["0"].Selected = true;
  4225. ultraTabControl4.Tabs["0"].Visible = true;
  4226. ultraTabControl4.Tabs["1"].Visible = false;
  4227. ultraTabControl4.Tabs["2"].Visible = false;
  4228. ultraTabControl4.Tabs["3"].Visible = false;
  4229. ultraTabControl4.Tabs["4"].Visible = false;
  4230. ultraTabControl4.Tabs["5"].Visible = false;
  4231. ultraTabControl4.Tabs["6"].Visible = false;
  4232. ultraTabControl4.Tabs["7"].Visible = false;
  4233. ultraTabControl4.Tabs["8"].Visible = false;
  4234. ultraTabControl4.Tabs["9"].Visible = false;
  4235. ultraTabControl4.Tabs["10"].Visible = false;
  4236. ultraTabControl4.Tabs["11"].Visible = false;
  4237. ultraTabControl4.Tabs["12"].Visible = false;
  4238. foreach (UltraGridRow forRow in ultraGrid29.Rows)
  4239. {
  4240. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4241. {
  4242. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4243. }
  4244. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4245. {
  4246. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4247. }
  4248. if (forRow.Cells["SplineItemNameS"].Text.ToString().Equals(""))
  4249. {
  4250. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4251. }
  4252. //else
  4253. //{
  4254. // string[] SampleType = forRow.Cells["SampleType"].Text.Split(new char[2] { '=', 'm' });
  4255. // string[] SplineItemNameS = forRow.Cells["SplineItemNameS"].Text.Split(new char[2] { '=', 'm' });
  4256. // if (SampleType.Count() == 1)
  4257. // {
  4258. // if (!forRow.Cells["SampleType"].Text.Trim().Equals(forRow.Cells["SplineItemNameS"].Text.Trim()))
  4259. // {
  4260. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4261. // }
  4262. // }
  4263. // else
  4264. // {
  4265. // if (!SampleType[1].ToString3().Equals(SplineItemNameS[1].ToString3()) || !SampleType[4].ToString3().Equals(SplineItemNameS[4].ToString3()))
  4266. // {
  4267. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4268. // }
  4269. // }
  4270. //}
  4271. string a = forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ","");
  4272. if (!forRow.Cells["SampleType"].Text.Trim().Replace(" ", "").Equals(forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "")))
  4273. {
  4274. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4275. }
  4276. if (!forRow.Cells["PhyDir"].Text.Trim().Equals(forRow.Cells["SplineItemNameF"].Text.Trim()))
  4277. {
  4278. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4279. }
  4280. if (forRow.Cells["ItemNameW"].Text.Trim().Equals("室温"))
  4281. {
  4282. if (forRow.Cells["CheckTemp"].Text.Trim().ToString().Equals("") || forRow.Cells["CheckTemp"].Value == null)
  4283. {
  4284. MessageUtil.ShowTips("没有温度!");
  4285. return;
  4286. }
  4287. else
  4288. {
  4289. if (int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) > 35 || int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) < 10)
  4290. {
  4291. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4292. }
  4293. }
  4294. }
  4295. else
  4296. {
  4297. if (!forRow.Cells["CheckTemp"].Text.Trim().Equals(forRow.Cells["ItemNameW"].Text.Trim().Replace("℃", "")))
  4298. {
  4299. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4300. }
  4301. }
  4302. }
  4303. }
  4304. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))//冲击
  4305. {
  4306. PipeCheckconsignPhydetailEntityCjbindingSource.DataSource = listSource;
  4307. ultraTabControl4.Tabs["1"].Selected = true;
  4308. ultraTabControl4.Tabs["0"].Visible = false;
  4309. ultraTabControl4.Tabs["1"].Visible = true;
  4310. ultraTabControl4.Tabs["2"].Visible = false;
  4311. ultraTabControl4.Tabs["3"].Visible = false;
  4312. ultraTabControl4.Tabs["4"].Visible = false;
  4313. ultraTabControl4.Tabs["5"].Visible = false;
  4314. ultraTabControl4.Tabs["6"].Visible = false;
  4315. ultraTabControl4.Tabs["7"].Visible = false;
  4316. ultraTabControl4.Tabs["8"].Visible = false;
  4317. ultraTabControl4.Tabs["9"].Visible = false;
  4318. ultraTabControl4.Tabs["10"].Visible = false;
  4319. ultraTabControl4.Tabs["11"].Visible = false;
  4320. ultraTabControl4.Tabs["12"].Visible = false;
  4321. foreach (UltraGridRow forRow in ultraGrid30.Rows)
  4322. {
  4323. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4324. {
  4325. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4326. }
  4327. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4328. {
  4329. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4330. }
  4331. if (forRow.Cells["SplineItemNameS"].Text.ToString().Equals(""))
  4332. {
  4333. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4334. }
  4335. //力学实验冲击,硬度单点值,平均值超上限都变红。
  4336. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4337. {
  4338. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4339. }
  4340. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4341. {
  4342. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4343. } if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4344. {
  4345. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4346. }
  4347. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4348. {
  4349. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4350. } if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4351. {
  4352. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4353. }
  4354. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4355. {
  4356. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4357. }
  4358. //else
  4359. //{
  4360. // string[] SampleType = forRow.Cells["SampleType"].Text.Split(new char[2] { '=', 'm' });
  4361. // string[] SplineItemNameS = forRow.Cells["SplineItemNameS"].Text.Split(new char[2] { '=', 'm' });
  4362. // if (SampleType.Count() == 1)
  4363. // {
  4364. // if (!forRow.Cells["SampleType"].Text.Trim().Equals(forRow.Cells["SplineItemNameS"].Text.Trim()))
  4365. // {
  4366. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4367. // }
  4368. // }
  4369. // else
  4370. // {
  4371. // if (!SampleType[1].ToString3().Equals(SplineItemNameS[1].ToString3()) || !SampleType[4].ToString3().Equals(SplineItemNameS[4].ToString3()))
  4372. // {
  4373. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4374. // }
  4375. // }
  4376. //}
  4377. if (!forRow.Cells["SampleType"].Text.Trim().Replace(" ", "").Equals(forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "")))
  4378. {
  4379. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4380. }
  4381. if (!forRow.Cells["PhyDir"].Text.Trim().Equals(forRow.Cells["SplineItemNameF"].Text.Trim()))
  4382. {
  4383. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4384. }
  4385. if (forRow.Cells["ItemNameW"].Text.Trim().Equals("室温"))
  4386. {
  4387. if (int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) > 35 || int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) < 10)
  4388. {
  4389. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4390. }
  4391. }
  4392. else
  4393. {
  4394. if (!forRow.Cells["CheckTemp"].Text.Trim().Equals(forRow.Cells["ItemNameW"].Text.Trim().Replace("℃", "")))
  4395. {
  4396. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4397. }
  4398. }
  4399. }
  4400. }
  4401. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))//布氏
  4402. {
  4403. PipeCheckconsignPhydetailEntityBSbindingSource.DataSource = listSource;
  4404. MergedCell(ultraGrid6, new string[] { "PhyName" });
  4405. ultraTabControl4.Tabs["4"].Selected = true;
  4406. ultraTabControl4.Tabs["0"].Visible = false;
  4407. ultraTabControl4.Tabs["1"].Visible = false;
  4408. ultraTabControl4.Tabs["2"].Visible = false;
  4409. ultraTabControl4.Tabs["3"].Visible = false;
  4410. ultraTabControl4.Tabs["4"].Visible = true;
  4411. ultraTabControl4.Tabs["5"].Visible = false;
  4412. ultraTabControl4.Tabs["6"].Visible = false;
  4413. ultraTabControl4.Tabs["7"].Visible = false;
  4414. ultraTabControl4.Tabs["8"].Visible = false;
  4415. ultraTabControl4.Tabs["9"].Visible = false;
  4416. ultraTabControl4.Tabs["10"].Visible = false;
  4417. ultraTabControl4.Tabs["11"].Visible = false;
  4418. ultraTabControl4.Tabs["12"].Visible = false;
  4419. foreach (UltraGridRow forRow in ultraGrid33.Rows)
  4420. {
  4421. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4422. {
  4423. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4424. }
  4425. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4426. {
  4427. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4428. }
  4429. //力学实验冲击,硬度单点值,平均值超上限都变红。
  4430. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4431. {
  4432. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4433. }
  4434. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4435. {
  4436. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4437. }
  4438. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4439. {
  4440. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4441. }
  4442. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4443. {
  4444. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4445. }
  4446. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4447. {
  4448. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4449. }
  4450. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4451. {
  4452. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4453. }
  4454. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4455. {
  4456. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4457. }
  4458. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4459. {
  4460. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4461. }
  4462. }
  4463. }
  4464. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))//洛氏
  4465. {
  4466. PipeCheckconsignPhydetailEntityLSbindingSource.DataSource = listSource;
  4467. MergedCell(ultraGrid5, new string[] { "PhyName" });
  4468. ultraTabControl4.Tabs["2"].Selected = true;
  4469. ultraTabControl4.Tabs["0"].Visible = false;
  4470. ultraTabControl4.Tabs["1"].Visible = false;
  4471. ultraTabControl4.Tabs["2"].Visible = true;
  4472. ultraTabControl4.Tabs["3"].Visible = false;
  4473. ultraTabControl4.Tabs["4"].Visible = false;
  4474. ultraTabControl4.Tabs["5"].Visible = false;
  4475. ultraTabControl4.Tabs["6"].Visible = false;
  4476. ultraTabControl4.Tabs["7"].Visible = false;
  4477. ultraTabControl4.Tabs["8"].Visible = false;
  4478. ultraTabControl4.Tabs["9"].Visible = false;
  4479. ultraTabControl4.Tabs["10"].Visible = false;
  4480. ultraTabControl4.Tabs["11"].Visible = false;
  4481. ultraTabControl4.Tabs["12"].Visible = false;
  4482. foreach (UltraGridRow forRow in ultraGrid31.Rows)
  4483. {
  4484. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4485. {
  4486. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4487. }
  4488. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4489. {
  4490. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4491. }
  4492. //力学实验冲击,硬度单点值,平均值超上限都变红。
  4493. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4494. {
  4495. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4496. }
  4497. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4498. {
  4499. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4500. }
  4501. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4502. {
  4503. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4504. }
  4505. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4506. {
  4507. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4508. }
  4509. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4510. {
  4511. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4512. }
  4513. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4514. {
  4515. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4516. }
  4517. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4518. {
  4519. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4520. }
  4521. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4522. {
  4523. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4524. }
  4525. }
  4526. }
  4527. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))//维氏
  4528. {
  4529. PipeCheckconsignPhydetailEntityWSbindingSource.DataSource = listSource;
  4530. MergedCell(ultraGrid5, new string[] { "PhyName" });
  4531. ultraTabControl4.Tabs["3"].Selected = true;
  4532. ultraTabControl4.Tabs["0"].Visible = false;
  4533. ultraTabControl4.Tabs["1"].Visible = false;
  4534. ultraTabControl4.Tabs["2"].Visible = false;
  4535. ultraTabControl4.Tabs["3"].Visible = true;
  4536. ultraTabControl4.Tabs["4"].Visible = false;
  4537. ultraTabControl4.Tabs["5"].Visible = false;
  4538. ultraTabControl4.Tabs["6"].Visible = false;
  4539. ultraTabControl4.Tabs["7"].Visible = false;
  4540. ultraTabControl4.Tabs["8"].Visible = false;
  4541. ultraTabControl4.Tabs["9"].Visible = false;
  4542. ultraTabControl4.Tabs["10"].Visible = false;
  4543. ultraTabControl4.Tabs["11"].Visible = false;
  4544. ultraTabControl4.Tabs["12"].Visible = false;
  4545. foreach (UltraGridRow forRow in ultraGrid32.Rows)
  4546. {
  4547. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4548. {
  4549. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4550. }
  4551. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4552. {
  4553. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4554. }
  4555. //力学实验冲击,硬度单点值,平均值超上限都变红。
  4556. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4557. {
  4558. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4559. }
  4560. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4561. {
  4562. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4563. }
  4564. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4565. {
  4566. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4567. }
  4568. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4569. {
  4570. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4571. }
  4572. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4573. {
  4574. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4575. }
  4576. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4577. {
  4578. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4579. }
  4580. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4581. {
  4582. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4583. }
  4584. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4585. {
  4586. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4587. }
  4588. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4589. {
  4590. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4591. }
  4592. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4593. {
  4594. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4595. }
  4596. }
  4597. }
  4598. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0016") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0031"))//组织
  4599. {
  4600. PipeCheckconsignPhydetailEntityZZbindingSource.DataSource = listSource;
  4601. ultraTabControl4.Tabs["7"].Selected = true;
  4602. ultraTabControl4.Tabs["0"].Visible = false;
  4603. ultraTabControl4.Tabs["1"].Visible = false;
  4604. ultraTabControl4.Tabs["2"].Visible = false;
  4605. ultraTabControl4.Tabs["3"].Visible = false;
  4606. ultraTabControl4.Tabs["4"].Visible = false;
  4607. ultraTabControl4.Tabs["5"].Visible = false;
  4608. ultraTabControl4.Tabs["6"].Visible = false;
  4609. ultraTabControl4.Tabs["7"].Visible = true;
  4610. ultraTabControl4.Tabs["8"].Visible = false;
  4611. ultraTabControl4.Tabs["9"].Visible = false;
  4612. ultraTabControl4.Tabs["10"].Visible = false;
  4613. ultraTabControl4.Tabs["11"].Visible = false;
  4614. ultraTabControl4.Tabs["12"].Visible = false;
  4615. foreach (UltraGridRow forRow in ultraGrid36.Rows)
  4616. {
  4617. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4618. {
  4619. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4620. }
  4621. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4622. {
  4623. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4624. }
  4625. }
  4626. }
  4627. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))//晶粒度
  4628. {
  4629. PipeCheckconsignPhydetailEntityJLDbindingSource.DataSource = listSource;
  4630. ultraTabControl4.Tabs["6"].Selected = true;
  4631. ultraTabControl4.Tabs["0"].Visible = false;
  4632. ultraTabControl4.Tabs["1"].Visible = false;
  4633. ultraTabControl4.Tabs["2"].Visible = false;
  4634. ultraTabControl4.Tabs["3"].Visible = false;
  4635. ultraTabControl4.Tabs["4"].Visible = false;
  4636. ultraTabControl4.Tabs["5"].Visible = false;
  4637. ultraTabControl4.Tabs["6"].Visible = true;
  4638. ultraTabControl4.Tabs["7"].Visible = false;
  4639. ultraTabControl4.Tabs["8"].Visible = false;
  4640. ultraTabControl4.Tabs["9"].Visible = false;
  4641. ultraTabControl4.Tabs["10"].Visible = false;
  4642. ultraTabControl4.Tabs["11"].Visible = false;
  4643. ultraTabControl4.Tabs["12"].Visible = false;
  4644. foreach (UltraGridRow forRow in ultraGrid35.Rows)
  4645. {
  4646. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4647. {
  4648. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4649. }
  4650. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4651. {
  4652. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4653. }
  4654. }
  4655. }
  4656. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))//夹杂
  4657. {
  4658. PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource = listSource;
  4659. ultraTabControl4.Tabs["5"].Selected = true;
  4660. ultraTabControl4.Tabs["0"].Visible = false;
  4661. ultraTabControl4.Tabs["1"].Visible = false;
  4662. ultraTabControl4.Tabs["2"].Visible = false;
  4663. ultraTabControl4.Tabs["3"].Visible = false;
  4664. ultraTabControl4.Tabs["4"].Visible = false;
  4665. ultraTabControl4.Tabs["5"].Visible = true;
  4666. ultraTabControl4.Tabs["6"].Visible = false;
  4667. ultraTabControl4.Tabs["7"].Visible = false;
  4668. ultraTabControl4.Tabs["8"].Visible = false;
  4669. ultraTabControl4.Tabs["9"].Visible = false;
  4670. ultraTabControl4.Tabs["10"].Visible = false;
  4671. ultraTabControl4.Tabs["11"].Visible = false;
  4672. ultraTabControl4.Tabs["12"].Visible = false;
  4673. foreach (UltraGridRow forRow in ultraGrid34.Rows)
  4674. {
  4675. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4676. {
  4677. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4678. }
  4679. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4680. {
  4681. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4682. }
  4683. if (forRow.Cells["PhyCode"].Text.ToString().Equals("P0618") || forRow.Cells["PhyCode"].Text.ToString().Equals("P0619"))
  4684. {
  4685. if (!forRow.Cells["Value1"].Text.ToString().Equals("是") && !forRow.Cells["Value1"].Text.ToString().Equals("否"))
  4686. {
  4687. forRow.RowSelectorAppearance.BackColor = Color.Red; ;
  4688. }
  4689. }
  4690. }
  4691. ultraGrid34.DisplayLayout.Bands[0].Columns["Value1"].Header.Caption = "一象限";
  4692. ultraGrid34.DisplayLayout.Bands[0].Columns["Value2"].Header.Caption = "二象限";
  4693. ultraGrid34.DisplayLayout.Bands[0].Columns["Value3"].Header.Caption = "三象限";
  4694. ultraGrid34.DisplayLayout.Bands[0].Columns["Value4"].Header.Caption = "四象限";
  4695. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0115"))
  4696. {
  4697. ultraGrid34.DisplayLayout.Bands[0].Columns["Value2"].Hidden = false;
  4698. ultraGrid34.DisplayLayout.Bands[0].Columns["Value3"].Hidden = false;
  4699. ultraGrid34.DisplayLayout.Bands[0].Columns["Value4"].Hidden = false;
  4700. }
  4701. else
  4702. {
  4703. ultraGrid34.DisplayLayout.Bands[0].Columns["Value2"].Hidden = true;
  4704. ultraGrid34.DisplayLayout.Bands[0].Columns["Value3"].Hidden = true;
  4705. ultraGrid34.DisplayLayout.Bands[0].Columns["Value4"].Hidden = true;
  4706. }
  4707. }
  4708. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0010"))//工艺
  4709. {
  4710. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0027") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0038") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0082") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0083") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0098"))//弯曲
  4711. {
  4712. PipeCheckconsignPhydetailEntityWQbindingSource.DataSource = listSource;
  4713. ultraTabControl4.Tabs["9"].Selected = true;
  4714. for (int i = 0; i < ultraGrid38.Rows.Count; i++)
  4715. {
  4716. if (this.ultraGrid38.Rows[i].Cells["IsGood"].Text == "不符合")
  4717. {
  4718. ultraGrid38.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4719. }
  4720. }
  4721. ultraTabControl4.Tabs["0"].Visible = false;
  4722. ultraTabControl4.Tabs["1"].Visible = false;
  4723. ultraTabControl4.Tabs["2"].Visible = false;
  4724. ultraTabControl4.Tabs["3"].Visible = false;
  4725. ultraTabControl4.Tabs["4"].Visible = false;
  4726. ultraTabControl4.Tabs["5"].Visible = false;
  4727. ultraTabControl4.Tabs["6"].Visible = false;
  4728. ultraTabControl4.Tabs["7"].Visible = false;
  4729. ultraTabControl4.Tabs["8"].Visible = false;
  4730. ultraTabControl4.Tabs["9"].Visible = true;
  4731. ultraTabControl4.Tabs["10"].Visible = false;
  4732. ultraTabControl4.Tabs["11"].Visible = false;
  4733. ultraTabControl4.Tabs["12"].Visible = false;
  4734. }
  4735. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0009"))//压扁
  4736. {
  4737. PipeCheckconsignPhydetailEntityYBbindingSource.DataSource = listSource;
  4738. ultraTabControl4.Tabs["8"].Selected = true;
  4739. for (int i = 0; i < ultraGrid37.Rows.Count; i++)
  4740. {
  4741. if (this.ultraGrid37.Rows[i].Cells["IsGood"].Text == "不符合" || this.ultraGrid37.Rows[i].Cells["IsDefect"].Text == "不符合")
  4742. {
  4743. ultraGrid37.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4744. }
  4745. }
  4746. ultraTabControl4.Tabs["0"].Visible = false;
  4747. ultraTabControl4.Tabs["1"].Visible = false;
  4748. ultraTabControl4.Tabs["2"].Visible = false;
  4749. ultraTabControl4.Tabs["3"].Visible = false;
  4750. ultraTabControl4.Tabs["4"].Visible = false;
  4751. ultraTabControl4.Tabs["5"].Visible = false;
  4752. ultraTabControl4.Tabs["6"].Visible = false;
  4753. ultraTabControl4.Tabs["7"].Visible = false;
  4754. ultraTabControl4.Tabs["8"].Visible = true;
  4755. ultraTabControl4.Tabs["9"].Visible = false;
  4756. ultraTabControl4.Tabs["10"].Visible = false;
  4757. ultraTabControl4.Tabs["11"].Visible = false;
  4758. ultraTabControl4.Tabs["12"].Visible = false;
  4759. ultraGrid37.DisplayLayout.Bands[0].Columns["IsGood"].Header.Caption = "试验结果(一次)";
  4760. ultraGrid37.DisplayLayout.Bands[0].Columns["IsDefect"].Header.Caption = "试验结果(二次)";
  4761. }
  4762. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0026"))//扩口
  4763. {
  4764. PipeCheckconsignPhydetailEntityKKbindingSource.DataSource = listSource;
  4765. ultraTabControl4.Tabs["10"].Selected = true;
  4766. for (int i = 0; i < ultraGrid39.Rows.Count; i++)
  4767. {
  4768. if (this.ultraGrid39.Rows[i].Cells["IsGood"].Text == "不符合")
  4769. {
  4770. ultraGrid39.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4771. }
  4772. }
  4773. ultraTabControl4.Tabs["0"].Visible = false;
  4774. ultraTabControl4.Tabs["1"].Visible = false;
  4775. ultraTabControl4.Tabs["2"].Visible = false;
  4776. ultraTabControl4.Tabs["3"].Visible = false;
  4777. ultraTabControl4.Tabs["4"].Visible = false;
  4778. ultraTabControl4.Tabs["5"].Visible = false;
  4779. ultraTabControl4.Tabs["6"].Visible = false;
  4780. ultraTabControl4.Tabs["7"].Visible = false;
  4781. ultraTabControl4.Tabs["8"].Visible = false;
  4782. ultraTabControl4.Tabs["9"].Visible = false;
  4783. ultraTabControl4.Tabs["10"].Visible = true;
  4784. ultraTabControl4.Tabs["11"].Visible = false;
  4785. ultraTabControl4.Tabs["12"].Visible = false;
  4786. }
  4787. }
  4788. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))//其他
  4789. {
  4790. PipeCheckconsignPhydetailEntityKKbindingSource.DataSource = listSource;
  4791. ultraTabControl4.Tabs["11"].Selected = true;
  4792. ultraTabControl4.Tabs["0"].Visible = false;
  4793. ultraTabControl4.Tabs["1"].Visible = false;
  4794. ultraTabControl4.Tabs["2"].Visible = false;
  4795. ultraTabControl4.Tabs["3"].Visible = false;
  4796. ultraTabControl4.Tabs["4"].Visible = false;
  4797. ultraTabControl4.Tabs["5"].Visible = false;
  4798. ultraTabControl4.Tabs["6"].Visible = false;
  4799. ultraTabControl4.Tabs["7"].Visible = false;
  4800. ultraTabControl4.Tabs["8"].Visible = false;
  4801. ultraTabControl4.Tabs["9"].Visible = false;
  4802. ultraTabControl4.Tabs["10"].Visible = false;
  4803. ultraTabControl4.Tabs["11"].Visible = true;
  4804. ultraTabControl4.Tabs["12"].Visible = false;
  4805. ultraGrid56.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  4806. foreach (UltraGridRow forRow in ultraGrid56.Rows)
  4807. {
  4808. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4809. {
  4810. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4811. }
  4812. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4813. {
  4814. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4815. }
  4816. }
  4817. }
  4818. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0066"))//落锤试验
  4819. {
  4820. PipeCheckconsignDetailEntityLCbindingSource.DataSource = listSource;
  4821. ultraTabControl4.Tabs["12"].Selected = true;
  4822. ultraTabControl4.Tabs["0"].Visible = false;
  4823. ultraTabControl4.Tabs["1"].Visible = false;
  4824. ultraTabControl4.Tabs["2"].Visible = false;
  4825. ultraTabControl4.Tabs["3"].Visible = false;
  4826. ultraTabControl4.Tabs["4"].Visible = false;
  4827. ultraTabControl4.Tabs["5"].Visible = false;
  4828. ultraTabControl4.Tabs["6"].Visible = false;
  4829. ultraTabControl4.Tabs["7"].Visible = false;
  4830. ultraTabControl4.Tabs["8"].Visible = false;
  4831. ultraTabControl4.Tabs["9"].Visible = false;
  4832. ultraTabControl4.Tabs["10"].Visible = false;
  4833. ultraTabControl4.Tabs["11"].Visible = false;
  4834. ultraTabControl4.Tabs["12"].Visible = true;
  4835. //ultraGrid56.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  4836. //foreach (UltraGridRow forRow in ultraGrid56.Rows)
  4837. //{
  4838. // if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4839. // {
  4840. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4841. // }
  4842. // if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4843. // {
  4844. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4845. // }
  4846. //}
  4847. }
  4848. }
  4849. private void ultraGrid14_AfterRowActivate(object sender, EventArgs e)
  4850. {
  4851. UltraGridRow uRow = this.ultraGrid14.ActiveRow;
  4852. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  4853. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPHY", new object[] { uRow.Cells["CheckNo"].Value.ToString(), uRow.Cells["SampleNo"].Value.ToString(), "345", arrId, this.ultraOptionSet1.CheckedItem.DataValue.ToString() }, this.ob);
  4854. PipeCheckconsignDetailEntitybindingSource4.DataSource = listSource;
  4855. }
  4856. private void ultraButton2_Click(object sender, EventArgs e)
  4857. {
  4858. if (this.ultraTxtYbEuestion.Text.Trim() == "")
  4859. {
  4860. MessageUtil.ShowTips("请选择计算公式!");
  4861. return;
  4862. }
  4863. double d = 0.0;
  4864. double c = 0.0;
  4865. double t = 0.0;
  4866. if (this.ultraTxtYbEuestion.Text.Trim() == "0.65*D" || this.ultraTxtYbEuestion.Text.Trim() == "7*D/8" || this.ultraTxtYbEuestion.Text.Trim() == "2*D/3")
  4867. {
  4868. if (this.ultraTxtYbD.Text.Trim() == "")
  4869. {
  4870. MessageUtil.ShowTips("请输入管子公称外径!");
  4871. return;
  4872. }
  4873. }
  4874. else if (this.ultraTxtYbEuestion.Text.Trim() == "(1+C)*T/(C+T/D)")
  4875. {
  4876. if (this.ultraTxtYbD.Text.Trim() == "" || this.ultraTxtYbC.Text.Trim() == "" || this.ultraTxtYbS.Text.Trim() == "")
  4877. {
  4878. MessageUtil.ShowTips("请输入管子的公称外径壁厚以及压扁系数!");
  4879. return;
  4880. }
  4881. }
  4882. d = double.Parse(this.ultraTxtYbD.Text.Trim().ToString3());
  4883. t = double.Parse(this.ultraTxtYbS.Text.Trim().ToString3());
  4884. c = double.Parse(this.ultraTxtYbC.Text.Trim().ToString3());
  4885. if (this.ultraTxtYbEuestion.Text.Trim() == "0.65*D")
  4886. {
  4887. this.ultraTxtYbSpac.Text = Math.Floor((0.65 * d)).ToString();
  4888. }
  4889. else if (this.ultraTxtYbEuestion.Text.Trim() == "7*D/8")
  4890. {
  4891. this.ultraTxtYbSpac.Text = Math.Floor(((7 * d) / 8)).ToString();
  4892. }
  4893. else if (this.ultraTxtYbEuestion.Text.Trim() == "2*D/3")
  4894. {
  4895. this.ultraTxtYbSpac.Text = Math.Floor(((2 * d) / 3)).ToString();
  4896. }
  4897. else if (this.ultraTxtYbEuestion.Text.Trim() == "(1+C)*T/(C+T/D)")
  4898. {
  4899. this.ultraTxtYbSpac.Text = Math.Floor((((1 + c) * t) / (c + t / d))).ToString();
  4900. }
  4901. }
  4902. private void ultraGrid17_CellChange(object sender, CellEventArgs e)
  4903. {
  4904. this.ultraGrid17.UpdateData();
  4905. UltraGridRow ur = this.ultraGrid17.ActiveRow;
  4906. UltraGridRow uRow = this.ultraGrid15.ActiveRow;
  4907. string specName = uRow.Cells["ItemNameS"].Text.Trim();//试验尺寸
  4908. int x = specName.IndexOf("×");//x位置
  4909. string width = specName.Substring(0, x).Replace("m", "");
  4910. string height = specName.Substring(x + 1).Replace("m", "");
  4911. int m = 0;
  4912. string ak1 = "";//真实值
  4913. string ak2 = "";
  4914. string ak3 = "";
  4915. int akNum = 0;
  4916. foreach (UltraGridRow row in this.ultraGrid17.Rows)
  4917. {
  4918. if (row.Cells["PhyName"].Text.Contains("ak"))
  4919. {
  4920. akNum = akNum + 1;
  4921. }
  4922. }
  4923. if (akNum > 0 && ur.Cells["PhyName"].Text.Contains("冲击功"))
  4924. {
  4925. if (e.Cell.Column.Key == "Value1")
  4926. {
  4927. if (ur.Cells["Value1"].Text == "-")
  4928. {
  4929. return;
  4930. }
  4931. ak1 = (Math.Round(100 * double.Parse(ur.Cells["Value1"].Text.Trim().Replace('<','-').ToString3()) / (double.Parse(width) * (double.Parse(height) - 2)), 0)).ToString();
  4932. foreach (UltraGridRow akRow in this.ultraGrid17.Rows)
  4933. {
  4934. if (akRow.Cells["PhyName"].Text.Contains("ak"))
  4935. {
  4936. akRow.Cells["Value1"].Value = ak1;
  4937. if (akRow.Cells["Value2"].Text != "")
  4938. {
  4939. m = m + 1;
  4940. }
  4941. if (akRow.Cells["Value3"].Text != "")
  4942. {
  4943. m = m + 1;
  4944. }
  4945. m = m + 1;
  4946. akRow.Cells["AverageValue"].Value = Math.Round(((double.Parse(akRow.Cells["Value1"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(akRow.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(akRow.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m)).ToString();
  4947. }
  4948. }
  4949. }
  4950. if (e.Cell.Column.Key == "Value2")
  4951. {
  4952. if (ur.Cells["Value2"].Text == "-")
  4953. {
  4954. return;
  4955. }
  4956. ak2 = (Math.Round(100 * double.Parse(ur.Cells["Value2"].Text.Trim().Replace('<','-').ToString3()) / (double.Parse(width) * (double.Parse(height) - 2)), 0)).ToString();
  4957. foreach (UltraGridRow akRow in this.ultraGrid17.Rows)
  4958. {
  4959. if (akRow.Cells["PhyName"].Text.Contains("ak"))
  4960. {
  4961. akRow.Cells["Value2"].Value = ak2;
  4962. if (ur.Cells["Value1"].Text != "")
  4963. {
  4964. m = m + 1;
  4965. }
  4966. if (ur.Cells["Value3"].Text != "")
  4967. {
  4968. m = m + 1;
  4969. }
  4970. m = m + 1;
  4971. akRow.Cells["AverageValue"].Value = Math.Round(((double.Parse(akRow.Cells["Value1"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(akRow.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(akRow.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m)).ToString();
  4972. }
  4973. }
  4974. }
  4975. if (e.Cell.Column.Key == "Value3")
  4976. {
  4977. if (ur.Cells["Value3"].Text == "-")
  4978. {
  4979. return;
  4980. }
  4981. ak3 = (Math.Round(100 * double.Parse(ur.Cells["Value3"].Text.Trim().Replace('<', '-').ToString3()) / (double.Parse(width) * (double.Parse(height) - 2)), 0)).ToString();
  4982. foreach (UltraGridRow akRow in this.ultraGrid17.Rows)
  4983. {
  4984. if (akRow.Cells["PhyName"].Text.Contains("ak"))
  4985. {
  4986. akRow.Cells["Value3"].Value = ak3;
  4987. if (akRow.Cells["Value1"].Text != "")
  4988. {
  4989. m = m + 1;
  4990. }
  4991. if (akRow.Cells["Value2"].Text != "")
  4992. {
  4993. m = m + 1;
  4994. }
  4995. m = m + 1;
  4996. akRow.Cells["AverageValue"].Value = Math.Round(((double.Parse(akRow.Cells["Value1"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(akRow.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(akRow.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m)).ToString();
  4997. }
  4998. }
  4999. }
  5000. }
  5001. else if (ur.Cells["PhyName"].Text.Contains("侧膨胀值LE"))
  5002. {
  5003. if (e.Cell.Column.Key == "Value1")
  5004. {
  5005. if (ur.Cells["Value1"].Text != "")
  5006. {
  5007. m = m + 1;
  5008. }
  5009. if (ur.Cells["Value2"].Text != "")
  5010. {
  5011. m = m + 1;
  5012. }
  5013. if (ur.Cells["Value3"].Text != "")
  5014. {
  5015. m = m + 1;
  5016. }
  5017. if (ur.Cells["Value1"].Text == "-")
  5018. {
  5019. return;
  5020. }
  5021. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Trim().Replace('<', '-').ToString3())) / m), 2).ToString();
  5022. }
  5023. if (e.Cell.Column.Key == "Value2")
  5024. {
  5025. if (ur.Cells["Value1"].Text != "")
  5026. {
  5027. m = m + 1;
  5028. }
  5029. if (ur.Cells["Value2"].Text != "")
  5030. {
  5031. m = m + 1;
  5032. }
  5033. if (ur.Cells["Value3"].Text != "")
  5034. {
  5035. m = m + 1;
  5036. }
  5037. if (ur.Cells["Value2"].Text == "-")
  5038. {
  5039. return;
  5040. }
  5041. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 2).ToString();
  5042. }
  5043. if (e.Cell.Column.Key == "Value3")
  5044. {
  5045. if (ur.Cells["Value1"].Text != "")
  5046. {
  5047. m = m + 1;
  5048. }
  5049. if (ur.Cells["Value2"].Text != "")
  5050. {
  5051. m = m + 1;
  5052. }
  5053. if (ur.Cells["Value3"].Text != "")
  5054. {
  5055. m = m + 1;
  5056. }
  5057. if (ur.Cells["Value3"].Text == "-")
  5058. {
  5059. return;
  5060. }
  5061. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 2).ToString();
  5062. }
  5063. }
  5064. else
  5065. {
  5066. if (e.Cell.Column.Key == "Value1")
  5067. {
  5068. if (ur.Cells["Value1"].Text != "")
  5069. {
  5070. m = m + 1;
  5071. }
  5072. if (ur.Cells["Value2"].Text != "")
  5073. {
  5074. m = m + 1;
  5075. }
  5076. if (ur.Cells["Value3"].Text != "")
  5077. {
  5078. m = m + 1;
  5079. }
  5080. if (ur.Cells["Value1"].Text == "-")
  5081. {
  5082. return;
  5083. }
  5084. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Trim().Replace('<', '-').ToString3())) / m), 0).ToString();
  5085. }
  5086. if (e.Cell.Column.Key == "Value2")
  5087. {
  5088. if (ur.Cells["Value1"].Text != "")
  5089. {
  5090. m = m + 1;
  5091. }
  5092. if (ur.Cells["Value2"].Text != "")
  5093. {
  5094. m = m + 1;
  5095. }
  5096. if (ur.Cells["Value3"].Text != "")
  5097. {
  5098. m = m + 1;
  5099. }
  5100. if (ur.Cells["Value2"].Text == "-")
  5101. {
  5102. return;
  5103. }
  5104. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5105. }
  5106. if (e.Cell.Column.Key == "Value3")
  5107. {
  5108. if (ur.Cells["Value1"].Text != "")
  5109. {
  5110. m = m + 1;
  5111. }
  5112. if (ur.Cells["Value2"].Text != "")
  5113. {
  5114. m = m + 1;
  5115. }
  5116. if (ur.Cells["Value3"].Text != "")
  5117. {
  5118. m = m + 1;
  5119. }
  5120. if (ur.Cells["Value3"].Text == "-")
  5121. {
  5122. return;
  5123. }
  5124. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Trim().Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5125. }
  5126. }
  5127. }
  5128. private void ultraGrid18_CellChange(object sender, CellEventArgs e)
  5129. {
  5130. this.ultraGrid18.UpdateData();
  5131. UltraGridRow ur = this.ultraGrid18.ActiveRow;
  5132. int m = 0;
  5133. if (e.Cell.Column.Key == "Value1")
  5134. {
  5135. if (ur.Cells["Value1"].Text != "")
  5136. {
  5137. m = m + 1;
  5138. }
  5139. if (ur.Cells["Value2"].Text != "")
  5140. {
  5141. m = m + 1;
  5142. }
  5143. if (ur.Cells["Value3"].Text != "")
  5144. {
  5145. m = m + 1;
  5146. }
  5147. if (ur.Cells["Value1"].Text == "-")
  5148. {
  5149. return;
  5150. }
  5151. if (ur.Cells["Value1"].Text == "-")
  5152. {
  5153. return;
  5154. }
  5155. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 1).ToString();
  5156. }
  5157. if (e.Cell.Column.Key == "Value2")
  5158. {
  5159. if (ur.Cells["Value1"].Text != "")
  5160. {
  5161. m = m + 1;
  5162. }
  5163. if (ur.Cells["Value2"].Text != "")
  5164. {
  5165. m = m + 1;
  5166. }
  5167. if (ur.Cells["Value3"].Text != "")
  5168. {
  5169. m = m + 1;
  5170. }
  5171. if (ur.Cells["Value2"].Text == "-")
  5172. {
  5173. return;
  5174. }
  5175. if (ur.Cells["Value2"].Text == "-")
  5176. {
  5177. return;
  5178. }
  5179. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('-', '0').Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('-', '0').Replace('<', '-').ToString3())) / m), 1).ToString();
  5180. }
  5181. if (e.Cell.Column.Key == "Value3")
  5182. {
  5183. if (ur.Cells["Value1"].Text != "")
  5184. {
  5185. m = m + 1;
  5186. }
  5187. if (ur.Cells["Value2"].Text != "")
  5188. {
  5189. m = m + 1;
  5190. }
  5191. if (ur.Cells["Value3"].Text != "")
  5192. {
  5193. m = m + 1;
  5194. }
  5195. if (ur.Cells["Value3"].Text == "-")
  5196. {
  5197. return;
  5198. }
  5199. if (ur.Cells["Value3"].Text == "-")
  5200. {
  5201. return;
  5202. }
  5203. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 1).ToString();
  5204. }
  5205. }
  5206. private void ultraGrid19_CellChange(object sender, CellEventArgs e)
  5207. {
  5208. this.ultraGrid19.UpdateData();
  5209. UltraGridRow ur = this.ultraGrid19.ActiveRow;
  5210. int m = 0;
  5211. string comFormual = this.ultraComFormual.Text.Trim();
  5212. if (e.Cell.Column.Key == "Value1D1" || e.Cell.Column.Key == "Value1D2")
  5213. {
  5214. if (comFormual.Equals("HV5"))
  5215. {
  5216. ur.Cells["Value1"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3())) / 2, 2), 0);
  5217. }
  5218. else if (comFormual.Equals("HV10"))
  5219. {
  5220. ur.Cells["Value1"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3())) / 2, 2), 0);
  5221. }
  5222. else
  5223. {
  5224. MessageUtil.ShowTips("公式选择错误!");
  5225. return;
  5226. }
  5227. if (ur.Cells["Value1"].Text != "")
  5228. {
  5229. m = m + 1;
  5230. }
  5231. if (ur.Cells["Value2"].Text != "")
  5232. {
  5233. m = m + 1;
  5234. }
  5235. if (ur.Cells["Value3"].Text != "")
  5236. {
  5237. m = m + 1;
  5238. }
  5239. if (ur.Cells["Value4"].Text != "")
  5240. {
  5241. m = m + 1;
  5242. }
  5243. if (ur.Cells["Value5"].Text != "")
  5244. {
  5245. m = m + 1;
  5246. }
  5247. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5248. }
  5249. if (e.Cell.Column.Key == "Value2D1" || e.Cell.Column.Key == "Value2D2")
  5250. {
  5251. if (comFormual.Equals("HV5"))
  5252. {
  5253. ur.Cells["Value2"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3())) / 2, 2), 0);
  5254. }
  5255. else if (comFormual.Equals("HV10"))
  5256. {
  5257. ur.Cells["Value2"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3())) / 2, 2), 0);
  5258. }
  5259. else
  5260. {
  5261. MessageUtil.ShowTips("公式选择错误!");
  5262. return;
  5263. }
  5264. if (ur.Cells["Value1"].Text != "")
  5265. {
  5266. m = m + 1;
  5267. }
  5268. if (ur.Cells["Value2"].Text != "")
  5269. {
  5270. m = m + 1;
  5271. }
  5272. if (ur.Cells["Value3"].Text != "")
  5273. {
  5274. m = m + 1;
  5275. }
  5276. if (ur.Cells["Value4"].Text != "")
  5277. {
  5278. m = m + 1;
  5279. }
  5280. if (ur.Cells["Value5"].Text != "")
  5281. {
  5282. m = m + 1;
  5283. }
  5284. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5285. }
  5286. if (e.Cell.Column.Key == "Value3D1" || e.Cell.Column.Key == "Value3D2")
  5287. {
  5288. if (comFormual.Equals("HV5"))
  5289. {
  5290. ur.Cells["Value3"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3())) / 2, 2), 0);
  5291. }
  5292. else if (comFormual.Equals("HV10"))
  5293. {
  5294. ur.Cells["Value3"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3())) / 2, 2), 0);
  5295. }
  5296. else
  5297. {
  5298. MessageUtil.ShowTips("公式选择错误!");
  5299. return;
  5300. }
  5301. if (ur.Cells["Value1"].Text != "")
  5302. {
  5303. m = m + 1;
  5304. }
  5305. if (ur.Cells["Value2"].Text != "")
  5306. {
  5307. m = m + 1;
  5308. }
  5309. if (ur.Cells["Value3"].Text != "")
  5310. {
  5311. m = m + 1;
  5312. }
  5313. if (ur.Cells["Value4"].Text != "")
  5314. {
  5315. m = m + 1;
  5316. }
  5317. if (ur.Cells["Value5"].Text != "")
  5318. {
  5319. m = m + 1;
  5320. }
  5321. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5322. }
  5323. if (e.Cell.Column.Key == "Value4D1" || e.Cell.Column.Key == "Value4D2")
  5324. {
  5325. if (comFormual.Equals("HV5"))
  5326. {
  5327. ur.Cells["Value4"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value4D1"].Text.ToString3()) + double.Parse(ur.Cells["Value4D2"].Text.ToString3())) / 2, 2), 0);
  5328. }
  5329. else if (comFormual.Equals("HV10"))
  5330. {
  5331. ur.Cells["Value4"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value4D1"].Text.ToString3()) + double.Parse(ur.Cells["Value4D2"].Text.ToString3())) / 2, 2), 0);
  5332. }
  5333. else
  5334. {
  5335. MessageUtil.ShowTips("公式选择错误!");
  5336. return;
  5337. }
  5338. if (ur.Cells["Value1"].Text != "")
  5339. {
  5340. m = m + 1;
  5341. }
  5342. if (ur.Cells["Value2"].Text != "")
  5343. {
  5344. m = m + 1;
  5345. }
  5346. if (ur.Cells["Value3"].Text != "")
  5347. {
  5348. m = m + 1;
  5349. }
  5350. if (ur.Cells["Value4"].Text != "")
  5351. {
  5352. m = m + 1;
  5353. }
  5354. if (ur.Cells["Value5"].Text != "")
  5355. {
  5356. m = m + 1;
  5357. }
  5358. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5359. }
  5360. if (e.Cell.Column.Key == "Value5D1" || e.Cell.Column.Key == "Value5D2")
  5361. {
  5362. if (comFormual.Equals("HV5"))
  5363. {
  5364. ur.Cells["Value5"].Value = Math.Round(0.1891 * 49.03 / Math.Pow((double.Parse(ur.Cells["Value5D1"].Text.ToString3()) + double.Parse(ur.Cells["Value5D2"].Text.ToString3())) / 2, 2), 0);
  5365. }
  5366. else if (comFormual.Equals("HV10"))
  5367. {
  5368. ur.Cells["Value5"].Value = Math.Round(0.1891 * 98.07 / Math.Pow((double.Parse(ur.Cells["Value5D1"].Text.ToString3()) + double.Parse(ur.Cells["Value5D2"].Text.ToString3())) / 2, 2), 0);
  5369. }
  5370. else
  5371. {
  5372. MessageUtil.ShowTips("公式选择错误!");
  5373. return;
  5374. }
  5375. if (ur.Cells["Value1"].Text != "")
  5376. {
  5377. m = m + 1;
  5378. }
  5379. if (ur.Cells["Value2"].Text != "")
  5380. {
  5381. m = m + 1;
  5382. }
  5383. if (ur.Cells["Value3"].Text != "")
  5384. {
  5385. m = m + 1;
  5386. }
  5387. if (ur.Cells["Value4"].Text != "")
  5388. {
  5389. m = m + 1;
  5390. }
  5391. if (ur.Cells["Value5"].Text != "")
  5392. {
  5393. m = m + 1;
  5394. }
  5395. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5396. }
  5397. if (e.Cell.Column.Key == "Value1")
  5398. {
  5399. if (ur.Cells["Value1"].Text != "")
  5400. {
  5401. m = m + 1;
  5402. }
  5403. if (ur.Cells["Value2"].Text != "")
  5404. {
  5405. m = m + 1;
  5406. }
  5407. if (ur.Cells["Value3"].Text != "")
  5408. {
  5409. m = m + 1;
  5410. }
  5411. if (ur.Cells["Value4"].Text != "")
  5412. {
  5413. m = m + 1;
  5414. }
  5415. if (ur.Cells["Value5"].Text != "")
  5416. {
  5417. m = m + 1;
  5418. }
  5419. if (ur.Cells["Value1"].Text == "-")
  5420. {
  5421. return;
  5422. }
  5423. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5424. }
  5425. if (e.Cell.Column.Key == "Value2")
  5426. {
  5427. if (ur.Cells["Value1"].Text != "")
  5428. {
  5429. m = m + 1;
  5430. }
  5431. if (ur.Cells["Value2"].Text != "")
  5432. {
  5433. m = m + 1;
  5434. }
  5435. if (ur.Cells["Value3"].Text != "")
  5436. {
  5437. m = m + 1;
  5438. }
  5439. if (ur.Cells["Value4"].Text != "")
  5440. {
  5441. m = m + 1;
  5442. }
  5443. if (ur.Cells["Value5"].Text != "")
  5444. {
  5445. m = m + 1;
  5446. }
  5447. if (ur.Cells["Value2"].Text == "-")
  5448. {
  5449. return;
  5450. }
  5451. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5452. }
  5453. if (e.Cell.Column.Key == "Value3")
  5454. {
  5455. if (ur.Cells["Value1"].Text != "")
  5456. {
  5457. m = m + 1;
  5458. }
  5459. if (ur.Cells["Value2"].Text != "")
  5460. {
  5461. m = m + 1;
  5462. }
  5463. if (ur.Cells["Value3"].Text != "")
  5464. {
  5465. m = m + 1;
  5466. }
  5467. if (ur.Cells["Value4"].Text != "")
  5468. {
  5469. m = m + 1;
  5470. }
  5471. if (ur.Cells["Value5"].Text != "")
  5472. {
  5473. m = m + 1;
  5474. }
  5475. if (ur.Cells["Value3"].Text == "-")
  5476. {
  5477. return;
  5478. }
  5479. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5480. }
  5481. if (e.Cell.Column.Key == "Value4")
  5482. {
  5483. if (ur.Cells["Value1"].Text != "")
  5484. {
  5485. m = m + 1;
  5486. }
  5487. if (ur.Cells["Value2"].Text != "")
  5488. {
  5489. m = m + 1;
  5490. }
  5491. if (ur.Cells["Value3"].Text != "")
  5492. {
  5493. m = m + 1;
  5494. }
  5495. if (ur.Cells["Value4"].Text != "")
  5496. {
  5497. m = m + 1;
  5498. }
  5499. if (ur.Cells["Value5"].Text != "")
  5500. {
  5501. m = m + 1;
  5502. }
  5503. if (ur.Cells["Value4"].Text == "-")
  5504. {
  5505. return;
  5506. }
  5507. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5508. }
  5509. if (e.Cell.Column.Key == "Value5")
  5510. {
  5511. if (ur.Cells["Value1"].Text != "")
  5512. {
  5513. m = m + 1;
  5514. }
  5515. if (ur.Cells["Value2"].Text != "")
  5516. {
  5517. m = m + 1;
  5518. }
  5519. if (ur.Cells["Value3"].Text != "")
  5520. {
  5521. m = m + 1;
  5522. }
  5523. if (ur.Cells["Value4"].Text != "")
  5524. {
  5525. m = m + 1;
  5526. }
  5527. if (ur.Cells["Value5"].Text != "")
  5528. {
  5529. m = m + 1;
  5530. }
  5531. if (ur.Cells["Value5"].Text == "-")
  5532. {
  5533. return;
  5534. }
  5535. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5536. }
  5537. }
  5538. private void ultraGrid20_CellChange(object sender, CellEventArgs e)
  5539. {
  5540. this.ultraGrid20.UpdateData();
  5541. UltraGridRow ur = this.ultraGrid20.ActiveRow;
  5542. int m = 0;
  5543. string comFormual = this.ultraComFormual.Text.Trim();
  5544. if (e.Cell.Column.Key == "Value1D1" || e.Cell.Column.Key == "Value1D2")
  5545. {
  5546. if (comFormual.Equals("HBW2.5"))
  5547. {
  5548. ur.Cells["Value1"].Value = (Math.Round(0.102 * 2 * 1838.75 / (2.5 * 3.142 * (2.5 - Math.Sqrt(6.25 - Math.Pow(double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  5549. }
  5550. else if (comFormual.Equals("HBW5"))
  5551. {
  5552. ur.Cells["Value1"].Value = (Math.Round(0.102 * 2 * 7355 / (5 * 3.142 * (5 - Math.Sqrt(25 - Math.Pow(double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  5553. }
  5554. else if (comFormual.Equals("HBW10"))
  5555. {
  5556. ur.Cells["Value1"].Value = (Math.Round(0.102 * 2 * 29420 / (10 * 3.142 * (10 - Math.Sqrt(100 - Math.Pow(double.Parse(ur.Cells["Value1D1"].Text.ToString3()) + double.Parse(ur.Cells["Value1D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  5557. }
  5558. else
  5559. {
  5560. MessageUtil.ShowTips("公式选择错误!");
  5561. return;
  5562. }
  5563. if (ur.Cells["Value1"].Text != "")
  5564. {
  5565. m = m + 1;
  5566. }
  5567. if (ur.Cells["Value2"].Text != "")
  5568. {
  5569. m = m + 1;
  5570. }
  5571. if (ur.Cells["Value3"].Text != "")
  5572. {
  5573. m = m + 1;
  5574. }
  5575. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 2).ToString();
  5576. }
  5577. if (e.Cell.Column.Key == "Value2D1" || e.Cell.Column.Key == "Value2D2")
  5578. {
  5579. if (comFormual.Equals("HBW2.5"))
  5580. {
  5581. ur.Cells["Value2"].Value = (Math.Round(0.102 * 2 * 1838.75 / (2.5 * 3.142 * (2.5 - Math.Sqrt(6.25 - Math.Pow(double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  5582. }
  5583. else if (comFormual.Equals("HBW5"))
  5584. {
  5585. ur.Cells["Value2"].Value = (Math.Round(0.102 * 2 * 7355 / (5 * 3.142 * (5 - Math.Sqrt(25 - Math.Pow(double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  5586. }
  5587. else if (comFormual.Equals("HBW10"))
  5588. {
  5589. ur.Cells["Value2"].Value = (Math.Round(0.102 * 2 * 29420 / (10 * 3.142 * (10 - Math.Sqrt(100 - Math.Pow(double.Parse(ur.Cells["Value2D1"].Text.ToString3()) + double.Parse(ur.Cells["Value2D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  5590. }
  5591. else
  5592. {
  5593. MessageUtil.ShowTips("公式选择错误!");
  5594. return;
  5595. }
  5596. if (ur.Cells["Value1"].Text != "")
  5597. {
  5598. m = m + 1;
  5599. }
  5600. if (ur.Cells["Value2"].Text != "")
  5601. {
  5602. m = m + 1;
  5603. }
  5604. if (ur.Cells["Value3"].Text != "")
  5605. {
  5606. m = m + 1;
  5607. }
  5608. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 2).ToString();
  5609. }
  5610. if (e.Cell.Column.Key == "Value3D1" || e.Cell.Column.Key == "Value3D2")
  5611. {
  5612. if (comFormual.Equals("HBW2.5"))
  5613. {
  5614. ur.Cells["Value3"].Value = (Math.Round(0.102 * 2 * 1838.75 / (2.5 * 3.142 * (2.5 - Math.Sqrt(6.25 - Math.Pow(double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  5615. }
  5616. else if (comFormual.Equals("HBW5"))
  5617. {
  5618. ur.Cells["Value3"].Value = (Math.Round(0.102 * 2 * 7355 / (5 * 3.142 * (5 - Math.Sqrt(25 - Math.Pow(double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  5619. }
  5620. else if (comFormual.Equals("HBW10"))
  5621. {
  5622. ur.Cells["Value3"].Value = (Math.Round(0.102 * 2 * 29420 / (10 * 3.142 * (10 - Math.Sqrt(100 - Math.Pow(double.Parse(ur.Cells["Value3D1"].Text.ToString3()) + double.Parse(ur.Cells["Value3D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  5623. }
  5624. else
  5625. {
  5626. MessageUtil.ShowTips("公式选择错误!");
  5627. return;
  5628. }
  5629. if (ur.Cells["Value1"].Text != "")
  5630. {
  5631. m = m + 1;
  5632. }
  5633. if (ur.Cells["Value2"].Text != "")
  5634. {
  5635. m = m + 1;
  5636. }
  5637. if (ur.Cells["Value3"].Text != "")
  5638. {
  5639. m = m + 1;
  5640. }
  5641. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5642. }
  5643. if (e.Cell.Column.Key == "Value1")
  5644. {
  5645. if (ur.Cells["Value1"].Text != "")
  5646. {
  5647. m = m + 1;
  5648. }
  5649. if (ur.Cells["Value2"].Text != "")
  5650. {
  5651. m = m + 1;
  5652. }
  5653. if (ur.Cells["Value3"].Text != "")
  5654. {
  5655. m = m + 1;
  5656. }
  5657. if (ur.Cells["Value1"].Text == "-")
  5658. {
  5659. return;
  5660. }
  5661. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5662. }
  5663. if (e.Cell.Column.Key == "Value2")
  5664. {
  5665. if (ur.Cells["Value1"].Text != "")
  5666. {
  5667. m = m + 1;
  5668. }
  5669. if (ur.Cells["Value2"].Text != "")
  5670. {
  5671. m = m + 1;
  5672. }
  5673. if (ur.Cells["Value3"].Text != "")
  5674. {
  5675. m = m + 1;
  5676. }
  5677. if (ur.Cells["Value2"].Text == "-")
  5678. {
  5679. return;
  5680. }
  5681. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5682. }
  5683. if (e.Cell.Column.Key == "Value3")
  5684. {
  5685. if (ur.Cells["Value1"].Text != "")
  5686. {
  5687. m = m + 1;
  5688. }
  5689. if (ur.Cells["Value2"].Text != "")
  5690. {
  5691. m = m + 1;
  5692. }
  5693. if (ur.Cells["Value3"].Text != "")
  5694. {
  5695. m = m + 1;
  5696. }
  5697. if (ur.Cells["Value3"].Text == "-")
  5698. {
  5699. return;
  5700. }
  5701. ur.Cells["AverageValue"].Value = Math.Round(((double.Parse(ur.Cells["Value1"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value2"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value3"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5702. }
  5703. }
  5704. private void ultraGrid27_AfterRowActivate(object sender, EventArgs e)
  5705. {
  5706. UltraGridRow uRow = this.ultraGrid27.ActiveRow;
  5707. if(uRow.HasChild())
  5708. {
  5709. return;
  5710. }
  5711. if(uRow == null)
  5712. {
  5713. return;
  5714. }
  5715. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  5716. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPHYNoFrim", new object[] { uRow.Cells["CheckNo"].Value.ToString(), "3", arrId, ultraOptionSet1.CheckedItem.DataValue.ToString() }, this.ob);
  5717. PipeCheckconsignDetailEntitybindingSource2.DataSource = listSource;
  5718. }
  5719. //private void ultraGrid27_CellChange(object sender, CellEventArgs e)
  5720. //{
  5721. // if (e.Cell.Row.HasChild() && e.Cell.Column.Key == "CHK")
  5722. // {
  5723. // ultraGrid27.UpdateData();
  5724. // if (e.Cell.Value.ToString() == "True")
  5725. // {
  5726. // foreach (UltraGridRow dr in e.Cell.Row.ChildBands[0].Rows)
  5727. // {
  5728. // dr.Cells["CHK1"].Value = "True";
  5729. // }
  5730. // }
  5731. // else
  5732. // {
  5733. // foreach (UltraGridRow dr in e.Cell.Row.ChildBands[0].Rows)
  5734. // {
  5735. // dr.Cells["CHK1"].Value = "False";
  5736. // }
  5737. // }
  5738. // }
  5739. //}
  5740. private void ultraGrid40_AfterRowActivate(object sender, EventArgs e)
  5741. {
  5742. UltraGridRow uRow = this.ultraGrid40.ActiveRow;
  5743. if (uRow.HasChild())
  5744. {
  5745. return;
  5746. }
  5747. if (uRow == null)
  5748. {
  5749. return;
  5750. }
  5751. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  5752. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPHYFrim", new object[] { uRow.Cells["CheckNo"].Value.ToString(), arrId, ultraOptionSet1.CheckedItem.DataValue.ToString() }, this.ob);
  5753. PipeCheckconsignDetailEntitybindingSource3.DataSource = listSource;
  5754. List<PipeCheckconsignDetailEntity> listSource1 = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  5755. "com.steering.lims.data.pipe.FrmDataCJBase.queryDetaiFlag", new object[] { uRow.Cells["CheckNo"].Value.ToString(), arrId }, this.ob);
  5756. pipeCheckconsignDetailEntityBindingSource7.DataSource = listSource1;
  5757. for(int i = 0;i<ultraGrid54.Rows.Count;i++)
  5758. {
  5759. if (this.ultraGrid54.Rows[i].Cells["Flag"].Text != "已审核" && this.ultraGrid54.Rows[i].Cells["Flag"].Text != "判定已接收")
  5760. {
  5761. ultraGrid54.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  5762. }
  5763. }
  5764. }
  5765. //private void ultraGrid40_CellChange(object sender, CellEventArgs e)
  5766. //{
  5767. // if (e.Cell.Row.HasChild() && e.Cell.Column.Key == "CHK")
  5768. // {
  5769. // ultraGrid40.UpdateData();
  5770. // if (e.Cell.Value.ToString() == "True")
  5771. // {
  5772. // foreach (UltraGridRow dr in e.Cell.Row.ChildBands[0].Rows)
  5773. // {
  5774. // dr.Cells["CHK1"].Value = "True";
  5775. // }
  5776. // }
  5777. // else
  5778. // {
  5779. // foreach (UltraGridRow dr in e.Cell.Row.ChildBands[0].Rows)
  5780. // {
  5781. // dr.Cells["CHK1"].Value = "False";
  5782. // }
  5783. // }
  5784. // }
  5785. //}
  5786. private void ultraGrid41_AfterRowActivate(object sender, EventArgs e)
  5787. {
  5788. ultraTabControl5.Visible = true;
  5789. ultraTabControl3.Visible = false;
  5790. ultraTabControl4.Visible = false;
  5791. ultraTabControl2.Visible = false;
  5792. //PipeCheckconsignPhydetailEntitybindingSource.Clear();
  5793. //PipeCheckconsignPhydetailEntityCjbindingSource.Clear();
  5794. //PipeCheckconsignPhydetailEntityLSbindingSource.Clear();
  5795. //PipeCheckconsignPhydetailEntityWSbindingSource.Clear();
  5796. //PipeCheckconsignPhydetailEntityBSbindingSource.Clear();
  5797. //PipeCheckconsignPhydetailEntityJZWbindingSource.Clear();
  5798. //PipeCheckconsignPhydetailEntityJLDbindingSource.Clear();
  5799. //PipeCheckconsignPhydetailEntityZZbindingSource.Clear();
  5800. //PipeCheckconsignPhydetailEntityYBbindingSource.Clear();
  5801. //PipeCheckconsignPhydetailEntityWQbindingSource.Clear();
  5802. //PipeCheckconsignPhydetailEntityKKbindingSource.Clear();
  5803. UltraGridRow row = this.ultraGrid41.ActiveRow;
  5804. List<PipeCheckconsignPhydetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignPhydetailEntity>(
  5805. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPhyItem", new object[] { row.Cells["CheckNo"].Value.ToString(), row.Cells["SampleNo"].Value.ToString(), row.Cells["PhyCodeMax"].Value.ToString() }, this.ob);
  5806. if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))//拉伸
  5807. {
  5808. PipeCheckconsignPhydetailEntitybindingSource.DataSource = listSource;
  5809. ultraTabControl5.Tabs["0"].Selected = true;
  5810. ultraTabControl5.Tabs["0"].Visible = true;
  5811. ultraTabControl5.Tabs["1"].Visible = false;
  5812. ultraTabControl5.Tabs["2"].Visible = false;
  5813. ultraTabControl5.Tabs["3"].Visible = false;
  5814. ultraTabControl5.Tabs["4"].Visible = false;
  5815. ultraTabControl5.Tabs["5"].Visible = false;
  5816. ultraTabControl5.Tabs["6"].Visible = false;
  5817. ultraTabControl5.Tabs["7"].Visible = false;
  5818. ultraTabControl5.Tabs["8"].Visible = false;
  5819. ultraTabControl5.Tabs["9"].Visible = false;
  5820. ultraTabControl5.Tabs["10"].Visible = false;
  5821. ultraTabControl5.Tabs["11"].Visible = false;
  5822. ultraTabControl5.Tabs["12"].Visible = false;
  5823. foreach (UltraGridRow forRow in ultraGrid42.Rows)
  5824. {
  5825. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5826. {
  5827. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5828. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5829. }
  5830. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5831. {
  5832. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5833. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5834. }
  5835. if (forRow.Cells["SplineItemNameS"].Text.ToString().Equals(""))
  5836. {
  5837. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5838. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5839. }
  5840. string a = forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "");
  5841. if (!forRow.Cells["SampleType"].Text.Trim().Replace(" ", "").Equals(forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "")))
  5842. {
  5843. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5844. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5845. }
  5846. if (!forRow.Cells["PhyDir"].Text.Trim().Equals(forRow.Cells["SplineItemNameF"].Text.Trim()))
  5847. {
  5848. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5849. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5850. }
  5851. if (forRow.Cells["ItemNameW"].Text.Trim().Equals("室温"))
  5852. {
  5853. if (int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) > 35 || int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) < 10)
  5854. {
  5855. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5856. }
  5857. }
  5858. else
  5859. {
  5860. if (!forRow.Cells["CheckTemp"].Text.Trim().Equals(forRow.Cells["ItemNameW"].Text.Trim().Replace("℃", "")))
  5861. {
  5862. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5863. }
  5864. }
  5865. }
  5866. }
  5867. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))//冲击
  5868. {
  5869. PipeCheckconsignPhydetailEntityCjbindingSource.DataSource = listSource;
  5870. ultraTabControl5.Tabs["1"].Selected = true;
  5871. ultraTabControl5.Tabs["0"].Visible = false;
  5872. ultraTabControl5.Tabs["1"].Visible = true;
  5873. ultraTabControl5.Tabs["2"].Visible = false;
  5874. ultraTabControl5.Tabs["3"].Visible = false;
  5875. ultraTabControl5.Tabs["4"].Visible = false;
  5876. ultraTabControl5.Tabs["5"].Visible = false;
  5877. ultraTabControl5.Tabs["6"].Visible = false;
  5878. ultraTabControl5.Tabs["7"].Visible = false;
  5879. ultraTabControl5.Tabs["8"].Visible = false;
  5880. ultraTabControl5.Tabs["9"].Visible = false;
  5881. ultraTabControl5.Tabs["10"].Visible = false;
  5882. ultraTabControl5.Tabs["11"].Visible = false;
  5883. ultraTabControl5.Tabs["12"].Visible = false;
  5884. foreach (UltraGridRow forRow in ultraGrid43.Rows)
  5885. {
  5886. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5887. {
  5888. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5889. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5890. }
  5891. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5892. {
  5893. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5894. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5895. }
  5896. //力学实验冲击,硬度单点值,平均值超上限都变红。
  5897. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5898. {
  5899. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5900. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5901. }
  5902. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5903. {
  5904. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5905. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5906. }
  5907. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5908. {
  5909. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5910. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5911. }
  5912. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5913. {
  5914. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5915. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5916. }
  5917. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5918. {
  5919. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5920. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5921. }
  5922. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5923. {
  5924. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5925. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5926. }
  5927. if (forRow.Cells["SplineItemNameS"].Text.ToString().Equals(""))
  5928. {
  5929. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5930. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5931. }
  5932. if (!forRow.Cells["SampleType"].Text.Trim().Replace(" ", "").Equals(forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "")))
  5933. {
  5934. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5935. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5936. }
  5937. if (!forRow.Cells["PhyDir"].Text.Trim().Equals(forRow.Cells["SplineItemNameF"].Text.Trim()))
  5938. {
  5939. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5940. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5941. }
  5942. if (forRow.Cells["ItemNameW"].Text.Trim().Equals("室温"))
  5943. {
  5944. if (int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) > 35 || int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) < 10)
  5945. {
  5946. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5947. }
  5948. }
  5949. else
  5950. {
  5951. if (!forRow.Cells["CheckTemp"].Text.Trim().Equals(forRow.Cells["ItemNameW"].Text.Trim().Replace("℃", "")))
  5952. {
  5953. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5954. }
  5955. }
  5956. }
  5957. }
  5958. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))//布氏
  5959. {
  5960. PipeCheckconsignPhydetailEntityBSbindingSource.DataSource = listSource;
  5961. MergedCell(ultraGrid6, new string[] { "PhyName" });
  5962. ultraTabControl5.Tabs["4"].Selected = true;
  5963. ultraTabControl5.Tabs["0"].Visible = false;
  5964. ultraTabControl5.Tabs["1"].Visible = false;
  5965. ultraTabControl5.Tabs["2"].Visible = false;
  5966. ultraTabControl5.Tabs["3"].Visible = false;
  5967. ultraTabControl5.Tabs["4"].Visible = true;
  5968. ultraTabControl5.Tabs["5"].Visible = false;
  5969. ultraTabControl5.Tabs["6"].Visible = false;
  5970. ultraTabControl5.Tabs["7"].Visible = false;
  5971. ultraTabControl5.Tabs["8"].Visible = false;
  5972. ultraTabControl5.Tabs["9"].Visible = false;
  5973. ultraTabControl5.Tabs["10"].Visible = false;
  5974. ultraTabControl5.Tabs["11"].Visible = false;
  5975. ultraTabControl5.Tabs["12"].Visible = false;
  5976. foreach (UltraGridRow forRow in ultraGrid46.Rows)
  5977. {
  5978. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5979. {
  5980. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5981. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5982. }
  5983. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5984. {
  5985. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5986. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5987. }
  5988. //力学实验冲击,硬度单点值,平均值超上限都变红。
  5989. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5990. {
  5991. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5992. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5993. }
  5994. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5995. {
  5996. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5997. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5998. }
  5999. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6000. {
  6001. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6002. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6003. }
  6004. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6005. {
  6006. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6007. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6008. }
  6009. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6010. {
  6011. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6012. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6013. }
  6014. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6015. {
  6016. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6017. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6018. }
  6019. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6020. {
  6021. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6022. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6023. }
  6024. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6025. {
  6026. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6027. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6028. }
  6029. }
  6030. }
  6031. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))//洛氏
  6032. {
  6033. PipeCheckconsignPhydetailEntityLSbindingSource.DataSource = listSource;
  6034. MergedCell(ultraGrid5, new string[] { "PhyName" });
  6035. ultraTabControl5.Tabs["2"].Selected = true;
  6036. ultraTabControl5.Tabs["0"].Visible = false;
  6037. ultraTabControl5.Tabs["1"].Visible = false;
  6038. ultraTabControl5.Tabs["2"].Visible = true;
  6039. ultraTabControl5.Tabs["3"].Visible = false;
  6040. ultraTabControl5.Tabs["4"].Visible = false;
  6041. ultraTabControl5.Tabs["5"].Visible = false;
  6042. ultraTabControl5.Tabs["6"].Visible = false;
  6043. ultraTabControl5.Tabs["7"].Visible = false;
  6044. ultraTabControl5.Tabs["8"].Visible = false;
  6045. ultraTabControl5.Tabs["9"].Visible = false;
  6046. ultraTabControl5.Tabs["10"].Visible = false;
  6047. ultraTabControl5.Tabs["11"].Visible = false;
  6048. ultraTabControl5.Tabs["12"].Visible = false;
  6049. foreach (UltraGridRow forRow in ultraGrid44.Rows)
  6050. {
  6051. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6052. {
  6053. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6054. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6055. }
  6056. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6057. {
  6058. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6059. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6060. }
  6061. //力学实验冲击,硬度单点值,平均值超上限都变红。
  6062. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6063. {
  6064. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6065. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6066. }
  6067. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6068. {
  6069. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6070. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6071. }
  6072. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6073. {
  6074. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6075. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6076. }
  6077. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6078. {
  6079. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6080. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6081. } if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6082. {
  6083. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6084. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6085. }
  6086. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6087. {
  6088. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6089. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6090. }
  6091. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6092. {
  6093. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6094. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6095. }
  6096. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6097. {
  6098. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6099. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6100. }
  6101. }
  6102. }
  6103. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))//维氏
  6104. {
  6105. PipeCheckconsignPhydetailEntityWSbindingSource.DataSource = listSource;
  6106. MergedCell(ultraGrid5, new string[] { "PhyName" });
  6107. ultraTabControl5.Tabs["3"].Selected = true;
  6108. ultraTabControl5.Tabs["0"].Visible = false;
  6109. ultraTabControl5.Tabs["1"].Visible = false;
  6110. ultraTabControl5.Tabs["2"].Visible = false;
  6111. ultraTabControl5.Tabs["3"].Visible = true;
  6112. ultraTabControl5.Tabs["4"].Visible = false;
  6113. ultraTabControl5.Tabs["5"].Visible = false;
  6114. ultraTabControl5.Tabs["6"].Visible = false;
  6115. ultraTabControl5.Tabs["7"].Visible = false;
  6116. ultraTabControl5.Tabs["8"].Visible = false;
  6117. ultraTabControl5.Tabs["9"].Visible = false;
  6118. ultraTabControl5.Tabs["10"].Visible = false;
  6119. ultraTabControl5.Tabs["11"].Visible = false;
  6120. ultraTabControl5.Tabs["12"].Visible = false;
  6121. foreach (UltraGridRow forRow in ultraGrid45.Rows)
  6122. {
  6123. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6124. {
  6125. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6126. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6127. }
  6128. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6129. {
  6130. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6131. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6132. }
  6133. //力学实验冲击,硬度单点值,平均值超上限都变红。
  6134. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6135. {
  6136. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6137. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6138. }
  6139. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6140. {
  6141. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6142. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6143. }
  6144. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6145. {
  6146. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6147. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6148. }
  6149. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6150. {
  6151. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6152. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6153. }
  6154. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6155. {
  6156. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6157. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6158. }
  6159. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6160. {
  6161. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6162. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6163. }
  6164. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6165. {
  6166. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6167. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6168. }
  6169. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6170. {
  6171. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6172. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6173. }
  6174. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6175. {
  6176. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6177. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6178. }
  6179. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6180. {
  6181. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6182. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6183. }
  6184. }
  6185. }
  6186. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0016") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0031"))//组织
  6187. {
  6188. PipeCheckconsignPhydetailEntityZZbindingSource.DataSource = listSource;
  6189. ultraTabControl5.Tabs["7"].Selected = true;
  6190. ultraTabControl5.Tabs["0"].Visible = false;
  6191. ultraTabControl5.Tabs["1"].Visible = false;
  6192. ultraTabControl5.Tabs["2"].Visible = false;
  6193. ultraTabControl5.Tabs["3"].Visible = false;
  6194. ultraTabControl5.Tabs["4"].Visible = false;
  6195. ultraTabControl5.Tabs["5"].Visible = false;
  6196. ultraTabControl5.Tabs["6"].Visible = false;
  6197. ultraTabControl5.Tabs["7"].Visible = true;
  6198. ultraTabControl5.Tabs["8"].Visible = false;
  6199. ultraTabControl5.Tabs["9"].Visible = false;
  6200. ultraTabControl5.Tabs["10"].Visible = false;
  6201. ultraTabControl5.Tabs["11"].Visible = false;
  6202. ultraTabControl5.Tabs["12"].Visible = false;
  6203. foreach (UltraGridRow forRow in ultraGrid49.Rows)
  6204. {
  6205. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6206. {
  6207. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6208. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6209. }
  6210. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6211. {
  6212. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6213. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6214. }
  6215. }
  6216. }
  6217. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))//晶粒度
  6218. {
  6219. PipeCheckconsignPhydetailEntityJLDbindingSource.DataSource = listSource;
  6220. ultraTabControl5.Tabs["6"].Selected = true;
  6221. ultraTabControl5.Tabs["0"].Visible = false;
  6222. ultraTabControl5.Tabs["1"].Visible = false;
  6223. ultraTabControl5.Tabs["2"].Visible = false;
  6224. ultraTabControl5.Tabs["3"].Visible = false;
  6225. ultraTabControl5.Tabs["4"].Visible = false;
  6226. ultraTabControl5.Tabs["5"].Visible = false;
  6227. ultraTabControl5.Tabs["6"].Visible = true;
  6228. ultraTabControl5.Tabs["7"].Visible = false;
  6229. ultraTabControl5.Tabs["8"].Visible = false;
  6230. ultraTabControl5.Tabs["9"].Visible = false;
  6231. ultraTabControl5.Tabs["10"].Visible = false;
  6232. ultraTabControl5.Tabs["11"].Visible = false;
  6233. ultraTabControl5.Tabs["12"].Visible = false;
  6234. foreach (UltraGridRow forRow in ultraGrid48.Rows)
  6235. {
  6236. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6237. {
  6238. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6239. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6240. }
  6241. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6242. {
  6243. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6244. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6245. }
  6246. }
  6247. }
  6248. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))//夹杂
  6249. {
  6250. PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource = listSource;
  6251. ultraTabControl5.Tabs["5"].Selected = true;
  6252. ultraTabControl5.Tabs["0"].Visible = false;
  6253. ultraTabControl5.Tabs["1"].Visible = false;
  6254. ultraTabControl5.Tabs["2"].Visible = false;
  6255. ultraTabControl5.Tabs["3"].Visible = false;
  6256. ultraTabControl5.Tabs["4"].Visible = false;
  6257. ultraTabControl5.Tabs["5"].Visible = true;
  6258. ultraTabControl5.Tabs["6"].Visible = false;
  6259. ultraTabControl5.Tabs["7"].Visible = false;
  6260. ultraTabControl5.Tabs["8"].Visible = false;
  6261. ultraTabControl5.Tabs["9"].Visible = false;
  6262. ultraTabControl5.Tabs["10"].Visible = false;
  6263. ultraTabControl5.Tabs["11"].Visible = false;
  6264. ultraTabControl5.Tabs["12"].Visible = false;
  6265. foreach (UltraGridRow forRow in ultraGrid47.Rows)
  6266. {
  6267. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6268. {
  6269. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6270. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6271. }
  6272. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6273. {
  6274. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6275. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6276. }
  6277. if (forRow.Cells["PhyCode"].Text.ToString().Equals("P0618") || forRow.Cells["PhyCode"].Text.ToString().Equals("P0619"))
  6278. {
  6279. if (!forRow.Cells["Value1"].Text.ToString().Equals("是") && !forRow.Cells["Value1"].Text.ToString().Equals("否"))
  6280. {
  6281. forRow.RowSelectorAppearance.BackColor = Color.Red; ;
  6282. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6283. }
  6284. }
  6285. }
  6286. ultraGrid47.DisplayLayout.Bands[0].Columns["Value1"].Header.Caption = "一象限";
  6287. ultraGrid47.DisplayLayout.Bands[0].Columns["Value2"].Header.Caption = "二象限";
  6288. ultraGrid47.DisplayLayout.Bands[0].Columns["Value3"].Header.Caption = "三象限";
  6289. ultraGrid47.DisplayLayout.Bands[0].Columns["Value4"].Header.Caption = "四象限";
  6290. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0115"))
  6291. {
  6292. ultraGrid47.DisplayLayout.Bands[0].Columns["Value2"].Hidden = false;
  6293. ultraGrid47.DisplayLayout.Bands[0].Columns["Value3"].Hidden = false;
  6294. ultraGrid47.DisplayLayout.Bands[0].Columns["Value4"].Hidden = false;
  6295. }
  6296. else
  6297. {
  6298. ultraGrid47.DisplayLayout.Bands[0].Columns["Value2"].Hidden = true;
  6299. ultraGrid47.DisplayLayout.Bands[0].Columns["Value3"].Hidden = true;
  6300. ultraGrid47.DisplayLayout.Bands[0].Columns["Value4"].Hidden = true;
  6301. }
  6302. }
  6303. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0010"))//工艺
  6304. {
  6305. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0027") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0038") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0082") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0083") || row.Cells["PhyCodeMax"].Value.ToString().Equals("C0098"))//弯曲
  6306. {
  6307. PipeCheckconsignPhydetailEntityWQbindingSource.DataSource = listSource;
  6308. ultraTabControl5.Tabs["9"].Selected = true;
  6309. ultraTabControl5.Tabs["0"].Visible = false;
  6310. ultraTabControl5.Tabs["1"].Visible = false;
  6311. ultraTabControl5.Tabs["2"].Visible = false;
  6312. ultraTabControl5.Tabs["3"].Visible = false;
  6313. ultraTabControl5.Tabs["4"].Visible = false;
  6314. ultraTabControl5.Tabs["5"].Visible = false;
  6315. ultraTabControl5.Tabs["6"].Visible = false;
  6316. ultraTabControl5.Tabs["7"].Visible = false;
  6317. ultraTabControl5.Tabs["8"].Visible = false;
  6318. ultraTabControl5.Tabs["9"].Visible = true;
  6319. ultraTabControl5.Tabs["10"].Visible = false;
  6320. ultraTabControl5.Tabs["11"].Visible = false;
  6321. ultraTabControl5.Tabs["12"].Visible = false;
  6322. }
  6323. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0009"))//压扁
  6324. {
  6325. PipeCheckconsignPhydetailEntityYBbindingSource.DataSource = listSource;
  6326. ultraTabControl5.Tabs["8"].Selected = true;
  6327. ultraTabControl5.Tabs["0"].Visible = false;
  6328. ultraTabControl5.Tabs["1"].Visible = false;
  6329. ultraTabControl5.Tabs["2"].Visible = false;
  6330. ultraTabControl5.Tabs["3"].Visible = false;
  6331. ultraTabControl5.Tabs["4"].Visible = false;
  6332. ultraTabControl5.Tabs["5"].Visible = false;
  6333. ultraTabControl5.Tabs["6"].Visible = false;
  6334. ultraTabControl5.Tabs["7"].Visible = false;
  6335. ultraTabControl5.Tabs["8"].Visible = true;
  6336. ultraTabControl5.Tabs["9"].Visible = false;
  6337. ultraTabControl5.Tabs["10"].Visible = false;
  6338. ultraTabControl5.Tabs["11"].Visible = false;
  6339. ultraTabControl5.Tabs["12"].Visible = false;
  6340. for (int i = 0; i < ultraGrid50.Rows.Count; i++)
  6341. {
  6342. if (this.ultraGrid50.Rows[i].Cells["IsGood"].Text == "不符合" || this.ultraGrid50.Rows[i].Cells["IsDefect"].Text == "不符合")
  6343. {
  6344. ultraGrid37.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  6345. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6346. }
  6347. }
  6348. ultraGrid50.DisplayLayout.Bands[0].Columns["IsGood"].Header.Caption = "试验结果(一次)";
  6349. ultraGrid50.DisplayLayout.Bands[0].Columns["IsDefect"].Header.Caption = "试验结果(二次)";
  6350. }
  6351. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0026"))//扩口
  6352. {
  6353. PipeCheckconsignPhydetailEntityKKbindingSource.DataSource = listSource;
  6354. ultraTabControl5.Tabs["10"].Selected = true;
  6355. ultraTabControl5.Tabs["0"].Visible = false;
  6356. ultraTabControl5.Tabs["1"].Visible = false;
  6357. ultraTabControl5.Tabs["2"].Visible = false;
  6358. ultraTabControl5.Tabs["3"].Visible = false;
  6359. ultraTabControl5.Tabs["4"].Visible = false;
  6360. ultraTabControl5.Tabs["5"].Visible = false;
  6361. ultraTabControl5.Tabs["6"].Visible = false;
  6362. ultraTabControl5.Tabs["7"].Visible = false;
  6363. ultraTabControl5.Tabs["8"].Visible = false;
  6364. ultraTabControl5.Tabs["9"].Visible = false;
  6365. ultraTabControl5.Tabs["10"].Visible = true;
  6366. ultraTabControl5.Tabs["11"].Visible = false;
  6367. ultraTabControl5.Tabs["12"].Visible = false;
  6368. for (int i = 0; i < ultraGrid52.Rows.Count; i++)
  6369. {
  6370. if (this.ultraGrid52.Rows[i].Cells["IsGood"].Text == "不符合")
  6371. {
  6372. ultraGrid52.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  6373. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6374. }
  6375. }
  6376. }
  6377. }
  6378. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))
  6379. {
  6380. pipeCheckconsignPhydetailEntityQTBindingSource.DataSource = listSource;
  6381. ultraTabControl5.Tabs["11"].Selected = true;
  6382. ultraTabControl5.Tabs["0"].Visible = false;
  6383. ultraTabControl5.Tabs["1"].Visible = false;
  6384. ultraTabControl5.Tabs["2"].Visible = false;
  6385. ultraTabControl5.Tabs["3"].Visible = false;
  6386. ultraTabControl5.Tabs["4"].Visible = false;
  6387. ultraTabControl5.Tabs["5"].Visible = false;
  6388. ultraTabControl5.Tabs["6"].Visible = false;
  6389. ultraTabControl5.Tabs["7"].Visible = false;
  6390. ultraTabControl5.Tabs["8"].Visible = false;
  6391. ultraTabControl5.Tabs["9"].Visible = false;
  6392. ultraTabControl5.Tabs["10"].Visible = false;
  6393. ultraTabControl5.Tabs["11"].Visible = true;
  6394. ultraTabControl5.Tabs["12"].Visible = false;
  6395. ultraGrid57.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  6396. foreach (UltraGridRow forRow in ultraGrid57.Rows)
  6397. {
  6398. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6399. {
  6400. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6401. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6402. }
  6403. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6404. {
  6405. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6406. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6407. }
  6408. }
  6409. }
  6410. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0066")) //落锤试验
  6411. {
  6412. PipeCheckconsignDetailEntityLCbindingSource.DataSource = listSource;
  6413. ultraTabControl5.Tabs["12"].Selected = true;
  6414. ultraTabControl5.Tabs["0"].Visible = false;
  6415. ultraTabControl5.Tabs["1"].Visible = false;
  6416. ultraTabControl5.Tabs["2"].Visible = false;
  6417. ultraTabControl5.Tabs["3"].Visible = false;
  6418. ultraTabControl5.Tabs["4"].Visible = false;
  6419. ultraTabControl5.Tabs["5"].Visible = false;
  6420. ultraTabControl5.Tabs["6"].Visible = false;
  6421. ultraTabControl5.Tabs["7"].Visible = false;
  6422. ultraTabControl5.Tabs["8"].Visible = false;
  6423. ultraTabControl5.Tabs["9"].Visible = false;
  6424. ultraTabControl5.Tabs["10"].Visible = false;
  6425. ultraTabControl5.Tabs["11"].Visible = false;
  6426. ultraTabControl5.Tabs["12"].Visible = true;
  6427. //ultraGrid57.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  6428. //foreach (UltraGridRow forRow in ultraGrid57.Rows)
  6429. //{
  6430. // if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6431. // {
  6432. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  6433. // this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6434. // }
  6435. // if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6436. // {
  6437. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  6438. // this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6439. // }
  6440. //}
  6441. }
  6442. }
  6443. private void ultraGrid8_CellChange(object sender, CellEventArgs e)
  6444. {
  6445. this.ultraGrid8.UpdateData();
  6446. if (e.Cell.Column.Key == "Value1")
  6447. {
  6448. if(!StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3()) && e.Cell.Row.Cells["Value1"].Value.ToString2() == "")
  6449. {
  6450. return;
  6451. //if (!(e.Cell.Row.Cells["Value1"].Value.ToString2().Substring(e.Cell.Row.Cells["Value1"].Value.ToString2().Length - 1, 1)).Equals("0") && !(e.Cell.Row.Cells["Value1"].Value.ToString2().Substring(e.Cell.Row.Cells["Value1"].Value.ToString2().Length - 1, 1)).Equals("5"))
  6452. //{
  6453. // MessageUtil.ShowTips("末尾位只能是0或者5");
  6454. // return;
  6455. //}
  6456. }
  6457. List<PipeCheckconsignPhydetailEntity> list = PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource as List<PipeCheckconsignPhydetailEntity>;
  6458. list.Where(p => p.PhyCode == "P0064").ToList().ForEach(p =>
  6459. {
  6460. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0057" || q.PhyCode == "P0060" || q.PhyCode == "P0061").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C+D)细系总和
  6461. });
  6462. list.Where(p => p.PhyCode == "P0065").ToList().ForEach(p =>
  6463. {
  6464. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0058" || q.PhyCode == "P0059" || q.PhyCode == "P0062").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C+D)粗系总和
  6465. });
  6466. list.Where(p => p.PhyCode == "P0069").ToList().ForEach(p =>
  6467. {
  6468. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+C)粗系总和
  6469. });
  6470. list.Where(p => p.PhyCode == "P0070").ToList().ForEach(p =>
  6471. {
  6472. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+C)细系总和
  6473. });
  6474. list.Where(p => p.PhyCode == "P0071").ToList().ForEach(p =>
  6475. {
  6476. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0057" || q.PhyCode == "P0060").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C)细系总和
  6477. });
  6478. list.Where(p => p.PhyCode == "P0072").ToList().ForEach(p =>
  6479. {
  6480. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0058" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C)粗系总和
  6481. });
  6482. list.Where(p => p.PhyCode == "P0085").ToList().ForEach(p =>
  6483. {
  6484. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0056" || q.PhyCode == "P0057" || q.PhyCode == "P0058" || q.PhyCode == "P0059" || q.PhyCode == "P0060" || q.PhyCode == "P0061" || q.PhyCode == "P0062").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C+D)粗细系总和
  6485. });
  6486. list.Where(p => p.PhyCode == "P0090").ToList().ForEach(p =>
  6487. {
  6488. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0058").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B)粗系总和
  6489. });
  6490. list.Where(p => p.PhyCode == "P0091").ToList().ForEach(p =>
  6491. {
  6492. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0057").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B)细系总和
  6493. });
  6494. list.Where(p => p.PhyCode == "P0096").ToList().ForEach(p =>
  6495. {
  6496. p.Value1 = list.Where(q => q.PhyCode == "P0058" || q.PhyCode == "P0062").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(B+D)粗系总和
  6497. });
  6498. list.Where(p => p.PhyCode == "P0097").ToList().ForEach(p =>
  6499. {
  6500. p.Value1 = list.Where(q => q.PhyCode == "P0057" || q.PhyCode == "P0061").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(B+D)粗系总和
  6501. });
  6502. ultraGrid8.Refresh();
  6503. }
  6504. }
  6505. private void ultraGrid21_CellChange(object sender, CellEventArgs e)
  6506. {
  6507. this.ultraGrid21.UpdateData();
  6508. if (e.Cell.Column.Key == "Value1")
  6509. {
  6510. List<PipeCheckconsignPhydetailEntity> list = PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource as List<PipeCheckconsignPhydetailEntity>;
  6511. list.Where(p => p.PhyCode == "P0064").ToList().ForEach(p =>
  6512. {
  6513. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0057" || q.PhyCode == "P0060" || q.PhyCode == "P0061").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C+D)细系总和
  6514. });
  6515. list.Where(p => p.PhyCode == "P0065").ToList().ForEach(p =>
  6516. {
  6517. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0058" || q.PhyCode == "P0059" || q.PhyCode == "P0062").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C+D)粗系总和
  6518. });
  6519. list.Where(p => p.PhyCode == "P0069").ToList().ForEach(p =>
  6520. {
  6521. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+C)粗系总和
  6522. });
  6523. list.Where(p => p.PhyCode == "P0070").ToList().ForEach(p =>
  6524. {
  6525. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+C)细系总和
  6526. });
  6527. list.Where(p => p.PhyCode == "P0071").ToList().ForEach(p =>
  6528. {
  6529. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0057" || q.PhyCode == "P0060").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C)细系总和
  6530. });
  6531. list.Where(p => p.PhyCode == "P0072").ToList().ForEach(p =>
  6532. {
  6533. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0058" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C)粗系总和
  6534. });
  6535. list.Where(p => p.PhyCode == "P0085").ToList().ForEach(p =>
  6536. {
  6537. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0056" || q.PhyCode == "P0057" || q.PhyCode == "P0058" || q.PhyCode == "P0059" || q.PhyCode == "P0060" || q.PhyCode == "P0061" || q.PhyCode == "P0062").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B+C+D)粗细系总和
  6538. });
  6539. list.Where(p => p.PhyCode == "P0090").ToList().ForEach(p =>
  6540. {
  6541. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0058").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B)粗系总和
  6542. });
  6543. list.Where(p => p.PhyCode == "P0091").ToList().ForEach(p =>
  6544. {
  6545. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0057").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B)细系总和
  6546. });
  6547. list.Where(p => p.PhyCode == "P0096").ToList().ForEach(p =>
  6548. {
  6549. p.Value1 = list.Where(q => q.PhyCode == "P0058" || q.PhyCode == "P0062").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(B+D)粗系总和
  6550. });
  6551. list.Where(p => p.PhyCode == "P0097").ToList().ForEach(p =>
  6552. {
  6553. p.Value1 = list.Where(q => q.PhyCode == "P0057" || q.PhyCode == "P0061").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(B+D)粗系总和
  6554. });
  6555. ultraGrid21.Refresh();
  6556. }
  6557. }
  6558. private void ultraGrid10_CellChange(object sender, CellEventArgs e)
  6559. {
  6560. this.ultraGrid10.UpdateData();
  6561. if (e.Cell.Column.Key == "Value1")
  6562. {
  6563. if (StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3())) return;
  6564. }
  6565. }
  6566. private void chkRegTime_CheckedChanged(object sender, EventArgs e)
  6567. {
  6568. this.RegStartTime.Enabled = this.RegEndTime.Enabled = this.chkRegTime.Checked;
  6569. }
  6570. private void chkCheckNo_CheckedChanged(object sender, EventArgs e)
  6571. {
  6572. this.txtCheckNo.Enabled = this.chkCheckNo.Checked;
  6573. }
  6574. private void chkJudgeNo_CheckedChanged(object sender, EventArgs e)
  6575. {
  6576. this.txtJudgeNo.Enabled = this.chkJudgeNo.Checked;
  6577. }
  6578. private void chkSteel_CheckedChanged(object sender, EventArgs e)
  6579. {
  6580. this.txtSteel.Enabled = this.chkSteel.Checked;
  6581. }
  6582. private void chkGroup_CheckedChanged(object sender, EventArgs e)
  6583. {
  6584. this.cmbGroup.Enabled = this.chkGroup.Checked;
  6585. }
  6586. private void chkSampleNo_CheckedChanged(object sender, EventArgs e)
  6587. {
  6588. this.txtSampleNo.Enabled = this.chkSampleNo.Checked;
  6589. }
  6590. private void chkOrderNo_CheckedChanged(object sender, EventArgs e)
  6591. {
  6592. this.txtOrderNo.Enabled = this.chkOrderNo.Checked;
  6593. }
  6594. private void chkSpec_CheckedChanged(object sender, EventArgs e)
  6595. {
  6596. this.txtSpec.Enabled = this.chkSpec.Checked;
  6597. }
  6598. private void ultraGrid24_AfterRowActivate(object sender, EventArgs e)
  6599. {
  6600. this.ultraGrid24.UpdateData();
  6601. UltraGridRow row = this.ultraGrid24.ActiveRow;
  6602. if (row == null) return;
  6603. ultraTxtYbEuestion.Text = row.Cells["CalculationFormula"].Text;
  6604. ultraTxtYbC.Text = row.Cells["Value7"].Text;
  6605. ultraTxtYbSpac.Text = row.Cells["Value8"].Text;
  6606. ultraTxtYbQualfiled.Text = row.Cells["IsGood"].Text;
  6607. ultraTxtYbDefect.Text = row.Cells["IsDefect"].Text;
  6608. ultraTxtYbMemo.Text = row.Cells["Remark"].Text;
  6609. }
  6610. private void ultraGrid25_AfterRowActivate(object sender, EventArgs e)
  6611. {
  6612. this.ultraGrid25.UpdateData();
  6613. UltraGridRow row = this.ultraGrid25.ActiveRow;
  6614. if (row == null) return;
  6615. ultraTxtWqDiameter.Text = row.Cells["Value9"].Text;
  6616. ultraTxtWqAngle.Text = row.Cells["Value10"].Text;
  6617. ultraTxtWqQualfiled.Text = row.Cells["IsGood"].Text;
  6618. ultraTxtWqMemo.Text = row.Cells["Remark"].Text;
  6619. }
  6620. private void ultraGrid26_AfterRowActivate(object sender, EventArgs e)
  6621. {
  6622. this.ultraGrid26.UpdateData();
  6623. UltraGridRow row = this.ultraGrid26.ActiveRow;
  6624. if (row == null) return;
  6625. ultraTxtKkTop.Text = row.Cells["Value11"].Text;
  6626. ultraTxtKkFlarRate.Text = row.Cells["Value12"].Text;
  6627. ultraTxtKkGood.Text = row.Cells["IsGood"].Text;
  6628. ultraTxtKkMemo.Text = row.Cells["Remark"].Text;
  6629. }
  6630. private void ultraComMethod_ValueChanged(object sender, EventArgs e)
  6631. {
  6632. ultraComMethodName.Clear();
  6633. if (String.IsNullOrEmpty(this.ultraComMethod.Value.ToString2()))
  6634. return;
  6635. DataTable ds = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.doQueryMothName", new object[] { this.ultraComMethod.Value.ToString2() }, ob);
  6636. if(ds.Rows.Count > 0)
  6637. {
  6638. ultraComMethodName.DataSource = ds;
  6639. ultraComMethodName.ValueMember = "STD_ID";
  6640. ultraComMethodName.SelectedIndex = 0;
  6641. }
  6642. }
  6643. private void chkIsProuctor_CheckedChanged(object sender, EventArgs e)
  6644. {
  6645. this.cmbIsProductor.Enabled = this.chkIsProuctor.Checked;
  6646. }
  6647. private void chkType_CheckedChanged(object sender, EventArgs e)
  6648. {
  6649. this.cmbType.Enabled = this.chkType.Checked;
  6650. }
  6651. private void chkPrintK_CheckedChanged(object sender, EventArgs e)
  6652. {
  6653. this.cmbPrintK.Enabled = this.chkPrintK.Checked;
  6654. }
  6655. private void ultraGrid53_CellChange(object sender, CellEventArgs e)
  6656. {
  6657. this.ultraGrid53.UpdateData();
  6658. UltraGridRow ur = this.ultraGrid53.ActiveRow;
  6659. int m = 0;
  6660. double min = 0.0;
  6661. if (e.Cell.Column.Key == "Value1" || e.Cell.Column.Key == "Value2" || e.Cell.Column.Key == "Value3")
  6662. {
  6663. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value2"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value3"].Value.ToString3()))
  6664. {
  6665. return;
  6666. }
  6667. min = double.Parse(ur.Cells["Value1"].Text.ToString3());
  6668. if (double.Parse(ur.Cells["Value2"].Text.ToString3()) < min)
  6669. {
  6670. min = double.Parse(ur.Cells["Value2"].Text.ToString3());
  6671. }
  6672. if (double.Parse(ur.Cells["Value3"].Text.ToString3()) < min)
  6673. {
  6674. min = double.Parse(ur.Cells["Value3"].Text.ToString3());
  6675. }
  6676. ur.Cells["AverageValue"].Value = Math.Round(min, 3).ToString();
  6677. }
  6678. }
  6679. private void ultraGrid55_CellChange(object sender, CellEventArgs e)
  6680. {
  6681. this.ultraGrid55.UpdateData();
  6682. UltraGridRow ur = this.ultraGrid55.ActiveRow;
  6683. int m = 0;
  6684. double min = 0.0;
  6685. if (e.Cell.Column.Key == "Value1" || e.Cell.Column.Key == "Value2" || e.Cell.Column.Key == "Value3")
  6686. {
  6687. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value2"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value3"].Value.ToString3()))
  6688. {
  6689. return;
  6690. }
  6691. min = double.Parse(ur.Cells["Value1"].Text.ToString3());
  6692. if (double.Parse(ur.Cells["Value2"].Text.ToString3()) < min)
  6693. {
  6694. min = double.Parse(ur.Cells["Value2"].Text.ToString3());
  6695. }
  6696. if (double.Parse(ur.Cells["Value3"].Text.ToString3()) < min)
  6697. {
  6698. min = double.Parse(ur.Cells["Value3"].Text.ToString3());
  6699. }
  6700. ur.Cells["AverageValue"].Value = Math.Round(min, 3).ToString();
  6701. }
  6702. }
  6703. private void ultraGrid13_AfterRowActivate(object sender, EventArgs e)
  6704. {
  6705. this.ultraGrid13.UpdateData();
  6706. UltraGridRow ur = this.ultraGrid13.ActiveRow;
  6707. if (ur.Cells["PhyCode"].Text.ToString().Equals("P0048"))
  6708. {
  6709. this.TxtYbDefect.Enabled = false;
  6710. }
  6711. else
  6712. {
  6713. this.TxtYbDefect.Enabled = true;
  6714. }
  6715. }
  6716. private void ultraGrid58_CellChange(object sender, CellEventArgs e)
  6717. {
  6718. int m = 1;
  6719. foreach (UltraGridRow row in this.ultraGrid58.Rows)
  6720. {
  6721. m = 1;
  6722. //落锤试验DWTT 自动计算
  6723. if (row.Cells["PhyCodeMin"].Text.ToString().Equals("R0057"))
  6724. {
  6725. if (e.Cell.Column.Key == "Value1")
  6726. {
  6727. if (!StringUtil.IsInt(row.Cells["Value1"].Text.ToString()) || int.Parse(row.Cells["Value1"].Text.ToString3()) > 100 || int.Parse(row.Cells["Value1"].Text.ToString3()) < 0)
  6728. {
  6729. MessageUtil.ShowTips("请输入0到100之间的数字!");
  6730. return;
  6731. }
  6732. if (row.Cells["Value2"].Text != "")
  6733. {
  6734. m = m + 1;
  6735. }
  6736. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3())) / m)).ToString();
  6737. }
  6738. if (e.Cell.Column.Key == "Value2")
  6739. {
  6740. if (!StringUtil.IsInt(row.Cells["Value2"].Text.ToString()) || int.Parse(row.Cells["Value2"].Text.ToString3()) > 100 || int.Parse(row.Cells["Value2"].Text.ToString3()) < 0)
  6741. {
  6742. MessageUtil.ShowTips("请输入0到100之间的数字!");
  6743. return;
  6744. }
  6745. if (row.Cells["Value1"].Text != "")
  6746. {
  6747. m = m + 1;
  6748. }
  6749. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3())) / m)).ToString();
  6750. }
  6751. }
  6752. }
  6753. }
  6754. private void ultraTabControl2_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  6755. {
  6756. }
  6757. private void ultraGrid59_CellChange(object sender, CellEventArgs e)
  6758. {
  6759. // this.ultraGrid59.UpdateData();
  6760. int m = 1;
  6761. foreach (UltraGridRow row in this.ultraGrid59.Rows)
  6762. {
  6763. m = 1;
  6764. //落锤试验DWTT 自动计算
  6765. if (row.Cells["PhyCodeMin"].Text.ToString().Equals("R0057"))
  6766. {
  6767. if (e.Cell.Column.Key == "Value1")
  6768. {
  6769. if (!StringUtil.IsInt(row.Cells["Value1"].Text.ToString()) || int.Parse(row.Cells["Value1"].Text.ToString3()) > 100 || int.Parse(row.Cells["Value1"].Text.ToString3()) < 0)
  6770. {
  6771. MessageUtil.ShowTips("请输入0到100之间的数字!");
  6772. return;
  6773. }
  6774. if (row.Cells["Value2"].Text != "")
  6775. {
  6776. m = m + 1;
  6777. }
  6778. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3())) / m)).ToString();
  6779. }
  6780. if (e.Cell.Column.Key == "Value2")
  6781. {
  6782. if (!StringUtil.IsInt(row.Cells["Value2"].Text.ToString()) || int.Parse(row.Cells["Value2"].Text.ToString3()) > 100 || int.Parse(row.Cells["Value2"].Text.ToString3()) < 0)
  6783. {
  6784. MessageUtil.ShowTips("请输入0到100之间的数字!");
  6785. return;
  6786. }
  6787. if (row.Cells["Value1"].Text != "")
  6788. {
  6789. m = m + 1;
  6790. }
  6791. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3())) / m)).ToString();
  6792. }
  6793. }
  6794. }
  6795. }
  6796. private void ultraGrid59_AfterRowActivate(object sender, EventArgs e)
  6797. {
  6798. this.ultraGrid59.UpdateData();
  6799. UltraGridRow row = this.ultraGrid59.ActiveRow;
  6800. if (row == null) return;
  6801. ultraSAMPLE_JB.Text = row.Cells["SampleJb"].Text;
  6802. ultraNOTCH_SHAPE.Text = row.Cells["NotchShape"].Text;
  6803. ultraNOTCH_TYPE.Text = row.Cells["NotchType"].Text;
  6804. }
  6805. private void ultraTabControl3_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  6806. {
  6807. }
  6808. }
  6809. }