FrmLabMecDataCJAuditNew.cs 363 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370
  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 FrmLabMecDataCJAuditNew : FrmBase
  22. {
  23. public FrmLabMecDataCJAuditNew()
  24. {
  25. InitializeComponent();
  26. }
  27. private string[] arrId;//数据权限
  28. private string[] plineCodes = { };
  29. private void FrmLabMecDataCJAuditNew_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 FrmLabMecDataCJAuditNew_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. if (ur.Cells["Value5"].Text != "")
  3231. {
  3232. m = m + 1;
  3233. }
  3234. 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();
  3235. }
  3236. if (e.Cell.Column.Key == "Value2D1" || e.Cell.Column.Key == "Value2D2")
  3237. {
  3238. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value2D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value2D2"].Value.ToString3()))
  3239. {
  3240. return;
  3241. }
  3242. if (comFormual.Equals("HBW2.5"))
  3243. {
  3244. 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();
  3245. }
  3246. else if (comFormual.Equals("HBW5"))
  3247. {
  3248. 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();
  3249. }
  3250. else if (comFormual.Equals("HBW10"))
  3251. {
  3252. 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();
  3253. }
  3254. else
  3255. {
  3256. MessageUtil.ShowTips("公式选择错误!");
  3257. return;
  3258. }
  3259. if (ur.Cells["Value1"].Text != "")
  3260. {
  3261. m = m + 1;
  3262. }
  3263. if (ur.Cells["Value2"].Text != "")
  3264. {
  3265. m = m + 1;
  3266. }
  3267. if (ur.Cells["Value3"].Text != "")
  3268. {
  3269. m = m + 1;
  3270. }
  3271. if (ur.Cells["Value4"].Text != "")
  3272. {
  3273. m = m + 1;
  3274. }
  3275. if (ur.Cells["Value5"].Text != "")
  3276. {
  3277. m = m + 1;
  3278. }
  3279. 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();
  3280. // 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();
  3281. }
  3282. if (e.Cell.Column.Key == "Value3D1" || e.Cell.Column.Key == "Value3D2")
  3283. {
  3284. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value3D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value3D2"].Value.ToString3()))
  3285. {
  3286. return;
  3287. }
  3288. if (comFormual.Equals("HBW2.5"))
  3289. {
  3290. 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();
  3291. }
  3292. else if (comFormual.Equals("HBW5"))
  3293. {
  3294. 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();
  3295. }
  3296. else if (comFormual.Equals("HBW10"))
  3297. {
  3298. 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();
  3299. }
  3300. else
  3301. {
  3302. MessageUtil.ShowTips("公式选择错误!");
  3303. return;
  3304. }
  3305. if (ur.Cells["Value1"].Text != "")
  3306. {
  3307. m = m + 1;
  3308. }
  3309. if (ur.Cells["Value2"].Text != "")
  3310. {
  3311. m = m + 1;
  3312. }
  3313. if (ur.Cells["Value3"].Text != "")
  3314. {
  3315. m = m + 1;
  3316. }
  3317. if(ur.Cells["Value4"].Text != "")
  3318. {
  3319. m = m + 1;
  3320. }
  3321. if (ur.Cells["Value5"].Text != "")
  3322. {
  3323. m = m + 1;
  3324. }
  3325. 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();
  3326. // 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();
  3327. }
  3328. if (e.Cell.Column.Key == "Value4D1" || e.Cell.Column.Key == "Value4D2")
  3329. {
  3330. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value4D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value4D2"].Value.ToString3()))
  3331. {
  3332. return;
  3333. }
  3334. if (comFormual.Equals("HBW2.5"))
  3335. {
  3336. 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();
  3337. }
  3338. else if (comFormual.Equals("HBW5"))
  3339. {
  3340. 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();
  3341. }
  3342. else if (comFormual.Equals("HBW10"))
  3343. {
  3344. 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();
  3345. }
  3346. else
  3347. {
  3348. MessageUtil.ShowTips("公式选择错误!");
  3349. return;
  3350. }
  3351. if (ur.Cells["Value1"].Text != "")
  3352. {
  3353. m = m + 1;
  3354. }
  3355. if (ur.Cells["Value2"].Text != "")
  3356. {
  3357. m = m + 1;
  3358. }
  3359. if (ur.Cells["Value3"].Text != "")
  3360. {
  3361. m = m + 1;
  3362. }
  3363. if (ur.Cells["Value4"].Text != "")
  3364. {
  3365. m = m + 1;
  3366. }
  3367. if (ur.Cells["Value5"].Text != "")
  3368. {
  3369. m = m + 1;
  3370. }
  3371. 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();
  3372. //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();
  3373. }
  3374. if (e.Cell.Column.Key == "Value5D1" || e.Cell.Column.Key == "Value5D2")
  3375. {
  3376. if (!StringUtil.IsDouble(e.Cell.Row.Cells["Value5D1"].Value.ToString3()) || !StringUtil.IsDouble(e.Cell.Row.Cells["Value5D2"].Value.ToString3()))
  3377. {
  3378. return;
  3379. }
  3380. if (comFormual.Equals("HBW2.5"))
  3381. {
  3382. ur.Cells["Value5"].Value = (Math.Round(0.102 * 2 * 1838.75 / (2.5 * 3.142 * (2.5 - Math.Sqrt(6.25 - Math.Pow(double.Parse(ur.Cells["Value5D1"].Text.ToString3()) + double.Parse(ur.Cells["Value5D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3383. }
  3384. else if (comFormual.Equals("HBW5"))
  3385. {
  3386. ur.Cells["Value5"].Value = (Math.Round(0.102 * 2 * 7355 / (5 * 3.142 * (5 - Math.Sqrt(25 - Math.Pow(double.Parse(ur.Cells["Value5D1"].Text.ToString3()) + double.Parse(ur.Cells["Value5D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3387. }
  3388. else if (comFormual.Equals("HBW10"))
  3389. {
  3390. ur.Cells["Value5"].Value = (Math.Round(0.102 * 2 * 29420 / (10 * 3.142 * (10 - Math.Sqrt(100 - Math.Pow(double.Parse(ur.Cells["Value5D1"].Text.ToString3()) + double.Parse(ur.Cells["Value5D2"].Text.ToString3()), 2) / 4))), 0)).ToString();
  3391. }
  3392. else
  3393. {
  3394. MessageUtil.ShowTips("公式选择错误!");
  3395. return;
  3396. }
  3397. if (ur.Cells["Value1"].Text != "")
  3398. {
  3399. m = m + 1;
  3400. }
  3401. if (ur.Cells["Value2"].Text != "")
  3402. {
  3403. m = m + 1;
  3404. }
  3405. if (ur.Cells["Value3"].Text != "")
  3406. {
  3407. m = m + 1;
  3408. }
  3409. if (ur.Cells["Value4"].Text != "")
  3410. {
  3411. m = m + 1;
  3412. }
  3413. if (ur.Cells["Value5"].Text != "")
  3414. {
  3415. m = m + 1;
  3416. }
  3417. 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();
  3418. }
  3419. 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")
  3420. {
  3421. 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()))
  3422. {
  3423. return;
  3424. }
  3425. if (ur.Cells["Value1"].Text != "")
  3426. {
  3427. m = m + 1;
  3428. }
  3429. if (ur.Cells["Value2"].Text != "")
  3430. {
  3431. m = m + 1;
  3432. }
  3433. if (ur.Cells["Value3"].Text != "")
  3434. {
  3435. m = m + 1;
  3436. }
  3437. if (ur.Cells["Value4"].Text != "")
  3438. {
  3439. m = m + 1;
  3440. }
  3441. if (ur.Cells["Value5"].Text != "")
  3442. {
  3443. m = m + 1;
  3444. }
  3445. 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();
  3446. }
  3447. }
  3448. private void ultraButton1_Click(object sender, EventArgs e)
  3449. {
  3450. if (this.TxtYbEuestion.Text.Trim() == "")
  3451. {
  3452. MessageUtil.ShowTips("请选择计算公式!");
  3453. return;
  3454. }
  3455. double d = 0.0;
  3456. double c = 0.0;
  3457. double t = 0.0;
  3458. if(this.TxtYbEuestion.Text.Trim() == "0.65*D" || this.TxtYbEuestion.Text.Trim() == "7*D/8" ||this.TxtYbEuestion.Text.Trim() == "2*D/3")
  3459. {
  3460. if(this.TxtYbD.Text.Trim() == "")
  3461. {
  3462. MessageUtil.ShowTips("请输入管子公称外径!");
  3463. return;
  3464. }
  3465. }else if(this.TxtYbEuestion.Text.Trim() == "(1+C)*T/(C+T/D)")
  3466. {
  3467. if(this.TxtYbD.Text.Trim() == "" || this.TxtYbC.Text.Trim() == "" || this.TxtYbS.Text.Trim() == "")
  3468. {
  3469. MessageUtil.ShowTips("请输入管子的公称外径壁厚以及压扁系数!");
  3470. return;
  3471. }
  3472. }
  3473. d = double.Parse(this.TxtYbD.Text.Trim().ToString3());
  3474. t = double.Parse(this.TxtYbS.Text.Trim().ToString3());
  3475. c = double.Parse(this.TxtYbC.Text.Trim().ToString3());
  3476. if (this.TxtYbEuestion.Text.Trim() == "0.65*D")
  3477. {
  3478. this.TxtYbSpac.Text = Math.Ceiling((0.65 * d)).ToString();
  3479. }
  3480. else if (this.TxtYbEuestion.Text.Trim() == "7*D/8")
  3481. {
  3482. this.TxtYbSpac.Text = Math.Ceiling(((7 * d) / 8)).ToString();
  3483. }
  3484. else if (this.TxtYbEuestion.Text.Trim() == "2*D/3")
  3485. {
  3486. this.TxtYbSpac.Text = Math.Ceiling(((2 * d) / 3)).ToString();
  3487. }
  3488. else if (this.TxtYbEuestion.Text.Trim() == "(1+C)*T/(C+T/D)")
  3489. {
  3490. this.TxtYbSpac.Text = Math.Floor((((1 + c) * t) / (c + t / d))).ToString();
  3491. }
  3492. }
  3493. /**
  3494. * 验证字符串 如:1<2
  3495. *
  3496. * @param strA
  3497. * 数字字符串
  3498. * @param sign
  3499. * 符号
  3500. * @param strB
  3501. * 数字字符串
  3502. * @return true Or false
  3503. */
  3504. private bool checkStr(string strA, string sign, string strB)
  3505. {
  3506. if (strA.Length == 0 || strB.Length == 0)
  3507. {
  3508. return true;
  3509. }
  3510. if (!StringUtil.IsDouble(strB) || !StringUtil.IsDouble(strA))
  3511. {
  3512. return true;
  3513. }
  3514. double a = double.Parse(strA);
  3515. double b = double.Parse(strB);
  3516. if (sign.Equals("="))
  3517. {
  3518. if (a == b)
  3519. {
  3520. return true;
  3521. }
  3522. else
  3523. {
  3524. return false;
  3525. }
  3526. }
  3527. if (sign.Equals(">"))
  3528. {
  3529. if (a > b)
  3530. {
  3531. return true;
  3532. }
  3533. else
  3534. {
  3535. return false;
  3536. }
  3537. }
  3538. if (sign.Equals(">="))
  3539. {
  3540. if (a >= b)
  3541. {
  3542. return true;
  3543. }
  3544. else
  3545. {
  3546. return false;
  3547. }
  3548. }
  3549. if (sign.Equals("<"))
  3550. {
  3551. if (a < b)
  3552. {
  3553. return true;
  3554. }
  3555. else
  3556. {
  3557. return false;
  3558. }
  3559. }
  3560. if (sign.Equals("<="))
  3561. {
  3562. if (a <= b)
  3563. {
  3564. return true;
  3565. }
  3566. else
  3567. {
  3568. return false;
  3569. }
  3570. }
  3571. return false;
  3572. }
  3573. private void ultraGrid15_AfterRowActivate(object sender, EventArgs e)
  3574. {
  3575. ultraTabControl3.Visible = true;
  3576. ultraTabControl4.Visible = false;
  3577. ultraTabControl5.Visible = false;
  3578. ultraTabControl2.Visible = false;
  3579. UltraGridRow row = this.ultraGrid15.ActiveRow;
  3580. if (row == null) return;
  3581. initCheckMethod(row.Cells["PhyCodeMax"].Value.ToString(), row.Cells["checkStd"].Text);//根据试样组加载试验方法
  3582. initCheckEqiupment(row.Cells["PhyCodeMax"].Value.ToString());//根据试样组加载试验设备
  3583. List<PipeCheckconsignPhydetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignPhydetailEntity>(
  3584. "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);
  3585. if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))//拉伸
  3586. {
  3587. PipeCheckconsignPhydetailEntitybindingSource.DataSource = listSource;
  3588. foreach (UltraGridRow forRow in ultraGrid16.Rows)
  3589. {
  3590. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3591. {
  3592. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3593. }
  3594. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3595. {
  3596. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3597. }
  3598. }
  3599. ultraTabControl3.Tabs["0"].Selected = true;
  3600. ultraTabControl3.Tabs["0"].Visible = true;
  3601. ultraTabControl3.Tabs["1"].Visible = false;
  3602. ultraTabControl3.Tabs["2"].Visible = false;
  3603. ultraTabControl3.Tabs["3"].Visible = false;
  3604. ultraTabControl3.Tabs["4"].Visible = false;
  3605. ultraTabControl3.Tabs["5"].Visible = false;
  3606. ultraTabControl3.Tabs["6"].Visible = false;
  3607. ultraTabControl3.Tabs["7"].Visible = false;
  3608. ultraTabControl3.Tabs["8"].Visible = false;
  3609. ultraTabControl3.Tabs["9"].Visible = false;
  3610. ultraTabControl3.Tabs["10"].Visible = false;
  3611. ultraTabControl3.Tabs["11"].Visible = false;
  3612. ultraTabControl3.Tabs["12"].Visible = false;
  3613. this.ultraComFormual1.Visible = false;
  3614. this.cmbStdSteelType1.Visible = false;
  3615. this.txtStdSteelNo1.Visible = false;
  3616. this.txtStdSteelValue1.Visible = false;
  3617. this.txtActualValue1.Visible = false;
  3618. ultraLabel59.Visible = false;
  3619. ultraLabel53.Visible = false;
  3620. ultraLabel52.Visible = false;
  3621. ultraLabel51.Visible = false;
  3622. ultraLabel50.Visible = false;
  3623. }
  3624. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))//冲击
  3625. {
  3626. PipeCheckconsignPhydetailEntityCjbindingSource.DataSource = listSource;
  3627. foreach (UltraGridRow forRow in ultraGrid17.Rows)
  3628. {
  3629. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3630. {
  3631. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3632. }
  3633. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3634. {
  3635. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3636. }
  3637. //力学实验冲击,硬度单点值,平均值超上限都变红。
  3638. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3639. {
  3640. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3641. }
  3642. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3643. {
  3644. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3645. }
  3646. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3647. {
  3648. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3649. }
  3650. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3651. {
  3652. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3653. }
  3654. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3655. {
  3656. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3657. }
  3658. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3659. {
  3660. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3661. }
  3662. }
  3663. ultraTabControl3.Tabs["1"].Selected = true;
  3664. ultraTabControl3.Tabs["0"].Visible = false;
  3665. ultraTabControl3.Tabs["1"].Visible = true;
  3666. ultraTabControl3.Tabs["2"].Visible = false;
  3667. ultraTabControl3.Tabs["3"].Visible = false;
  3668. ultraTabControl3.Tabs["4"].Visible = false;
  3669. ultraTabControl3.Tabs["5"].Visible = false;
  3670. ultraTabControl3.Tabs["6"].Visible = false;
  3671. ultraTabControl3.Tabs["7"].Visible = false;
  3672. ultraTabControl3.Tabs["8"].Visible = false;
  3673. ultraTabControl3.Tabs["9"].Visible = false;
  3674. ultraTabControl3.Tabs["10"].Visible = false;
  3675. ultraTabControl3.Tabs["11"].Visible = false;
  3676. ultraTabControl3.Tabs["12"].Visible = false;
  3677. this.ultraComFormual1.Visible = false;
  3678. this.cmbStdSteelType1.Visible = false;
  3679. this.txtStdSteelNo1.Visible = false;
  3680. this.txtStdSteelValue1.Visible = false;
  3681. this.txtActualValue1.Visible = false;
  3682. ultraLabel59.Visible = false;
  3683. ultraLabel53.Visible = false;
  3684. ultraLabel52.Visible = false;
  3685. ultraLabel51.Visible = false;
  3686. ultraLabel50.Visible = false;
  3687. }
  3688. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))//布氏
  3689. {
  3690. ultraComFormual1.Items.Clear();
  3691. cmbStdSteelType1.Items.Clear();
  3692. PipeCheckconsignPhydetailEntityBSbindingSource.DataSource = listSource;
  3693. MergedCell(ultraGrid6, new string[] { "PhyName" });
  3694. foreach (UltraGridRow forRow in ultraGrid20.Rows)
  3695. {
  3696. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3697. {
  3698. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3699. }
  3700. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3701. {
  3702. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3703. }
  3704. //力学实验冲击,硬度单点值,平均值超上限都变红。
  3705. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3706. {
  3707. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3708. }
  3709. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3710. {
  3711. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3712. }
  3713. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3714. {
  3715. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3716. }
  3717. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3718. {
  3719. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3720. }
  3721. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3722. {
  3723. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3724. }
  3725. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3726. {
  3727. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3728. }
  3729. if (!checkStr(forRow.Cells["Value4"].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["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3734. {
  3735. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3736. }
  3737. }
  3738. ultraTabControl3.Tabs["4"].Selected = true;
  3739. ultraTabControl3.Tabs["0"].Visible = false;
  3740. ultraTabControl3.Tabs["1"].Visible = false;
  3741. ultraTabControl3.Tabs["2"].Visible = false;
  3742. ultraTabControl3.Tabs["3"].Visible = false;
  3743. ultraTabControl3.Tabs["4"].Visible = true;
  3744. ultraTabControl3.Tabs["5"].Visible = false;
  3745. ultraTabControl3.Tabs["6"].Visible = false;
  3746. ultraTabControl3.Tabs["7"].Visible = false;
  3747. ultraTabControl3.Tabs["8"].Visible = false;
  3748. ultraTabControl3.Tabs["9"].Visible = false;
  3749. ultraTabControl3.Tabs["10"].Visible = false;
  3750. ultraTabControl3.Tabs["11"].Visible = false;
  3751. ultraTabControl3.Tabs["12"].Visible = false;
  3752. this.ultraComFormual1.Visible = true;
  3753. this.cmbStdSteelType1.Visible = true;
  3754. this.txtStdSteelNo1.Visible = true;
  3755. this.txtStdSteelValue1.Visible = true;
  3756. this.txtActualValue1.Visible = true;
  3757. ultraLabel59.Visible = true;
  3758. ultraLabel53.Visible = true;
  3759. ultraLabel52.Visible = true;
  3760. ultraLabel51.Visible = true;
  3761. ultraLabel50.Visible = true;
  3762. if (this.UserInfo.GetDeptid().Equals("002001007009"))
  3763. {
  3764. ultraComFormual1.Items.Add("HBW2.5");
  3765. ultraComFormual1.Items.Add("HBW5");
  3766. ultraComFormual1.Items.Add("HBW10");
  3767. cmbStdSteelType1.Items.Add("HBW2.5/187.5");
  3768. cmbStdSteelType1.Items.Add("HBW 5/750");
  3769. cmbStdSteelType1.Items.Add("HBW 10/1000");
  3770. }
  3771. else
  3772. {
  3773. ultraComFormual1.Items.Add("HBW 2.5/187.5");
  3774. ultraComFormual1.Items.Add("HBW 5/750");
  3775. ultraComFormual1.Items.Add("HBW 10/3000");
  3776. cmbStdSteelType1.Items.Add("HBW 2.5/187.5");
  3777. cmbStdSteelType1.Items.Add("HBW 5/750");
  3778. cmbStdSteelType1.Items.Add("HBW 10/3000");
  3779. }
  3780. }
  3781. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))//洛氏
  3782. {
  3783. cmbStdSteelType1.Items.Clear();
  3784. PipeCheckconsignPhydetailEntityLSbindingSource.DataSource = listSource;
  3785. MergedCell(ultraGrid5, new string[] { "PhyName" });
  3786. foreach (UltraGridRow forRow in ultraGrid18.Rows)
  3787. {
  3788. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3789. {
  3790. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3791. }
  3792. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3793. {
  3794. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3795. }
  3796. //力学实验冲击,硬度单点值,平均值超上限都变红。
  3797. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3798. {
  3799. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3800. }
  3801. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3802. {
  3803. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3804. }
  3805. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3806. {
  3807. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3808. }
  3809. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3810. {
  3811. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3812. }
  3813. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3814. {
  3815. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3816. }
  3817. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3818. {
  3819. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3820. }
  3821. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3822. {
  3823. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3824. }
  3825. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3826. {
  3827. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3828. }
  3829. }
  3830. ultraTabControl3.Tabs["2"].Selected = true;
  3831. ultraTabControl3.Tabs["0"].Visible = false;
  3832. ultraTabControl3.Tabs["1"].Visible = false;
  3833. ultraTabControl3.Tabs["2"].Visible = true;
  3834. ultraTabControl3.Tabs["3"].Visible = false;
  3835. ultraTabControl3.Tabs["4"].Visible = false;
  3836. ultraTabControl3.Tabs["5"].Visible = false;
  3837. ultraTabControl3.Tabs["6"].Visible = false;
  3838. ultraTabControl3.Tabs["7"].Visible = false;
  3839. ultraTabControl3.Tabs["8"].Visible = false;
  3840. ultraTabControl3.Tabs["9"].Visible = false;
  3841. ultraTabControl3.Tabs["10"].Visible = false;
  3842. ultraTabControl3.Tabs["11"].Visible = false;
  3843. ultraTabControl3.Tabs["12"].Visible = false;
  3844. this.ultraComFormual1.Visible = false;
  3845. this.cmbStdSteelType1.Visible = true;
  3846. this.txtStdSteelNo1.Visible = true;
  3847. this.txtStdSteelValue1.Visible = true;
  3848. this.txtActualValue1.Visible = true;
  3849. ultraLabel59.Visible = false;
  3850. ultraLabel53.Visible = true;
  3851. ultraLabel52.Visible = true;
  3852. ultraLabel51.Visible = true;
  3853. ultraLabel50.Visible = true;
  3854. cmbStdSteelType1.Items.Add("HRA");
  3855. cmbStdSteelType1.Items.Add("HRB");
  3856. cmbStdSteelType1.Items.Add("HRC");
  3857. }
  3858. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))//维氏
  3859. {
  3860. ultraComFormual1.Items.Clear();
  3861. cmbStdSteelType1.Items.Clear();
  3862. PipeCheckconsignPhydetailEntityWSbindingSource.DataSource = listSource;
  3863. MergedCell(ultraGrid5, new string[] { "PhyName" });
  3864. foreach (UltraGridRow forRow in ultraGrid19.Rows)
  3865. {
  3866. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3867. {
  3868. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3869. }
  3870. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3871. {
  3872. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3873. }
  3874. //力学实验冲击,硬度单点值,平均值超上限都变红。
  3875. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3876. {
  3877. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3878. }
  3879. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3880. {
  3881. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3882. }
  3883. if (!checkStr(forRow.Cells["Value2"].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["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3888. {
  3889. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3890. }
  3891. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3892. {
  3893. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3894. }
  3895. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3896. {
  3897. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3898. }
  3899. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3900. {
  3901. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3902. }
  3903. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3904. {
  3905. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3906. }
  3907. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3908. {
  3909. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3910. }
  3911. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3912. {
  3913. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3914. }
  3915. }
  3916. ultraTabControl3.Tabs["3"].Selected = true;
  3917. ultraTabControl3.Tabs["0"].Visible = false;
  3918. ultraTabControl3.Tabs["1"].Visible = false;
  3919. ultraTabControl3.Tabs["2"].Visible = false;
  3920. ultraTabControl3.Tabs["3"].Visible = true;
  3921. ultraTabControl3.Tabs["4"].Visible = false;
  3922. ultraTabControl3.Tabs["5"].Visible = false;
  3923. ultraTabControl3.Tabs["6"].Visible = false;
  3924. ultraTabControl3.Tabs["7"].Visible = false;
  3925. ultraTabControl3.Tabs["8"].Visible = false;
  3926. ultraTabControl3.Tabs["9"].Visible = false;
  3927. ultraTabControl3.Tabs["10"].Visible = false;
  3928. ultraTabControl3.Tabs["11"].Visible = false;
  3929. ultraTabControl3.Tabs["12"].Visible = false;
  3930. this.ultraComFormual1.Visible = true;
  3931. this.cmbStdSteelType1.Visible = true;
  3932. this.txtStdSteelNo1.Visible = true;
  3933. this.txtStdSteelValue1.Visible = true;
  3934. this.txtActualValue1.Visible = true;
  3935. ultraLabel59.Visible = true;
  3936. ultraLabel53.Visible = true;
  3937. ultraLabel52.Visible = true;
  3938. ultraLabel51.Visible = true;
  3939. ultraLabel50.Visible = true;
  3940. ultraComFormual1.Items.Add("HV5");
  3941. ultraComFormual1.Items.Add("HV10");
  3942. cmbStdSteelType1.Items.Add("HV5");
  3943. cmbStdSteelType1.Items.Add("HV10");
  3944. cmbStdSteelType1.Items.Add("HV0.2");
  3945. }
  3946. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0016") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0031"))//组织
  3947. {
  3948. PipeCheckconsignPhydetailEntityZZbindingSource.DataSource = listSource;
  3949. foreach (UltraGridRow forRow in ultraGrid23.Rows)
  3950. {
  3951. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3952. {
  3953. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3954. }
  3955. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3956. {
  3957. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3958. }
  3959. }
  3960. ultraTabControl3.Tabs["7"].Selected = true;
  3961. ultraTabControl3.Tabs["0"].Visible = false;
  3962. ultraTabControl3.Tabs["1"].Visible = false;
  3963. ultraTabControl3.Tabs["2"].Visible = false;
  3964. ultraTabControl3.Tabs["3"].Visible = false;
  3965. ultraTabControl3.Tabs["4"].Visible = false;
  3966. ultraTabControl3.Tabs["5"].Visible = false;
  3967. ultraTabControl3.Tabs["6"].Visible = false;
  3968. ultraTabControl3.Tabs["7"].Visible = true;
  3969. ultraTabControl3.Tabs["8"].Visible = false;
  3970. ultraTabControl3.Tabs["9"].Visible = false;
  3971. ultraTabControl3.Tabs["10"].Visible = false;
  3972. ultraTabControl3.Tabs["11"].Visible = false;
  3973. ultraTabControl3.Tabs["12"].Visible = false;
  3974. this.ultraComFormual1.Visible = false;
  3975. this.cmbStdSteelType1.Visible = false;
  3976. this.txtStdSteelNo1.Visible = false;
  3977. this.txtStdSteelValue1.Visible = false;
  3978. this.txtActualValue1.Visible = false;
  3979. ultraLabel59.Visible = false;
  3980. ultraLabel53.Visible = false;
  3981. ultraLabel52.Visible = false;
  3982. ultraLabel51.Visible = false;
  3983. ultraLabel50.Visible = false;
  3984. }
  3985. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))//晶粒度
  3986. {
  3987. PipeCheckconsignPhydetailEntityJLDbindingSource.DataSource = listSource;
  3988. foreach (UltraGridRow forRow in ultraGrid22.Rows)
  3989. {
  3990. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  3991. {
  3992. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3993. }
  3994. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  3995. {
  3996. forRow.RowSelectorAppearance.BackColor = Color.Red;
  3997. }
  3998. }
  3999. ultraTabControl3.Tabs["6"].Selected = true;
  4000. ultraTabControl3.Tabs["0"].Visible = false;
  4001. ultraTabControl3.Tabs["1"].Visible = false;
  4002. ultraTabControl3.Tabs["2"].Visible = false;
  4003. ultraTabControl3.Tabs["3"].Visible = false;
  4004. ultraTabControl3.Tabs["4"].Visible = false;
  4005. ultraTabControl3.Tabs["5"].Visible = false;
  4006. ultraTabControl3.Tabs["6"].Visible = true;
  4007. ultraTabControl3.Tabs["7"].Visible = false;
  4008. ultraTabControl3.Tabs["8"].Visible = false;
  4009. ultraTabControl3.Tabs["9"].Visible = false;
  4010. ultraTabControl3.Tabs["10"].Visible = false;
  4011. ultraTabControl3.Tabs["11"].Visible = false;
  4012. ultraTabControl3.Tabs["12"].Visible = false;
  4013. this.ultraComFormual1.Visible = false;
  4014. this.cmbStdSteelType1.Visible = true;
  4015. this.txtStdSteelNo1.Visible = true;
  4016. this.txtStdSteelValue1.Visible = true;
  4017. this.txtActualValue1.Visible = true;
  4018. ultraLabel59.Visible = false;
  4019. ultraLabel53.Visible = false;
  4020. ultraLabel52.Visible = false;
  4021. ultraLabel51.Visible = false;
  4022. ultraLabel50.Visible = false;
  4023. }
  4024. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))//夹杂
  4025. {
  4026. PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource = listSource;
  4027. foreach (UltraGridRow forRow in ultraGrid21.Rows)
  4028. {
  4029. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4030. {
  4031. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4032. }
  4033. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4034. {
  4035. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4036. }
  4037. if (forRow.Cells["PhyCode"].Text.ToString().Equals("P0618") || forRow.Cells["PhyCode"].Text.ToString().Equals("P0619"))
  4038. {
  4039. if (!forRow.Cells["Value1"].Text.ToString().Equals("是") && !forRow.Cells["Value1"].Text.ToString().Equals("否"))
  4040. {
  4041. forRow.RowSelectorAppearance.BackColor = Color.Red; ;
  4042. }
  4043. }
  4044. }
  4045. ultraTabControl3.Tabs["5"].Selected = true;
  4046. ultraTabControl3.Tabs["0"].Visible = false;
  4047. ultraTabControl3.Tabs["1"].Visible = false;
  4048. ultraTabControl3.Tabs["2"].Visible = false;
  4049. ultraTabControl3.Tabs["3"].Visible = false;
  4050. ultraTabControl3.Tabs["4"].Visible = false;
  4051. ultraTabControl3.Tabs["5"].Visible = true;
  4052. ultraTabControl3.Tabs["6"].Visible = false;
  4053. ultraTabControl3.Tabs["7"].Visible = false;
  4054. ultraTabControl3.Tabs["8"].Visible = false;
  4055. ultraTabControl3.Tabs["9"].Visible = false;
  4056. ultraTabControl3.Tabs["10"].Visible = false;
  4057. ultraTabControl3.Tabs["11"].Visible = false;
  4058. ultraTabControl3.Tabs["12"].Visible = false;
  4059. this.ultraComFormual1.Visible = false;
  4060. this.cmbStdSteelType1.Visible = false;
  4061. this.txtStdSteelNo1.Visible = false;
  4062. this.txtStdSteelValue1.Visible = false;
  4063. this.txtActualValue1.Visible = false;
  4064. ultraLabel59.Visible = false;
  4065. ultraLabel53.Visible = false;
  4066. ultraLabel52.Visible = false;
  4067. ultraLabel51.Visible = false;
  4068. ultraLabel50.Visible = false;
  4069. ultraGrid21.DisplayLayout.Bands[0].Columns["Value1"].Header.Caption = "一象限";
  4070. ultraGrid21.DisplayLayout.Bands[0].Columns["Value2"].Header.Caption = "二象限";
  4071. ultraGrid21.DisplayLayout.Bands[0].Columns["Value3"].Header.Caption = "三象限";
  4072. ultraGrid21.DisplayLayout.Bands[0].Columns["Value4"].Header.Caption = "四象限";
  4073. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0115"))
  4074. {
  4075. ultraGrid21.DisplayLayout.Bands[0].Columns["Value2"].Hidden = false;
  4076. ultraGrid21.DisplayLayout.Bands[0].Columns["Value3"].Hidden = false;
  4077. ultraGrid21.DisplayLayout.Bands[0].Columns["Value4"].Hidden = false;
  4078. }
  4079. else
  4080. {
  4081. ultraGrid21.DisplayLayout.Bands[0].Columns["Value2"].Hidden = true;
  4082. ultraGrid21.DisplayLayout.Bands[0].Columns["Value3"].Hidden = true;
  4083. ultraGrid21.DisplayLayout.Bands[0].Columns["Value4"].Hidden = true;
  4084. }
  4085. }
  4086. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0010"))//工艺
  4087. {
  4088. 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"))//弯曲
  4089. {
  4090. PipeCheckconsignPhydetailEntityWQbindingSource.DataSource = listSource;
  4091. ultraTabControl3.Tabs["9"].Selected = true;
  4092. for (int i = 0; i < ultraGrid25.Rows.Count; i++)
  4093. {
  4094. if (this.ultraGrid25.Rows[i].Cells["IsGood"].Text == "不符合")
  4095. {
  4096. ultraGrid25.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4097. }
  4098. }
  4099. ultraTabControl3.Tabs["0"].Visible = false;
  4100. ultraTabControl3.Tabs["1"].Visible = false;
  4101. ultraTabControl3.Tabs["2"].Visible = false;
  4102. ultraTabControl3.Tabs["3"].Visible = false;
  4103. ultraTabControl3.Tabs["4"].Visible = false;
  4104. ultraTabControl3.Tabs["5"].Visible = false;
  4105. ultraTabControl3.Tabs["6"].Visible = false;
  4106. ultraTabControl3.Tabs["7"].Visible = false;
  4107. ultraTabControl3.Tabs["8"].Visible = false;
  4108. ultraTabControl3.Tabs["9"].Visible = true;
  4109. ultraTabControl3.Tabs["10"].Visible = false;
  4110. ultraTabControl3.Tabs["11"].Visible = false;
  4111. ultraTabControl3.Tabs["12"].Visible = false;
  4112. this.ultraComFormual1.Visible = false;
  4113. this.cmbStdSteelType1.Visible = false;
  4114. this.txtStdSteelNo1.Visible = false;
  4115. this.txtStdSteelValue1.Visible = false;
  4116. this.txtActualValue1.Visible = false;
  4117. }
  4118. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0009"))//压扁
  4119. {
  4120. ultraTxtYbEuestion.Text = "";
  4121. ultraTxtYbD.Text = "";
  4122. ultraTxtYbS.Text = "";
  4123. ultraTxtYbC.Text = "";
  4124. ultraTxtYbSpac.Text = "";
  4125. ultraTxtYbQualfiled.Text = "";
  4126. ultraTxtYbDefect.Text = "";
  4127. ultraTxtYbMemo.Text = "";
  4128. PipeCheckconsignPhydetailEntityYBbindingSource.DataSource = listSource;
  4129. ultraTabControl3.Tabs["8"].Selected = true;
  4130. for (int i = 0; i < ultraGrid24.Rows.Count; i++)
  4131. {
  4132. if (this.ultraGrid24.Rows[i].Cells["IsGood"].Text == "不符合" || this.ultraGrid24.Rows[i].Cells["IsDefect"].Text == "不符合")
  4133. {
  4134. ultraGrid24.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4135. }
  4136. }
  4137. ultraTabControl3.Tabs["0"].Visible = false;
  4138. ultraTabControl3.Tabs["1"].Visible = false;
  4139. ultraTabControl3.Tabs["2"].Visible = false;
  4140. ultraTabControl3.Tabs["3"].Visible = false;
  4141. ultraTabControl3.Tabs["4"].Visible = false;
  4142. ultraTabControl3.Tabs["5"].Visible = false;
  4143. ultraTabControl3.Tabs["6"].Visible = false;
  4144. ultraTabControl3.Tabs["7"].Visible = false;
  4145. ultraTabControl3.Tabs["8"].Visible = true;
  4146. ultraTabControl3.Tabs["9"].Visible = false;
  4147. ultraTabControl3.Tabs["10"].Visible = false;
  4148. ultraTabControl3.Tabs["11"].Visible = false;
  4149. ultraTabControl3.Tabs["12"].Visible = false;
  4150. this.ultraComFormual1.Visible = false;
  4151. this.cmbStdSteelType1.Visible = false;
  4152. this.txtStdSteelNo1.Visible = false;
  4153. this.txtStdSteelValue1.Visible = false;
  4154. this.txtActualValue1.Visible = false;
  4155. ultraLabel59.Visible = false;
  4156. ultraLabel53.Visible = false;
  4157. ultraLabel52.Visible = false;
  4158. ultraLabel51.Visible = false;
  4159. ultraLabel50.Visible = false;
  4160. int x = row.Cells["SpecName"].Text.IndexOf('x');
  4161. ultraTxtYbD.Text = row.Cells["SpecName"].Text.Substring(0, x);
  4162. ultraTxtYbS.Text = row.Cells["SpecName"].Text.Substring(x + 1);
  4163. ultraGrid24.DisplayLayout.Bands[0].Columns["IsGood"].Header.Caption = "试验结果(一次)";
  4164. ultraGrid24.DisplayLayout.Bands[0].Columns["IsDefect"].Header.Caption = "试验结果(二次)";
  4165. }
  4166. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0026"))//扩口
  4167. {
  4168. PipeCheckconsignPhydetailEntityKKbindingSource.DataSource = listSource;
  4169. ultraTabControl3.Tabs["10"].Selected = true;
  4170. for (int i = 0; i < ultraGrid26.Rows.Count; i++)
  4171. {
  4172. if (this.ultraGrid26.Rows[i].Cells["IsGood"].Text == "不符合")
  4173. {
  4174. ultraGrid26.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4175. }
  4176. }
  4177. ultraTabControl3.Tabs["0"].Visible = false;
  4178. ultraTabControl3.Tabs["1"].Visible = false;
  4179. ultraTabControl3.Tabs["2"].Visible = false;
  4180. ultraTabControl3.Tabs["3"].Visible = false;
  4181. ultraTabControl3.Tabs["4"].Visible = false;
  4182. ultraTabControl3.Tabs["5"].Visible = false;
  4183. ultraTabControl3.Tabs["6"].Visible = false;
  4184. ultraTabControl3.Tabs["7"].Visible = false;
  4185. ultraTabControl3.Tabs["8"].Visible = false;
  4186. ultraTabControl3.Tabs["9"].Visible = false;
  4187. ultraTabControl3.Tabs["10"].Visible = true;
  4188. ultraTabControl3.Tabs["11"].Visible = false;
  4189. ultraTabControl3.Tabs["12"].Visible = false;
  4190. this.ultraComFormual1.Visible = false;
  4191. this.cmbStdSteelType1.Visible = false;
  4192. this.txtStdSteelNo1.Visible = false;
  4193. this.txtStdSteelValue1.Visible = false;
  4194. this.txtActualValue1.Visible = false;
  4195. ultraLabel59.Visible = false;
  4196. ultraLabel53.Visible = false;
  4197. ultraLabel52.Visible = false;
  4198. ultraLabel51.Visible = false;
  4199. ultraLabel50.Visible = false;
  4200. }
  4201. }
  4202. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))
  4203. {
  4204. pipeCheckconsignPhydetailEntityQTBindingSource.DataSource = listSource;
  4205. ultraTabControl3.Tabs["11"].Selected = true;
  4206. ultraTabControl3.Tabs["0"].Visible = false;
  4207. ultraTabControl3.Tabs["1"].Visible = false;
  4208. ultraTabControl3.Tabs["2"].Visible = false;
  4209. ultraTabControl3.Tabs["3"].Visible = false;
  4210. ultraTabControl3.Tabs["4"].Visible = false;
  4211. ultraTabControl3.Tabs["5"].Visible = false;
  4212. ultraTabControl3.Tabs["6"].Visible = false;
  4213. ultraTabControl3.Tabs["7"].Visible = false;
  4214. ultraTabControl3.Tabs["8"].Visible = false;
  4215. ultraTabControl3.Tabs["9"].Visible = false;
  4216. ultraTabControl3.Tabs["10"].Visible = false;
  4217. ultraTabControl3.Tabs["11"].Visible = true;
  4218. ultraTabControl3.Tabs["12"].Visible = false;
  4219. ultraGrid55.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  4220. this.ultraComFormual1.Visible = false;
  4221. this.cmbStdSteelType1.Visible = false;
  4222. this.txtStdSteelNo1.Visible = false;
  4223. this.txtStdSteelValue1.Visible = false;
  4224. this.txtActualValue1.Visible = false;
  4225. ultraLabel59.Visible = false;
  4226. ultraLabel53.Visible = false;
  4227. ultraLabel52.Visible = false;
  4228. ultraLabel51.Visible = false;
  4229. ultraLabel50.Visible = false;
  4230. }
  4231. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0066"))//落锤试验
  4232. {
  4233. PipeCheckconsignDetailEntityLCbindingSource.DataSource = listSource;
  4234. ultraTabControl3.Tabs["12"].Selected = true;
  4235. ultraTabControl3.Tabs["0"].Visible = false;
  4236. ultraTabControl3.Tabs["1"].Visible = false;
  4237. ultraTabControl3.Tabs["2"].Visible = false;
  4238. ultraTabControl3.Tabs["3"].Visible = false;
  4239. ultraTabControl3.Tabs["4"].Visible = false;
  4240. ultraTabControl3.Tabs["5"].Visible = false;
  4241. ultraTabControl3.Tabs["6"].Visible = false;
  4242. ultraTabControl3.Tabs["7"].Visible = false;
  4243. ultraTabControl3.Tabs["8"].Visible = false;
  4244. ultraTabControl3.Tabs["9"].Visible = false;
  4245. ultraTabControl3.Tabs["10"].Visible = false;
  4246. ultraTabControl3.Tabs["11"].Visible = false;
  4247. ultraTabControl3.Tabs["12"].Visible = true;
  4248. //ultraGrid55.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  4249. this.ultraComFormual1.Visible = false;
  4250. this.cmbStdSteelType1.Visible = false;
  4251. this.txtStdSteelNo1.Visible = false;
  4252. this.txtStdSteelValue1.Visible = false;
  4253. this.txtActualValue1.Visible = false;
  4254. ultraLabel59.Visible = false;
  4255. ultraLabel53.Visible = false;
  4256. ultraLabel52.Visible = false;
  4257. ultraLabel51.Visible = false;
  4258. ultraLabel50.Visible = false;
  4259. }
  4260. initCheckData(row);//加载编辑区信息
  4261. }
  4262. private void initCheckData(UltraGridRow row)
  4263. {
  4264. this.txtCHECK_TEMP1.Text = row.Cells["CheckTemp"].Text;
  4265. this.ultraDEVICE_NAME1.Value = row.Cells["DeviceNo"].Text;
  4266. if (!String.IsNullOrEmpty(row.Cells["FormualNo"].Text))
  4267. {
  4268. this.ultraComMethod1.Value = row.Cells["FormualNo"].Text;
  4269. }
  4270. this.cmbChemOrder1.Value = row.Cells["CheckShift"].Text;
  4271. this.cmbChemGroup1.Value = row.Cells["CheckClass"].Text;
  4272. this.txtChemUser1.Text = row.Cells["CheckName"].Text;
  4273. this.ultraComFormual1.Text = row.Cells["HardnessType"].Text;
  4274. cmbStdSteelType1.Text = row.Cells["StdSteelType"].Text;
  4275. this.txtStdSteelNo1.Text = row.Cells["StdSteelNo"].Text;
  4276. this.txtStdSteelValue1.Text = row.Cells["StdSteelValue"].Text;
  4277. this.txtActualValue1.Text = row.Cells["ActualValue"].Text;
  4278. this.ultraComFormual1.Text = row.Cells["HardnessType"].Text;
  4279. }
  4280. private void ultraGrid28_AfterRowActivate(object sender, EventArgs e)
  4281. {
  4282. ultraTabControl3.Visible = false;
  4283. ultraTabControl4.Visible = true;
  4284. ultraTabControl5.Visible = false;
  4285. ultraTabControl2.Visible = false;
  4286. UltraGridRow row = this.ultraGrid28.ActiveRow;
  4287. List<PipeCheckconsignPhydetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignPhydetailEntity>(
  4288. "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);
  4289. if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))//拉伸
  4290. {
  4291. PipeCheckconsignPhydetailEntitybindingSource.DataSource = listSource;
  4292. ultraTabControl4.Tabs["0"].Selected = true;
  4293. ultraTabControl4.Tabs["0"].Visible = true;
  4294. ultraTabControl4.Tabs["1"].Visible = false;
  4295. ultraTabControl4.Tabs["2"].Visible = false;
  4296. ultraTabControl4.Tabs["3"].Visible = false;
  4297. ultraTabControl4.Tabs["4"].Visible = false;
  4298. ultraTabControl4.Tabs["5"].Visible = false;
  4299. ultraTabControl4.Tabs["6"].Visible = false;
  4300. ultraTabControl4.Tabs["7"].Visible = false;
  4301. ultraTabControl4.Tabs["8"].Visible = false;
  4302. ultraTabControl4.Tabs["9"].Visible = false;
  4303. ultraTabControl4.Tabs["10"].Visible = false;
  4304. ultraTabControl4.Tabs["11"].Visible = false;
  4305. ultraTabControl4.Tabs["12"].Visible = false;
  4306. foreach (UltraGridRow forRow in ultraGrid29.Rows)
  4307. {
  4308. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4309. {
  4310. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4311. }
  4312. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4313. {
  4314. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4315. }
  4316. if (forRow.Cells["SplineItemNameS"].Text.ToString().Equals(""))
  4317. {
  4318. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4319. }
  4320. //else
  4321. //{
  4322. // string[] SampleType = forRow.Cells["SampleType"].Text.Split(new char[2] { '=', 'm' });
  4323. // string[] SplineItemNameS = forRow.Cells["SplineItemNameS"].Text.Split(new char[2] { '=', 'm' });
  4324. // if (SampleType.Count() == 1)
  4325. // {
  4326. // if (!forRow.Cells["SampleType"].Text.Trim().Equals(forRow.Cells["SplineItemNameS"].Text.Trim()))
  4327. // {
  4328. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4329. // }
  4330. // }
  4331. // else
  4332. // {
  4333. // if (!SampleType[1].ToString3().Equals(SplineItemNameS[1].ToString3()) || !SampleType[4].ToString3().Equals(SplineItemNameS[4].ToString3()))
  4334. // {
  4335. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4336. // }
  4337. // }
  4338. //}
  4339. string a = forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ","");
  4340. if (!forRow.Cells["SampleType"].Text.Trim().Replace(" ", "").Equals(forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "")))
  4341. {
  4342. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4343. }
  4344. if (!forRow.Cells["PhyDir"].Text.Trim().Equals(forRow.Cells["SplineItemNameF"].Text.Trim()))
  4345. {
  4346. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4347. }
  4348. if (forRow.Cells["ItemNameW"].Text.Trim().Equals("室温"))
  4349. {
  4350. if (forRow.Cells["CheckTemp"].Text.Trim().ToString().Equals("") || forRow.Cells["CheckTemp"].Value == null)
  4351. {
  4352. MessageUtil.ShowTips("没有温度!");
  4353. return;
  4354. }
  4355. else
  4356. {
  4357. if (int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) > 35 || int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) < 10)
  4358. {
  4359. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4360. }
  4361. }
  4362. }
  4363. else
  4364. {
  4365. if (!forRow.Cells["CheckTemp"].Text.Trim().Equals(forRow.Cells["ItemNameW"].Text.Trim().Replace("℃", "")))
  4366. {
  4367. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4368. }
  4369. }
  4370. }
  4371. }
  4372. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))//冲击
  4373. {
  4374. PipeCheckconsignPhydetailEntityCjbindingSource.DataSource = listSource;
  4375. ultraTabControl4.Tabs["1"].Selected = true;
  4376. ultraTabControl4.Tabs["0"].Visible = false;
  4377. ultraTabControl4.Tabs["1"].Visible = true;
  4378. ultraTabControl4.Tabs["2"].Visible = false;
  4379. ultraTabControl4.Tabs["3"].Visible = false;
  4380. ultraTabControl4.Tabs["4"].Visible = false;
  4381. ultraTabControl4.Tabs["5"].Visible = false;
  4382. ultraTabControl4.Tabs["6"].Visible = false;
  4383. ultraTabControl4.Tabs["7"].Visible = false;
  4384. ultraTabControl4.Tabs["8"].Visible = false;
  4385. ultraTabControl4.Tabs["9"].Visible = false;
  4386. ultraTabControl4.Tabs["10"].Visible = false;
  4387. ultraTabControl4.Tabs["11"].Visible = false;
  4388. ultraTabControl4.Tabs["12"].Visible = false;
  4389. foreach (UltraGridRow forRow in ultraGrid30.Rows)
  4390. {
  4391. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4392. {
  4393. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4394. }
  4395. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4396. {
  4397. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4398. }
  4399. if (forRow.Cells["SplineItemNameS"].Text.ToString().Equals(""))
  4400. {
  4401. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4402. }
  4403. //力学实验冲击,硬度单点值,平均值超上限都变红。
  4404. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4405. {
  4406. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4407. }
  4408. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4409. {
  4410. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4411. } if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4412. {
  4413. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4414. }
  4415. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4416. {
  4417. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4418. } if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4419. {
  4420. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4421. }
  4422. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4423. {
  4424. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4425. }
  4426. //else
  4427. //{
  4428. // string[] SampleType = forRow.Cells["SampleType"].Text.Split(new char[2] { '=', 'm' });
  4429. // string[] SplineItemNameS = forRow.Cells["SplineItemNameS"].Text.Split(new char[2] { '=', 'm' });
  4430. // if (SampleType.Count() == 1)
  4431. // {
  4432. // if (!forRow.Cells["SampleType"].Text.Trim().Equals(forRow.Cells["SplineItemNameS"].Text.Trim()))
  4433. // {
  4434. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4435. // }
  4436. // }
  4437. // else
  4438. // {
  4439. // if (!SampleType[1].ToString3().Equals(SplineItemNameS[1].ToString3()) || !SampleType[4].ToString3().Equals(SplineItemNameS[4].ToString3()))
  4440. // {
  4441. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4442. // }
  4443. // }
  4444. //}
  4445. if (!forRow.Cells["SampleType"].Text.Trim().Replace(" ", "").Equals(forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "")))
  4446. {
  4447. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4448. }
  4449. if (!forRow.Cells["PhyDir"].Text.Trim().Equals(forRow.Cells["SplineItemNameF"].Text.Trim()))
  4450. {
  4451. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4452. }
  4453. if (forRow.Cells["ItemNameW"].Text.Trim().Equals("室温"))
  4454. {
  4455. if (int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) > 35 || int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) < 10)
  4456. {
  4457. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4458. }
  4459. }
  4460. else
  4461. {
  4462. if (!forRow.Cells["CheckTemp"].Text.Trim().Equals(forRow.Cells["ItemNameW"].Text.Trim().Replace("℃", "")))
  4463. {
  4464. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4465. }
  4466. }
  4467. }
  4468. }
  4469. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))//布氏
  4470. {
  4471. PipeCheckconsignPhydetailEntityBSbindingSource.DataSource = listSource;
  4472. MergedCell(ultraGrid6, new string[] { "PhyName" });
  4473. ultraTabControl4.Tabs["4"].Selected = true;
  4474. ultraTabControl4.Tabs["0"].Visible = false;
  4475. ultraTabControl4.Tabs["1"].Visible = false;
  4476. ultraTabControl4.Tabs["2"].Visible = false;
  4477. ultraTabControl4.Tabs["3"].Visible = false;
  4478. ultraTabControl4.Tabs["4"].Visible = true;
  4479. ultraTabControl4.Tabs["5"].Visible = false;
  4480. ultraTabControl4.Tabs["6"].Visible = false;
  4481. ultraTabControl4.Tabs["7"].Visible = false;
  4482. ultraTabControl4.Tabs["8"].Visible = false;
  4483. ultraTabControl4.Tabs["9"].Visible = false;
  4484. ultraTabControl4.Tabs["10"].Visible = false;
  4485. ultraTabControl4.Tabs["11"].Visible = false;
  4486. ultraTabControl4.Tabs["12"].Visible = false;
  4487. foreach (UltraGridRow forRow in ultraGrid33.Rows)
  4488. {
  4489. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4490. {
  4491. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4492. }
  4493. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4494. {
  4495. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4496. }
  4497. //力学实验冲击,硬度单点值,平均值超上限都变红。
  4498. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4499. {
  4500. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4501. }
  4502. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4503. {
  4504. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4505. }
  4506. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4507. {
  4508. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4509. }
  4510. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4511. {
  4512. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4513. }
  4514. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4515. {
  4516. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4517. }
  4518. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4519. {
  4520. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4521. }
  4522. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4523. {
  4524. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4525. }
  4526. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4527. {
  4528. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4529. }
  4530. }
  4531. }
  4532. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))//洛氏
  4533. {
  4534. PipeCheckconsignPhydetailEntityLSbindingSource.DataSource = listSource;
  4535. MergedCell(ultraGrid5, new string[] { "PhyName" });
  4536. ultraTabControl4.Tabs["2"].Selected = true;
  4537. ultraTabControl4.Tabs["0"].Visible = false;
  4538. ultraTabControl4.Tabs["1"].Visible = false;
  4539. ultraTabControl4.Tabs["2"].Visible = true;
  4540. ultraTabControl4.Tabs["3"].Visible = false;
  4541. ultraTabControl4.Tabs["4"].Visible = false;
  4542. ultraTabControl4.Tabs["5"].Visible = false;
  4543. ultraTabControl4.Tabs["6"].Visible = false;
  4544. ultraTabControl4.Tabs["7"].Visible = false;
  4545. ultraTabControl4.Tabs["8"].Visible = false;
  4546. ultraTabControl4.Tabs["9"].Visible = false;
  4547. ultraTabControl4.Tabs["10"].Visible = false;
  4548. ultraTabControl4.Tabs["11"].Visible = false;
  4549. ultraTabControl4.Tabs["12"].Visible = false;
  4550. foreach (UltraGridRow forRow in ultraGrid31.Rows)
  4551. {
  4552. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4553. {
  4554. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4555. }
  4556. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4557. {
  4558. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4559. }
  4560. //力学实验冲击,硬度单点值,平均值超上限都变红。
  4561. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4562. {
  4563. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4564. }
  4565. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4566. {
  4567. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4568. }
  4569. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4570. {
  4571. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4572. }
  4573. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4574. {
  4575. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4576. }
  4577. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4578. {
  4579. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4580. }
  4581. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4582. {
  4583. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4584. }
  4585. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4586. {
  4587. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4588. }
  4589. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4590. {
  4591. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4592. }
  4593. }
  4594. }
  4595. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))//维氏
  4596. {
  4597. PipeCheckconsignPhydetailEntityWSbindingSource.DataSource = listSource;
  4598. MergedCell(ultraGrid5, new string[] { "PhyName" });
  4599. ultraTabControl4.Tabs["3"].Selected = true;
  4600. ultraTabControl4.Tabs["0"].Visible = false;
  4601. ultraTabControl4.Tabs["1"].Visible = false;
  4602. ultraTabControl4.Tabs["2"].Visible = false;
  4603. ultraTabControl4.Tabs["3"].Visible = true;
  4604. ultraTabControl4.Tabs["4"].Visible = false;
  4605. ultraTabControl4.Tabs["5"].Visible = false;
  4606. ultraTabControl4.Tabs["6"].Visible = false;
  4607. ultraTabControl4.Tabs["7"].Visible = false;
  4608. ultraTabControl4.Tabs["8"].Visible = false;
  4609. ultraTabControl4.Tabs["9"].Visible = false;
  4610. ultraTabControl4.Tabs["10"].Visible = false;
  4611. ultraTabControl4.Tabs["11"].Visible = false;
  4612. ultraTabControl4.Tabs["12"].Visible = false;
  4613. foreach (UltraGridRow forRow in ultraGrid32.Rows)
  4614. {
  4615. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4616. {
  4617. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4618. }
  4619. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4620. {
  4621. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4622. }
  4623. //力学实验冲击,硬度单点值,平均值超上限都变红。
  4624. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4625. {
  4626. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4627. }
  4628. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4629. {
  4630. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4631. }
  4632. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4633. {
  4634. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4635. }
  4636. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4637. {
  4638. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4639. }
  4640. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4641. {
  4642. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4643. }
  4644. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4645. {
  4646. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4647. }
  4648. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4649. {
  4650. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4651. }
  4652. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4653. {
  4654. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4655. }
  4656. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4657. {
  4658. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4659. }
  4660. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4661. {
  4662. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4663. }
  4664. }
  4665. }
  4666. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0016") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0031"))//组织
  4667. {
  4668. PipeCheckconsignPhydetailEntityZZbindingSource.DataSource = listSource;
  4669. ultraTabControl4.Tabs["7"].Selected = true;
  4670. ultraTabControl4.Tabs["0"].Visible = false;
  4671. ultraTabControl4.Tabs["1"].Visible = false;
  4672. ultraTabControl4.Tabs["2"].Visible = false;
  4673. ultraTabControl4.Tabs["3"].Visible = false;
  4674. ultraTabControl4.Tabs["4"].Visible = false;
  4675. ultraTabControl4.Tabs["5"].Visible = false;
  4676. ultraTabControl4.Tabs["6"].Visible = false;
  4677. ultraTabControl4.Tabs["7"].Visible = true;
  4678. ultraTabControl4.Tabs["8"].Visible = false;
  4679. ultraTabControl4.Tabs["9"].Visible = false;
  4680. ultraTabControl4.Tabs["10"].Visible = false;
  4681. ultraTabControl4.Tabs["11"].Visible = false;
  4682. ultraTabControl4.Tabs["12"].Visible = false;
  4683. foreach (UltraGridRow forRow in ultraGrid36.Rows)
  4684. {
  4685. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4686. {
  4687. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4688. }
  4689. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4690. {
  4691. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4692. }
  4693. }
  4694. }
  4695. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))//晶粒度
  4696. {
  4697. PipeCheckconsignPhydetailEntityJLDbindingSource.DataSource = listSource;
  4698. ultraTabControl4.Tabs["6"].Selected = true;
  4699. ultraTabControl4.Tabs["0"].Visible = false;
  4700. ultraTabControl4.Tabs["1"].Visible = false;
  4701. ultraTabControl4.Tabs["2"].Visible = false;
  4702. ultraTabControl4.Tabs["3"].Visible = false;
  4703. ultraTabControl4.Tabs["4"].Visible = false;
  4704. ultraTabControl4.Tabs["5"].Visible = false;
  4705. ultraTabControl4.Tabs["6"].Visible = true;
  4706. ultraTabControl4.Tabs["7"].Visible = false;
  4707. ultraTabControl4.Tabs["8"].Visible = false;
  4708. ultraTabControl4.Tabs["9"].Visible = false;
  4709. ultraTabControl4.Tabs["10"].Visible = false;
  4710. ultraTabControl4.Tabs["11"].Visible = false;
  4711. ultraTabControl4.Tabs["12"].Visible = false;
  4712. foreach (UltraGridRow forRow in ultraGrid35.Rows)
  4713. {
  4714. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4715. {
  4716. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4717. }
  4718. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4719. {
  4720. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4721. }
  4722. }
  4723. }
  4724. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))//夹杂
  4725. {
  4726. PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource = listSource;
  4727. ultraTabControl4.Tabs["5"].Selected = true;
  4728. ultraTabControl4.Tabs["0"].Visible = false;
  4729. ultraTabControl4.Tabs["1"].Visible = false;
  4730. ultraTabControl4.Tabs["2"].Visible = false;
  4731. ultraTabControl4.Tabs["3"].Visible = false;
  4732. ultraTabControl4.Tabs["4"].Visible = false;
  4733. ultraTabControl4.Tabs["5"].Visible = true;
  4734. ultraTabControl4.Tabs["6"].Visible = false;
  4735. ultraTabControl4.Tabs["7"].Visible = false;
  4736. ultraTabControl4.Tabs["8"].Visible = false;
  4737. ultraTabControl4.Tabs["9"].Visible = false;
  4738. ultraTabControl4.Tabs["10"].Visible = false;
  4739. ultraTabControl4.Tabs["11"].Visible = false;
  4740. ultraTabControl4.Tabs["12"].Visible = false;
  4741. foreach (UltraGridRow forRow in ultraGrid34.Rows)
  4742. {
  4743. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4744. {
  4745. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4746. }
  4747. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4748. {
  4749. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4750. }
  4751. if (forRow.Cells["PhyCode"].Text.ToString().Equals("P0618") || forRow.Cells["PhyCode"].Text.ToString().Equals("P0619"))
  4752. {
  4753. if (!forRow.Cells["Value1"].Text.ToString().Equals("是") && !forRow.Cells["Value1"].Text.ToString().Equals("否"))
  4754. {
  4755. forRow.RowSelectorAppearance.BackColor = Color.Red; ;
  4756. }
  4757. }
  4758. }
  4759. ultraGrid34.DisplayLayout.Bands[0].Columns["Value1"].Header.Caption = "一象限";
  4760. ultraGrid34.DisplayLayout.Bands[0].Columns["Value2"].Header.Caption = "二象限";
  4761. ultraGrid34.DisplayLayout.Bands[0].Columns["Value3"].Header.Caption = "三象限";
  4762. ultraGrid34.DisplayLayout.Bands[0].Columns["Value4"].Header.Caption = "四象限";
  4763. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0115"))
  4764. {
  4765. ultraGrid34.DisplayLayout.Bands[0].Columns["Value2"].Hidden = false;
  4766. ultraGrid34.DisplayLayout.Bands[0].Columns["Value3"].Hidden = false;
  4767. ultraGrid34.DisplayLayout.Bands[0].Columns["Value4"].Hidden = false;
  4768. }
  4769. else
  4770. {
  4771. ultraGrid34.DisplayLayout.Bands[0].Columns["Value2"].Hidden = true;
  4772. ultraGrid34.DisplayLayout.Bands[0].Columns["Value3"].Hidden = true;
  4773. ultraGrid34.DisplayLayout.Bands[0].Columns["Value4"].Hidden = true;
  4774. }
  4775. }
  4776. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0010"))//工艺
  4777. {
  4778. 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"))//弯曲
  4779. {
  4780. PipeCheckconsignPhydetailEntityWQbindingSource.DataSource = listSource;
  4781. ultraTabControl4.Tabs["9"].Selected = true;
  4782. for (int i = 0; i < ultraGrid38.Rows.Count; i++)
  4783. {
  4784. if (this.ultraGrid38.Rows[i].Cells["IsGood"].Text == "不符合")
  4785. {
  4786. ultraGrid38.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4787. }
  4788. }
  4789. ultraTabControl4.Tabs["0"].Visible = false;
  4790. ultraTabControl4.Tabs["1"].Visible = false;
  4791. ultraTabControl4.Tabs["2"].Visible = false;
  4792. ultraTabControl4.Tabs["3"].Visible = false;
  4793. ultraTabControl4.Tabs["4"].Visible = false;
  4794. ultraTabControl4.Tabs["5"].Visible = false;
  4795. ultraTabControl4.Tabs["6"].Visible = false;
  4796. ultraTabControl4.Tabs["7"].Visible = false;
  4797. ultraTabControl4.Tabs["8"].Visible = false;
  4798. ultraTabControl4.Tabs["9"].Visible = true;
  4799. ultraTabControl4.Tabs["10"].Visible = false;
  4800. ultraTabControl4.Tabs["11"].Visible = false;
  4801. ultraTabControl4.Tabs["12"].Visible = false;
  4802. }
  4803. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0009"))//压扁
  4804. {
  4805. PipeCheckconsignPhydetailEntityYBbindingSource.DataSource = listSource;
  4806. ultraTabControl4.Tabs["8"].Selected = true;
  4807. for (int i = 0; i < ultraGrid37.Rows.Count; i++)
  4808. {
  4809. if (this.ultraGrid37.Rows[i].Cells["IsGood"].Text == "不符合" || this.ultraGrid37.Rows[i].Cells["IsDefect"].Text == "不符合")
  4810. {
  4811. ultraGrid37.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4812. }
  4813. }
  4814. ultraTabControl4.Tabs["0"].Visible = false;
  4815. ultraTabControl4.Tabs["1"].Visible = false;
  4816. ultraTabControl4.Tabs["2"].Visible = false;
  4817. ultraTabControl4.Tabs["3"].Visible = false;
  4818. ultraTabControl4.Tabs["4"].Visible = false;
  4819. ultraTabControl4.Tabs["5"].Visible = false;
  4820. ultraTabControl4.Tabs["6"].Visible = false;
  4821. ultraTabControl4.Tabs["7"].Visible = false;
  4822. ultraTabControl4.Tabs["8"].Visible = true;
  4823. ultraTabControl4.Tabs["9"].Visible = false;
  4824. ultraTabControl4.Tabs["10"].Visible = false;
  4825. ultraTabControl4.Tabs["11"].Visible = false;
  4826. ultraTabControl4.Tabs["12"].Visible = false;
  4827. ultraGrid37.DisplayLayout.Bands[0].Columns["IsGood"].Header.Caption = "试验结果(一次)";
  4828. ultraGrid37.DisplayLayout.Bands[0].Columns["IsDefect"].Header.Caption = "试验结果(二次)";
  4829. }
  4830. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0026"))//扩口
  4831. {
  4832. PipeCheckconsignPhydetailEntityKKbindingSource.DataSource = listSource;
  4833. ultraTabControl4.Tabs["10"].Selected = true;
  4834. for (int i = 0; i < ultraGrid39.Rows.Count; i++)
  4835. {
  4836. if (this.ultraGrid39.Rows[i].Cells["IsGood"].Text == "不符合")
  4837. {
  4838. ultraGrid39.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  4839. }
  4840. }
  4841. ultraTabControl4.Tabs["0"].Visible = false;
  4842. ultraTabControl4.Tabs["1"].Visible = false;
  4843. ultraTabControl4.Tabs["2"].Visible = false;
  4844. ultraTabControl4.Tabs["3"].Visible = false;
  4845. ultraTabControl4.Tabs["4"].Visible = false;
  4846. ultraTabControl4.Tabs["5"].Visible = false;
  4847. ultraTabControl4.Tabs["6"].Visible = false;
  4848. ultraTabControl4.Tabs["7"].Visible = false;
  4849. ultraTabControl4.Tabs["8"].Visible = false;
  4850. ultraTabControl4.Tabs["9"].Visible = false;
  4851. ultraTabControl4.Tabs["10"].Visible = true;
  4852. ultraTabControl4.Tabs["11"].Visible = false;
  4853. ultraTabControl4.Tabs["12"].Visible = false;
  4854. }
  4855. }
  4856. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))//其他
  4857. {
  4858. PipeCheckconsignPhydetailEntityKKbindingSource.DataSource = listSource;
  4859. ultraTabControl4.Tabs["11"].Selected = true;
  4860. ultraTabControl4.Tabs["0"].Visible = false;
  4861. ultraTabControl4.Tabs["1"].Visible = false;
  4862. ultraTabControl4.Tabs["2"].Visible = false;
  4863. ultraTabControl4.Tabs["3"].Visible = false;
  4864. ultraTabControl4.Tabs["4"].Visible = false;
  4865. ultraTabControl4.Tabs["5"].Visible = false;
  4866. ultraTabControl4.Tabs["6"].Visible = false;
  4867. ultraTabControl4.Tabs["7"].Visible = false;
  4868. ultraTabControl4.Tabs["8"].Visible = false;
  4869. ultraTabControl4.Tabs["9"].Visible = false;
  4870. ultraTabControl4.Tabs["10"].Visible = false;
  4871. ultraTabControl4.Tabs["11"].Visible = true;
  4872. ultraTabControl4.Tabs["12"].Visible = false;
  4873. ultraGrid56.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  4874. foreach (UltraGridRow forRow in ultraGrid56.Rows)
  4875. {
  4876. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4877. {
  4878. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4879. }
  4880. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4881. {
  4882. forRow.RowSelectorAppearance.BackColor = Color.Red;
  4883. }
  4884. }
  4885. }
  4886. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0066"))//落锤试验
  4887. {
  4888. PipeCheckconsignDetailEntityLCbindingSource.DataSource = listSource;
  4889. ultraTabControl4.Tabs["12"].Selected = true;
  4890. ultraTabControl4.Tabs["0"].Visible = false;
  4891. ultraTabControl4.Tabs["1"].Visible = false;
  4892. ultraTabControl4.Tabs["2"].Visible = false;
  4893. ultraTabControl4.Tabs["3"].Visible = false;
  4894. ultraTabControl4.Tabs["4"].Visible = false;
  4895. ultraTabControl4.Tabs["5"].Visible = false;
  4896. ultraTabControl4.Tabs["6"].Visible = false;
  4897. ultraTabControl4.Tabs["7"].Visible = false;
  4898. ultraTabControl4.Tabs["8"].Visible = false;
  4899. ultraTabControl4.Tabs["9"].Visible = false;
  4900. ultraTabControl4.Tabs["10"].Visible = false;
  4901. ultraTabControl4.Tabs["11"].Visible = false;
  4902. ultraTabControl4.Tabs["12"].Visible = true;
  4903. //ultraGrid56.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  4904. //foreach (UltraGridRow forRow in ultraGrid56.Rows)
  4905. //{
  4906. // if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  4907. // {
  4908. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4909. // }
  4910. // if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  4911. // {
  4912. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  4913. // }
  4914. //}
  4915. }
  4916. }
  4917. private void ultraGrid14_AfterRowActivate(object sender, EventArgs e)
  4918. {
  4919. UltraGridRow uRow = this.ultraGrid14.ActiveRow;
  4920. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  4921. "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);
  4922. PipeCheckconsignDetailEntitybindingSource4.DataSource = listSource;
  4923. }
  4924. private void ultraButton2_Click(object sender, EventArgs e)
  4925. {
  4926. if (this.ultraTxtYbEuestion.Text.Trim() == "")
  4927. {
  4928. MessageUtil.ShowTips("请选择计算公式!");
  4929. return;
  4930. }
  4931. double d = 0.0;
  4932. double c = 0.0;
  4933. double t = 0.0;
  4934. if (this.ultraTxtYbEuestion.Text.Trim() == "0.65*D" || this.ultraTxtYbEuestion.Text.Trim() == "7*D/8" || this.ultraTxtYbEuestion.Text.Trim() == "2*D/3")
  4935. {
  4936. if (this.ultraTxtYbD.Text.Trim() == "")
  4937. {
  4938. MessageUtil.ShowTips("请输入管子公称外径!");
  4939. return;
  4940. }
  4941. }
  4942. else if (this.ultraTxtYbEuestion.Text.Trim() == "(1+C)*T/(C+T/D)")
  4943. {
  4944. if (this.ultraTxtYbD.Text.Trim() == "" || this.ultraTxtYbC.Text.Trim() == "" || this.ultraTxtYbS.Text.Trim() == "")
  4945. {
  4946. MessageUtil.ShowTips("请输入管子的公称外径壁厚以及压扁系数!");
  4947. return;
  4948. }
  4949. }
  4950. d = double.Parse(this.ultraTxtYbD.Text.Trim().ToString3());
  4951. t = double.Parse(this.ultraTxtYbS.Text.Trim().ToString3());
  4952. c = double.Parse(this.ultraTxtYbC.Text.Trim().ToString3());
  4953. if (this.ultraTxtYbEuestion.Text.Trim() == "0.65*D")
  4954. {
  4955. this.ultraTxtYbSpac.Text = Math.Floor((0.65 * d)).ToString();
  4956. }
  4957. else if (this.ultraTxtYbEuestion.Text.Trim() == "7*D/8")
  4958. {
  4959. this.ultraTxtYbSpac.Text = Math.Floor(((7 * d) / 8)).ToString();
  4960. }
  4961. else if (this.ultraTxtYbEuestion.Text.Trim() == "2*D/3")
  4962. {
  4963. this.ultraTxtYbSpac.Text = Math.Floor(((2 * d) / 3)).ToString();
  4964. }
  4965. else if (this.ultraTxtYbEuestion.Text.Trim() == "(1+C)*T/(C+T/D)")
  4966. {
  4967. this.ultraTxtYbSpac.Text = Math.Floor((((1 + c) * t) / (c + t / d))).ToString();
  4968. }
  4969. }
  4970. private void ultraGrid17_CellChange(object sender, CellEventArgs e)
  4971. {
  4972. this.ultraGrid17.UpdateData();
  4973. UltraGridRow ur = this.ultraGrid17.ActiveRow;
  4974. UltraGridRow uRow = this.ultraGrid15.ActiveRow;
  4975. string specName = uRow.Cells["ItemNameS"].Text.Trim();//试验尺寸
  4976. int x = specName.IndexOf("×");//x位置
  4977. string width = specName.Substring(0, x).Replace("m", "");
  4978. string height = specName.Substring(x + 1).Replace("m", "");
  4979. int m = 0;
  4980. string ak1 = "";//真实值
  4981. string ak2 = "";
  4982. string ak3 = "";
  4983. int akNum = 0;
  4984. foreach (UltraGridRow row in this.ultraGrid17.Rows)
  4985. {
  4986. if (row.Cells["PhyName"].Text.Contains("ak"))
  4987. {
  4988. akNum = akNum + 1;
  4989. }
  4990. }
  4991. if (akNum > 0 && ur.Cells["PhyName"].Text.Contains("冲击功"))
  4992. {
  4993. if (e.Cell.Column.Key == "Value1")
  4994. {
  4995. if (ur.Cells["Value1"].Text == "-")
  4996. {
  4997. return;
  4998. }
  4999. ak1 = (Math.Round(100 * double.Parse(ur.Cells["Value1"].Text.Trim().Replace('<','-').ToString3()) / (double.Parse(width) * (double.Parse(height) - 2)), 0)).ToString();
  5000. foreach (UltraGridRow akRow in this.ultraGrid17.Rows)
  5001. {
  5002. if (akRow.Cells["PhyName"].Text.Contains("ak"))
  5003. {
  5004. akRow.Cells["Value1"].Value = ak1;
  5005. if (akRow.Cells["Value2"].Text != "")
  5006. {
  5007. m = m + 1;
  5008. }
  5009. if (akRow.Cells["Value3"].Text != "")
  5010. {
  5011. m = m + 1;
  5012. }
  5013. m = m + 1;
  5014. 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();
  5015. }
  5016. }
  5017. }
  5018. if (e.Cell.Column.Key == "Value2")
  5019. {
  5020. if (ur.Cells["Value2"].Text == "-")
  5021. {
  5022. return;
  5023. }
  5024. ak2 = (Math.Round(100 * double.Parse(ur.Cells["Value2"].Text.Trim().Replace('<','-').ToString3()) / (double.Parse(width) * (double.Parse(height) - 2)), 0)).ToString();
  5025. foreach (UltraGridRow akRow in this.ultraGrid17.Rows)
  5026. {
  5027. if (akRow.Cells["PhyName"].Text.Contains("ak"))
  5028. {
  5029. akRow.Cells["Value2"].Value = ak2;
  5030. if (ur.Cells["Value1"].Text != "")
  5031. {
  5032. m = m + 1;
  5033. }
  5034. if (ur.Cells["Value3"].Text != "")
  5035. {
  5036. m = m + 1;
  5037. }
  5038. m = m + 1;
  5039. 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();
  5040. }
  5041. }
  5042. }
  5043. if (e.Cell.Column.Key == "Value3")
  5044. {
  5045. if (ur.Cells["Value3"].Text == "-")
  5046. {
  5047. return;
  5048. }
  5049. ak3 = (Math.Round(100 * double.Parse(ur.Cells["Value3"].Text.Trim().Replace('<', '-').ToString3()) / (double.Parse(width) * (double.Parse(height) - 2)), 0)).ToString();
  5050. foreach (UltraGridRow akRow in this.ultraGrid17.Rows)
  5051. {
  5052. if (akRow.Cells["PhyName"].Text.Contains("ak"))
  5053. {
  5054. akRow.Cells["Value3"].Value = ak3;
  5055. if (akRow.Cells["Value1"].Text != "")
  5056. {
  5057. m = m + 1;
  5058. }
  5059. if (akRow.Cells["Value2"].Text != "")
  5060. {
  5061. m = m + 1;
  5062. }
  5063. m = m + 1;
  5064. 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();
  5065. }
  5066. }
  5067. }
  5068. }
  5069. else if (ur.Cells["PhyName"].Text.Contains("侧膨胀值LE"))
  5070. {
  5071. if (e.Cell.Column.Key == "Value1")
  5072. {
  5073. if (ur.Cells["Value1"].Text != "")
  5074. {
  5075. m = m + 1;
  5076. }
  5077. if (ur.Cells["Value2"].Text != "")
  5078. {
  5079. m = m + 1;
  5080. }
  5081. if (ur.Cells["Value3"].Text != "")
  5082. {
  5083. m = m + 1;
  5084. }
  5085. if (ur.Cells["Value1"].Text == "-")
  5086. {
  5087. return;
  5088. }
  5089. 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();
  5090. }
  5091. if (e.Cell.Column.Key == "Value2")
  5092. {
  5093. if (ur.Cells["Value1"].Text != "")
  5094. {
  5095. m = m + 1;
  5096. }
  5097. if (ur.Cells["Value2"].Text != "")
  5098. {
  5099. m = m + 1;
  5100. }
  5101. if (ur.Cells["Value3"].Text != "")
  5102. {
  5103. m = m + 1;
  5104. }
  5105. if (ur.Cells["Value2"].Text == "-")
  5106. {
  5107. return;
  5108. }
  5109. 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();
  5110. }
  5111. if (e.Cell.Column.Key == "Value3")
  5112. {
  5113. if (ur.Cells["Value1"].Text != "")
  5114. {
  5115. m = m + 1;
  5116. }
  5117. if (ur.Cells["Value2"].Text != "")
  5118. {
  5119. m = m + 1;
  5120. }
  5121. if (ur.Cells["Value3"].Text != "")
  5122. {
  5123. m = m + 1;
  5124. }
  5125. if (ur.Cells["Value3"].Text == "-")
  5126. {
  5127. return;
  5128. }
  5129. 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();
  5130. }
  5131. }
  5132. else
  5133. {
  5134. if (e.Cell.Column.Key == "Value1")
  5135. {
  5136. if (ur.Cells["Value1"].Text != "")
  5137. {
  5138. m = m + 1;
  5139. }
  5140. if (ur.Cells["Value2"].Text != "")
  5141. {
  5142. m = m + 1;
  5143. }
  5144. if (ur.Cells["Value3"].Text != "")
  5145. {
  5146. m = m + 1;
  5147. }
  5148. if (ur.Cells["Value1"].Text == "-")
  5149. {
  5150. return;
  5151. }
  5152. 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();
  5153. }
  5154. if (e.Cell.Column.Key == "Value2")
  5155. {
  5156. if (ur.Cells["Value1"].Text != "")
  5157. {
  5158. m = m + 1;
  5159. }
  5160. if (ur.Cells["Value2"].Text != "")
  5161. {
  5162. m = m + 1;
  5163. }
  5164. if (ur.Cells["Value3"].Text != "")
  5165. {
  5166. m = m + 1;
  5167. }
  5168. if (ur.Cells["Value2"].Text == "-")
  5169. {
  5170. return;
  5171. }
  5172. 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();
  5173. }
  5174. if (e.Cell.Column.Key == "Value3")
  5175. {
  5176. if (ur.Cells["Value1"].Text != "")
  5177. {
  5178. m = m + 1;
  5179. }
  5180. if (ur.Cells["Value2"].Text != "")
  5181. {
  5182. m = m + 1;
  5183. }
  5184. if (ur.Cells["Value3"].Text != "")
  5185. {
  5186. m = m + 1;
  5187. }
  5188. if (ur.Cells["Value3"].Text == "-")
  5189. {
  5190. return;
  5191. }
  5192. 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();
  5193. }
  5194. }
  5195. }
  5196. private void ultraGrid18_CellChange(object sender, CellEventArgs e)
  5197. {
  5198. this.ultraGrid18.UpdateData();
  5199. UltraGridRow ur = this.ultraGrid18.ActiveRow;
  5200. int m = 0;
  5201. if (e.Cell.Column.Key == "Value1")
  5202. {
  5203. if (ur.Cells["Value1"].Text != "")
  5204. {
  5205. m = m + 1;
  5206. }
  5207. if (ur.Cells["Value2"].Text != "")
  5208. {
  5209. m = m + 1;
  5210. }
  5211. if (ur.Cells["Value3"].Text != "")
  5212. {
  5213. m = m + 1;
  5214. }
  5215. if (ur.Cells["Value1"].Text == "-")
  5216. {
  5217. return;
  5218. }
  5219. if (ur.Cells["Value1"].Text == "-")
  5220. {
  5221. return;
  5222. }
  5223. 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();
  5224. }
  5225. if (e.Cell.Column.Key == "Value2")
  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["Value2"].Text == "-")
  5240. {
  5241. return;
  5242. }
  5243. if (ur.Cells["Value2"].Text == "-")
  5244. {
  5245. return;
  5246. }
  5247. 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();
  5248. }
  5249. if (e.Cell.Column.Key == "Value3")
  5250. {
  5251. if (ur.Cells["Value1"].Text != "")
  5252. {
  5253. m = m + 1;
  5254. }
  5255. if (ur.Cells["Value2"].Text != "")
  5256. {
  5257. m = m + 1;
  5258. }
  5259. if (ur.Cells["Value3"].Text != "")
  5260. {
  5261. m = m + 1;
  5262. }
  5263. if (ur.Cells["Value3"].Text == "-")
  5264. {
  5265. return;
  5266. }
  5267. if (ur.Cells["Value3"].Text == "-")
  5268. {
  5269. return;
  5270. }
  5271. 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();
  5272. }
  5273. }
  5274. private void ultraGrid19_CellChange(object sender, CellEventArgs e)
  5275. {
  5276. this.ultraGrid19.UpdateData();
  5277. UltraGridRow ur = this.ultraGrid19.ActiveRow;
  5278. int m = 0;
  5279. string comFormual = this.ultraComFormual.Text.Trim();
  5280. if (e.Cell.Column.Key == "Value1D1" || e.Cell.Column.Key == "Value1D2")
  5281. {
  5282. if (comFormual.Equals("HV5"))
  5283. {
  5284. 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);
  5285. }
  5286. else if (comFormual.Equals("HV10"))
  5287. {
  5288. 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);
  5289. }
  5290. else
  5291. {
  5292. MessageUtil.ShowTips("公式选择错误!");
  5293. return;
  5294. }
  5295. if (ur.Cells["Value1"].Text != "")
  5296. {
  5297. m = m + 1;
  5298. }
  5299. if (ur.Cells["Value2"].Text != "")
  5300. {
  5301. m = m + 1;
  5302. }
  5303. if (ur.Cells["Value3"].Text != "")
  5304. {
  5305. m = m + 1;
  5306. }
  5307. if (ur.Cells["Value4"].Text != "")
  5308. {
  5309. m = m + 1;
  5310. }
  5311. if (ur.Cells["Value5"].Text != "")
  5312. {
  5313. m = m + 1;
  5314. }
  5315. 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();
  5316. }
  5317. if (e.Cell.Column.Key == "Value2D1" || e.Cell.Column.Key == "Value2D2")
  5318. {
  5319. if (comFormual.Equals("HV5"))
  5320. {
  5321. 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);
  5322. }
  5323. else if (comFormual.Equals("HV10"))
  5324. {
  5325. 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);
  5326. }
  5327. else
  5328. {
  5329. MessageUtil.ShowTips("公式选择错误!");
  5330. return;
  5331. }
  5332. if (ur.Cells["Value1"].Text != "")
  5333. {
  5334. m = m + 1;
  5335. }
  5336. if (ur.Cells["Value2"].Text != "")
  5337. {
  5338. m = m + 1;
  5339. }
  5340. if (ur.Cells["Value3"].Text != "")
  5341. {
  5342. m = m + 1;
  5343. }
  5344. if (ur.Cells["Value4"].Text != "")
  5345. {
  5346. m = m + 1;
  5347. }
  5348. if (ur.Cells["Value5"].Text != "")
  5349. {
  5350. m = m + 1;
  5351. }
  5352. 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();
  5353. }
  5354. if (e.Cell.Column.Key == "Value3D1" || e.Cell.Column.Key == "Value3D2")
  5355. {
  5356. if (comFormual.Equals("HV5"))
  5357. {
  5358. 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);
  5359. }
  5360. else if (comFormual.Equals("HV10"))
  5361. {
  5362. 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);
  5363. }
  5364. else
  5365. {
  5366. MessageUtil.ShowTips("公式选择错误!");
  5367. return;
  5368. }
  5369. if (ur.Cells["Value1"].Text != "")
  5370. {
  5371. m = m + 1;
  5372. }
  5373. if (ur.Cells["Value2"].Text != "")
  5374. {
  5375. m = m + 1;
  5376. }
  5377. if (ur.Cells["Value3"].Text != "")
  5378. {
  5379. m = m + 1;
  5380. }
  5381. if (ur.Cells["Value4"].Text != "")
  5382. {
  5383. m = m + 1;
  5384. }
  5385. if (ur.Cells["Value5"].Text != "")
  5386. {
  5387. m = m + 1;
  5388. }
  5389. 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();
  5390. }
  5391. if (e.Cell.Column.Key == "Value4D1" || e.Cell.Column.Key == "Value4D2")
  5392. {
  5393. if (comFormual.Equals("HV5"))
  5394. {
  5395. 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);
  5396. }
  5397. else if (comFormual.Equals("HV10"))
  5398. {
  5399. 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);
  5400. }
  5401. else
  5402. {
  5403. MessageUtil.ShowTips("公式选择错误!");
  5404. return;
  5405. }
  5406. if (ur.Cells["Value1"].Text != "")
  5407. {
  5408. m = m + 1;
  5409. }
  5410. if (ur.Cells["Value2"].Text != "")
  5411. {
  5412. m = m + 1;
  5413. }
  5414. if (ur.Cells["Value3"].Text != "")
  5415. {
  5416. m = m + 1;
  5417. }
  5418. if (ur.Cells["Value4"].Text != "")
  5419. {
  5420. m = m + 1;
  5421. }
  5422. if (ur.Cells["Value5"].Text != "")
  5423. {
  5424. m = m + 1;
  5425. }
  5426. 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();
  5427. }
  5428. if (e.Cell.Column.Key == "Value5D1" || e.Cell.Column.Key == "Value5D2")
  5429. {
  5430. if (comFormual.Equals("HV5"))
  5431. {
  5432. 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);
  5433. }
  5434. else if (comFormual.Equals("HV10"))
  5435. {
  5436. 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);
  5437. }
  5438. else
  5439. {
  5440. MessageUtil.ShowTips("公式选择错误!");
  5441. return;
  5442. }
  5443. if (ur.Cells["Value1"].Text != "")
  5444. {
  5445. m = m + 1;
  5446. }
  5447. if (ur.Cells["Value2"].Text != "")
  5448. {
  5449. m = m + 1;
  5450. }
  5451. if (ur.Cells["Value3"].Text != "")
  5452. {
  5453. m = m + 1;
  5454. }
  5455. if (ur.Cells["Value4"].Text != "")
  5456. {
  5457. m = m + 1;
  5458. }
  5459. if (ur.Cells["Value5"].Text != "")
  5460. {
  5461. m = m + 1;
  5462. }
  5463. 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();
  5464. }
  5465. if (e.Cell.Column.Key == "Value1")
  5466. {
  5467. if (ur.Cells["Value1"].Text != "")
  5468. {
  5469. m = m + 1;
  5470. }
  5471. if (ur.Cells["Value2"].Text != "")
  5472. {
  5473. m = m + 1;
  5474. }
  5475. if (ur.Cells["Value3"].Text != "")
  5476. {
  5477. m = m + 1;
  5478. }
  5479. if (ur.Cells["Value4"].Text != "")
  5480. {
  5481. m = m + 1;
  5482. }
  5483. if (ur.Cells["Value5"].Text != "")
  5484. {
  5485. m = m + 1;
  5486. }
  5487. if (ur.Cells["Value1"].Text == "-")
  5488. {
  5489. return;
  5490. }
  5491. 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();
  5492. }
  5493. if (e.Cell.Column.Key == "Value2")
  5494. {
  5495. if (ur.Cells["Value1"].Text != "")
  5496. {
  5497. m = m + 1;
  5498. }
  5499. if (ur.Cells["Value2"].Text != "")
  5500. {
  5501. m = m + 1;
  5502. }
  5503. if (ur.Cells["Value3"].Text != "")
  5504. {
  5505. m = m + 1;
  5506. }
  5507. if (ur.Cells["Value4"].Text != "")
  5508. {
  5509. m = m + 1;
  5510. }
  5511. if (ur.Cells["Value5"].Text != "")
  5512. {
  5513. m = m + 1;
  5514. }
  5515. if (ur.Cells["Value2"].Text == "-")
  5516. {
  5517. return;
  5518. }
  5519. 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();
  5520. }
  5521. if (e.Cell.Column.Key == "Value3")
  5522. {
  5523. if (ur.Cells["Value1"].Text != "")
  5524. {
  5525. m = m + 1;
  5526. }
  5527. if (ur.Cells["Value2"].Text != "")
  5528. {
  5529. m = m + 1;
  5530. }
  5531. if (ur.Cells["Value3"].Text != "")
  5532. {
  5533. m = m + 1;
  5534. }
  5535. if (ur.Cells["Value4"].Text != "")
  5536. {
  5537. m = m + 1;
  5538. }
  5539. if (ur.Cells["Value5"].Text != "")
  5540. {
  5541. m = m + 1;
  5542. }
  5543. if (ur.Cells["Value3"].Text == "-")
  5544. {
  5545. return;
  5546. }
  5547. 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();
  5548. }
  5549. if (e.Cell.Column.Key == "Value4")
  5550. {
  5551. if (ur.Cells["Value1"].Text != "")
  5552. {
  5553. m = m + 1;
  5554. }
  5555. if (ur.Cells["Value2"].Text != "")
  5556. {
  5557. m = m + 1;
  5558. }
  5559. if (ur.Cells["Value3"].Text != "")
  5560. {
  5561. m = m + 1;
  5562. }
  5563. if (ur.Cells["Value4"].Text != "")
  5564. {
  5565. m = m + 1;
  5566. }
  5567. if (ur.Cells["Value5"].Text != "")
  5568. {
  5569. m = m + 1;
  5570. }
  5571. if (ur.Cells["Value4"].Text == "-")
  5572. {
  5573. return;
  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()) + double.Parse(ur.Cells["Value4"].Text.Replace('<', '-').ToString3()) + double.Parse(ur.Cells["Value5"].Text.Replace('<', '-').ToString3())) / m), 0).ToString();
  5576. }
  5577. if (e.Cell.Column.Key == "Value5")
  5578. {
  5579. if (ur.Cells["Value1"].Text != "")
  5580. {
  5581. m = m + 1;
  5582. }
  5583. if (ur.Cells["Value2"].Text != "")
  5584. {
  5585. m = m + 1;
  5586. }
  5587. if (ur.Cells["Value3"].Text != "")
  5588. {
  5589. m = m + 1;
  5590. }
  5591. if (ur.Cells["Value4"].Text != "")
  5592. {
  5593. m = m + 1;
  5594. }
  5595. if (ur.Cells["Value5"].Text != "")
  5596. {
  5597. m = m + 1;
  5598. }
  5599. if (ur.Cells["Value5"].Text == "-")
  5600. {
  5601. return;
  5602. }
  5603. 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();
  5604. }
  5605. }
  5606. private void ultraGrid20_CellChange(object sender, CellEventArgs e)
  5607. {
  5608. this.ultraGrid20.UpdateData();
  5609. UltraGridRow ur = this.ultraGrid20.ActiveRow;
  5610. int m = 0;
  5611. string comFormual = this.ultraComFormual.Text.Trim();
  5612. if (e.Cell.Column.Key == "Value1D1" || e.Cell.Column.Key == "Value1D2")
  5613. {
  5614. if (comFormual.Equals("HBW2.5"))
  5615. {
  5616. 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();
  5617. }
  5618. else if (comFormual.Equals("HBW5"))
  5619. {
  5620. 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();
  5621. }
  5622. else if (comFormual.Equals("HBW10"))
  5623. {
  5624. 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();
  5625. }
  5626. else
  5627. {
  5628. MessageUtil.ShowTips("公式选择错误!");
  5629. return;
  5630. }
  5631. if (ur.Cells["Value1"].Text != "")
  5632. {
  5633. m = m + 1;
  5634. }
  5635. if (ur.Cells["Value2"].Text != "")
  5636. {
  5637. m = m + 1;
  5638. }
  5639. if (ur.Cells["Value3"].Text != "")
  5640. {
  5641. m = m + 1;
  5642. }
  5643. 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();
  5644. }
  5645. if (e.Cell.Column.Key == "Value2D1" || e.Cell.Column.Key == "Value2D2")
  5646. {
  5647. if (comFormual.Equals("HBW2.5"))
  5648. {
  5649. 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();
  5650. }
  5651. else if (comFormual.Equals("HBW5"))
  5652. {
  5653. 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();
  5654. }
  5655. else if (comFormual.Equals("HBW10"))
  5656. {
  5657. 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();
  5658. }
  5659. else
  5660. {
  5661. MessageUtil.ShowTips("公式选择错误!");
  5662. return;
  5663. }
  5664. if (ur.Cells["Value1"].Text != "")
  5665. {
  5666. m = m + 1;
  5667. }
  5668. if (ur.Cells["Value2"].Text != "")
  5669. {
  5670. m = m + 1;
  5671. }
  5672. if (ur.Cells["Value3"].Text != "")
  5673. {
  5674. m = m + 1;
  5675. }
  5676. 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();
  5677. }
  5678. if (e.Cell.Column.Key == "Value3D1" || e.Cell.Column.Key == "Value3D2")
  5679. {
  5680. if (comFormual.Equals("HBW2.5"))
  5681. {
  5682. 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();
  5683. }
  5684. else if (comFormual.Equals("HBW5"))
  5685. {
  5686. 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();
  5687. }
  5688. else if (comFormual.Equals("HBW10"))
  5689. {
  5690. 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();
  5691. }
  5692. else
  5693. {
  5694. MessageUtil.ShowTips("公式选择错误!");
  5695. return;
  5696. }
  5697. if (ur.Cells["Value1"].Text != "")
  5698. {
  5699. m = m + 1;
  5700. }
  5701. if (ur.Cells["Value2"].Text != "")
  5702. {
  5703. m = m + 1;
  5704. }
  5705. if (ur.Cells["Value3"].Text != "")
  5706. {
  5707. m = m + 1;
  5708. }
  5709. 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();
  5710. }
  5711. if (e.Cell.Column.Key == "Value1")
  5712. {
  5713. if (ur.Cells["Value1"].Text != "")
  5714. {
  5715. m = m + 1;
  5716. }
  5717. if (ur.Cells["Value2"].Text != "")
  5718. {
  5719. m = m + 1;
  5720. }
  5721. if (ur.Cells["Value3"].Text != "")
  5722. {
  5723. m = m + 1;
  5724. }
  5725. if (ur.Cells["Value1"].Text == "-")
  5726. {
  5727. return;
  5728. }
  5729. 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();
  5730. }
  5731. if (e.Cell.Column.Key == "Value2")
  5732. {
  5733. if (ur.Cells["Value1"].Text != "")
  5734. {
  5735. m = m + 1;
  5736. }
  5737. if (ur.Cells["Value2"].Text != "")
  5738. {
  5739. m = m + 1;
  5740. }
  5741. if (ur.Cells["Value3"].Text != "")
  5742. {
  5743. m = m + 1;
  5744. }
  5745. if (ur.Cells["Value2"].Text == "-")
  5746. {
  5747. return;
  5748. }
  5749. 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();
  5750. }
  5751. if (e.Cell.Column.Key == "Value3")
  5752. {
  5753. if (ur.Cells["Value1"].Text != "")
  5754. {
  5755. m = m + 1;
  5756. }
  5757. if (ur.Cells["Value2"].Text != "")
  5758. {
  5759. m = m + 1;
  5760. }
  5761. if (ur.Cells["Value3"].Text != "")
  5762. {
  5763. m = m + 1;
  5764. }
  5765. if (ur.Cells["Value3"].Text == "-")
  5766. {
  5767. return;
  5768. }
  5769. 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();
  5770. }
  5771. }
  5772. private void ultraGrid27_AfterRowActivate(object sender, EventArgs e)
  5773. {
  5774. UltraGridRow uRow = this.ultraGrid27.ActiveRow;
  5775. if(uRow.HasChild())
  5776. {
  5777. return;
  5778. }
  5779. if(uRow == null)
  5780. {
  5781. return;
  5782. }
  5783. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  5784. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPHYNoFrim", new object[] { uRow.Cells["CheckNo"].Value.ToString(), "3", arrId, ultraOptionSet1.CheckedItem.DataValue.ToString() }, this.ob);
  5785. PipeCheckconsignDetailEntitybindingSource2.DataSource = listSource;
  5786. }
  5787. //private void ultraGrid27_CellChange(object sender, CellEventArgs e)
  5788. //{
  5789. // if (e.Cell.Row.HasChild() && e.Cell.Column.Key == "CHK")
  5790. // {
  5791. // ultraGrid27.UpdateData();
  5792. // if (e.Cell.Value.ToString() == "True")
  5793. // {
  5794. // foreach (UltraGridRow dr in e.Cell.Row.ChildBands[0].Rows)
  5795. // {
  5796. // dr.Cells["CHK1"].Value = "True";
  5797. // }
  5798. // }
  5799. // else
  5800. // {
  5801. // foreach (UltraGridRow dr in e.Cell.Row.ChildBands[0].Rows)
  5802. // {
  5803. // dr.Cells["CHK1"].Value = "False";
  5804. // }
  5805. // }
  5806. // }
  5807. //}
  5808. private void ultraGrid40_AfterRowActivate(object sender, EventArgs e)
  5809. {
  5810. UltraGridRow uRow = this.ultraGrid40.ActiveRow;
  5811. if (uRow.HasChild())
  5812. {
  5813. return;
  5814. }
  5815. if (uRow == null)
  5816. {
  5817. return;
  5818. }
  5819. List<PipeCheckconsignDetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  5820. "com.steering.lims.data.pipe.FrmDataCJBase.queryCheckConsignBaseDetailPHYFrim", new object[] { uRow.Cells["CheckNo"].Value.ToString(), arrId, ultraOptionSet1.CheckedItem.DataValue.ToString() }, this.ob);
  5821. PipeCheckconsignDetailEntitybindingSource3.DataSource = listSource;
  5822. List<PipeCheckconsignDetailEntity> listSource1 = EntityHelper.GetData<PipeCheckconsignDetailEntity>(
  5823. "com.steering.lims.data.pipe.FrmDataCJBase.queryDetaiFlag", new object[] { uRow.Cells["CheckNo"].Value.ToString(), arrId }, this.ob);
  5824. pipeCheckconsignDetailEntityBindingSource7.DataSource = listSource1;
  5825. for(int i = 0;i<ultraGrid54.Rows.Count;i++)
  5826. {
  5827. if (this.ultraGrid54.Rows[i].Cells["Flag"].Text != "已审核" && this.ultraGrid54.Rows[i].Cells["Flag"].Text != "判定已接收")
  5828. {
  5829. ultraGrid54.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  5830. }
  5831. }
  5832. }
  5833. //private void ultraGrid40_CellChange(object sender, CellEventArgs e)
  5834. //{
  5835. // if (e.Cell.Row.HasChild() && e.Cell.Column.Key == "CHK")
  5836. // {
  5837. // ultraGrid40.UpdateData();
  5838. // if (e.Cell.Value.ToString() == "True")
  5839. // {
  5840. // foreach (UltraGridRow dr in e.Cell.Row.ChildBands[0].Rows)
  5841. // {
  5842. // dr.Cells["CHK1"].Value = "True";
  5843. // }
  5844. // }
  5845. // else
  5846. // {
  5847. // foreach (UltraGridRow dr in e.Cell.Row.ChildBands[0].Rows)
  5848. // {
  5849. // dr.Cells["CHK1"].Value = "False";
  5850. // }
  5851. // }
  5852. // }
  5853. //}
  5854. private void ultraGrid41_AfterRowActivate(object sender, EventArgs e)
  5855. {
  5856. ultraTabControl5.Visible = true;
  5857. ultraTabControl3.Visible = false;
  5858. ultraTabControl4.Visible = false;
  5859. ultraTabControl2.Visible = false;
  5860. //PipeCheckconsignPhydetailEntitybindingSource.Clear();
  5861. //PipeCheckconsignPhydetailEntityCjbindingSource.Clear();
  5862. //PipeCheckconsignPhydetailEntityLSbindingSource.Clear();
  5863. //PipeCheckconsignPhydetailEntityWSbindingSource.Clear();
  5864. //PipeCheckconsignPhydetailEntityBSbindingSource.Clear();
  5865. //PipeCheckconsignPhydetailEntityJZWbindingSource.Clear();
  5866. //PipeCheckconsignPhydetailEntityJLDbindingSource.Clear();
  5867. //PipeCheckconsignPhydetailEntityZZbindingSource.Clear();
  5868. //PipeCheckconsignPhydetailEntityYBbindingSource.Clear();
  5869. //PipeCheckconsignPhydetailEntityWQbindingSource.Clear();
  5870. //PipeCheckconsignPhydetailEntityKKbindingSource.Clear();
  5871. UltraGridRow row = this.ultraGrid41.ActiveRow;
  5872. List<PipeCheckconsignPhydetailEntity> listSource = EntityHelper.GetData<PipeCheckconsignPhydetailEntity>(
  5873. "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);
  5874. if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0001"))//拉伸
  5875. {
  5876. PipeCheckconsignPhydetailEntitybindingSource.DataSource = listSource;
  5877. ultraTabControl5.Tabs["0"].Selected = true;
  5878. ultraTabControl5.Tabs["0"].Visible = true;
  5879. ultraTabControl5.Tabs["1"].Visible = false;
  5880. ultraTabControl5.Tabs["2"].Visible = false;
  5881. ultraTabControl5.Tabs["3"].Visible = false;
  5882. ultraTabControl5.Tabs["4"].Visible = false;
  5883. ultraTabControl5.Tabs["5"].Visible = false;
  5884. ultraTabControl5.Tabs["6"].Visible = false;
  5885. ultraTabControl5.Tabs["7"].Visible = false;
  5886. ultraTabControl5.Tabs["8"].Visible = false;
  5887. ultraTabControl5.Tabs["9"].Visible = false;
  5888. ultraTabControl5.Tabs["10"].Visible = false;
  5889. ultraTabControl5.Tabs["11"].Visible = false;
  5890. ultraTabControl5.Tabs["12"].Visible = false;
  5891. foreach (UltraGridRow forRow in ultraGrid42.Rows)
  5892. {
  5893. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5894. {
  5895. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5896. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5897. }
  5898. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5899. {
  5900. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5901. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5902. }
  5903. if (forRow.Cells["SplineItemNameS"].Text.ToString().Equals(""))
  5904. {
  5905. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5906. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5907. }
  5908. string a = forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "");
  5909. if (!forRow.Cells["SampleType"].Text.Trim().Replace(" ", "").Equals(forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "")))
  5910. {
  5911. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5912. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5913. }
  5914. if (!forRow.Cells["PhyDir"].Text.Trim().Equals(forRow.Cells["SplineItemNameF"].Text.Trim()))
  5915. {
  5916. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5917. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5918. }
  5919. if (forRow.Cells["ItemNameW"].Text.Trim().Equals("室温"))
  5920. {
  5921. if (int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) > 35 || int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) < 10)
  5922. {
  5923. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5924. }
  5925. }
  5926. else
  5927. {
  5928. if (!forRow.Cells["CheckTemp"].Text.Trim().Equals(forRow.Cells["ItemNameW"].Text.Trim().Replace("℃", "")))
  5929. {
  5930. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5931. }
  5932. }
  5933. }
  5934. }
  5935. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0002"))//冲击
  5936. {
  5937. PipeCheckconsignPhydetailEntityCjbindingSource.DataSource = listSource;
  5938. ultraTabControl5.Tabs["1"].Selected = true;
  5939. ultraTabControl5.Tabs["0"].Visible = false;
  5940. ultraTabControl5.Tabs["1"].Visible = true;
  5941. ultraTabControl5.Tabs["2"].Visible = false;
  5942. ultraTabControl5.Tabs["3"].Visible = false;
  5943. ultraTabControl5.Tabs["4"].Visible = false;
  5944. ultraTabControl5.Tabs["5"].Visible = false;
  5945. ultraTabControl5.Tabs["6"].Visible = false;
  5946. ultraTabControl5.Tabs["7"].Visible = false;
  5947. ultraTabControl5.Tabs["8"].Visible = false;
  5948. ultraTabControl5.Tabs["9"].Visible = false;
  5949. ultraTabControl5.Tabs["10"].Visible = false;
  5950. ultraTabControl5.Tabs["11"].Visible = false;
  5951. ultraTabControl5.Tabs["12"].Visible = false;
  5952. foreach (UltraGridRow forRow in ultraGrid43.Rows)
  5953. {
  5954. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5955. {
  5956. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5957. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5958. }
  5959. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5960. {
  5961. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5962. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5963. }
  5964. //力学实验冲击,硬度单点值,平均值超上限都变红。
  5965. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5966. {
  5967. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5968. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5969. }
  5970. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5971. {
  5972. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5973. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5974. }
  5975. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5976. {
  5977. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5978. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5979. }
  5980. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5981. {
  5982. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5983. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5984. }
  5985. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  5986. {
  5987. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5988. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5989. }
  5990. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  5991. {
  5992. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5993. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5994. }
  5995. if (forRow.Cells["SplineItemNameS"].Text.ToString().Equals(""))
  5996. {
  5997. forRow.RowSelectorAppearance.BackColor = Color.Red;
  5998. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  5999. }
  6000. if (!forRow.Cells["SampleType"].Text.Trim().Replace(" ", "").Equals(forRow.Cells["SplineItemNameS"].Text.Trim().Replace("0=", "o=").Replace(" ", "")))
  6001. {
  6002. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6003. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6004. }
  6005. if (!forRow.Cells["PhyDir"].Text.Trim().Equals(forRow.Cells["SplineItemNameF"].Text.Trim()))
  6006. {
  6007. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6008. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6009. }
  6010. if (forRow.Cells["ItemNameW"].Text.Trim().Equals("室温"))
  6011. {
  6012. if (int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) > 35 || int.Parse(forRow.Cells["CheckTemp"].Text.Trim()) < 10)
  6013. {
  6014. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6015. }
  6016. }
  6017. else
  6018. {
  6019. if (!forRow.Cells["CheckTemp"].Text.Trim().Equals(forRow.Cells["ItemNameW"].Text.Trim().Replace("℃", "")))
  6020. {
  6021. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6022. }
  6023. }
  6024. }
  6025. }
  6026. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0003"))//布氏
  6027. {
  6028. PipeCheckconsignPhydetailEntityBSbindingSource.DataSource = listSource;
  6029. MergedCell(ultraGrid6, new string[] { "PhyName" });
  6030. ultraTabControl5.Tabs["4"].Selected = true;
  6031. ultraTabControl5.Tabs["0"].Visible = false;
  6032. ultraTabControl5.Tabs["1"].Visible = false;
  6033. ultraTabControl5.Tabs["2"].Visible = false;
  6034. ultraTabControl5.Tabs["3"].Visible = false;
  6035. ultraTabControl5.Tabs["4"].Visible = true;
  6036. ultraTabControl5.Tabs["5"].Visible = false;
  6037. ultraTabControl5.Tabs["6"].Visible = false;
  6038. ultraTabControl5.Tabs["7"].Visible = false;
  6039. ultraTabControl5.Tabs["8"].Visible = false;
  6040. ultraTabControl5.Tabs["9"].Visible = false;
  6041. ultraTabControl5.Tabs["10"].Visible = false;
  6042. ultraTabControl5.Tabs["11"].Visible = false;
  6043. ultraTabControl5.Tabs["12"].Visible = false;
  6044. foreach (UltraGridRow forRow in ultraGrid46.Rows)
  6045. {
  6046. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6047. {
  6048. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6049. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6050. }
  6051. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6052. {
  6053. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6054. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6055. }
  6056. //力学实验冲击,硬度单点值,平均值超上限都变红。
  6057. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6058. {
  6059. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6060. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6061. }
  6062. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6063. {
  6064. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6065. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6066. }
  6067. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].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["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6073. {
  6074. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6075. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6076. }
  6077. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6078. {
  6079. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6080. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6081. }
  6082. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6083. {
  6084. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6085. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6086. }
  6087. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6088. {
  6089. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6090. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6091. }
  6092. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6093. {
  6094. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6095. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6096. }
  6097. }
  6098. }
  6099. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0004") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0018"))//洛氏
  6100. {
  6101. PipeCheckconsignPhydetailEntityLSbindingSource.DataSource = listSource;
  6102. MergedCell(ultraGrid5, new string[] { "PhyName" });
  6103. ultraTabControl5.Tabs["2"].Selected = true;
  6104. ultraTabControl5.Tabs["0"].Visible = false;
  6105. ultraTabControl5.Tabs["1"].Visible = false;
  6106. ultraTabControl5.Tabs["2"].Visible = true;
  6107. ultraTabControl5.Tabs["3"].Visible = false;
  6108. ultraTabControl5.Tabs["4"].Visible = false;
  6109. ultraTabControl5.Tabs["5"].Visible = false;
  6110. ultraTabControl5.Tabs["6"].Visible = false;
  6111. ultraTabControl5.Tabs["7"].Visible = false;
  6112. ultraTabControl5.Tabs["8"].Visible = false;
  6113. ultraTabControl5.Tabs["9"].Visible = false;
  6114. ultraTabControl5.Tabs["10"].Visible = false;
  6115. ultraTabControl5.Tabs["11"].Visible = false;
  6116. ultraTabControl5.Tabs["12"].Visible = false;
  6117. foreach (UltraGridRow forRow in ultraGrid44.Rows)
  6118. {
  6119. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6120. {
  6121. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6122. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6123. }
  6124. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6125. {
  6126. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6127. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6128. }
  6129. //力学实验冲击,硬度单点值,平均值超上限都变红。
  6130. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6131. {
  6132. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6133. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6134. }
  6135. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6136. {
  6137. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6138. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6139. }
  6140. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6141. {
  6142. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6143. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6144. }
  6145. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6146. {
  6147. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6148. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6149. } if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].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["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6155. {
  6156. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6157. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6158. }
  6159. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].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["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6165. {
  6166. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6167. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6168. }
  6169. }
  6170. }
  6171. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0005"))//维氏
  6172. {
  6173. PipeCheckconsignPhydetailEntityWSbindingSource.DataSource = listSource;
  6174. MergedCell(ultraGrid5, new string[] { "PhyName" });
  6175. ultraTabControl5.Tabs["3"].Selected = true;
  6176. ultraTabControl5.Tabs["0"].Visible = false;
  6177. ultraTabControl5.Tabs["1"].Visible = false;
  6178. ultraTabControl5.Tabs["2"].Visible = false;
  6179. ultraTabControl5.Tabs["3"].Visible = true;
  6180. ultraTabControl5.Tabs["4"].Visible = false;
  6181. ultraTabControl5.Tabs["5"].Visible = false;
  6182. ultraTabControl5.Tabs["6"].Visible = false;
  6183. ultraTabControl5.Tabs["7"].Visible = false;
  6184. ultraTabControl5.Tabs["8"].Visible = false;
  6185. ultraTabControl5.Tabs["9"].Visible = false;
  6186. ultraTabControl5.Tabs["10"].Visible = false;
  6187. ultraTabControl5.Tabs["11"].Visible = false;
  6188. ultraTabControl5.Tabs["12"].Visible = false;
  6189. foreach (UltraGridRow forRow in ultraGrid45.Rows)
  6190. {
  6191. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6192. {
  6193. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6194. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6195. }
  6196. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6197. {
  6198. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6199. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6200. }
  6201. //力学实验冲击,硬度单点值,平均值超上限都变红。
  6202. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6203. {
  6204. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6205. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6206. }
  6207. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6208. {
  6209. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6210. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6211. }
  6212. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6213. {
  6214. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6215. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6216. }
  6217. if (!checkStr(forRow.Cells["Value2"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6218. {
  6219. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6220. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6221. }
  6222. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6223. {
  6224. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6225. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6226. }
  6227. if (!checkStr(forRow.Cells["Value3"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6228. {
  6229. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6230. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6231. }
  6232. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6233. {
  6234. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6235. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6236. }
  6237. if (!checkStr(forRow.Cells["Value4"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6238. {
  6239. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6240. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6241. }
  6242. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6243. {
  6244. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6245. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6246. }
  6247. if (!checkStr(forRow.Cells["Value5"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6248. {
  6249. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6250. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6251. }
  6252. }
  6253. }
  6254. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0014") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0016") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0031"))//组织
  6255. {
  6256. PipeCheckconsignPhydetailEntityZZbindingSource.DataSource = listSource;
  6257. ultraTabControl5.Tabs["7"].Selected = true;
  6258. ultraTabControl5.Tabs["0"].Visible = false;
  6259. ultraTabControl5.Tabs["1"].Visible = false;
  6260. ultraTabControl5.Tabs["2"].Visible = false;
  6261. ultraTabControl5.Tabs["3"].Visible = false;
  6262. ultraTabControl5.Tabs["4"].Visible = false;
  6263. ultraTabControl5.Tabs["5"].Visible = false;
  6264. ultraTabControl5.Tabs["6"].Visible = false;
  6265. ultraTabControl5.Tabs["7"].Visible = true;
  6266. ultraTabControl5.Tabs["8"].Visible = false;
  6267. ultraTabControl5.Tabs["9"].Visible = false;
  6268. ultraTabControl5.Tabs["10"].Visible = false;
  6269. ultraTabControl5.Tabs["11"].Visible = false;
  6270. ultraTabControl5.Tabs["12"].Visible = false;
  6271. foreach (UltraGridRow forRow in ultraGrid49.Rows)
  6272. {
  6273. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6274. {
  6275. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6276. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6277. }
  6278. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6279. {
  6280. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6281. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6282. }
  6283. }
  6284. }
  6285. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0013"))//晶粒度
  6286. {
  6287. PipeCheckconsignPhydetailEntityJLDbindingSource.DataSource = listSource;
  6288. ultraTabControl5.Tabs["6"].Selected = true;
  6289. ultraTabControl5.Tabs["0"].Visible = false;
  6290. ultraTabControl5.Tabs["1"].Visible = false;
  6291. ultraTabControl5.Tabs["2"].Visible = false;
  6292. ultraTabControl5.Tabs["3"].Visible = false;
  6293. ultraTabControl5.Tabs["4"].Visible = false;
  6294. ultraTabControl5.Tabs["5"].Visible = false;
  6295. ultraTabControl5.Tabs["6"].Visible = true;
  6296. ultraTabControl5.Tabs["7"].Visible = false;
  6297. ultraTabControl5.Tabs["8"].Visible = false;
  6298. ultraTabControl5.Tabs["9"].Visible = false;
  6299. ultraTabControl5.Tabs["10"].Visible = false;
  6300. ultraTabControl5.Tabs["11"].Visible = false;
  6301. ultraTabControl5.Tabs["12"].Visible = false;
  6302. foreach (UltraGridRow forRow in ultraGrid48.Rows)
  6303. {
  6304. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6305. {
  6306. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6307. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6308. }
  6309. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6310. {
  6311. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6312. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6313. }
  6314. }
  6315. }
  6316. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0012"))//夹杂
  6317. {
  6318. PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource = listSource;
  6319. ultraTabControl5.Tabs["5"].Selected = true;
  6320. ultraTabControl5.Tabs["0"].Visible = false;
  6321. ultraTabControl5.Tabs["1"].Visible = false;
  6322. ultraTabControl5.Tabs["2"].Visible = false;
  6323. ultraTabControl5.Tabs["3"].Visible = false;
  6324. ultraTabControl5.Tabs["4"].Visible = false;
  6325. ultraTabControl5.Tabs["5"].Visible = true;
  6326. ultraTabControl5.Tabs["6"].Visible = false;
  6327. ultraTabControl5.Tabs["7"].Visible = false;
  6328. ultraTabControl5.Tabs["8"].Visible = false;
  6329. ultraTabControl5.Tabs["9"].Visible = false;
  6330. ultraTabControl5.Tabs["10"].Visible = false;
  6331. ultraTabControl5.Tabs["11"].Visible = false;
  6332. ultraTabControl5.Tabs["12"].Visible = false;
  6333. foreach (UltraGridRow forRow in ultraGrid47.Rows)
  6334. {
  6335. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6336. {
  6337. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6338. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6339. }
  6340. if (!checkStr(forRow.Cells["Value1"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6341. {
  6342. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6343. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6344. }
  6345. if (forRow.Cells["PhyCode"].Text.ToString().Equals("P0618") || forRow.Cells["PhyCode"].Text.ToString().Equals("P0619"))
  6346. {
  6347. if (!forRow.Cells["Value1"].Text.ToString().Equals("是") && !forRow.Cells["Value1"].Text.ToString().Equals("否"))
  6348. {
  6349. forRow.RowSelectorAppearance.BackColor = Color.Red; ;
  6350. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6351. }
  6352. }
  6353. }
  6354. ultraGrid47.DisplayLayout.Bands[0].Columns["Value1"].Header.Caption = "一象限";
  6355. ultraGrid47.DisplayLayout.Bands[0].Columns["Value2"].Header.Caption = "二象限";
  6356. ultraGrid47.DisplayLayout.Bands[0].Columns["Value3"].Header.Caption = "三象限";
  6357. ultraGrid47.DisplayLayout.Bands[0].Columns["Value4"].Header.Caption = "四象限";
  6358. if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0115"))
  6359. {
  6360. ultraGrid47.DisplayLayout.Bands[0].Columns["Value2"].Hidden = false;
  6361. ultraGrid47.DisplayLayout.Bands[0].Columns["Value3"].Hidden = false;
  6362. ultraGrid47.DisplayLayout.Bands[0].Columns["Value4"].Hidden = false;
  6363. }
  6364. else
  6365. {
  6366. ultraGrid47.DisplayLayout.Bands[0].Columns["Value2"].Hidden = true;
  6367. ultraGrid47.DisplayLayout.Bands[0].Columns["Value3"].Hidden = true;
  6368. ultraGrid47.DisplayLayout.Bands[0].Columns["Value4"].Hidden = true;
  6369. }
  6370. }
  6371. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0010"))//工艺
  6372. {
  6373. 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"))//弯曲
  6374. {
  6375. PipeCheckconsignPhydetailEntityWQbindingSource.DataSource = listSource;
  6376. ultraTabControl5.Tabs["9"].Selected = true;
  6377. ultraTabControl5.Tabs["0"].Visible = false;
  6378. ultraTabControl5.Tabs["1"].Visible = false;
  6379. ultraTabControl5.Tabs["2"].Visible = false;
  6380. ultraTabControl5.Tabs["3"].Visible = false;
  6381. ultraTabControl5.Tabs["4"].Visible = false;
  6382. ultraTabControl5.Tabs["5"].Visible = false;
  6383. ultraTabControl5.Tabs["6"].Visible = false;
  6384. ultraTabControl5.Tabs["7"].Visible = false;
  6385. ultraTabControl5.Tabs["8"].Visible = false;
  6386. ultraTabControl5.Tabs["9"].Visible = true;
  6387. ultraTabControl5.Tabs["10"].Visible = false;
  6388. ultraTabControl5.Tabs["11"].Visible = false;
  6389. ultraTabControl5.Tabs["12"].Visible = false;
  6390. }
  6391. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0009"))//压扁
  6392. {
  6393. PipeCheckconsignPhydetailEntityYBbindingSource.DataSource = listSource;
  6394. ultraTabControl5.Tabs["8"].Selected = true;
  6395. ultraTabControl5.Tabs["0"].Visible = false;
  6396. ultraTabControl5.Tabs["1"].Visible = false;
  6397. ultraTabControl5.Tabs["2"].Visible = false;
  6398. ultraTabControl5.Tabs["3"].Visible = false;
  6399. ultraTabControl5.Tabs["4"].Visible = false;
  6400. ultraTabControl5.Tabs["5"].Visible = false;
  6401. ultraTabControl5.Tabs["6"].Visible = false;
  6402. ultraTabControl5.Tabs["7"].Visible = false;
  6403. ultraTabControl5.Tabs["8"].Visible = true;
  6404. ultraTabControl5.Tabs["9"].Visible = false;
  6405. ultraTabControl5.Tabs["10"].Visible = false;
  6406. ultraTabControl5.Tabs["11"].Visible = false;
  6407. ultraTabControl5.Tabs["12"].Visible = false;
  6408. for (int i = 0; i < ultraGrid50.Rows.Count; i++)
  6409. {
  6410. if (this.ultraGrid50.Rows[i].Cells["IsGood"].Text == "不符合" || this.ultraGrid50.Rows[i].Cells["IsDefect"].Text == "不符合")
  6411. {
  6412. ultraGrid37.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  6413. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6414. }
  6415. }
  6416. ultraGrid50.DisplayLayout.Bands[0].Columns["IsGood"].Header.Caption = "试验结果(一次)";
  6417. ultraGrid50.DisplayLayout.Bands[0].Columns["IsDefect"].Header.Caption = "试验结果(二次)";
  6418. }
  6419. else if (row.Cells["PhyCodeMax"].Value.ToString().Equals("C0026"))//扩口
  6420. {
  6421. PipeCheckconsignPhydetailEntityKKbindingSource.DataSource = listSource;
  6422. ultraTabControl5.Tabs["10"].Selected = true;
  6423. ultraTabControl5.Tabs["0"].Visible = false;
  6424. ultraTabControl5.Tabs["1"].Visible = false;
  6425. ultraTabControl5.Tabs["2"].Visible = false;
  6426. ultraTabControl5.Tabs["3"].Visible = false;
  6427. ultraTabControl5.Tabs["4"].Visible = false;
  6428. ultraTabControl5.Tabs["5"].Visible = false;
  6429. ultraTabControl5.Tabs["6"].Visible = false;
  6430. ultraTabControl5.Tabs["7"].Visible = false;
  6431. ultraTabControl5.Tabs["8"].Visible = false;
  6432. ultraTabControl5.Tabs["9"].Visible = false;
  6433. ultraTabControl5.Tabs["10"].Visible = true;
  6434. ultraTabControl5.Tabs["11"].Visible = false;
  6435. ultraTabControl5.Tabs["12"].Visible = false;
  6436. for (int i = 0; i < ultraGrid52.Rows.Count; i++)
  6437. {
  6438. if (this.ultraGrid52.Rows[i].Cells["IsGood"].Text == "不符合")
  6439. {
  6440. ultraGrid52.Rows[i].RowSelectorAppearance.BackColor = Color.Red;
  6441. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6442. }
  6443. }
  6444. }
  6445. }
  6446. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0050") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0060"))
  6447. {
  6448. pipeCheckconsignPhydetailEntityQTBindingSource.DataSource = listSource;
  6449. ultraTabControl5.Tabs["11"].Selected = true;
  6450. ultraTabControl5.Tabs["0"].Visible = false;
  6451. ultraTabControl5.Tabs["1"].Visible = false;
  6452. ultraTabControl5.Tabs["2"].Visible = false;
  6453. ultraTabControl5.Tabs["3"].Visible = false;
  6454. ultraTabControl5.Tabs["4"].Visible = false;
  6455. ultraTabControl5.Tabs["5"].Visible = false;
  6456. ultraTabControl5.Tabs["6"].Visible = false;
  6457. ultraTabControl5.Tabs["7"].Visible = false;
  6458. ultraTabControl5.Tabs["8"].Visible = false;
  6459. ultraTabControl5.Tabs["9"].Visible = false;
  6460. ultraTabControl5.Tabs["10"].Visible = false;
  6461. ultraTabControl5.Tabs["11"].Visible = true;
  6462. ultraTabControl5.Tabs["12"].Visible = false;
  6463. ultraGrid57.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  6464. foreach (UltraGridRow forRow in ultraGrid57.Rows)
  6465. {
  6466. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6467. {
  6468. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6469. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6470. }
  6471. if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6472. {
  6473. forRow.RowSelectorAppearance.BackColor = Color.Red;
  6474. this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6475. }
  6476. }
  6477. }
  6478. else if (row.Cells["PhyCodeMin"].Value.ToString().Equals("R0057") || row.Cells["PhyCodeMin"].Value.ToString().Equals("R0066")) //落锤试验
  6479. {
  6480. PipeCheckconsignDetailEntityLCbindingSource.DataSource = listSource;
  6481. ultraTabControl5.Tabs["12"].Selected = true;
  6482. ultraTabControl5.Tabs["0"].Visible = false;
  6483. ultraTabControl5.Tabs["1"].Visible = false;
  6484. ultraTabControl5.Tabs["2"].Visible = false;
  6485. ultraTabControl5.Tabs["3"].Visible = false;
  6486. ultraTabControl5.Tabs["4"].Visible = false;
  6487. ultraTabControl5.Tabs["5"].Visible = false;
  6488. ultraTabControl5.Tabs["6"].Visible = false;
  6489. ultraTabControl5.Tabs["7"].Visible = false;
  6490. ultraTabControl5.Tabs["8"].Visible = false;
  6491. ultraTabControl5.Tabs["9"].Visible = false;
  6492. ultraTabControl5.Tabs["10"].Visible = false;
  6493. ultraTabControl5.Tabs["11"].Visible = false;
  6494. ultraTabControl5.Tabs["12"].Visible = true;
  6495. //ultraGrid57.DisplayLayout.Bands[0].Columns["AverageValue"].Header.Caption = "最小值";
  6496. //foreach (UltraGridRow forRow in ultraGrid57.Rows)
  6497. //{
  6498. // if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMinSign"].Text.Trim(), forRow.Cells["StdMin"].Text.Trim()))
  6499. // {
  6500. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  6501. // this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6502. // }
  6503. // if (!checkStr(forRow.Cells["AverageValue"].Text.Trim(), forRow.Cells["StdMaxSign"].Text.Trim(), forRow.Cells["StdMax"].Text.Trim()))
  6504. // {
  6505. // forRow.RowSelectorAppearance.BackColor = Color.Red;
  6506. // this.ultraGrid40.ActiveRow.RowSelectorAppearance.BackColor = Color.Red;
  6507. // }
  6508. //}
  6509. }
  6510. }
  6511. private void ultraGrid8_CellChange(object sender, CellEventArgs e)
  6512. {
  6513. this.ultraGrid8.UpdateData();
  6514. if (e.Cell.Column.Key == "Value1")
  6515. {
  6516. if(!StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3()) && e.Cell.Row.Cells["Value1"].Value.ToString2() == "")
  6517. {
  6518. return;
  6519. //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"))
  6520. //{
  6521. // MessageUtil.ShowTips("末尾位只能是0或者5");
  6522. // return;
  6523. //}
  6524. }
  6525. List<PipeCheckconsignPhydetailEntity> list = PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource as List<PipeCheckconsignPhydetailEntity>;
  6526. list.Where(p => p.PhyCode == "P0064").ToList().ForEach(p =>
  6527. {
  6528. 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)细系总和
  6529. });
  6530. list.Where(p => p.PhyCode == "P0065").ToList().ForEach(p =>
  6531. {
  6532. 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)粗系总和
  6533. });
  6534. list.Where(p => p.PhyCode == "P0069").ToList().ForEach(p =>
  6535. {
  6536. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+C)粗系总和
  6537. });
  6538. list.Where(p => p.PhyCode == "P0070").ToList().ForEach(p =>
  6539. {
  6540. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+C)细系总和
  6541. });
  6542. list.Where(p => p.PhyCode == "P0071").ToList().ForEach(p =>
  6543. {
  6544. 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)细系总和
  6545. });
  6546. list.Where(p => p.PhyCode == "P0072").ToList().ForEach(p =>
  6547. {
  6548. 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)粗系总和
  6549. });
  6550. list.Where(p => p.PhyCode == "P0085").ToList().ForEach(p =>
  6551. {
  6552. 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)粗细系总和
  6553. });
  6554. list.Where(p => p.PhyCode == "P0090").ToList().ForEach(p =>
  6555. {
  6556. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0058").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B)粗系总和
  6557. });
  6558. list.Where(p => p.PhyCode == "P0091").ToList().ForEach(p =>
  6559. {
  6560. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0057").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B)细系总和
  6561. });
  6562. list.Where(p => p.PhyCode == "P0096").ToList().ForEach(p =>
  6563. {
  6564. p.Value1 = list.Where(q => q.PhyCode == "P0058" || q.PhyCode == "P0062").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(B+D)粗系总和
  6565. });
  6566. list.Where(p => p.PhyCode == "P0097").ToList().ForEach(p =>
  6567. {
  6568. p.Value1 = list.Where(q => q.PhyCode == "P0057" || q.PhyCode == "P0061").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(B+D)粗系总和
  6569. });
  6570. ultraGrid8.Refresh();
  6571. }
  6572. }
  6573. private void ultraGrid21_CellChange(object sender, CellEventArgs e)
  6574. {
  6575. this.ultraGrid21.UpdateData();
  6576. if (e.Cell.Column.Key == "Value1")
  6577. {
  6578. List<PipeCheckconsignPhydetailEntity> list = PipeCheckconsignPhydetailEntityJZWbindingSource.DataSource as List<PipeCheckconsignPhydetailEntity>;
  6579. list.Where(p => p.PhyCode == "P0064").ToList().ForEach(p =>
  6580. {
  6581. 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)细系总和
  6582. });
  6583. list.Where(p => p.PhyCode == "P0065").ToList().ForEach(p =>
  6584. {
  6585. 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)粗系总和
  6586. });
  6587. list.Where(p => p.PhyCode == "P0069").ToList().ForEach(p =>
  6588. {
  6589. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+C)粗系总和
  6590. });
  6591. list.Where(p => p.PhyCode == "P0070").ToList().ForEach(p =>
  6592. {
  6593. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0059").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+C)细系总和
  6594. });
  6595. list.Where(p => p.PhyCode == "P0071").ToList().ForEach(p =>
  6596. {
  6597. 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)细系总和
  6598. });
  6599. list.Where(p => p.PhyCode == "P0072").ToList().ForEach(p =>
  6600. {
  6601. 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)粗系总和
  6602. });
  6603. list.Where(p => p.PhyCode == "P0085").ToList().ForEach(p =>
  6604. {
  6605. 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)粗细系总和
  6606. });
  6607. list.Where(p => p.PhyCode == "P0090").ToList().ForEach(p =>
  6608. {
  6609. p.Value1 = list.Where(q => q.PhyCode == "P0056" || q.PhyCode == "P0058").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B)粗系总和
  6610. });
  6611. list.Where(p => p.PhyCode == "P0091").ToList().ForEach(p =>
  6612. {
  6613. p.Value1 = list.Where(q => q.PhyCode == "P0052" || q.PhyCode == "P0057").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(A+B)细系总和
  6614. });
  6615. list.Where(p => p.PhyCode == "P0096").ToList().ForEach(p =>
  6616. {
  6617. p.Value1 = list.Where(q => q.PhyCode == "P0058" || q.PhyCode == "P0062").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(B+D)粗系总和
  6618. });
  6619. list.Where(p => p.PhyCode == "P0097").ToList().ForEach(p =>
  6620. {
  6621. p.Value1 = list.Where(q => q.PhyCode == "P0057" || q.PhyCode == "P0061").Sum(q => double.Parse(q.Value1.ToString3())).ToString();//(B+D)粗系总和
  6622. });
  6623. ultraGrid21.Refresh();
  6624. }
  6625. }
  6626. private void ultraGrid10_CellChange(object sender, CellEventArgs e)
  6627. {
  6628. this.ultraGrid10.UpdateData();
  6629. if (e.Cell.Column.Key == "Value1")
  6630. {
  6631. if (StringUtil.IsDouble(e.Cell.Row.Cells["Value1"].Value.ToString3())) return;
  6632. }
  6633. }
  6634. private void chkRegTime_CheckedChanged(object sender, EventArgs e)
  6635. {
  6636. this.RegStartTime.Enabled = this.RegEndTime.Enabled = this.chkRegTime.Checked;
  6637. }
  6638. private void chkCheckNo_CheckedChanged(object sender, EventArgs e)
  6639. {
  6640. this.txtCheckNo.Enabled = this.chkCheckNo.Checked;
  6641. }
  6642. private void chkJudgeNo_CheckedChanged(object sender, EventArgs e)
  6643. {
  6644. this.txtJudgeNo.Enabled = this.chkJudgeNo.Checked;
  6645. }
  6646. private void chkSteel_CheckedChanged(object sender, EventArgs e)
  6647. {
  6648. this.txtSteel.Enabled = this.chkSteel.Checked;
  6649. }
  6650. private void chkGroup_CheckedChanged(object sender, EventArgs e)
  6651. {
  6652. this.cmbGroup.Enabled = this.chkGroup.Checked;
  6653. }
  6654. private void chkSampleNo_CheckedChanged(object sender, EventArgs e)
  6655. {
  6656. this.txtSampleNo.Enabled = this.chkSampleNo.Checked;
  6657. }
  6658. private void chkOrderNo_CheckedChanged(object sender, EventArgs e)
  6659. {
  6660. this.txtOrderNo.Enabled = this.chkOrderNo.Checked;
  6661. }
  6662. private void chkSpec_CheckedChanged(object sender, EventArgs e)
  6663. {
  6664. this.txtSpec.Enabled = this.chkSpec.Checked;
  6665. }
  6666. private void ultraGrid24_AfterRowActivate(object sender, EventArgs e)
  6667. {
  6668. this.ultraGrid24.UpdateData();
  6669. UltraGridRow row = this.ultraGrid24.ActiveRow;
  6670. if (row == null) return;
  6671. ultraTxtYbEuestion.Text = row.Cells["CalculationFormula"].Text;
  6672. ultraTxtYbC.Text = row.Cells["Value7"].Text;
  6673. ultraTxtYbSpac.Text = row.Cells["Value8"].Text;
  6674. ultraTxtYbQualfiled.Text = row.Cells["IsGood"].Text;
  6675. ultraTxtYbDefect.Text = row.Cells["IsDefect"].Text;
  6676. ultraTxtYbMemo.Text = row.Cells["Remark"].Text;
  6677. }
  6678. private void ultraGrid25_AfterRowActivate(object sender, EventArgs e)
  6679. {
  6680. this.ultraGrid25.UpdateData();
  6681. UltraGridRow row = this.ultraGrid25.ActiveRow;
  6682. if (row == null) return;
  6683. ultraTxtWqDiameter.Text = row.Cells["Value9"].Text;
  6684. ultraTxtWqAngle.Text = row.Cells["Value10"].Text;
  6685. ultraTxtWqQualfiled.Text = row.Cells["IsGood"].Text;
  6686. ultraTxtWqMemo.Text = row.Cells["Remark"].Text;
  6687. }
  6688. private void ultraGrid26_AfterRowActivate(object sender, EventArgs e)
  6689. {
  6690. this.ultraGrid26.UpdateData();
  6691. UltraGridRow row = this.ultraGrid26.ActiveRow;
  6692. if (row == null) return;
  6693. ultraTxtKkTop.Text = row.Cells["Value11"].Text;
  6694. ultraTxtKkFlarRate.Text = row.Cells["Value12"].Text;
  6695. ultraTxtKkGood.Text = row.Cells["IsGood"].Text;
  6696. ultraTxtKkMemo.Text = row.Cells["Remark"].Text;
  6697. }
  6698. private void ultraComMethod_ValueChanged(object sender, EventArgs e)
  6699. {
  6700. ultraComMethodName.Clear();
  6701. if (String.IsNullOrEmpty(this.ultraComMethod.Value.ToString2()))
  6702. return;
  6703. DataTable ds = PublicServer.GetData("com.steering.lims.data.pipe.FrmDataCJBase.doQueryMothName", new object[] { this.ultraComMethod.Value.ToString2() }, ob);
  6704. if(ds.Rows.Count > 0)
  6705. {
  6706. ultraComMethodName.DataSource = ds;
  6707. ultraComMethodName.ValueMember = "STD_ID";
  6708. ultraComMethodName.SelectedIndex = 0;
  6709. }
  6710. }
  6711. private void chkIsProuctor_CheckedChanged(object sender, EventArgs e)
  6712. {
  6713. this.cmbIsProductor.Enabled = this.chkIsProuctor.Checked;
  6714. }
  6715. private void chkType_CheckedChanged(object sender, EventArgs e)
  6716. {
  6717. this.cmbType.Enabled = this.chkType.Checked;
  6718. }
  6719. private void chkPrintK_CheckedChanged(object sender, EventArgs e)
  6720. {
  6721. this.cmbPrintK.Enabled = this.chkPrintK.Checked;
  6722. }
  6723. private void ultraGrid53_CellChange(object sender, CellEventArgs e)
  6724. {
  6725. this.ultraGrid53.UpdateData();
  6726. UltraGridRow ur = this.ultraGrid53.ActiveRow;
  6727. int m = 0;
  6728. double min = 0.0;
  6729. if (e.Cell.Column.Key == "Value1" || e.Cell.Column.Key == "Value2" || e.Cell.Column.Key == "Value3")
  6730. {
  6731. 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()))
  6732. {
  6733. return;
  6734. }
  6735. min = double.Parse(ur.Cells["Value1"].Text.ToString3());
  6736. if (double.Parse(ur.Cells["Value2"].Text.ToString3()) < min)
  6737. {
  6738. min = double.Parse(ur.Cells["Value2"].Text.ToString3());
  6739. }
  6740. if (double.Parse(ur.Cells["Value3"].Text.ToString3()) < min)
  6741. {
  6742. min = double.Parse(ur.Cells["Value3"].Text.ToString3());
  6743. }
  6744. ur.Cells["AverageValue"].Value = Math.Round(min, 3).ToString();
  6745. }
  6746. }
  6747. private void ultraGrid55_CellChange(object sender, CellEventArgs e)
  6748. {
  6749. this.ultraGrid55.UpdateData();
  6750. UltraGridRow ur = this.ultraGrid55.ActiveRow;
  6751. int m = 0;
  6752. double min = 0.0;
  6753. if (e.Cell.Column.Key == "Value1" || e.Cell.Column.Key == "Value2" || e.Cell.Column.Key == "Value3")
  6754. {
  6755. 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()))
  6756. {
  6757. return;
  6758. }
  6759. min = double.Parse(ur.Cells["Value1"].Text.ToString3());
  6760. if (double.Parse(ur.Cells["Value2"].Text.ToString3()) < min)
  6761. {
  6762. min = double.Parse(ur.Cells["Value2"].Text.ToString3());
  6763. }
  6764. if (double.Parse(ur.Cells["Value3"].Text.ToString3()) < min)
  6765. {
  6766. min = double.Parse(ur.Cells["Value3"].Text.ToString3());
  6767. }
  6768. ur.Cells["AverageValue"].Value = Math.Round(min, 3).ToString();
  6769. }
  6770. }
  6771. private void ultraGrid13_AfterRowActivate(object sender, EventArgs e)
  6772. {
  6773. this.ultraGrid13.UpdateData();
  6774. UltraGridRow ur = this.ultraGrid13.ActiveRow;
  6775. if (ur.Cells["PhyCode"].Text.ToString().Equals("P0048"))
  6776. {
  6777. this.TxtYbDefect.Enabled = false;
  6778. }
  6779. else
  6780. {
  6781. this.TxtYbDefect.Enabled = true;
  6782. }
  6783. }
  6784. private void ultraGrid58_CellChange(object sender, CellEventArgs e)
  6785. {
  6786. int m = 1;
  6787. foreach (UltraGridRow row in this.ultraGrid58.Rows)
  6788. {
  6789. m = 1;
  6790. //落锤试验DWTT 自动计算
  6791. if (row.Cells["PhyCodeMin"].Text.ToString().Equals("R0057"))
  6792. {
  6793. if (e.Cell.Column.Key == "Value1")
  6794. {
  6795. if (!StringUtil.IsInt(row.Cells["Value1"].Text.ToString()) || int.Parse(row.Cells["Value1"].Text.ToString3()) > 100 || int.Parse(row.Cells["Value1"].Text.ToString3()) < 0)
  6796. {
  6797. MessageUtil.ShowTips("请输入0到100之间的数字!");
  6798. return;
  6799. }
  6800. if (row.Cells["Value2"].Text != "")
  6801. {
  6802. m = m + 1;
  6803. }
  6804. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3())) / m)).ToString();
  6805. }
  6806. if (e.Cell.Column.Key == "Value2")
  6807. {
  6808. if (!StringUtil.IsInt(row.Cells["Value2"].Text.ToString()) || int.Parse(row.Cells["Value2"].Text.ToString3()) > 100 || int.Parse(row.Cells["Value2"].Text.ToString3()) < 0)
  6809. {
  6810. MessageUtil.ShowTips("请输入0到100之间的数字!");
  6811. return;
  6812. }
  6813. if (row.Cells["Value1"].Text != "")
  6814. {
  6815. m = m + 1;
  6816. }
  6817. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3())) / m)).ToString();
  6818. }
  6819. }
  6820. }
  6821. }
  6822. private void ultraTabControl2_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  6823. {
  6824. }
  6825. private void ultraGrid59_CellChange(object sender, CellEventArgs e)
  6826. {
  6827. // this.ultraGrid59.UpdateData();
  6828. int m = 1;
  6829. foreach (UltraGridRow row in this.ultraGrid59.Rows)
  6830. {
  6831. m = 1;
  6832. //落锤试验DWTT 自动计算
  6833. if (row.Cells["PhyCodeMin"].Text.ToString().Equals("R0057"))
  6834. {
  6835. if (e.Cell.Column.Key == "Value1")
  6836. {
  6837. if (!StringUtil.IsInt(row.Cells["Value1"].Text.ToString()) || int.Parse(row.Cells["Value1"].Text.ToString3()) > 100 || int.Parse(row.Cells["Value1"].Text.ToString3()) < 0)
  6838. {
  6839. MessageUtil.ShowTips("请输入0到100之间的数字!");
  6840. return;
  6841. }
  6842. if (row.Cells["Value2"].Text != "")
  6843. {
  6844. m = m + 1;
  6845. }
  6846. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3())) / m)).ToString();
  6847. }
  6848. if (e.Cell.Column.Key == "Value2")
  6849. {
  6850. if (!StringUtil.IsInt(row.Cells["Value2"].Text.ToString()) || int.Parse(row.Cells["Value2"].Text.ToString3()) > 100 || int.Parse(row.Cells["Value2"].Text.ToString3()) < 0)
  6851. {
  6852. MessageUtil.ShowTips("请输入0到100之间的数字!");
  6853. return;
  6854. }
  6855. if (row.Cells["Value1"].Text != "")
  6856. {
  6857. m = m + 1;
  6858. }
  6859. row.Cells["AverageValue"].Value = Math.Round(((double.Parse(row.Cells["Value1"].Text.Trim().ToString3()) + double.Parse(row.Cells["Value2"].Text.ToString3())) / m)).ToString();
  6860. }
  6861. }
  6862. }
  6863. }
  6864. private void ultraGrid59_AfterRowActivate(object sender, EventArgs e)
  6865. {
  6866. this.ultraGrid59.UpdateData();
  6867. UltraGridRow row = this.ultraGrid59.ActiveRow;
  6868. if (row == null) return;
  6869. ultraSAMPLE_JB.Text = row.Cells["SampleJb"].Text;
  6870. ultraNOTCH_SHAPE.Text = row.Cells["NotchShape"].Text;
  6871. ultraNOTCH_TYPE.Text = row.Cells["NotchType"].Text;
  6872. }
  6873. private void ultraTabControl3_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
  6874. {
  6875. }
  6876. }
  6877. }