ЛяховDataSet.Designer.cs 447 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // Этот код создан программой.
  4. // Исполняемая версия:4.0.30319.42000
  5. //
  6. // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
  7. // повторной генерации кода.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. #pragma warning disable 1591
  11. namespace Lyakhov_Tovar {
  12. /// <summary>
  13. ///Represents a strongly typed in-memory cache of data.
  14. ///</summary>
  15. [global::System.Serializable()]
  16. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  17. [global::System.ComponentModel.ToolboxItem(true)]
  18. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
  19. [global::System.Xml.Serialization.XmlRootAttribute("ЛяховDataSet")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class ЛяховDataSet : global::System.Data.DataSet {
  22. private Заказ_товараDataTable tableЗаказ_товара;
  23. private НакладнаяDataTable tableНакладная;
  24. private ПоставщикDataTable tableПоставщик;
  25. private Продажа_товараDataTable tableПродажа_товара;
  26. private СотрудникDataTable tableСотрудник;
  27. private ТоварыDataTable tableТовары;
  28. private global::System.Data.DataRelation relationFK_Заказ_товара_Сотрудник;
  29. private global::System.Data.DataRelation relationFK_Накладная_Сотрудник;
  30. private global::System.Data.DataRelation relationFK_Поставщик_Заказ_товара;
  31. private global::System.Data.DataRelation relationFK_Поставщик_Накладная;
  32. private global::System.Data.DataRelation relationFK_Продажа_товара_Сотрудник;
  33. private global::System.Data.DataRelation relationFK_Продажа_товара_Товары;
  34. private global::System.Data.DataRelation relationFK_Товары_Заказ_товара;
  35. private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  36. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  37. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  38. public ЛяховDataSet() {
  39. this.BeginInit();
  40. this.InitClass();
  41. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  42. base.Tables.CollectionChanged += schemaChangedHandler;
  43. base.Relations.CollectionChanged += schemaChangedHandler;
  44. this.EndInit();
  45. }
  46. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  47. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  48. protected ЛяховDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  49. base(info, context, false) {
  50. if ((this.IsBinarySerialized(info, context) == true)) {
  51. this.InitVars(false);
  52. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  53. this.Tables.CollectionChanged += schemaChangedHandler1;
  54. this.Relations.CollectionChanged += schemaChangedHandler1;
  55. return;
  56. }
  57. string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
  58. if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  59. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  60. ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  61. if ((ds.Tables["Заказ товара"] != null)) {
  62. base.Tables.Add(new Заказ_товараDataTable(ds.Tables["Заказ товара"]));
  63. }
  64. if ((ds.Tables["Накладная"] != null)) {
  65. base.Tables.Add(new НакладнаяDataTable(ds.Tables["Накладная"]));
  66. }
  67. if ((ds.Tables["Поставщик"] != null)) {
  68. base.Tables.Add(new ПоставщикDataTable(ds.Tables["Поставщик"]));
  69. }
  70. if ((ds.Tables["Продажа товара"] != null)) {
  71. base.Tables.Add(new Продажа_товараDataTable(ds.Tables["Продажа товара"]));
  72. }
  73. if ((ds.Tables["Сотрудник"] != null)) {
  74. base.Tables.Add(new СотрудникDataTable(ds.Tables["Сотрудник"]));
  75. }
  76. if ((ds.Tables["Товары"] != null)) {
  77. base.Tables.Add(new ТоварыDataTable(ds.Tables["Товары"]));
  78. }
  79. this.DataSetName = ds.DataSetName;
  80. this.Prefix = ds.Prefix;
  81. this.Namespace = ds.Namespace;
  82. this.Locale = ds.Locale;
  83. this.CaseSensitive = ds.CaseSensitive;
  84. this.EnforceConstraints = ds.EnforceConstraints;
  85. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  86. this.InitVars();
  87. }
  88. else {
  89. this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  90. }
  91. this.GetSerializationData(info, context);
  92. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  93. base.Tables.CollectionChanged += schemaChangedHandler;
  94. this.Relations.CollectionChanged += schemaChangedHandler;
  95. }
  96. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  97. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  98. [global::System.ComponentModel.Browsable(false)]
  99. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  100. public Заказ_товараDataTable Заказ_товара {
  101. get {
  102. return this.tableЗаказ_товара;
  103. }
  104. }
  105. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  106. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  107. [global::System.ComponentModel.Browsable(false)]
  108. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  109. public НакладнаяDataTable Накладная {
  110. get {
  111. return this.tableНакладная;
  112. }
  113. }
  114. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  115. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  116. [global::System.ComponentModel.Browsable(false)]
  117. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  118. public ПоставщикDataTable Поставщик {
  119. get {
  120. return this.tableПоставщик;
  121. }
  122. }
  123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  124. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  125. [global::System.ComponentModel.Browsable(false)]
  126. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  127. public Продажа_товараDataTable Продажа_товара {
  128. get {
  129. return this.tableПродажа_товара;
  130. }
  131. }
  132. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  133. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  134. [global::System.ComponentModel.Browsable(false)]
  135. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  136. public СотрудникDataTable Сотрудник {
  137. get {
  138. return this.tableСотрудник;
  139. }
  140. }
  141. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  142. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  143. [global::System.ComponentModel.Browsable(false)]
  144. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  145. public ТоварыDataTable Товары {
  146. get {
  147. return this.tableТовары;
  148. }
  149. }
  150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  151. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  152. [global::System.ComponentModel.BrowsableAttribute(true)]
  153. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
  154. public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
  155. get {
  156. return this._schemaSerializationMode;
  157. }
  158. set {
  159. this._schemaSerializationMode = value;
  160. }
  161. }
  162. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  163. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  164. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  165. public new global::System.Data.DataTableCollection Tables {
  166. get {
  167. return base.Tables;
  168. }
  169. }
  170. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  171. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  172. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  173. public new global::System.Data.DataRelationCollection Relations {
  174. get {
  175. return base.Relations;
  176. }
  177. }
  178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  179. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  180. protected override void InitializeDerivedDataSet() {
  181. this.BeginInit();
  182. this.InitClass();
  183. this.EndInit();
  184. }
  185. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  186. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  187. public override global::System.Data.DataSet Clone() {
  188. ЛяховDataSet cln = ((ЛяховDataSet)(base.Clone()));
  189. cln.InitVars();
  190. cln.SchemaSerializationMode = this.SchemaSerializationMode;
  191. return cln;
  192. }
  193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  194. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  195. protected override bool ShouldSerializeTables() {
  196. return false;
  197. }
  198. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  199. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  200. protected override bool ShouldSerializeRelations() {
  201. return false;
  202. }
  203. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  204. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  205. protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
  206. if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  207. this.Reset();
  208. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  209. ds.ReadXml(reader);
  210. if ((ds.Tables["Заказ товара"] != null)) {
  211. base.Tables.Add(new Заказ_товараDataTable(ds.Tables["Заказ товара"]));
  212. }
  213. if ((ds.Tables["Накладная"] != null)) {
  214. base.Tables.Add(new НакладнаяDataTable(ds.Tables["Накладная"]));
  215. }
  216. if ((ds.Tables["Поставщик"] != null)) {
  217. base.Tables.Add(new ПоставщикDataTable(ds.Tables["Поставщик"]));
  218. }
  219. if ((ds.Tables["Продажа товара"] != null)) {
  220. base.Tables.Add(new Продажа_товараDataTable(ds.Tables["Продажа товара"]));
  221. }
  222. if ((ds.Tables["Сотрудник"] != null)) {
  223. base.Tables.Add(new СотрудникDataTable(ds.Tables["Сотрудник"]));
  224. }
  225. if ((ds.Tables["Товары"] != null)) {
  226. base.Tables.Add(new ТоварыDataTable(ds.Tables["Товары"]));
  227. }
  228. this.DataSetName = ds.DataSetName;
  229. this.Prefix = ds.Prefix;
  230. this.Namespace = ds.Namespace;
  231. this.Locale = ds.Locale;
  232. this.CaseSensitive = ds.CaseSensitive;
  233. this.EnforceConstraints = ds.EnforceConstraints;
  234. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  235. this.InitVars();
  236. }
  237. else {
  238. this.ReadXml(reader);
  239. this.InitVars();
  240. }
  241. }
  242. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  243. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  244. protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
  245. global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
  246. this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
  247. stream.Position = 0;
  248. return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
  249. }
  250. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  251. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  252. internal void InitVars() {
  253. this.InitVars(true);
  254. }
  255. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  256. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  257. internal void InitVars(bool initTable) {
  258. this.tableЗаказ_товара = ((Заказ_товараDataTable)(base.Tables["Заказ товара"]));
  259. if ((initTable == true)) {
  260. if ((this.tableЗаказ_товара != null)) {
  261. this.tableЗаказ_товара.InitVars();
  262. }
  263. }
  264. this.tableНакладная = ((НакладнаяDataTable)(base.Tables["Накладная"]));
  265. if ((initTable == true)) {
  266. if ((this.tableНакладная != null)) {
  267. this.tableНакладная.InitVars();
  268. }
  269. }
  270. this.tableПоставщик = ((ПоставщикDataTable)(base.Tables["Поставщик"]));
  271. if ((initTable == true)) {
  272. if ((this.tableПоставщик != null)) {
  273. this.tableПоставщик.InitVars();
  274. }
  275. }
  276. this.tableПродажа_товара = ((Продажа_товараDataTable)(base.Tables["Продажа товара"]));
  277. if ((initTable == true)) {
  278. if ((this.tableПродажа_товара != null)) {
  279. this.tableПродажа_товара.InitVars();
  280. }
  281. }
  282. this.tableСотрудник = ((СотрудникDataTable)(base.Tables["Сотрудник"]));
  283. if ((initTable == true)) {
  284. if ((this.tableСотрудник != null)) {
  285. this.tableСотрудник.InitVars();
  286. }
  287. }
  288. this.tableТовары = ((ТоварыDataTable)(base.Tables["Товары"]));
  289. if ((initTable == true)) {
  290. if ((this.tableТовары != null)) {
  291. this.tableТовары.InitVars();
  292. }
  293. }
  294. this.relationFK_Заказ_товара_Сотрудник = this.Relations["FK_Заказ товара_Сотрудник"];
  295. this.relationFK_Накладная_Сотрудник = this.Relations["FK_Накладная_Сотрудник"];
  296. this.relationFK_Поставщик_Заказ_товара = this.Relations["FK_Поставщик_Заказ товара"];
  297. this.relationFK_Поставщик_Накладная = this.Relations["FK_Поставщик_Накладная"];
  298. this.relationFK_Продажа_товара_Сотрудник = this.Relations["FK_Продажа товара_Сотрудник"];
  299. this.relationFK_Продажа_товара_Товары = this.Relations["FK_Продажа товара_Товары"];
  300. this.relationFK_Товары_Заказ_товара = this.Relations["FK_Товары_Заказ товара"];
  301. }
  302. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  303. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  304. private void InitClass() {
  305. this.DataSetName = "ЛяховDataSet";
  306. this.Prefix = "";
  307. this.Namespace = "http://tempuri.org/ЛяховDataSet.xsd";
  308. this.EnforceConstraints = true;
  309. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  310. this.tableЗаказ_товара = new Заказ_товараDataTable();
  311. base.Tables.Add(this.tableЗаказ_товара);
  312. this.tableНакладная = new НакладнаяDataTable();
  313. base.Tables.Add(this.tableНакладная);
  314. this.tableПоставщик = new ПоставщикDataTable();
  315. base.Tables.Add(this.tableПоставщик);
  316. this.tableПродажа_товара = new Продажа_товараDataTable();
  317. base.Tables.Add(this.tableПродажа_товара);
  318. this.tableСотрудник = new СотрудникDataTable();
  319. base.Tables.Add(this.tableСотрудник);
  320. this.tableТовары = new ТоварыDataTable();
  321. base.Tables.Add(this.tableТовары);
  322. this.relationFK_Заказ_товара_Сотрудник = new global::System.Data.DataRelation("FK_Заказ товара_Сотрудник", new global::System.Data.DataColumn[] {
  323. this.tableСотрудник.Код_сотрудникаColumn}, new global::System.Data.DataColumn[] {
  324. this.tableЗаказ_товара.Код_сотрудникаColumn}, false);
  325. this.Relations.Add(this.relationFK_Заказ_товара_Сотрудник);
  326. this.relationFK_Накладная_Сотрудник = new global::System.Data.DataRelation("FK_Накладная_Сотрудник", new global::System.Data.DataColumn[] {
  327. this.tableСотрудник.Код_сотрудникаColumn}, new global::System.Data.DataColumn[] {
  328. this.tableНакладная.Код_сотрудникаColumn}, false);
  329. this.Relations.Add(this.relationFK_Накладная_Сотрудник);
  330. this.relationFK_Поставщик_Заказ_товара = new global::System.Data.DataRelation("FK_Поставщик_Заказ товара", new global::System.Data.DataColumn[] {
  331. this.tableЗаказ_товара.Код_заказаColumn}, new global::System.Data.DataColumn[] {
  332. this.tableПоставщик.Код_заказаColumn}, false);
  333. this.Relations.Add(this.relationFK_Поставщик_Заказ_товара);
  334. this.relationFK_Поставщик_Накладная = new global::System.Data.DataRelation("FK_Поставщик_Накладная", new global::System.Data.DataColumn[] {
  335. this.tableНакладная.Код_накладнойColumn}, new global::System.Data.DataColumn[] {
  336. this.tableПоставщик.Код_накладнойColumn}, false);
  337. this.Relations.Add(this.relationFK_Поставщик_Накладная);
  338. this.relationFK_Продажа_товара_Сотрудник = new global::System.Data.DataRelation("FK_Продажа товара_Сотрудник", new global::System.Data.DataColumn[] {
  339. this.tableСотрудник.Код_сотрудникаColumn}, new global::System.Data.DataColumn[] {
  340. this.tableПродажа_товара.Код_сотрудникаColumn}, false);
  341. this.Relations.Add(this.relationFK_Продажа_товара_Сотрудник);
  342. this.relationFK_Продажа_товара_Товары = new global::System.Data.DataRelation("FK_Продажа товара_Товары", new global::System.Data.DataColumn[] {
  343. this.tableТовары.Код_товараColumn}, new global::System.Data.DataColumn[] {
  344. this.tableПродажа_товара.Код_товараColumn}, false);
  345. this.Relations.Add(this.relationFK_Продажа_товара_Товары);
  346. this.relationFK_Товары_Заказ_товара = new global::System.Data.DataRelation("FK_Товары_Заказ товара", new global::System.Data.DataColumn[] {
  347. this.tableЗаказ_товара.Код_заказаColumn}, new global::System.Data.DataColumn[] {
  348. this.tableТовары.Код_заказаColumn}, false);
  349. this.Relations.Add(this.relationFK_Товары_Заказ_товара);
  350. }
  351. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  352. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  353. private bool ShouldSerializeЗаказ_товара() {
  354. return false;
  355. }
  356. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  357. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  358. private bool ShouldSerializeНакладная() {
  359. return false;
  360. }
  361. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  362. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  363. private bool ShouldSerializeПоставщик() {
  364. return false;
  365. }
  366. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  367. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  368. private bool ShouldSerializeПродажа_товара() {
  369. return false;
  370. }
  371. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  372. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  373. private bool ShouldSerializeСотрудник() {
  374. return false;
  375. }
  376. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  377. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  378. private bool ShouldSerializeТовары() {
  379. return false;
  380. }
  381. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  382. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  383. private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
  384. if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
  385. this.InitVars();
  386. }
  387. }
  388. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  389. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  390. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  391. ЛяховDataSet ds = new ЛяховDataSet();
  392. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  393. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  394. global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
  395. any.Namespace = ds.Namespace;
  396. sequence.Items.Add(any);
  397. type.Particle = sequence;
  398. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  399. if (xs.Contains(dsSchema.TargetNamespace)) {
  400. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  401. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  402. try {
  403. global::System.Xml.Schema.XmlSchema schema = null;
  404. dsSchema.Write(s1);
  405. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  406. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  407. s2.SetLength(0);
  408. schema.Write(s2);
  409. if ((s1.Length == s2.Length)) {
  410. s1.Position = 0;
  411. s2.Position = 0;
  412. for (; ((s1.Position != s1.Length)
  413. && (s1.ReadByte() == s2.ReadByte())); ) {
  414. ;
  415. }
  416. if ((s1.Position == s1.Length)) {
  417. return type;
  418. }
  419. }
  420. }
  421. }
  422. finally {
  423. if ((s1 != null)) {
  424. s1.Close();
  425. }
  426. if ((s2 != null)) {
  427. s2.Close();
  428. }
  429. }
  430. }
  431. xs.Add(dsSchema);
  432. return type;
  433. }
  434. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  435. public delegate void Заказ_товараRowChangeEventHandler(object sender, Заказ_товараRowChangeEvent e);
  436. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  437. public delegate void НакладнаяRowChangeEventHandler(object sender, НакладнаяRowChangeEvent e);
  438. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  439. public delegate void ПоставщикRowChangeEventHandler(object sender, ПоставщикRowChangeEvent e);
  440. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  441. public delegate void Продажа_товараRowChangeEventHandler(object sender, Продажа_товараRowChangeEvent e);
  442. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  443. public delegate void СотрудникRowChangeEventHandler(object sender, СотрудникRowChangeEvent e);
  444. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  445. public delegate void ТоварыRowChangeEventHandler(object sender, ТоварыRowChangeEvent e);
  446. /// <summary>
  447. ///Represents the strongly named DataTable class.
  448. ///</summary>
  449. [global::System.Serializable()]
  450. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  451. public partial class Заказ_товараDataTable : global::System.Data.TypedTableBase<Заказ_товараRow> {
  452. private global::System.Data.DataColumn columnКод_сотрудника;
  453. private global::System.Data.DataColumn columnНаименование_товара;
  454. private global::System.Data.DataColumn columnКоличество;
  455. private global::System.Data.DataColumn columnКод_поставщика;
  456. private global::System.Data.DataColumn columnКод_заказа;
  457. private global::System.Data.DataColumn columnКод_товара;
  458. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  459. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  460. public Заказ_товараDataTable() {
  461. this.TableName = "Заказ товара";
  462. this.BeginInit();
  463. this.InitClass();
  464. this.EndInit();
  465. }
  466. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  467. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  468. internal Заказ_товараDataTable(global::System.Data.DataTable table) {
  469. this.TableName = table.TableName;
  470. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  471. this.CaseSensitive = table.CaseSensitive;
  472. }
  473. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  474. this.Locale = table.Locale;
  475. }
  476. if ((table.Namespace != table.DataSet.Namespace)) {
  477. this.Namespace = table.Namespace;
  478. }
  479. this.Prefix = table.Prefix;
  480. this.MinimumCapacity = table.MinimumCapacity;
  481. }
  482. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  483. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  484. protected Заказ_товараDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  485. base(info, context) {
  486. this.InitVars();
  487. }
  488. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  489. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  490. public global::System.Data.DataColumn Код_сотрудникаColumn {
  491. get {
  492. return this.columnКод_сотрудника;
  493. }
  494. }
  495. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  496. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  497. public global::System.Data.DataColumn Наименование_товараColumn {
  498. get {
  499. return this.columnНаименование_товара;
  500. }
  501. }
  502. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  503. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  504. public global::System.Data.DataColumn КоличествоColumn {
  505. get {
  506. return this.columnКоличество;
  507. }
  508. }
  509. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  510. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  511. public global::System.Data.DataColumn Код_поставщикаColumn {
  512. get {
  513. return this.columnКод_поставщика;
  514. }
  515. }
  516. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  517. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  518. public global::System.Data.DataColumn Код_заказаColumn {
  519. get {
  520. return this.columnКод_заказа;
  521. }
  522. }
  523. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  524. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  525. public global::System.Data.DataColumn Код_товараColumn {
  526. get {
  527. return this.columnКод_товара;
  528. }
  529. }
  530. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  531. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  532. [global::System.ComponentModel.Browsable(false)]
  533. public int Count {
  534. get {
  535. return this.Rows.Count;
  536. }
  537. }
  538. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  539. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  540. public Заказ_товараRow this[int index] {
  541. get {
  542. return ((Заказ_товараRow)(this.Rows[index]));
  543. }
  544. }
  545. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  546. public event Заказ_товараRowChangeEventHandler Заказ_товараRowChanging;
  547. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  548. public event Заказ_товараRowChangeEventHandler Заказ_товараRowChanged;
  549. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  550. public event Заказ_товараRowChangeEventHandler Заказ_товараRowDeleting;
  551. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  552. public event Заказ_товараRowChangeEventHandler Заказ_товараRowDeleted;
  553. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  554. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  555. public void AddЗаказ_товараRow(Заказ_товараRow row) {
  556. this.Rows.Add(row);
  557. }
  558. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  559. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  560. public Заказ_товараRow AddЗаказ_товараRow(СотрудникRow parentСотрудникRowByFK_Заказ_товара_Сотрудник, string Наименование_товара, int Количество, int Код_поставщика, int Код_товара) {
  561. Заказ_товараRow rowЗаказ_товараRow = ((Заказ_товараRow)(this.NewRow()));
  562. object[] columnValuesArray = new object[] {
  563. null,
  564. Наименование_товара,
  565. Количество,
  566. Код_поставщика,
  567. null,
  568. Код_товара};
  569. if ((parentСотрудникRowByFK_Заказ_товара_Сотрудник != null)) {
  570. columnValuesArray[0] = parentСотрудникRowByFK_Заказ_товара_Сотрудник[4];
  571. }
  572. rowЗаказ_товараRow.ItemArray = columnValuesArray;
  573. this.Rows.Add(rowЗаказ_товараRow);
  574. return rowЗаказ_товараRow;
  575. }
  576. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  577. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  578. public Заказ_товараRow FindByКод_заказа(int Код_заказа) {
  579. return ((Заказ_товараRow)(this.Rows.Find(new object[] {
  580. Код_заказа})));
  581. }
  582. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  583. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  584. public override global::System.Data.DataTable Clone() {
  585. Заказ_товараDataTable cln = ((Заказ_товараDataTable)(base.Clone()));
  586. cln.InitVars();
  587. return cln;
  588. }
  589. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  590. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  591. protected override global::System.Data.DataTable CreateInstance() {
  592. return new Заказ_товараDataTable();
  593. }
  594. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  595. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  596. internal void InitVars() {
  597. this.columnКод_сотрудника = base.Columns["Код_сотрудника"];
  598. this.columnНаименование_товара = base.Columns["Наименование_товара"];
  599. this.columnКоличество = base.Columns["Количество"];
  600. this.columnКод_поставщика = base.Columns["Код_поставщика"];
  601. this.columnКод_заказа = base.Columns["Код_заказа"];
  602. this.columnКод_товара = base.Columns["Код_товара"];
  603. }
  604. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  605. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  606. private void InitClass() {
  607. this.columnКод_сотрудника = new global::System.Data.DataColumn("Код_сотрудника", typeof(int), null, global::System.Data.MappingType.Element);
  608. base.Columns.Add(this.columnКод_сотрудника);
  609. this.columnНаименование_товара = new global::System.Data.DataColumn("Наименование_товара", typeof(string), null, global::System.Data.MappingType.Element);
  610. base.Columns.Add(this.columnНаименование_товара);
  611. this.columnКоличество = new global::System.Data.DataColumn("Количество", typeof(int), null, global::System.Data.MappingType.Element);
  612. base.Columns.Add(this.columnКоличество);
  613. this.columnКод_поставщика = new global::System.Data.DataColumn("Код_поставщика", typeof(int), null, global::System.Data.MappingType.Element);
  614. base.Columns.Add(this.columnКод_поставщика);
  615. this.columnКод_заказа = new global::System.Data.DataColumn("Код_заказа", typeof(int), null, global::System.Data.MappingType.Element);
  616. base.Columns.Add(this.columnКод_заказа);
  617. this.columnКод_товара = new global::System.Data.DataColumn("Код_товара", typeof(int), null, global::System.Data.MappingType.Element);
  618. base.Columns.Add(this.columnКод_товара);
  619. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  620. this.columnКод_заказа}, true));
  621. this.columnКод_сотрудника.AllowDBNull = false;
  622. this.columnНаименование_товара.AllowDBNull = false;
  623. this.columnНаименование_товара.MaxLength = 50;
  624. this.columnКоличество.AllowDBNull = false;
  625. this.columnКод_поставщика.AllowDBNull = false;
  626. this.columnКод_заказа.AutoIncrement = true;
  627. this.columnКод_заказа.AutoIncrementSeed = -1;
  628. this.columnКод_заказа.AutoIncrementStep = -1;
  629. this.columnКод_заказа.AllowDBNull = false;
  630. this.columnКод_заказа.ReadOnly = true;
  631. this.columnКод_заказа.Unique = true;
  632. this.columnКод_товара.AllowDBNull = false;
  633. }
  634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  635. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  636. public Заказ_товараRow NewЗаказ_товараRow() {
  637. return ((Заказ_товараRow)(this.NewRow()));
  638. }
  639. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  640. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  641. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  642. return new Заказ_товараRow(builder);
  643. }
  644. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  645. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  646. protected override global::System.Type GetRowType() {
  647. return typeof(Заказ_товараRow);
  648. }
  649. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  650. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  651. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  652. base.OnRowChanged(e);
  653. if ((this.Заказ_товараRowChanged != null)) {
  654. this.Заказ_товараRowChanged(this, new Заказ_товараRowChangeEvent(((Заказ_товараRow)(e.Row)), e.Action));
  655. }
  656. }
  657. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  658. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  659. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  660. base.OnRowChanging(e);
  661. if ((this.Заказ_товараRowChanging != null)) {
  662. this.Заказ_товараRowChanging(this, new Заказ_товараRowChangeEvent(((Заказ_товараRow)(e.Row)), e.Action));
  663. }
  664. }
  665. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  666. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  667. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  668. base.OnRowDeleted(e);
  669. if ((this.Заказ_товараRowDeleted != null)) {
  670. this.Заказ_товараRowDeleted(this, new Заказ_товараRowChangeEvent(((Заказ_товараRow)(e.Row)), e.Action));
  671. }
  672. }
  673. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  674. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  675. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  676. base.OnRowDeleting(e);
  677. if ((this.Заказ_товараRowDeleting != null)) {
  678. this.Заказ_товараRowDeleting(this, new Заказ_товараRowChangeEvent(((Заказ_товараRow)(e.Row)), e.Action));
  679. }
  680. }
  681. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  682. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  683. public void RemoveЗаказ_товараRow(Заказ_товараRow row) {
  684. this.Rows.Remove(row);
  685. }
  686. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  687. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  688. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  689. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  690. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  691. ЛяховDataSet ds = new ЛяховDataSet();
  692. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  693. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  694. any1.MinOccurs = new decimal(0);
  695. any1.MaxOccurs = decimal.MaxValue;
  696. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  697. sequence.Items.Add(any1);
  698. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  699. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  700. any2.MinOccurs = new decimal(1);
  701. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  702. sequence.Items.Add(any2);
  703. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  704. attribute1.Name = "namespace";
  705. attribute1.FixedValue = ds.Namespace;
  706. type.Attributes.Add(attribute1);
  707. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  708. attribute2.Name = "tableTypeName";
  709. attribute2.FixedValue = "Заказ_товараDataTable";
  710. type.Attributes.Add(attribute2);
  711. type.Particle = sequence;
  712. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  713. if (xs.Contains(dsSchema.TargetNamespace)) {
  714. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  715. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  716. try {
  717. global::System.Xml.Schema.XmlSchema schema = null;
  718. dsSchema.Write(s1);
  719. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  720. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  721. s2.SetLength(0);
  722. schema.Write(s2);
  723. if ((s1.Length == s2.Length)) {
  724. s1.Position = 0;
  725. s2.Position = 0;
  726. for (; ((s1.Position != s1.Length)
  727. && (s1.ReadByte() == s2.ReadByte())); ) {
  728. ;
  729. }
  730. if ((s1.Position == s1.Length)) {
  731. return type;
  732. }
  733. }
  734. }
  735. }
  736. finally {
  737. if ((s1 != null)) {
  738. s1.Close();
  739. }
  740. if ((s2 != null)) {
  741. s2.Close();
  742. }
  743. }
  744. }
  745. xs.Add(dsSchema);
  746. return type;
  747. }
  748. }
  749. /// <summary>
  750. ///Represents the strongly named DataTable class.
  751. ///</summary>
  752. [global::System.Serializable()]
  753. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  754. public partial class НакладнаяDataTable : global::System.Data.TypedTableBase<НакладнаяRow> {
  755. private global::System.Data.DataColumn columnНазвание_товара;
  756. private global::System.Data.DataColumn columnКоличество;
  757. private global::System.Data.DataColumn columnСтоимость;
  758. private global::System.Data.DataColumn columnДата_привоза_товара;
  759. private global::System.Data.DataColumn columnКод_поставщика;
  760. private global::System.Data.DataColumn columnКод_сотрудника;
  761. private global::System.Data.DataColumn columnКод_накладной;
  762. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  763. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  764. public НакладнаяDataTable() {
  765. this.TableName = "Накладная";
  766. this.BeginInit();
  767. this.InitClass();
  768. this.EndInit();
  769. }
  770. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  771. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  772. internal НакладнаяDataTable(global::System.Data.DataTable table) {
  773. this.TableName = table.TableName;
  774. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  775. this.CaseSensitive = table.CaseSensitive;
  776. }
  777. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  778. this.Locale = table.Locale;
  779. }
  780. if ((table.Namespace != table.DataSet.Namespace)) {
  781. this.Namespace = table.Namespace;
  782. }
  783. this.Prefix = table.Prefix;
  784. this.MinimumCapacity = table.MinimumCapacity;
  785. }
  786. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  787. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  788. protected НакладнаяDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  789. base(info, context) {
  790. this.InitVars();
  791. }
  792. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  793. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  794. public global::System.Data.DataColumn Название_товараColumn {
  795. get {
  796. return this.columnНазвание_товара;
  797. }
  798. }
  799. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  800. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  801. public global::System.Data.DataColumn КоличествоColumn {
  802. get {
  803. return this.columnКоличество;
  804. }
  805. }
  806. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  807. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  808. public global::System.Data.DataColumn СтоимостьColumn {
  809. get {
  810. return this.columnСтоимость;
  811. }
  812. }
  813. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  814. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  815. public global::System.Data.DataColumn Дата_привоза_товараColumn {
  816. get {
  817. return this.columnДата_привоза_товара;
  818. }
  819. }
  820. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  821. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  822. public global::System.Data.DataColumn Код_поставщикаColumn {
  823. get {
  824. return this.columnКод_поставщика;
  825. }
  826. }
  827. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  828. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  829. public global::System.Data.DataColumn Код_сотрудникаColumn {
  830. get {
  831. return this.columnКод_сотрудника;
  832. }
  833. }
  834. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  835. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  836. public global::System.Data.DataColumn Код_накладнойColumn {
  837. get {
  838. return this.columnКод_накладной;
  839. }
  840. }
  841. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  842. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  843. [global::System.ComponentModel.Browsable(false)]
  844. public int Count {
  845. get {
  846. return this.Rows.Count;
  847. }
  848. }
  849. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  850. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  851. public НакладнаяRow this[int index] {
  852. get {
  853. return ((НакладнаяRow)(this.Rows[index]));
  854. }
  855. }
  856. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  857. public event НакладнаяRowChangeEventHandler НакладнаяRowChanging;
  858. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  859. public event НакладнаяRowChangeEventHandler НакладнаяRowChanged;
  860. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  861. public event НакладнаяRowChangeEventHandler НакладнаяRowDeleting;
  862. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  863. public event НакладнаяRowChangeEventHandler НакладнаяRowDeleted;
  864. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  865. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  866. public void AddНакладнаяRow(НакладнаяRow row) {
  867. this.Rows.Add(row);
  868. }
  869. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  870. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  871. public НакладнаяRow AddНакладнаяRow(string Название_товара, int Количество, decimal Стоимость, System.DateTime Дата_привоза_товара, int Код_поставщика, СотрудникRow parentСотрудникRowByFK_Накладная_Сотрудник) {
  872. НакладнаяRow rowНакладнаяRow = ((НакладнаяRow)(this.NewRow()));
  873. object[] columnValuesArray = new object[] {
  874. Название_товара,
  875. Количество,
  876. Стоимость,
  877. Дата_привоза_товара,
  878. Код_поставщика,
  879. null,
  880. null};
  881. if ((parentСотрудникRowByFK_Накладная_Сотрудник != null)) {
  882. columnValuesArray[5] = parentСотрудникRowByFK_Накладная_Сотрудник[4];
  883. }
  884. rowНакладнаяRow.ItemArray = columnValuesArray;
  885. this.Rows.Add(rowНакладнаяRow);
  886. return rowНакладнаяRow;
  887. }
  888. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  889. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  890. public НакладнаяRow FindByКод_накладной(int Код_накладной) {
  891. return ((НакладнаяRow)(this.Rows.Find(new object[] {
  892. Код_накладной})));
  893. }
  894. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  895. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  896. public override global::System.Data.DataTable Clone() {
  897. НакладнаяDataTable cln = ((НакладнаяDataTable)(base.Clone()));
  898. cln.InitVars();
  899. return cln;
  900. }
  901. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  902. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  903. protected override global::System.Data.DataTable CreateInstance() {
  904. return new НакладнаяDataTable();
  905. }
  906. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  907. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  908. internal void InitVars() {
  909. this.columnНазвание_товара = base.Columns["Название_товара"];
  910. this.columnКоличество = base.Columns["Количество"];
  911. this.columnСтоимость = base.Columns["Стоимость"];
  912. this.columnДата_привоза_товара = base.Columns["Дата_привоза_товара"];
  913. this.columnКод_поставщика = base.Columns["Код_поставщика"];
  914. this.columnКод_сотрудника = base.Columns["Код_сотрудника"];
  915. this.columnКод_накладной = base.Columns["Код_накладной"];
  916. }
  917. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  918. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  919. private void InitClass() {
  920. this.columnНазвание_товара = new global::System.Data.DataColumn("Название_товара", typeof(string), null, global::System.Data.MappingType.Element);
  921. base.Columns.Add(this.columnНазвание_товара);
  922. this.columnКоличество = new global::System.Data.DataColumn("Количество", typeof(int), null, global::System.Data.MappingType.Element);
  923. base.Columns.Add(this.columnКоличество);
  924. this.columnСтоимость = new global::System.Data.DataColumn("Стоимость", typeof(decimal), null, global::System.Data.MappingType.Element);
  925. base.Columns.Add(this.columnСтоимость);
  926. this.columnДата_привоза_товара = new global::System.Data.DataColumn("Дата_привоза_товара", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
  927. base.Columns.Add(this.columnДата_привоза_товара);
  928. this.columnКод_поставщика = new global::System.Data.DataColumn("Код_поставщика", typeof(int), null, global::System.Data.MappingType.Element);
  929. base.Columns.Add(this.columnКод_поставщика);
  930. this.columnКод_сотрудника = new global::System.Data.DataColumn("Код_сотрудника", typeof(int), null, global::System.Data.MappingType.Element);
  931. base.Columns.Add(this.columnКод_сотрудника);
  932. this.columnКод_накладной = new global::System.Data.DataColumn("Код_накладной", typeof(int), null, global::System.Data.MappingType.Element);
  933. base.Columns.Add(this.columnКод_накладной);
  934. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  935. this.columnКод_накладной}, true));
  936. this.columnНазвание_товара.AllowDBNull = false;
  937. this.columnНазвание_товара.MaxLength = 50;
  938. this.columnКоличество.AllowDBNull = false;
  939. this.columnСтоимость.AllowDBNull = false;
  940. this.columnДата_привоза_товара.AllowDBNull = false;
  941. this.columnКод_поставщика.AllowDBNull = false;
  942. this.columnКод_сотрудника.AllowDBNull = false;
  943. this.columnКод_накладной.AutoIncrement = true;
  944. this.columnКод_накладной.AutoIncrementSeed = -1;
  945. this.columnКод_накладной.AutoIncrementStep = -1;
  946. this.columnКод_накладной.AllowDBNull = false;
  947. this.columnКод_накладной.ReadOnly = true;
  948. this.columnКод_накладной.Unique = true;
  949. }
  950. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  951. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  952. public НакладнаяRow NewНакладнаяRow() {
  953. return ((НакладнаяRow)(this.NewRow()));
  954. }
  955. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  956. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  957. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  958. return new НакладнаяRow(builder);
  959. }
  960. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  961. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  962. protected override global::System.Type GetRowType() {
  963. return typeof(НакладнаяRow);
  964. }
  965. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  966. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  967. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  968. base.OnRowChanged(e);
  969. if ((this.НакладнаяRowChanged != null)) {
  970. this.НакладнаяRowChanged(this, new НакладнаяRowChangeEvent(((НакладнаяRow)(e.Row)), e.Action));
  971. }
  972. }
  973. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  974. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  975. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  976. base.OnRowChanging(e);
  977. if ((this.НакладнаяRowChanging != null)) {
  978. this.НакладнаяRowChanging(this, new НакладнаяRowChangeEvent(((НакладнаяRow)(e.Row)), e.Action));
  979. }
  980. }
  981. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  982. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  983. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  984. base.OnRowDeleted(e);
  985. if ((this.НакладнаяRowDeleted != null)) {
  986. this.НакладнаяRowDeleted(this, new НакладнаяRowChangeEvent(((НакладнаяRow)(e.Row)), e.Action));
  987. }
  988. }
  989. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  990. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  991. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  992. base.OnRowDeleting(e);
  993. if ((this.НакладнаяRowDeleting != null)) {
  994. this.НакладнаяRowDeleting(this, new НакладнаяRowChangeEvent(((НакладнаяRow)(e.Row)), e.Action));
  995. }
  996. }
  997. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  998. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  999. public void RemoveНакладнаяRow(НакладнаяRow row) {
  1000. this.Rows.Remove(row);
  1001. }
  1002. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1003. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1004. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1005. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1006. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1007. ЛяховDataSet ds = new ЛяховDataSet();
  1008. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1009. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1010. any1.MinOccurs = new decimal(0);
  1011. any1.MaxOccurs = decimal.MaxValue;
  1012. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1013. sequence.Items.Add(any1);
  1014. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1015. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1016. any2.MinOccurs = new decimal(1);
  1017. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1018. sequence.Items.Add(any2);
  1019. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1020. attribute1.Name = "namespace";
  1021. attribute1.FixedValue = ds.Namespace;
  1022. type.Attributes.Add(attribute1);
  1023. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1024. attribute2.Name = "tableTypeName";
  1025. attribute2.FixedValue = "НакладнаяDataTable";
  1026. type.Attributes.Add(attribute2);
  1027. type.Particle = sequence;
  1028. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1029. if (xs.Contains(dsSchema.TargetNamespace)) {
  1030. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1031. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1032. try {
  1033. global::System.Xml.Schema.XmlSchema schema = null;
  1034. dsSchema.Write(s1);
  1035. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1036. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1037. s2.SetLength(0);
  1038. schema.Write(s2);
  1039. if ((s1.Length == s2.Length)) {
  1040. s1.Position = 0;
  1041. s2.Position = 0;
  1042. for (; ((s1.Position != s1.Length)
  1043. && (s1.ReadByte() == s2.ReadByte())); ) {
  1044. ;
  1045. }
  1046. if ((s1.Position == s1.Length)) {
  1047. return type;
  1048. }
  1049. }
  1050. }
  1051. }
  1052. finally {
  1053. if ((s1 != null)) {
  1054. s1.Close();
  1055. }
  1056. if ((s2 != null)) {
  1057. s2.Close();
  1058. }
  1059. }
  1060. }
  1061. xs.Add(dsSchema);
  1062. return type;
  1063. }
  1064. }
  1065. /// <summary>
  1066. ///Represents the strongly named DataTable class.
  1067. ///</summary>
  1068. [global::System.Serializable()]
  1069. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  1070. public partial class ПоставщикDataTable : global::System.Data.TypedTableBase<ПоставщикRow> {
  1071. private global::System.Data.DataColumn columnНазвание_фирмы_поставщика;
  1072. private global::System.Data.DataColumn columnКоличество_привезенного_товара;
  1073. private global::System.Data.DataColumn columnЦена_товара;
  1074. private global::System.Data.DataColumn columnАдрес;
  1075. private global::System.Data.DataColumn columnКод_поставщика;
  1076. private global::System.Data.DataColumn columnКод_заказа;
  1077. private global::System.Data.DataColumn columnКод_накладной;
  1078. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1079. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1080. public ПоставщикDataTable() {
  1081. this.TableName = "Поставщик";
  1082. this.BeginInit();
  1083. this.InitClass();
  1084. this.EndInit();
  1085. }
  1086. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1087. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1088. internal ПоставщикDataTable(global::System.Data.DataTable table) {
  1089. this.TableName = table.TableName;
  1090. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  1091. this.CaseSensitive = table.CaseSensitive;
  1092. }
  1093. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  1094. this.Locale = table.Locale;
  1095. }
  1096. if ((table.Namespace != table.DataSet.Namespace)) {
  1097. this.Namespace = table.Namespace;
  1098. }
  1099. this.Prefix = table.Prefix;
  1100. this.MinimumCapacity = table.MinimumCapacity;
  1101. }
  1102. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1103. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1104. protected ПоставщикDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  1105. base(info, context) {
  1106. this.InitVars();
  1107. }
  1108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1109. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1110. public global::System.Data.DataColumn Название_фирмы_поставщикаColumn {
  1111. get {
  1112. return this.columnНазвание_фирмы_поставщика;
  1113. }
  1114. }
  1115. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1116. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1117. public global::System.Data.DataColumn Количество_привезенного_товараColumn {
  1118. get {
  1119. return this.columnКоличество_привезенного_товара;
  1120. }
  1121. }
  1122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1123. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1124. public global::System.Data.DataColumn Цена_товараColumn {
  1125. get {
  1126. return this.columnЦена_товара;
  1127. }
  1128. }
  1129. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1130. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1131. public global::System.Data.DataColumn АдресColumn {
  1132. get {
  1133. return this.columnАдрес;
  1134. }
  1135. }
  1136. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1137. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1138. public global::System.Data.DataColumn Код_поставщикаColumn {
  1139. get {
  1140. return this.columnКод_поставщика;
  1141. }
  1142. }
  1143. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1144. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1145. public global::System.Data.DataColumn Код_заказаColumn {
  1146. get {
  1147. return this.columnКод_заказа;
  1148. }
  1149. }
  1150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1151. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1152. public global::System.Data.DataColumn Код_накладнойColumn {
  1153. get {
  1154. return this.columnКод_накладной;
  1155. }
  1156. }
  1157. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1158. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1159. [global::System.ComponentModel.Browsable(false)]
  1160. public int Count {
  1161. get {
  1162. return this.Rows.Count;
  1163. }
  1164. }
  1165. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1166. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1167. public ПоставщикRow this[int index] {
  1168. get {
  1169. return ((ПоставщикRow)(this.Rows[index]));
  1170. }
  1171. }
  1172. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1173. public event ПоставщикRowChangeEventHandler ПоставщикRowChanging;
  1174. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1175. public event ПоставщикRowChangeEventHandler ПоставщикRowChanged;
  1176. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1177. public event ПоставщикRowChangeEventHandler ПоставщикRowDeleting;
  1178. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1179. public event ПоставщикRowChangeEventHandler ПоставщикRowDeleted;
  1180. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1181. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1182. public void AddПоставщикRow(ПоставщикRow row) {
  1183. this.Rows.Add(row);
  1184. }
  1185. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1186. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1187. public ПоставщикRow AddПоставщикRow(string Название_фирмы_поставщика, int Количество_привезенного_товара, decimal Цена_товара, string Адрес, Заказ_товараRow parentЗаказ_товараRowByFK_Поставщик_Заказ_товара, НакладнаяRow parentНакладнаяRowByFK_Поставщик_Накладная) {
  1188. ПоставщикRow rowПоставщикRow = ((ПоставщикRow)(this.NewRow()));
  1189. object[] columnValuesArray = new object[] {
  1190. Название_фирмы_поставщика,
  1191. Количество_привезенного_товара,
  1192. Цена_товара,
  1193. Адрес,
  1194. null,
  1195. null,
  1196. null};
  1197. if ((parentЗаказ_товараRowByFK_Поставщик_Заказ_товара != null)) {
  1198. columnValuesArray[5] = parentЗаказ_товараRowByFK_Поставщик_Заказ_товара[4];
  1199. }
  1200. if ((parentНакладнаяRowByFK_Поставщик_Накладная != null)) {
  1201. columnValuesArray[6] = parentНакладнаяRowByFK_Поставщик_Накладная[6];
  1202. }
  1203. rowПоставщикRow.ItemArray = columnValuesArray;
  1204. this.Rows.Add(rowПоставщикRow);
  1205. return rowПоставщикRow;
  1206. }
  1207. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1208. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1209. public ПоставщикRow FindByКод_поставщика(int Код_поставщика) {
  1210. return ((ПоставщикRow)(this.Rows.Find(new object[] {
  1211. Код_поставщика})));
  1212. }
  1213. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1214. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1215. public override global::System.Data.DataTable Clone() {
  1216. ПоставщикDataTable cln = ((ПоставщикDataTable)(base.Clone()));
  1217. cln.InitVars();
  1218. return cln;
  1219. }
  1220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1221. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1222. protected override global::System.Data.DataTable CreateInstance() {
  1223. return new ПоставщикDataTable();
  1224. }
  1225. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1226. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1227. internal void InitVars() {
  1228. this.columnНазвание_фирмы_поставщика = base.Columns["Название_фирмы_поставщика"];
  1229. this.columnКоличество_привезенного_товара = base.Columns["Количество_привезенного_товара"];
  1230. this.columnЦена_товара = base.Columns["Цена_товара"];
  1231. this.columnАдрес = base.Columns["Адрес"];
  1232. this.columnКод_поставщика = base.Columns["Код_поставщика"];
  1233. this.columnКод_заказа = base.Columns["Код_заказа"];
  1234. this.columnКод_накладной = base.Columns["Код_накладной"];
  1235. }
  1236. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1237. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1238. private void InitClass() {
  1239. this.columnНазвание_фирмы_поставщика = new global::System.Data.DataColumn("Название_фирмы_поставщика", typeof(string), null, global::System.Data.MappingType.Element);
  1240. base.Columns.Add(this.columnНазвание_фирмы_поставщика);
  1241. this.columnКоличество_привезенного_товара = new global::System.Data.DataColumn("Количество_привезенного_товара", typeof(int), null, global::System.Data.MappingType.Element);
  1242. base.Columns.Add(this.columnКоличество_привезенного_товара);
  1243. this.columnЦена_товара = new global::System.Data.DataColumn("Цена_товара", typeof(decimal), null, global::System.Data.MappingType.Element);
  1244. base.Columns.Add(this.columnЦена_товара);
  1245. this.columnАдрес = new global::System.Data.DataColumn("Адрес", typeof(string), null, global::System.Data.MappingType.Element);
  1246. base.Columns.Add(this.columnАдрес);
  1247. this.columnКод_поставщика = new global::System.Data.DataColumn("Код_поставщика", typeof(int), null, global::System.Data.MappingType.Element);
  1248. base.Columns.Add(this.columnКод_поставщика);
  1249. this.columnКод_заказа = new global::System.Data.DataColumn("Код_заказа", typeof(int), null, global::System.Data.MappingType.Element);
  1250. base.Columns.Add(this.columnКод_заказа);
  1251. this.columnКод_накладной = new global::System.Data.DataColumn("Код_накладной", typeof(int), null, global::System.Data.MappingType.Element);
  1252. base.Columns.Add(this.columnКод_накладной);
  1253. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  1254. this.columnКод_поставщика}, true));
  1255. this.columnНазвание_фирмы_поставщика.AllowDBNull = false;
  1256. this.columnНазвание_фирмы_поставщика.MaxLength = 50;
  1257. this.columnКоличество_привезенного_товара.AllowDBNull = false;
  1258. this.columnЦена_товара.AllowDBNull = false;
  1259. this.columnАдрес.AllowDBNull = false;
  1260. this.columnАдрес.MaxLength = 50;
  1261. this.columnКод_поставщика.AutoIncrement = true;
  1262. this.columnКод_поставщика.AutoIncrementSeed = -1;
  1263. this.columnКод_поставщика.AutoIncrementStep = -1;
  1264. this.columnКод_поставщика.AllowDBNull = false;
  1265. this.columnКод_поставщика.ReadOnly = true;
  1266. this.columnКод_поставщика.Unique = true;
  1267. }
  1268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1269. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1270. public ПоставщикRow NewПоставщикRow() {
  1271. return ((ПоставщикRow)(this.NewRow()));
  1272. }
  1273. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1274. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1275. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  1276. return new ПоставщикRow(builder);
  1277. }
  1278. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1279. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1280. protected override global::System.Type GetRowType() {
  1281. return typeof(ПоставщикRow);
  1282. }
  1283. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1284. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1285. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  1286. base.OnRowChanged(e);
  1287. if ((this.ПоставщикRowChanged != null)) {
  1288. this.ПоставщикRowChanged(this, new ПоставщикRowChangeEvent(((ПоставщикRow)(e.Row)), e.Action));
  1289. }
  1290. }
  1291. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1292. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1293. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  1294. base.OnRowChanging(e);
  1295. if ((this.ПоставщикRowChanging != null)) {
  1296. this.ПоставщикRowChanging(this, new ПоставщикRowChangeEvent(((ПоставщикRow)(e.Row)), e.Action));
  1297. }
  1298. }
  1299. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1300. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1301. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  1302. base.OnRowDeleted(e);
  1303. if ((this.ПоставщикRowDeleted != null)) {
  1304. this.ПоставщикRowDeleted(this, new ПоставщикRowChangeEvent(((ПоставщикRow)(e.Row)), e.Action));
  1305. }
  1306. }
  1307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1308. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1309. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  1310. base.OnRowDeleting(e);
  1311. if ((this.ПоставщикRowDeleting != null)) {
  1312. this.ПоставщикRowDeleting(this, new ПоставщикRowChangeEvent(((ПоставщикRow)(e.Row)), e.Action));
  1313. }
  1314. }
  1315. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1316. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1317. public void RemoveПоставщикRow(ПоставщикRow row) {
  1318. this.Rows.Remove(row);
  1319. }
  1320. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1321. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1322. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1323. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1324. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1325. ЛяховDataSet ds = new ЛяховDataSet();
  1326. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1327. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1328. any1.MinOccurs = new decimal(0);
  1329. any1.MaxOccurs = decimal.MaxValue;
  1330. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1331. sequence.Items.Add(any1);
  1332. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1333. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1334. any2.MinOccurs = new decimal(1);
  1335. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1336. sequence.Items.Add(any2);
  1337. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1338. attribute1.Name = "namespace";
  1339. attribute1.FixedValue = ds.Namespace;
  1340. type.Attributes.Add(attribute1);
  1341. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1342. attribute2.Name = "tableTypeName";
  1343. attribute2.FixedValue = "ПоставщикDataTable";
  1344. type.Attributes.Add(attribute2);
  1345. type.Particle = sequence;
  1346. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1347. if (xs.Contains(dsSchema.TargetNamespace)) {
  1348. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1349. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1350. try {
  1351. global::System.Xml.Schema.XmlSchema schema = null;
  1352. dsSchema.Write(s1);
  1353. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1354. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1355. s2.SetLength(0);
  1356. schema.Write(s2);
  1357. if ((s1.Length == s2.Length)) {
  1358. s1.Position = 0;
  1359. s2.Position = 0;
  1360. for (; ((s1.Position != s1.Length)
  1361. && (s1.ReadByte() == s2.ReadByte())); ) {
  1362. ;
  1363. }
  1364. if ((s1.Position == s1.Length)) {
  1365. return type;
  1366. }
  1367. }
  1368. }
  1369. }
  1370. finally {
  1371. if ((s1 != null)) {
  1372. s1.Close();
  1373. }
  1374. if ((s2 != null)) {
  1375. s2.Close();
  1376. }
  1377. }
  1378. }
  1379. xs.Add(dsSchema);
  1380. return type;
  1381. }
  1382. }
  1383. /// <summary>
  1384. ///Represents the strongly named DataTable class.
  1385. ///</summary>
  1386. [global::System.Serializable()]
  1387. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  1388. public partial class Продажа_товараDataTable : global::System.Data.TypedTableBase<Продажа_товараRow> {
  1389. private global::System.Data.DataColumn columnКод_товара;
  1390. private global::System.Data.DataColumn columnКоличество;
  1391. private global::System.Data.DataColumn columnЦена;
  1392. private global::System.Data.DataColumn columnДата_продажи;
  1393. private global::System.Data.DataColumn columnВремя_продажи_товара;
  1394. private global::System.Data.DataColumn columnКод_сотрудника;
  1395. private global::System.Data.DataColumn columnКод_продажи;
  1396. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1397. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1398. public Продажа_товараDataTable() {
  1399. this.TableName = "Продажа товара";
  1400. this.BeginInit();
  1401. this.InitClass();
  1402. this.EndInit();
  1403. }
  1404. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1405. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1406. internal Продажа_товараDataTable(global::System.Data.DataTable table) {
  1407. this.TableName = table.TableName;
  1408. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  1409. this.CaseSensitive = table.CaseSensitive;
  1410. }
  1411. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  1412. this.Locale = table.Locale;
  1413. }
  1414. if ((table.Namespace != table.DataSet.Namespace)) {
  1415. this.Namespace = table.Namespace;
  1416. }
  1417. this.Prefix = table.Prefix;
  1418. this.MinimumCapacity = table.MinimumCapacity;
  1419. }
  1420. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1421. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1422. protected Продажа_товараDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  1423. base(info, context) {
  1424. this.InitVars();
  1425. }
  1426. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1427. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1428. public global::System.Data.DataColumn Код_товараColumn {
  1429. get {
  1430. return this.columnКод_товара;
  1431. }
  1432. }
  1433. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1434. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1435. public global::System.Data.DataColumn КоличествоColumn {
  1436. get {
  1437. return this.columnКоличество;
  1438. }
  1439. }
  1440. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1441. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1442. public global::System.Data.DataColumn ЦенаColumn {
  1443. get {
  1444. return this.columnЦена;
  1445. }
  1446. }
  1447. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1448. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1449. public global::System.Data.DataColumn Дата_продажиColumn {
  1450. get {
  1451. return this.columnДата_продажи;
  1452. }
  1453. }
  1454. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1455. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1456. public global::System.Data.DataColumn Время_продажи_товараColumn {
  1457. get {
  1458. return this.columnВремя_продажи_товара;
  1459. }
  1460. }
  1461. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1462. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1463. public global::System.Data.DataColumn Код_сотрудникаColumn {
  1464. get {
  1465. return this.columnКод_сотрудника;
  1466. }
  1467. }
  1468. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1469. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1470. public global::System.Data.DataColumn Код_продажиColumn {
  1471. get {
  1472. return this.columnКод_продажи;
  1473. }
  1474. }
  1475. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1476. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1477. [global::System.ComponentModel.Browsable(false)]
  1478. public int Count {
  1479. get {
  1480. return this.Rows.Count;
  1481. }
  1482. }
  1483. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1484. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1485. public Продажа_товараRow this[int index] {
  1486. get {
  1487. return ((Продажа_товараRow)(this.Rows[index]));
  1488. }
  1489. }
  1490. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1491. public event Продажа_товараRowChangeEventHandler Продажа_товараRowChanging;
  1492. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1493. public event Продажа_товараRowChangeEventHandler Продажа_товараRowChanged;
  1494. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1495. public event Продажа_товараRowChangeEventHandler Продажа_товараRowDeleting;
  1496. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1497. public event Продажа_товараRowChangeEventHandler Продажа_товараRowDeleted;
  1498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1499. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1500. public void AddПродажа_товараRow(Продажа_товараRow row) {
  1501. this.Rows.Add(row);
  1502. }
  1503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1504. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1505. public Продажа_товараRow AddПродажа_товараRow(ТоварыRow parentТоварыRowByFK_Продажа_товара_Товары, int Количество, decimal Цена, System.DateTime Дата_продажи, System.TimeSpan Время_продажи_товара, СотрудникRow parentСотрудникRowByFK_Продажа_товара_Сотрудник) {
  1506. Продажа_товараRow rowПродажа_товараRow = ((Продажа_товараRow)(this.NewRow()));
  1507. object[] columnValuesArray = new object[] {
  1508. null,
  1509. Количество,
  1510. Цена,
  1511. Дата_продажи,
  1512. Время_продажи_товара,
  1513. null,
  1514. null};
  1515. if ((parentТоварыRowByFK_Продажа_товара_Товары != null)) {
  1516. columnValuesArray[0] = parentТоварыRowByFK_Продажа_товара_Товары[3];
  1517. }
  1518. if ((parentСотрудникRowByFK_Продажа_товара_Сотрудник != null)) {
  1519. columnValuesArray[5] = parentСотрудникRowByFK_Продажа_товара_Сотрудник[4];
  1520. }
  1521. rowПродажа_товараRow.ItemArray = columnValuesArray;
  1522. this.Rows.Add(rowПродажа_товараRow);
  1523. return rowПродажа_товараRow;
  1524. }
  1525. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1526. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1527. public Продажа_товараRow FindByКод_продажи(int Код_продажи) {
  1528. return ((Продажа_товараRow)(this.Rows.Find(new object[] {
  1529. Код_продажи})));
  1530. }
  1531. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1532. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1533. public override global::System.Data.DataTable Clone() {
  1534. Продажа_товараDataTable cln = ((Продажа_товараDataTable)(base.Clone()));
  1535. cln.InitVars();
  1536. return cln;
  1537. }
  1538. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1539. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1540. protected override global::System.Data.DataTable CreateInstance() {
  1541. return new Продажа_товараDataTable();
  1542. }
  1543. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1544. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1545. internal void InitVars() {
  1546. this.columnКод_товара = base.Columns["Код_товара"];
  1547. this.columnКоличество = base.Columns["Количество"];
  1548. this.columnЦена = base.Columns["Цена"];
  1549. this.columnДата_продажи = base.Columns["Дата_продажи"];
  1550. this.columnВремя_продажи_товара = base.Columns["Время_продажи_товара"];
  1551. this.columnКод_сотрудника = base.Columns["Код_сотрудника"];
  1552. this.columnКод_продажи = base.Columns["Код_продажи"];
  1553. }
  1554. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1555. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1556. private void InitClass() {
  1557. this.columnКод_товара = new global::System.Data.DataColumn("Код_товара", typeof(int), null, global::System.Data.MappingType.Element);
  1558. base.Columns.Add(this.columnКод_товара);
  1559. this.columnКоличество = new global::System.Data.DataColumn("Количество", typeof(int), null, global::System.Data.MappingType.Element);
  1560. base.Columns.Add(this.columnКоличество);
  1561. this.columnЦена = new global::System.Data.DataColumn("Цена", typeof(decimal), null, global::System.Data.MappingType.Element);
  1562. base.Columns.Add(this.columnЦена);
  1563. this.columnДата_продажи = new global::System.Data.DataColumn("Дата_продажи", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
  1564. base.Columns.Add(this.columnДата_продажи);
  1565. this.columnВремя_продажи_товара = new global::System.Data.DataColumn("Время_продажи_товара", typeof(global::System.TimeSpan), null, global::System.Data.MappingType.Element);
  1566. base.Columns.Add(this.columnВремя_продажи_товара);
  1567. this.columnКод_сотрудника = new global::System.Data.DataColumn("Код_сотрудника", typeof(int), null, global::System.Data.MappingType.Element);
  1568. base.Columns.Add(this.columnКод_сотрудника);
  1569. this.columnКод_продажи = new global::System.Data.DataColumn("Код_продажи", typeof(int), null, global::System.Data.MappingType.Element);
  1570. base.Columns.Add(this.columnКод_продажи);
  1571. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  1572. this.columnКод_продажи}, true));
  1573. this.columnКод_товара.AllowDBNull = false;
  1574. this.columnКоличество.AllowDBNull = false;
  1575. this.columnЦена.AllowDBNull = false;
  1576. this.columnДата_продажи.AllowDBNull = false;
  1577. this.columnВремя_продажи_товара.AllowDBNull = false;
  1578. this.columnКод_сотрудника.AllowDBNull = false;
  1579. this.columnКод_продажи.AutoIncrement = true;
  1580. this.columnКод_продажи.AutoIncrementSeed = -1;
  1581. this.columnКод_продажи.AutoIncrementStep = -1;
  1582. this.columnКод_продажи.AllowDBNull = false;
  1583. this.columnКод_продажи.ReadOnly = true;
  1584. this.columnКод_продажи.Unique = true;
  1585. }
  1586. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1587. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1588. public Продажа_товараRow NewПродажа_товараRow() {
  1589. return ((Продажа_товараRow)(this.NewRow()));
  1590. }
  1591. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1592. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1593. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  1594. return new Продажа_товараRow(builder);
  1595. }
  1596. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1597. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1598. protected override global::System.Type GetRowType() {
  1599. return typeof(Продажа_товараRow);
  1600. }
  1601. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1602. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1603. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  1604. base.OnRowChanged(e);
  1605. if ((this.Продажа_товараRowChanged != null)) {
  1606. this.Продажа_товараRowChanged(this, new Продажа_товараRowChangeEvent(((Продажа_товараRow)(e.Row)), e.Action));
  1607. }
  1608. }
  1609. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1610. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1611. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  1612. base.OnRowChanging(e);
  1613. if ((this.Продажа_товараRowChanging != null)) {
  1614. this.Продажа_товараRowChanging(this, new Продажа_товараRowChangeEvent(((Продажа_товараRow)(e.Row)), e.Action));
  1615. }
  1616. }
  1617. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1618. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1619. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  1620. base.OnRowDeleted(e);
  1621. if ((this.Продажа_товараRowDeleted != null)) {
  1622. this.Продажа_товараRowDeleted(this, new Продажа_товараRowChangeEvent(((Продажа_товараRow)(e.Row)), e.Action));
  1623. }
  1624. }
  1625. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1626. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1627. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  1628. base.OnRowDeleting(e);
  1629. if ((this.Продажа_товараRowDeleting != null)) {
  1630. this.Продажа_товараRowDeleting(this, new Продажа_товараRowChangeEvent(((Продажа_товараRow)(e.Row)), e.Action));
  1631. }
  1632. }
  1633. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1634. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1635. public void RemoveПродажа_товараRow(Продажа_товараRow row) {
  1636. this.Rows.Remove(row);
  1637. }
  1638. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1639. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1640. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1641. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1642. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1643. ЛяховDataSet ds = new ЛяховDataSet();
  1644. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1645. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1646. any1.MinOccurs = new decimal(0);
  1647. any1.MaxOccurs = decimal.MaxValue;
  1648. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1649. sequence.Items.Add(any1);
  1650. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1651. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1652. any2.MinOccurs = new decimal(1);
  1653. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1654. sequence.Items.Add(any2);
  1655. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1656. attribute1.Name = "namespace";
  1657. attribute1.FixedValue = ds.Namespace;
  1658. type.Attributes.Add(attribute1);
  1659. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1660. attribute2.Name = "tableTypeName";
  1661. attribute2.FixedValue = "Продажа_товараDataTable";
  1662. type.Attributes.Add(attribute2);
  1663. type.Particle = sequence;
  1664. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1665. if (xs.Contains(dsSchema.TargetNamespace)) {
  1666. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1667. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1668. try {
  1669. global::System.Xml.Schema.XmlSchema schema = null;
  1670. dsSchema.Write(s1);
  1671. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1672. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1673. s2.SetLength(0);
  1674. schema.Write(s2);
  1675. if ((s1.Length == s2.Length)) {
  1676. s1.Position = 0;
  1677. s2.Position = 0;
  1678. for (; ((s1.Position != s1.Length)
  1679. && (s1.ReadByte() == s2.ReadByte())); ) {
  1680. ;
  1681. }
  1682. if ((s1.Position == s1.Length)) {
  1683. return type;
  1684. }
  1685. }
  1686. }
  1687. }
  1688. finally {
  1689. if ((s1 != null)) {
  1690. s1.Close();
  1691. }
  1692. if ((s2 != null)) {
  1693. s2.Close();
  1694. }
  1695. }
  1696. }
  1697. xs.Add(dsSchema);
  1698. return type;
  1699. }
  1700. }
  1701. /// <summary>
  1702. ///Represents the strongly named DataTable class.
  1703. ///</summary>
  1704. [global::System.Serializable()]
  1705. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  1706. public partial class СотрудникDataTable : global::System.Data.TypedTableBase<СотрудникRow> {
  1707. private global::System.Data.DataColumn columnИмя;
  1708. private global::System.Data.DataColumn columnФамилия;
  1709. private global::System.Data.DataColumn columnОтчество;
  1710. private global::System.Data.DataColumn columnТелефон;
  1711. private global::System.Data.DataColumn columnКод_сотрудника;
  1712. private global::System.Data.DataColumn columnЛогин;
  1713. private global::System.Data.DataColumn columnПароль;
  1714. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1715. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1716. public СотрудникDataTable() {
  1717. this.TableName = "Сотрудник";
  1718. this.BeginInit();
  1719. this.InitClass();
  1720. this.EndInit();
  1721. }
  1722. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1723. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1724. internal СотрудникDataTable(global::System.Data.DataTable table) {
  1725. this.TableName = table.TableName;
  1726. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  1727. this.CaseSensitive = table.CaseSensitive;
  1728. }
  1729. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  1730. this.Locale = table.Locale;
  1731. }
  1732. if ((table.Namespace != table.DataSet.Namespace)) {
  1733. this.Namespace = table.Namespace;
  1734. }
  1735. this.Prefix = table.Prefix;
  1736. this.MinimumCapacity = table.MinimumCapacity;
  1737. }
  1738. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1739. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1740. protected СотрудникDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  1741. base(info, context) {
  1742. this.InitVars();
  1743. }
  1744. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1745. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1746. public global::System.Data.DataColumn ИмяColumn {
  1747. get {
  1748. return this.columnИмя;
  1749. }
  1750. }
  1751. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1752. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1753. public global::System.Data.DataColumn ФамилияColumn {
  1754. get {
  1755. return this.columnФамилия;
  1756. }
  1757. }
  1758. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1759. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1760. public global::System.Data.DataColumn ОтчествоColumn {
  1761. get {
  1762. return this.columnОтчество;
  1763. }
  1764. }
  1765. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1766. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1767. public global::System.Data.DataColumn ТелефонColumn {
  1768. get {
  1769. return this.columnТелефон;
  1770. }
  1771. }
  1772. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1773. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1774. public global::System.Data.DataColumn Код_сотрудникаColumn {
  1775. get {
  1776. return this.columnКод_сотрудника;
  1777. }
  1778. }
  1779. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1780. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1781. public global::System.Data.DataColumn ЛогинColumn {
  1782. get {
  1783. return this.columnЛогин;
  1784. }
  1785. }
  1786. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1787. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1788. public global::System.Data.DataColumn ПарольColumn {
  1789. get {
  1790. return this.columnПароль;
  1791. }
  1792. }
  1793. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1794. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1795. [global::System.ComponentModel.Browsable(false)]
  1796. public int Count {
  1797. get {
  1798. return this.Rows.Count;
  1799. }
  1800. }
  1801. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1802. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1803. public СотрудникRow this[int index] {
  1804. get {
  1805. return ((СотрудникRow)(this.Rows[index]));
  1806. }
  1807. }
  1808. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1809. public event СотрудникRowChangeEventHandler СотрудникRowChanging;
  1810. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1811. public event СотрудникRowChangeEventHandler СотрудникRowChanged;
  1812. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1813. public event СотрудникRowChangeEventHandler СотрудникRowDeleting;
  1814. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1815. public event СотрудникRowChangeEventHandler СотрудникRowDeleted;
  1816. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1817. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1818. public void AddСотрудникRow(СотрудникRow row) {
  1819. this.Rows.Add(row);
  1820. }
  1821. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1822. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1823. public СотрудникRow AddСотрудникRow(string Имя, string Фамилия, string Отчество, string Телефон, string Логин, string Пароль) {
  1824. СотрудникRow rowСотрудникRow = ((СотрудникRow)(this.NewRow()));
  1825. object[] columnValuesArray = new object[] {
  1826. Имя,
  1827. Фамилия,
  1828. Отчество,
  1829. Телефон,
  1830. null,
  1831. Логин,
  1832. Пароль};
  1833. rowСотрудникRow.ItemArray = columnValuesArray;
  1834. this.Rows.Add(rowСотрудникRow);
  1835. return rowСотрудникRow;
  1836. }
  1837. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1838. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1839. public СотрудникRow FindByКод_сотрудника(int Код_сотрудника) {
  1840. return ((СотрудникRow)(this.Rows.Find(new object[] {
  1841. Код_сотрудника})));
  1842. }
  1843. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1844. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1845. public override global::System.Data.DataTable Clone() {
  1846. СотрудникDataTable cln = ((СотрудникDataTable)(base.Clone()));
  1847. cln.InitVars();
  1848. return cln;
  1849. }
  1850. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1851. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1852. protected override global::System.Data.DataTable CreateInstance() {
  1853. return new СотрудникDataTable();
  1854. }
  1855. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1856. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1857. internal void InitVars() {
  1858. this.columnИмя = base.Columns["Имя"];
  1859. this.columnФамилия = base.Columns["Фамилия"];
  1860. this.columnОтчество = base.Columns["Отчество"];
  1861. this.columnТелефон = base.Columns["Телефон"];
  1862. this.columnКод_сотрудника = base.Columns["Код_сотрудника"];
  1863. this.columnЛогин = base.Columns["Логин"];
  1864. this.columnПароль = base.Columns["Пароль"];
  1865. }
  1866. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1867. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1868. private void InitClass() {
  1869. this.columnИмя = new global::System.Data.DataColumn("Имя", typeof(string), null, global::System.Data.MappingType.Element);
  1870. base.Columns.Add(this.columnИмя);
  1871. this.columnФамилия = new global::System.Data.DataColumn("Фамилия", typeof(string), null, global::System.Data.MappingType.Element);
  1872. base.Columns.Add(this.columnФамилия);
  1873. this.columnОтчество = new global::System.Data.DataColumn("Отчество", typeof(string), null, global::System.Data.MappingType.Element);
  1874. base.Columns.Add(this.columnОтчество);
  1875. this.columnТелефон = new global::System.Data.DataColumn("Телефон", typeof(string), null, global::System.Data.MappingType.Element);
  1876. base.Columns.Add(this.columnТелефон);
  1877. this.columnКод_сотрудника = new global::System.Data.DataColumn("Код_сотрудника", typeof(int), null, global::System.Data.MappingType.Element);
  1878. base.Columns.Add(this.columnКод_сотрудника);
  1879. this.columnЛогин = new global::System.Data.DataColumn("Логин", typeof(string), null, global::System.Data.MappingType.Element);
  1880. base.Columns.Add(this.columnЛогин);
  1881. this.columnПароль = new global::System.Data.DataColumn("Пароль", typeof(string), null, global::System.Data.MappingType.Element);
  1882. base.Columns.Add(this.columnПароль);
  1883. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  1884. this.columnКод_сотрудника}, true));
  1885. this.columnИмя.AllowDBNull = false;
  1886. this.columnИмя.MaxLength = 50;
  1887. this.columnФамилия.AllowDBNull = false;
  1888. this.columnФамилия.MaxLength = 50;
  1889. this.columnОтчество.AllowDBNull = false;
  1890. this.columnОтчество.MaxLength = 50;
  1891. this.columnТелефон.AllowDBNull = false;
  1892. this.columnТелефон.MaxLength = 50;
  1893. this.columnКод_сотрудника.AutoIncrement = true;
  1894. this.columnКод_сотрудника.AutoIncrementSeed = -1;
  1895. this.columnКод_сотрудника.AutoIncrementStep = -1;
  1896. this.columnКод_сотрудника.AllowDBNull = false;
  1897. this.columnКод_сотрудника.ReadOnly = true;
  1898. this.columnКод_сотрудника.Unique = true;
  1899. this.columnЛогин.AllowDBNull = false;
  1900. this.columnЛогин.MaxLength = 50;
  1901. this.columnПароль.AllowDBNull = false;
  1902. this.columnПароль.MaxLength = 50;
  1903. }
  1904. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1905. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1906. public СотрудникRow NewСотрудникRow() {
  1907. return ((СотрудникRow)(this.NewRow()));
  1908. }
  1909. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1910. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1911. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  1912. return new СотрудникRow(builder);
  1913. }
  1914. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1915. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1916. protected override global::System.Type GetRowType() {
  1917. return typeof(СотрудникRow);
  1918. }
  1919. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1920. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1921. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  1922. base.OnRowChanged(e);
  1923. if ((this.СотрудникRowChanged != null)) {
  1924. this.СотрудникRowChanged(this, new СотрудникRowChangeEvent(((СотрудникRow)(e.Row)), e.Action));
  1925. }
  1926. }
  1927. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1928. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1929. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  1930. base.OnRowChanging(e);
  1931. if ((this.СотрудникRowChanging != null)) {
  1932. this.СотрудникRowChanging(this, new СотрудникRowChangeEvent(((СотрудникRow)(e.Row)), e.Action));
  1933. }
  1934. }
  1935. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1936. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1937. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  1938. base.OnRowDeleted(e);
  1939. if ((this.СотрудникRowDeleted != null)) {
  1940. this.СотрудникRowDeleted(this, new СотрудникRowChangeEvent(((СотрудникRow)(e.Row)), e.Action));
  1941. }
  1942. }
  1943. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1944. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1945. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  1946. base.OnRowDeleting(e);
  1947. if ((this.СотрудникRowDeleting != null)) {
  1948. this.СотрудникRowDeleting(this, new СотрудникRowChangeEvent(((СотрудникRow)(e.Row)), e.Action));
  1949. }
  1950. }
  1951. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1952. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1953. public void RemoveСотрудникRow(СотрудникRow row) {
  1954. this.Rows.Remove(row);
  1955. }
  1956. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1957. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1958. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1959. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1960. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1961. ЛяховDataSet ds = new ЛяховDataSet();
  1962. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1963. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1964. any1.MinOccurs = new decimal(0);
  1965. any1.MaxOccurs = decimal.MaxValue;
  1966. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1967. sequence.Items.Add(any1);
  1968. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1969. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1970. any2.MinOccurs = new decimal(1);
  1971. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1972. sequence.Items.Add(any2);
  1973. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1974. attribute1.Name = "namespace";
  1975. attribute1.FixedValue = ds.Namespace;
  1976. type.Attributes.Add(attribute1);
  1977. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1978. attribute2.Name = "tableTypeName";
  1979. attribute2.FixedValue = "СотрудникDataTable";
  1980. type.Attributes.Add(attribute2);
  1981. type.Particle = sequence;
  1982. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1983. if (xs.Contains(dsSchema.TargetNamespace)) {
  1984. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1985. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1986. try {
  1987. global::System.Xml.Schema.XmlSchema schema = null;
  1988. dsSchema.Write(s1);
  1989. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1990. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1991. s2.SetLength(0);
  1992. schema.Write(s2);
  1993. if ((s1.Length == s2.Length)) {
  1994. s1.Position = 0;
  1995. s2.Position = 0;
  1996. for (; ((s1.Position != s1.Length)
  1997. && (s1.ReadByte() == s2.ReadByte())); ) {
  1998. ;
  1999. }
  2000. if ((s1.Position == s1.Length)) {
  2001. return type;
  2002. }
  2003. }
  2004. }
  2005. }
  2006. finally {
  2007. if ((s1 != null)) {
  2008. s1.Close();
  2009. }
  2010. if ((s2 != null)) {
  2011. s2.Close();
  2012. }
  2013. }
  2014. }
  2015. xs.Add(dsSchema);
  2016. return type;
  2017. }
  2018. }
  2019. /// <summary>
  2020. ///Represents the strongly named DataTable class.
  2021. ///</summary>
  2022. [global::System.Serializable()]
  2023. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  2024. public partial class ТоварыDataTable : global::System.Data.TypedTableBase<ТоварыRow> {
  2025. private global::System.Data.DataColumn columnНазвание_товара;
  2026. private global::System.Data.DataColumn columnКоличество;
  2027. private global::System.Data.DataColumn columnЦена_за_штуку;
  2028. private global::System.Data.DataColumn columnКод_товара;
  2029. private global::System.Data.DataColumn columnКод_заказа;
  2030. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2031. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2032. public ТоварыDataTable() {
  2033. this.TableName = "Товары";
  2034. this.BeginInit();
  2035. this.InitClass();
  2036. this.EndInit();
  2037. }
  2038. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2039. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2040. internal ТоварыDataTable(global::System.Data.DataTable table) {
  2041. this.TableName = table.TableName;
  2042. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  2043. this.CaseSensitive = table.CaseSensitive;
  2044. }
  2045. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  2046. this.Locale = table.Locale;
  2047. }
  2048. if ((table.Namespace != table.DataSet.Namespace)) {
  2049. this.Namespace = table.Namespace;
  2050. }
  2051. this.Prefix = table.Prefix;
  2052. this.MinimumCapacity = table.MinimumCapacity;
  2053. }
  2054. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2055. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2056. protected ТоварыDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  2057. base(info, context) {
  2058. this.InitVars();
  2059. }
  2060. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2061. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2062. public global::System.Data.DataColumn Название_товараColumn {
  2063. get {
  2064. return this.columnНазвание_товара;
  2065. }
  2066. }
  2067. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2068. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2069. public global::System.Data.DataColumn КоличествоColumn {
  2070. get {
  2071. return this.columnКоличество;
  2072. }
  2073. }
  2074. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2075. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2076. public global::System.Data.DataColumn Цена_за_штукуColumn {
  2077. get {
  2078. return this.columnЦена_за_штуку;
  2079. }
  2080. }
  2081. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2082. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2083. public global::System.Data.DataColumn Код_товараColumn {
  2084. get {
  2085. return this.columnКод_товара;
  2086. }
  2087. }
  2088. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2089. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2090. public global::System.Data.DataColumn Код_заказаColumn {
  2091. get {
  2092. return this.columnКод_заказа;
  2093. }
  2094. }
  2095. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2096. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2097. [global::System.ComponentModel.Browsable(false)]
  2098. public int Count {
  2099. get {
  2100. return this.Rows.Count;
  2101. }
  2102. }
  2103. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2104. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2105. public ТоварыRow this[int index] {
  2106. get {
  2107. return ((ТоварыRow)(this.Rows[index]));
  2108. }
  2109. }
  2110. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2111. public event ТоварыRowChangeEventHandler ТоварыRowChanging;
  2112. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2113. public event ТоварыRowChangeEventHandler ТоварыRowChanged;
  2114. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2115. public event ТоварыRowChangeEventHandler ТоварыRowDeleting;
  2116. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2117. public event ТоварыRowChangeEventHandler ТоварыRowDeleted;
  2118. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2119. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2120. public void AddТоварыRow(ТоварыRow row) {
  2121. this.Rows.Add(row);
  2122. }
  2123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2124. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2125. public ТоварыRow AddТоварыRow(string Название_товара, int Количество, decimal Цена_за_штуку, Заказ_товараRow parentЗаказ_товараRowByFK_Товары_Заказ_товара) {
  2126. ТоварыRow rowТоварыRow = ((ТоварыRow)(this.NewRow()));
  2127. object[] columnValuesArray = new object[] {
  2128. Название_товара,
  2129. Количество,
  2130. Цена_за_штуку,
  2131. null,
  2132. null};
  2133. if ((parentЗаказ_товараRowByFK_Товары_Заказ_товара != null)) {
  2134. columnValuesArray[4] = parentЗаказ_товараRowByFK_Товары_Заказ_товара[4];
  2135. }
  2136. rowТоварыRow.ItemArray = columnValuesArray;
  2137. this.Rows.Add(rowТоварыRow);
  2138. return rowТоварыRow;
  2139. }
  2140. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2141. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2142. public ТоварыRow FindByКод_товара(int Код_товара) {
  2143. return ((ТоварыRow)(this.Rows.Find(new object[] {
  2144. Код_товара})));
  2145. }
  2146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2147. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2148. public override global::System.Data.DataTable Clone() {
  2149. ТоварыDataTable cln = ((ТоварыDataTable)(base.Clone()));
  2150. cln.InitVars();
  2151. return cln;
  2152. }
  2153. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2154. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2155. protected override global::System.Data.DataTable CreateInstance() {
  2156. return new ТоварыDataTable();
  2157. }
  2158. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2159. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2160. internal void InitVars() {
  2161. this.columnНазвание_товара = base.Columns["Название_товара"];
  2162. this.columnКоличество = base.Columns["Количество"];
  2163. this.columnЦена_за_штуку = base.Columns["Цена_за_штуку"];
  2164. this.columnКод_товара = base.Columns["Код_товара"];
  2165. this.columnКод_заказа = base.Columns["Код_заказа"];
  2166. }
  2167. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2168. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2169. private void InitClass() {
  2170. this.columnНазвание_товара = new global::System.Data.DataColumn("Название_товара", typeof(string), null, global::System.Data.MappingType.Element);
  2171. base.Columns.Add(this.columnНазвание_товара);
  2172. this.columnКоличество = new global::System.Data.DataColumn("Количество", typeof(int), null, global::System.Data.MappingType.Element);
  2173. base.Columns.Add(this.columnКоличество);
  2174. this.columnЦена_за_штуку = new global::System.Data.DataColumn("Цена_за_штуку", typeof(decimal), null, global::System.Data.MappingType.Element);
  2175. base.Columns.Add(this.columnЦена_за_штуку);
  2176. this.columnКод_товара = new global::System.Data.DataColumn("Код_товара", typeof(int), null, global::System.Data.MappingType.Element);
  2177. base.Columns.Add(this.columnКод_товара);
  2178. this.columnКод_заказа = new global::System.Data.DataColumn("Код_заказа", typeof(int), null, global::System.Data.MappingType.Element);
  2179. base.Columns.Add(this.columnКод_заказа);
  2180. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  2181. this.columnКод_товара}, true));
  2182. this.columnНазвание_товара.AllowDBNull = false;
  2183. this.columnНазвание_товара.MaxLength = 50;
  2184. this.columnКоличество.AllowDBNull = false;
  2185. this.columnЦена_за_штуку.AllowDBNull = false;
  2186. this.columnКод_товара.AutoIncrement = true;
  2187. this.columnКод_товара.AutoIncrementSeed = -1;
  2188. this.columnКод_товара.AutoIncrementStep = -1;
  2189. this.columnКод_товара.AllowDBNull = false;
  2190. this.columnКод_товара.ReadOnly = true;
  2191. this.columnКод_товара.Unique = true;
  2192. }
  2193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2194. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2195. public ТоварыRow NewТоварыRow() {
  2196. return ((ТоварыRow)(this.NewRow()));
  2197. }
  2198. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2199. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2200. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  2201. return new ТоварыRow(builder);
  2202. }
  2203. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2204. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2205. protected override global::System.Type GetRowType() {
  2206. return typeof(ТоварыRow);
  2207. }
  2208. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2209. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2210. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  2211. base.OnRowChanged(e);
  2212. if ((this.ТоварыRowChanged != null)) {
  2213. this.ТоварыRowChanged(this, new ТоварыRowChangeEvent(((ТоварыRow)(e.Row)), e.Action));
  2214. }
  2215. }
  2216. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2217. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2218. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  2219. base.OnRowChanging(e);
  2220. if ((this.ТоварыRowChanging != null)) {
  2221. this.ТоварыRowChanging(this, new ТоварыRowChangeEvent(((ТоварыRow)(e.Row)), e.Action));
  2222. }
  2223. }
  2224. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2225. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2226. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  2227. base.OnRowDeleted(e);
  2228. if ((this.ТоварыRowDeleted != null)) {
  2229. this.ТоварыRowDeleted(this, new ТоварыRowChangeEvent(((ТоварыRow)(e.Row)), e.Action));
  2230. }
  2231. }
  2232. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2233. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2234. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  2235. base.OnRowDeleting(e);
  2236. if ((this.ТоварыRowDeleting != null)) {
  2237. this.ТоварыRowDeleting(this, new ТоварыRowChangeEvent(((ТоварыRow)(e.Row)), e.Action));
  2238. }
  2239. }
  2240. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2241. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2242. public void RemoveТоварыRow(ТоварыRow row) {
  2243. this.Rows.Remove(row);
  2244. }
  2245. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2246. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2247. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  2248. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  2249. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  2250. ЛяховDataSet ds = new ЛяховDataSet();
  2251. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  2252. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  2253. any1.MinOccurs = new decimal(0);
  2254. any1.MaxOccurs = decimal.MaxValue;
  2255. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  2256. sequence.Items.Add(any1);
  2257. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  2258. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  2259. any2.MinOccurs = new decimal(1);
  2260. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  2261. sequence.Items.Add(any2);
  2262. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  2263. attribute1.Name = "namespace";
  2264. attribute1.FixedValue = ds.Namespace;
  2265. type.Attributes.Add(attribute1);
  2266. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  2267. attribute2.Name = "tableTypeName";
  2268. attribute2.FixedValue = "ТоварыDataTable";
  2269. type.Attributes.Add(attribute2);
  2270. type.Particle = sequence;
  2271. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  2272. if (xs.Contains(dsSchema.TargetNamespace)) {
  2273. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  2274. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  2275. try {
  2276. global::System.Xml.Schema.XmlSchema schema = null;
  2277. dsSchema.Write(s1);
  2278. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  2279. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  2280. s2.SetLength(0);
  2281. schema.Write(s2);
  2282. if ((s1.Length == s2.Length)) {
  2283. s1.Position = 0;
  2284. s2.Position = 0;
  2285. for (; ((s1.Position != s1.Length)
  2286. && (s1.ReadByte() == s2.ReadByte())); ) {
  2287. ;
  2288. }
  2289. if ((s1.Position == s1.Length)) {
  2290. return type;
  2291. }
  2292. }
  2293. }
  2294. }
  2295. finally {
  2296. if ((s1 != null)) {
  2297. s1.Close();
  2298. }
  2299. if ((s2 != null)) {
  2300. s2.Close();
  2301. }
  2302. }
  2303. }
  2304. xs.Add(dsSchema);
  2305. return type;
  2306. }
  2307. }
  2308. /// <summary>
  2309. ///Represents strongly named DataRow class.
  2310. ///</summary>
  2311. public partial class Заказ_товараRow : global::System.Data.DataRow {
  2312. private Заказ_товараDataTable tableЗаказ_товара;
  2313. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2314. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2315. internal Заказ_товараRow(global::System.Data.DataRowBuilder rb) :
  2316. base(rb) {
  2317. this.tableЗаказ_товара = ((Заказ_товараDataTable)(this.Table));
  2318. }
  2319. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2320. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2321. public int Код_сотрудника {
  2322. get {
  2323. return ((int)(this[this.tableЗаказ_товара.Код_сотрудникаColumn]));
  2324. }
  2325. set {
  2326. this[this.tableЗаказ_товара.Код_сотрудникаColumn] = value;
  2327. }
  2328. }
  2329. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2330. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2331. public string Наименование_товара {
  2332. get {
  2333. return ((string)(this[this.tableЗаказ_товара.Наименование_товараColumn]));
  2334. }
  2335. set {
  2336. this[this.tableЗаказ_товара.Наименование_товараColumn] = value;
  2337. }
  2338. }
  2339. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2340. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2341. public int Количество {
  2342. get {
  2343. return ((int)(this[this.tableЗаказ_товара.КоличествоColumn]));
  2344. }
  2345. set {
  2346. this[this.tableЗаказ_товара.КоличествоColumn] = value;
  2347. }
  2348. }
  2349. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2350. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2351. public int Код_поставщика {
  2352. get {
  2353. return ((int)(this[this.tableЗаказ_товара.Код_поставщикаColumn]));
  2354. }
  2355. set {
  2356. this[this.tableЗаказ_товара.Код_поставщикаColumn] = value;
  2357. }
  2358. }
  2359. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2360. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2361. public int Код_заказа {
  2362. get {
  2363. return ((int)(this[this.tableЗаказ_товара.Код_заказаColumn]));
  2364. }
  2365. set {
  2366. this[this.tableЗаказ_товара.Код_заказаColumn] = value;
  2367. }
  2368. }
  2369. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2370. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2371. public int Код_товара {
  2372. get {
  2373. return ((int)(this[this.tableЗаказ_товара.Код_товараColumn]));
  2374. }
  2375. set {
  2376. this[this.tableЗаказ_товара.Код_товараColumn] = value;
  2377. }
  2378. }
  2379. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2380. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2381. public СотрудникRow СотрудникRow {
  2382. get {
  2383. return ((СотрудникRow)(this.GetParentRow(this.Table.ParentRelations["FK_Заказ товара_Сотрудник"])));
  2384. }
  2385. set {
  2386. this.SetParentRow(value, this.Table.ParentRelations["FK_Заказ товара_Сотрудник"]);
  2387. }
  2388. }
  2389. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2390. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2391. public ПоставщикRow[] GetПоставщикRows() {
  2392. if ((this.Table.ChildRelations["FK_Поставщик_Заказ товара"] == null)) {
  2393. return new ПоставщикRow[0];
  2394. }
  2395. else {
  2396. return ((ПоставщикRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Поставщик_Заказ товара"])));
  2397. }
  2398. }
  2399. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2400. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2401. public ТоварыRow[] GetТоварыRows() {
  2402. if ((this.Table.ChildRelations["FK_Товары_Заказ товара"] == null)) {
  2403. return new ТоварыRow[0];
  2404. }
  2405. else {
  2406. return ((ТоварыRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Товары_Заказ товара"])));
  2407. }
  2408. }
  2409. }
  2410. /// <summary>
  2411. ///Represents strongly named DataRow class.
  2412. ///</summary>
  2413. public partial class НакладнаяRow : global::System.Data.DataRow {
  2414. private НакладнаяDataTable tableНакладная;
  2415. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2416. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2417. internal НакладнаяRow(global::System.Data.DataRowBuilder rb) :
  2418. base(rb) {
  2419. this.tableНакладная = ((НакладнаяDataTable)(this.Table));
  2420. }
  2421. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2422. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2423. public string Название_товара {
  2424. get {
  2425. return ((string)(this[this.tableНакладная.Название_товараColumn]));
  2426. }
  2427. set {
  2428. this[this.tableНакладная.Название_товараColumn] = value;
  2429. }
  2430. }
  2431. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2432. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2433. public int Количество {
  2434. get {
  2435. return ((int)(this[this.tableНакладная.КоличествоColumn]));
  2436. }
  2437. set {
  2438. this[this.tableНакладная.КоличествоColumn] = value;
  2439. }
  2440. }
  2441. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2442. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2443. public decimal Стоимость {
  2444. get {
  2445. return ((decimal)(this[this.tableНакладная.СтоимостьColumn]));
  2446. }
  2447. set {
  2448. this[this.tableНакладная.СтоимостьColumn] = value;
  2449. }
  2450. }
  2451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2452. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2453. public System.DateTime Дата_привоза_товара {
  2454. get {
  2455. return ((global::System.DateTime)(this[this.tableНакладная.Дата_привоза_товараColumn]));
  2456. }
  2457. set {
  2458. this[this.tableНакладная.Дата_привоза_товараColumn] = value;
  2459. }
  2460. }
  2461. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2462. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2463. public int Код_поставщика {
  2464. get {
  2465. return ((int)(this[this.tableНакладная.Код_поставщикаColumn]));
  2466. }
  2467. set {
  2468. this[this.tableНакладная.Код_поставщикаColumn] = value;
  2469. }
  2470. }
  2471. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2472. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2473. public int Код_сотрудника {
  2474. get {
  2475. return ((int)(this[this.tableНакладная.Код_сотрудникаColumn]));
  2476. }
  2477. set {
  2478. this[this.tableНакладная.Код_сотрудникаColumn] = value;
  2479. }
  2480. }
  2481. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2482. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2483. public int Код_накладной {
  2484. get {
  2485. return ((int)(this[this.tableНакладная.Код_накладнойColumn]));
  2486. }
  2487. set {
  2488. this[this.tableНакладная.Код_накладнойColumn] = value;
  2489. }
  2490. }
  2491. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2492. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2493. public СотрудникRow СотрудникRow {
  2494. get {
  2495. return ((СотрудникRow)(this.GetParentRow(this.Table.ParentRelations["FK_Накладная_Сотрудник"])));
  2496. }
  2497. set {
  2498. this.SetParentRow(value, this.Table.ParentRelations["FK_Накладная_Сотрудник"]);
  2499. }
  2500. }
  2501. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2502. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2503. public ПоставщикRow[] GetПоставщикRows() {
  2504. if ((this.Table.ChildRelations["FK_Поставщик_Накладная"] == null)) {
  2505. return new ПоставщикRow[0];
  2506. }
  2507. else {
  2508. return ((ПоставщикRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Поставщик_Накладная"])));
  2509. }
  2510. }
  2511. }
  2512. /// <summary>
  2513. ///Represents strongly named DataRow class.
  2514. ///</summary>
  2515. public partial class ПоставщикRow : global::System.Data.DataRow {
  2516. private ПоставщикDataTable tableПоставщик;
  2517. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2518. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2519. internal ПоставщикRow(global::System.Data.DataRowBuilder rb) :
  2520. base(rb) {
  2521. this.tableПоставщик = ((ПоставщикDataTable)(this.Table));
  2522. }
  2523. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2524. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2525. public string Название_фирмы_поставщика {
  2526. get {
  2527. return ((string)(this[this.tableПоставщик.Название_фирмы_поставщикаColumn]));
  2528. }
  2529. set {
  2530. this[this.tableПоставщик.Название_фирмы_поставщикаColumn] = value;
  2531. }
  2532. }
  2533. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2534. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2535. public int Количество_привезенного_товара {
  2536. get {
  2537. return ((int)(this[this.tableПоставщик.Количество_привезенного_товараColumn]));
  2538. }
  2539. set {
  2540. this[this.tableПоставщик.Количество_привезенного_товараColumn] = value;
  2541. }
  2542. }
  2543. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2544. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2545. public decimal Цена_товара {
  2546. get {
  2547. return ((decimal)(this[this.tableПоставщик.Цена_товараColumn]));
  2548. }
  2549. set {
  2550. this[this.tableПоставщик.Цена_товараColumn] = value;
  2551. }
  2552. }
  2553. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2554. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2555. public string Адрес {
  2556. get {
  2557. return ((string)(this[this.tableПоставщик.АдресColumn]));
  2558. }
  2559. set {
  2560. this[this.tableПоставщик.АдресColumn] = value;
  2561. }
  2562. }
  2563. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2564. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2565. public int Код_поставщика {
  2566. get {
  2567. return ((int)(this[this.tableПоставщик.Код_поставщикаColumn]));
  2568. }
  2569. set {
  2570. this[this.tableПоставщик.Код_поставщикаColumn] = value;
  2571. }
  2572. }
  2573. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2574. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2575. public int Код_заказа {
  2576. get {
  2577. try {
  2578. return ((int)(this[this.tableПоставщик.Код_заказаColumn]));
  2579. }
  2580. catch (global::System.InvalidCastException e) {
  2581. throw new global::System.Data.StrongTypingException("Значение для столбца \'Код_заказа\' в таблице \'Поставщик\' равно DBNull.", e);
  2582. }
  2583. }
  2584. set {
  2585. this[this.tableПоставщик.Код_заказаColumn] = value;
  2586. }
  2587. }
  2588. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2589. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2590. public int Код_накладной {
  2591. get {
  2592. try {
  2593. return ((int)(this[this.tableПоставщик.Код_накладнойColumn]));
  2594. }
  2595. catch (global::System.InvalidCastException e) {
  2596. throw new global::System.Data.StrongTypingException("Значение для столбца \'Код_накладной\' в таблице \'Поставщик\' равно DBNull.", e);
  2597. }
  2598. }
  2599. set {
  2600. this[this.tableПоставщик.Код_накладнойColumn] = value;
  2601. }
  2602. }
  2603. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2604. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2605. public Заказ_товараRow Заказ_товараRow {
  2606. get {
  2607. return ((Заказ_товараRow)(this.GetParentRow(this.Table.ParentRelations["FK_Поставщик_Заказ товара"])));
  2608. }
  2609. set {
  2610. this.SetParentRow(value, this.Table.ParentRelations["FK_Поставщик_Заказ товара"]);
  2611. }
  2612. }
  2613. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2614. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2615. public НакладнаяRow НакладнаяRow {
  2616. get {
  2617. return ((НакладнаяRow)(this.GetParentRow(this.Table.ParentRelations["FK_Поставщик_Накладная"])));
  2618. }
  2619. set {
  2620. this.SetParentRow(value, this.Table.ParentRelations["FK_Поставщик_Накладная"]);
  2621. }
  2622. }
  2623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2624. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2625. public bool IsКод_заказаNull() {
  2626. return this.IsNull(this.tableПоставщик.Код_заказаColumn);
  2627. }
  2628. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2629. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2630. public void SetКод_заказаNull() {
  2631. this[this.tableПоставщик.Код_заказаColumn] = global::System.Convert.DBNull;
  2632. }
  2633. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2634. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2635. public bool IsКод_накладнойNull() {
  2636. return this.IsNull(this.tableПоставщик.Код_накладнойColumn);
  2637. }
  2638. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2639. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2640. public void SetКод_накладнойNull() {
  2641. this[this.tableПоставщик.Код_накладнойColumn] = global::System.Convert.DBNull;
  2642. }
  2643. }
  2644. /// <summary>
  2645. ///Represents strongly named DataRow class.
  2646. ///</summary>
  2647. public partial class Продажа_товараRow : global::System.Data.DataRow {
  2648. private Продажа_товараDataTable tableПродажа_товара;
  2649. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2650. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2651. internal Продажа_товараRow(global::System.Data.DataRowBuilder rb) :
  2652. base(rb) {
  2653. this.tableПродажа_товара = ((Продажа_товараDataTable)(this.Table));
  2654. }
  2655. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2656. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2657. public int Код_товара {
  2658. get {
  2659. return ((int)(this[this.tableПродажа_товара.Код_товараColumn]));
  2660. }
  2661. set {
  2662. this[this.tableПродажа_товара.Код_товараColumn] = value;
  2663. }
  2664. }
  2665. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2666. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2667. public int Количество {
  2668. get {
  2669. return ((int)(this[this.tableПродажа_товара.КоличествоColumn]));
  2670. }
  2671. set {
  2672. this[this.tableПродажа_товара.КоличествоColumn] = value;
  2673. }
  2674. }
  2675. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2676. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2677. public decimal Цена {
  2678. get {
  2679. return ((decimal)(this[this.tableПродажа_товара.ЦенаColumn]));
  2680. }
  2681. set {
  2682. this[this.tableПродажа_товара.ЦенаColumn] = value;
  2683. }
  2684. }
  2685. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2686. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2687. public System.DateTime Дата_продажи {
  2688. get {
  2689. return ((global::System.DateTime)(this[this.tableПродажа_товара.Дата_продажиColumn]));
  2690. }
  2691. set {
  2692. this[this.tableПродажа_товара.Дата_продажиColumn] = value;
  2693. }
  2694. }
  2695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2696. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2697. public System.TimeSpan Время_продажи_товара {
  2698. get {
  2699. return ((global::System.TimeSpan)(this[this.tableПродажа_товара.Время_продажи_товараColumn]));
  2700. }
  2701. set {
  2702. this[this.tableПродажа_товара.Время_продажи_товараColumn] = value;
  2703. }
  2704. }
  2705. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2706. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2707. public int Код_сотрудника {
  2708. get {
  2709. return ((int)(this[this.tableПродажа_товара.Код_сотрудникаColumn]));
  2710. }
  2711. set {
  2712. this[this.tableПродажа_товара.Код_сотрудникаColumn] = value;
  2713. }
  2714. }
  2715. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2716. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2717. public int Код_продажи {
  2718. get {
  2719. return ((int)(this[this.tableПродажа_товара.Код_продажиColumn]));
  2720. }
  2721. set {
  2722. this[this.tableПродажа_товара.Код_продажиColumn] = value;
  2723. }
  2724. }
  2725. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2726. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2727. public СотрудникRow СотрудникRow {
  2728. get {
  2729. return ((СотрудникRow)(this.GetParentRow(this.Table.ParentRelations["FK_Продажа товара_Сотрудник"])));
  2730. }
  2731. set {
  2732. this.SetParentRow(value, this.Table.ParentRelations["FK_Продажа товара_Сотрудник"]);
  2733. }
  2734. }
  2735. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2736. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2737. public ТоварыRow ТоварыRow {
  2738. get {
  2739. return ((ТоварыRow)(this.GetParentRow(this.Table.ParentRelations["FK_Продажа товара_Товары"])));
  2740. }
  2741. set {
  2742. this.SetParentRow(value, this.Table.ParentRelations["FK_Продажа товара_Товары"]);
  2743. }
  2744. }
  2745. }
  2746. /// <summary>
  2747. ///Represents strongly named DataRow class.
  2748. ///</summary>
  2749. public partial class СотрудникRow : global::System.Data.DataRow {
  2750. private СотрудникDataTable tableСотрудник;
  2751. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2752. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2753. internal СотрудникRow(global::System.Data.DataRowBuilder rb) :
  2754. base(rb) {
  2755. this.tableСотрудник = ((СотрудникDataTable)(this.Table));
  2756. }
  2757. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2758. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2759. public string Имя {
  2760. get {
  2761. return ((string)(this[this.tableСотрудник.ИмяColumn]));
  2762. }
  2763. set {
  2764. this[this.tableСотрудник.ИмяColumn] = value;
  2765. }
  2766. }
  2767. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2768. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2769. public string Фамилия {
  2770. get {
  2771. return ((string)(this[this.tableСотрудник.ФамилияColumn]));
  2772. }
  2773. set {
  2774. this[this.tableСотрудник.ФамилияColumn] = value;
  2775. }
  2776. }
  2777. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2778. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2779. public string Отчество {
  2780. get {
  2781. return ((string)(this[this.tableСотрудник.ОтчествоColumn]));
  2782. }
  2783. set {
  2784. this[this.tableСотрудник.ОтчествоColumn] = value;
  2785. }
  2786. }
  2787. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2788. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2789. public string Телефон {
  2790. get {
  2791. return ((string)(this[this.tableСотрудник.ТелефонColumn]));
  2792. }
  2793. set {
  2794. this[this.tableСотрудник.ТелефонColumn] = value;
  2795. }
  2796. }
  2797. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2798. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2799. public int Код_сотрудника {
  2800. get {
  2801. return ((int)(this[this.tableСотрудник.Код_сотрудникаColumn]));
  2802. }
  2803. set {
  2804. this[this.tableСотрудник.Код_сотрудникаColumn] = value;
  2805. }
  2806. }
  2807. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2808. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2809. public string Логин {
  2810. get {
  2811. return ((string)(this[this.tableСотрудник.ЛогинColumn]));
  2812. }
  2813. set {
  2814. this[this.tableСотрудник.ЛогинColumn] = value;
  2815. }
  2816. }
  2817. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2818. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2819. public string Пароль {
  2820. get {
  2821. return ((string)(this[this.tableСотрудник.ПарольColumn]));
  2822. }
  2823. set {
  2824. this[this.tableСотрудник.ПарольColumn] = value;
  2825. }
  2826. }
  2827. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2828. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2829. public Заказ_товараRow[] GetЗаказ_товараRows() {
  2830. if ((this.Table.ChildRelations["FK_Заказ товара_Сотрудник"] == null)) {
  2831. return new Заказ_товараRow[0];
  2832. }
  2833. else {
  2834. return ((Заказ_товараRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Заказ товара_Сотрудник"])));
  2835. }
  2836. }
  2837. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2838. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2839. public НакладнаяRow[] GetНакладнаяRows() {
  2840. if ((this.Table.ChildRelations["FK_Накладная_Сотрудник"] == null)) {
  2841. return new НакладнаяRow[0];
  2842. }
  2843. else {
  2844. return ((НакладнаяRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Накладная_Сотрудник"])));
  2845. }
  2846. }
  2847. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2848. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2849. public Продажа_товараRow[] GetПродажа_товараRows() {
  2850. if ((this.Table.ChildRelations["FK_Продажа товара_Сотрудник"] == null)) {
  2851. return new Продажа_товараRow[0];
  2852. }
  2853. else {
  2854. return ((Продажа_товараRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Продажа товара_Сотрудник"])));
  2855. }
  2856. }
  2857. }
  2858. /// <summary>
  2859. ///Represents strongly named DataRow class.
  2860. ///</summary>
  2861. public partial class ТоварыRow : global::System.Data.DataRow {
  2862. private ТоварыDataTable tableТовары;
  2863. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2864. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2865. internal ТоварыRow(global::System.Data.DataRowBuilder rb) :
  2866. base(rb) {
  2867. this.tableТовары = ((ТоварыDataTable)(this.Table));
  2868. }
  2869. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2870. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2871. public string Название_товара {
  2872. get {
  2873. return ((string)(this[this.tableТовары.Название_товараColumn]));
  2874. }
  2875. set {
  2876. this[this.tableТовары.Название_товараColumn] = value;
  2877. }
  2878. }
  2879. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2880. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2881. public int Количество {
  2882. get {
  2883. return ((int)(this[this.tableТовары.КоличествоColumn]));
  2884. }
  2885. set {
  2886. this[this.tableТовары.КоличествоColumn] = value;
  2887. }
  2888. }
  2889. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2890. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2891. public decimal Цена_за_штуку {
  2892. get {
  2893. return ((decimal)(this[this.tableТовары.Цена_за_штукуColumn]));
  2894. }
  2895. set {
  2896. this[this.tableТовары.Цена_за_штукуColumn] = value;
  2897. }
  2898. }
  2899. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2900. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2901. public int Код_товара {
  2902. get {
  2903. return ((int)(this[this.tableТовары.Код_товараColumn]));
  2904. }
  2905. set {
  2906. this[this.tableТовары.Код_товараColumn] = value;
  2907. }
  2908. }
  2909. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2910. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2911. public int Код_заказа {
  2912. get {
  2913. try {
  2914. return ((int)(this[this.tableТовары.Код_заказаColumn]));
  2915. }
  2916. catch (global::System.InvalidCastException e) {
  2917. throw new global::System.Data.StrongTypingException("Значение для столбца \'Код_заказа\' в таблице \'Товары\' равно DBNull.", e);
  2918. }
  2919. }
  2920. set {
  2921. this[this.tableТовары.Код_заказаColumn] = value;
  2922. }
  2923. }
  2924. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2925. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2926. public Заказ_товараRow Заказ_товараRow {
  2927. get {
  2928. return ((Заказ_товараRow)(this.GetParentRow(this.Table.ParentRelations["FK_Товары_Заказ товара"])));
  2929. }
  2930. set {
  2931. this.SetParentRow(value, this.Table.ParentRelations["FK_Товары_Заказ товара"]);
  2932. }
  2933. }
  2934. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2935. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2936. public bool IsКод_заказаNull() {
  2937. return this.IsNull(this.tableТовары.Код_заказаColumn);
  2938. }
  2939. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2940. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2941. public void SetКод_заказаNull() {
  2942. this[this.tableТовары.Код_заказаColumn] = global::System.Convert.DBNull;
  2943. }
  2944. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2945. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2946. public Продажа_товараRow[] GetПродажа_товараRows() {
  2947. if ((this.Table.ChildRelations["FK_Продажа товара_Товары"] == null)) {
  2948. return new Продажа_товараRow[0];
  2949. }
  2950. else {
  2951. return ((Продажа_товараRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Продажа товара_Товары"])));
  2952. }
  2953. }
  2954. }
  2955. /// <summary>
  2956. ///Row event argument class
  2957. ///</summary>
  2958. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2959. public class Заказ_товараRowChangeEvent : global::System.EventArgs {
  2960. private Заказ_товараRow eventRow;
  2961. private global::System.Data.DataRowAction eventAction;
  2962. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2963. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2964. public Заказ_товараRowChangeEvent(Заказ_товараRow row, global::System.Data.DataRowAction action) {
  2965. this.eventRow = row;
  2966. this.eventAction = action;
  2967. }
  2968. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2969. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2970. public Заказ_товараRow Row {
  2971. get {
  2972. return this.eventRow;
  2973. }
  2974. }
  2975. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2976. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2977. public global::System.Data.DataRowAction Action {
  2978. get {
  2979. return this.eventAction;
  2980. }
  2981. }
  2982. }
  2983. /// <summary>
  2984. ///Row event argument class
  2985. ///</summary>
  2986. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2987. public class НакладнаяRowChangeEvent : global::System.EventArgs {
  2988. private НакладнаяRow eventRow;
  2989. private global::System.Data.DataRowAction eventAction;
  2990. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2991. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2992. public НакладнаяRowChangeEvent(НакладнаяRow row, global::System.Data.DataRowAction action) {
  2993. this.eventRow = row;
  2994. this.eventAction = action;
  2995. }
  2996. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2997. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2998. public НакладнаяRow Row {
  2999. get {
  3000. return this.eventRow;
  3001. }
  3002. }
  3003. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3004. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3005. public global::System.Data.DataRowAction Action {
  3006. get {
  3007. return this.eventAction;
  3008. }
  3009. }
  3010. }
  3011. /// <summary>
  3012. ///Row event argument class
  3013. ///</summary>
  3014. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3015. public class ПоставщикRowChangeEvent : global::System.EventArgs {
  3016. private ПоставщикRow eventRow;
  3017. private global::System.Data.DataRowAction eventAction;
  3018. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3019. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3020. public ПоставщикRowChangeEvent(ПоставщикRow row, global::System.Data.DataRowAction action) {
  3021. this.eventRow = row;
  3022. this.eventAction = action;
  3023. }
  3024. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3025. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3026. public ПоставщикRow Row {
  3027. get {
  3028. return this.eventRow;
  3029. }
  3030. }
  3031. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3032. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3033. public global::System.Data.DataRowAction Action {
  3034. get {
  3035. return this.eventAction;
  3036. }
  3037. }
  3038. }
  3039. /// <summary>
  3040. ///Row event argument class
  3041. ///</summary>
  3042. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3043. public class Продажа_товараRowChangeEvent : global::System.EventArgs {
  3044. private Продажа_товараRow eventRow;
  3045. private global::System.Data.DataRowAction eventAction;
  3046. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3047. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3048. public Продажа_товараRowChangeEvent(Продажа_товараRow row, global::System.Data.DataRowAction action) {
  3049. this.eventRow = row;
  3050. this.eventAction = action;
  3051. }
  3052. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3053. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3054. public Продажа_товараRow Row {
  3055. get {
  3056. return this.eventRow;
  3057. }
  3058. }
  3059. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3060. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3061. public global::System.Data.DataRowAction Action {
  3062. get {
  3063. return this.eventAction;
  3064. }
  3065. }
  3066. }
  3067. /// <summary>
  3068. ///Row event argument class
  3069. ///</summary>
  3070. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3071. public class СотрудникRowChangeEvent : global::System.EventArgs {
  3072. private СотрудникRow eventRow;
  3073. private global::System.Data.DataRowAction eventAction;
  3074. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3075. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3076. public СотрудникRowChangeEvent(СотрудникRow row, global::System.Data.DataRowAction action) {
  3077. this.eventRow = row;
  3078. this.eventAction = action;
  3079. }
  3080. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3081. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3082. public СотрудникRow Row {
  3083. get {
  3084. return this.eventRow;
  3085. }
  3086. }
  3087. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3088. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3089. public global::System.Data.DataRowAction Action {
  3090. get {
  3091. return this.eventAction;
  3092. }
  3093. }
  3094. }
  3095. /// <summary>
  3096. ///Row event argument class
  3097. ///</summary>
  3098. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3099. public class ТоварыRowChangeEvent : global::System.EventArgs {
  3100. private ТоварыRow eventRow;
  3101. private global::System.Data.DataRowAction eventAction;
  3102. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3103. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3104. public ТоварыRowChangeEvent(ТоварыRow row, global::System.Data.DataRowAction action) {
  3105. this.eventRow = row;
  3106. this.eventAction = action;
  3107. }
  3108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3109. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3110. public ТоварыRow Row {
  3111. get {
  3112. return this.eventRow;
  3113. }
  3114. }
  3115. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3116. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3117. public global::System.Data.DataRowAction Action {
  3118. get {
  3119. return this.eventAction;
  3120. }
  3121. }
  3122. }
  3123. }
  3124. }
  3125. namespace Lyakhov_Tovar.ЛяховDataSetTableAdapters {
  3126. /// <summary>
  3127. ///Represents the connection and commands used to retrieve and save data.
  3128. ///</summary>
  3129. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  3130. [global::System.ComponentModel.ToolboxItem(true)]
  3131. [global::System.ComponentModel.DataObjectAttribute(true)]
  3132. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  3133. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  3134. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3135. public partial class Заказ_товараTableAdapter : global::System.ComponentModel.Component {
  3136. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  3137. private global::System.Data.SqlClient.SqlConnection _connection;
  3138. private global::System.Data.SqlClient.SqlTransaction _transaction;
  3139. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  3140. private bool _clearBeforeFill;
  3141. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3142. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3143. public Заказ_товараTableAdapter() {
  3144. this.ClearBeforeFill = true;
  3145. }
  3146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3147. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3148. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  3149. get {
  3150. if ((this._adapter == null)) {
  3151. this.InitAdapter();
  3152. }
  3153. return this._adapter;
  3154. }
  3155. }
  3156. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3157. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3158. internal global::System.Data.SqlClient.SqlConnection Connection {
  3159. get {
  3160. if ((this._connection == null)) {
  3161. this.InitConnection();
  3162. }
  3163. return this._connection;
  3164. }
  3165. set {
  3166. this._connection = value;
  3167. if ((this.Adapter.InsertCommand != null)) {
  3168. this.Adapter.InsertCommand.Connection = value;
  3169. }
  3170. if ((this.Adapter.DeleteCommand != null)) {
  3171. this.Adapter.DeleteCommand.Connection = value;
  3172. }
  3173. if ((this.Adapter.UpdateCommand != null)) {
  3174. this.Adapter.UpdateCommand.Connection = value;
  3175. }
  3176. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3177. if ((this.CommandCollection[i] != null)) {
  3178. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  3179. }
  3180. }
  3181. }
  3182. }
  3183. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3184. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3185. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  3186. get {
  3187. return this._transaction;
  3188. }
  3189. set {
  3190. this._transaction = value;
  3191. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3192. this.CommandCollection[i].Transaction = this._transaction;
  3193. }
  3194. if (((this.Adapter != null)
  3195. && (this.Adapter.DeleteCommand != null))) {
  3196. this.Adapter.DeleteCommand.Transaction = this._transaction;
  3197. }
  3198. if (((this.Adapter != null)
  3199. && (this.Adapter.InsertCommand != null))) {
  3200. this.Adapter.InsertCommand.Transaction = this._transaction;
  3201. }
  3202. if (((this.Adapter != null)
  3203. && (this.Adapter.UpdateCommand != null))) {
  3204. this.Adapter.UpdateCommand.Transaction = this._transaction;
  3205. }
  3206. }
  3207. }
  3208. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3209. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3210. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  3211. get {
  3212. if ((this._commandCollection == null)) {
  3213. this.InitCommandCollection();
  3214. }
  3215. return this._commandCollection;
  3216. }
  3217. }
  3218. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3219. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3220. public bool ClearBeforeFill {
  3221. get {
  3222. return this._clearBeforeFill;
  3223. }
  3224. set {
  3225. this._clearBeforeFill = value;
  3226. }
  3227. }
  3228. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3229. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3230. private void InitAdapter() {
  3231. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  3232. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  3233. tableMapping.SourceTable = "Table";
  3234. tableMapping.DataSetTable = "Заказ товара";
  3235. tableMapping.ColumnMappings.Add("Код_сотрудника", "Код_сотрудника");
  3236. tableMapping.ColumnMappings.Add("Наименование_товара", "Наименование_товара");
  3237. tableMapping.ColumnMappings.Add("Количество", "Количество");
  3238. tableMapping.ColumnMappings.Add("Код_поставщика", "Код_поставщика");
  3239. tableMapping.ColumnMappings.Add("Код_заказа", "Код_заказа");
  3240. tableMapping.ColumnMappings.Add("Код_товара", "Код_товара");
  3241. this._adapter.TableMappings.Add(tableMapping);
  3242. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  3243. this._adapter.DeleteCommand.Connection = this.Connection;
  3244. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Заказ товара] WHERE (([Код_сотрудника] = @Original_Код_сотрудника) AND ([Наименование_товара] = @Original_Наименование_товара) AND ([Количество] = @Original_Количество) AND ([Код_поставщика] = @Original_Код_поставщика) AND ([Код_заказа] = @Original_Код_заказа) AND ([Код_товара] = @Original_Код_товара))";
  3245. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  3246. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3247. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Наименование_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3248. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3249. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3250. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3251. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3252. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  3253. this._adapter.InsertCommand.Connection = this.Connection;
  3254. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Заказ товара] ([Код_сотрудника], [Наименование_товара], [Количество], [Код_поставщика], [Код_товара]) VALUES (@Код_сотрудника, @Наименование_товара, @Количество, @Код_поставщика, @Код_товара);
  3255. SELECT Код_сотрудника, Наименование_товара, Количество, Код_поставщика, Код_заказа, Код_товара FROM [Заказ товара] WHERE (Код_заказа = SCOPE_IDENTITY())";
  3256. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  3257. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3258. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Наименование_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3259. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3260. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3261. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3262. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  3263. this._adapter.UpdateCommand.Connection = this.Connection;
  3264. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Заказ товара] SET [Код_сотрудника] = @Код_сотрудника, [Наименование_товара] = @Наименование_товара, [Количество] = @Количество, [Код_поставщика] = @Код_поставщика, [Код_товара] = @Код_товара WHERE (([Код_сотрудника] = @Original_Код_сотрудника) AND ([Наименование_товара] = @Original_Наименование_товара) AND ([Количество] = @Original_Количество) AND ([Код_поставщика] = @Original_Код_поставщика) AND ([Код_заказа] = @Original_Код_заказа) AND ([Код_товара] = @Original_Код_товара));
  3265. SELECT Код_сотрудника, Наименование_товара, Количество, Код_поставщика, Код_заказа, Код_товара FROM [Заказ товара] WHERE (Код_заказа = @Код_заказа)";
  3266. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  3267. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3268. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Наименование_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3269. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3270. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3271. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3272. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3273. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Наименование_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3274. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3275. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3276. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3277. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3278. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_заказа", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3279. }
  3280. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3281. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3282. private void InitConnection() {
  3283. this._connection = new global::System.Data.SqlClient.SqlConnection();
  3284. this._connection.ConnectionString = global::Lyakhov_Tovar.Properties.Settings.Default.ЛяховConnectionString;
  3285. }
  3286. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3287. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3288. private void InitCommandCollection() {
  3289. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  3290. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  3291. this._commandCollection[0].Connection = this.Connection;
  3292. this._commandCollection[0].CommandText = "SELECT Код_сотрудника, Наименование_товара, Количество, Код_поставщика, Код_заказ" +
  3293. "а, Код_товара FROM dbo.[Заказ товара]";
  3294. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  3295. }
  3296. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3297. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3298. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3299. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  3300. public virtual int Fill(ЛяховDataSet.Заказ_товараDataTable dataTable) {
  3301. this.Adapter.SelectCommand = this.CommandCollection[0];
  3302. if ((this.ClearBeforeFill == true)) {
  3303. dataTable.Clear();
  3304. }
  3305. int returnValue = this.Adapter.Fill(dataTable);
  3306. return returnValue;
  3307. }
  3308. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3309. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3310. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3311. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  3312. public virtual ЛяховDataSet.Заказ_товараDataTable GetData() {
  3313. this.Adapter.SelectCommand = this.CommandCollection[0];
  3314. ЛяховDataSet.Заказ_товараDataTable dataTable = new ЛяховDataSet.Заказ_товараDataTable();
  3315. this.Adapter.Fill(dataTable);
  3316. return dataTable;
  3317. }
  3318. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3319. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3320. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3321. public virtual int Update(ЛяховDataSet.Заказ_товараDataTable dataTable) {
  3322. return this.Adapter.Update(dataTable);
  3323. }
  3324. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3325. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3326. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3327. public virtual int Update(ЛяховDataSet dataSet) {
  3328. return this.Adapter.Update(dataSet, "Заказ товара");
  3329. }
  3330. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3331. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3332. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3333. public virtual int Update(global::System.Data.DataRow dataRow) {
  3334. return this.Adapter.Update(new global::System.Data.DataRow[] {
  3335. dataRow});
  3336. }
  3337. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3338. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3339. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3340. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  3341. return this.Adapter.Update(dataRows);
  3342. }
  3343. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3344. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3345. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3346. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  3347. public virtual int Delete(int Original_Код_сотрудника, string Original_Наименование_товара, int Original_Количество, int Original_Код_поставщика, int Original_Код_заказа, int Original_Код_товара) {
  3348. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Код_сотрудника));
  3349. if ((Original_Наименование_товара == null)) {
  3350. throw new global::System.ArgumentNullException("Original_Наименование_товара");
  3351. }
  3352. else {
  3353. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Наименование_товара));
  3354. }
  3355. this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Количество));
  3356. this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_Код_поставщика));
  3357. this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Код_заказа));
  3358. this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_Код_товара));
  3359. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  3360. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3361. != global::System.Data.ConnectionState.Open)) {
  3362. this.Adapter.DeleteCommand.Connection.Open();
  3363. }
  3364. try {
  3365. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  3366. return returnValue;
  3367. }
  3368. finally {
  3369. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3370. this.Adapter.DeleteCommand.Connection.Close();
  3371. }
  3372. }
  3373. }
  3374. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3375. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3376. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3377. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  3378. public virtual int Insert(int Код_сотрудника, string Наименование_товара, int Количество, int Код_поставщика, int Код_товара) {
  3379. this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Код_сотрудника));
  3380. if ((Наименование_товара == null)) {
  3381. throw new global::System.ArgumentNullException("Наименование_товара");
  3382. }
  3383. else {
  3384. this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Наименование_товара));
  3385. }
  3386. this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Количество));
  3387. this.Adapter.InsertCommand.Parameters[3].Value = ((int)(Код_поставщика));
  3388. this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Код_товара));
  3389. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  3390. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3391. != global::System.Data.ConnectionState.Open)) {
  3392. this.Adapter.InsertCommand.Connection.Open();
  3393. }
  3394. try {
  3395. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  3396. return returnValue;
  3397. }
  3398. finally {
  3399. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3400. this.Adapter.InsertCommand.Connection.Close();
  3401. }
  3402. }
  3403. }
  3404. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3405. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3406. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3407. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3408. public virtual int Update(int Код_сотрудника, string Наименование_товара, int Количество, int Код_поставщика, int Код_товара, int Original_Код_сотрудника, string Original_Наименование_товара, int Original_Количество, int Original_Код_поставщика, int Original_Код_заказа, int Original_Код_товара, int Код_заказа) {
  3409. this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Код_сотрудника));
  3410. if ((Наименование_товара == null)) {
  3411. throw new global::System.ArgumentNullException("Наименование_товара");
  3412. }
  3413. else {
  3414. this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Наименование_товара));
  3415. }
  3416. this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Количество));
  3417. this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Код_поставщика));
  3418. this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Код_товара));
  3419. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_Код_сотрудника));
  3420. if ((Original_Наименование_товара == null)) {
  3421. throw new global::System.ArgumentNullException("Original_Наименование_товара");
  3422. }
  3423. else {
  3424. this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Наименование_товара));
  3425. }
  3426. this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Количество));
  3427. this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_Код_поставщика));
  3428. this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_Код_заказа));
  3429. this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_Код_товара));
  3430. this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Код_заказа));
  3431. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  3432. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3433. != global::System.Data.ConnectionState.Open)) {
  3434. this.Adapter.UpdateCommand.Connection.Open();
  3435. }
  3436. try {
  3437. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  3438. return returnValue;
  3439. }
  3440. finally {
  3441. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3442. this.Adapter.UpdateCommand.Connection.Close();
  3443. }
  3444. }
  3445. }
  3446. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3447. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3448. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3449. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3450. public virtual int Update(int Код_сотрудника, string Наименование_товара, int Количество, int Код_поставщика, int Код_товара, int Original_Код_сотрудника, string Original_Наименование_товара, int Original_Количество, int Original_Код_поставщика, int Original_Код_заказа, int Original_Код_товара) {
  3451. return this.Update(Код_сотрудника, Наименование_товара, Количество, Код_поставщика, Код_товара, Original_Код_сотрудника, Original_Наименование_товара, Original_Количество, Original_Код_поставщика, Original_Код_заказа, Original_Код_товара, Original_Код_заказа);
  3452. }
  3453. }
  3454. /// <summary>
  3455. ///Represents the connection and commands used to retrieve and save data.
  3456. ///</summary>
  3457. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  3458. [global::System.ComponentModel.ToolboxItem(true)]
  3459. [global::System.ComponentModel.DataObjectAttribute(true)]
  3460. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  3461. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  3462. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3463. public partial class НакладнаяTableAdapter : global::System.ComponentModel.Component {
  3464. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  3465. private global::System.Data.SqlClient.SqlConnection _connection;
  3466. private global::System.Data.SqlClient.SqlTransaction _transaction;
  3467. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  3468. private bool _clearBeforeFill;
  3469. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3470. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3471. public НакладнаяTableAdapter() {
  3472. this.ClearBeforeFill = true;
  3473. }
  3474. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3475. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3476. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  3477. get {
  3478. if ((this._adapter == null)) {
  3479. this.InitAdapter();
  3480. }
  3481. return this._adapter;
  3482. }
  3483. }
  3484. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3485. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3486. internal global::System.Data.SqlClient.SqlConnection Connection {
  3487. get {
  3488. if ((this._connection == null)) {
  3489. this.InitConnection();
  3490. }
  3491. return this._connection;
  3492. }
  3493. set {
  3494. this._connection = value;
  3495. if ((this.Adapter.InsertCommand != null)) {
  3496. this.Adapter.InsertCommand.Connection = value;
  3497. }
  3498. if ((this.Adapter.DeleteCommand != null)) {
  3499. this.Adapter.DeleteCommand.Connection = value;
  3500. }
  3501. if ((this.Adapter.UpdateCommand != null)) {
  3502. this.Adapter.UpdateCommand.Connection = value;
  3503. }
  3504. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3505. if ((this.CommandCollection[i] != null)) {
  3506. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  3507. }
  3508. }
  3509. }
  3510. }
  3511. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3512. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3513. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  3514. get {
  3515. return this._transaction;
  3516. }
  3517. set {
  3518. this._transaction = value;
  3519. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3520. this.CommandCollection[i].Transaction = this._transaction;
  3521. }
  3522. if (((this.Adapter != null)
  3523. && (this.Adapter.DeleteCommand != null))) {
  3524. this.Adapter.DeleteCommand.Transaction = this._transaction;
  3525. }
  3526. if (((this.Adapter != null)
  3527. && (this.Adapter.InsertCommand != null))) {
  3528. this.Adapter.InsertCommand.Transaction = this._transaction;
  3529. }
  3530. if (((this.Adapter != null)
  3531. && (this.Adapter.UpdateCommand != null))) {
  3532. this.Adapter.UpdateCommand.Transaction = this._transaction;
  3533. }
  3534. }
  3535. }
  3536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3537. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3538. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  3539. get {
  3540. if ((this._commandCollection == null)) {
  3541. this.InitCommandCollection();
  3542. }
  3543. return this._commandCollection;
  3544. }
  3545. }
  3546. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3547. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3548. public bool ClearBeforeFill {
  3549. get {
  3550. return this._clearBeforeFill;
  3551. }
  3552. set {
  3553. this._clearBeforeFill = value;
  3554. }
  3555. }
  3556. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3557. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3558. private void InitAdapter() {
  3559. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  3560. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  3561. tableMapping.SourceTable = "Table";
  3562. tableMapping.DataSetTable = "Накладная";
  3563. tableMapping.ColumnMappings.Add("Название_товара", "Название_товара");
  3564. tableMapping.ColumnMappings.Add("Количество", "Количество");
  3565. tableMapping.ColumnMappings.Add("Стоимость", "Стоимость");
  3566. tableMapping.ColumnMappings.Add("Дата_привоза_товара", "Дата_привоза_товара");
  3567. tableMapping.ColumnMappings.Add("Код_поставщика", "Код_поставщика");
  3568. tableMapping.ColumnMappings.Add("Код_сотрудника", "Код_сотрудника");
  3569. tableMapping.ColumnMappings.Add("Код_накладной", "Код_накладной");
  3570. this._adapter.TableMappings.Add(tableMapping);
  3571. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  3572. this._adapter.DeleteCommand.Connection = this.Connection;
  3573. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Накладная] WHERE (([Название_товара] = @Original_Название_товара) AND ([Количество] = @Original_Количество) AND ([Стоимость] = @Original_Стоимость) AND ([Дата_привоза_товара] = @Original_Дата_привоза_товара) AND ([Код_поставщика] = @Original_Код_поставщика) AND ([Код_сотрудника] = @Original_Код_сотрудника) AND ([Код_накладной] = @Original_Код_накладной))";
  3574. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  3575. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Название_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3576. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3577. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Стоимость", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Стоимость", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3578. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Дата_привоза_товара", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_привоза_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3579. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3580. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3581. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_накладной", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_накладной", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3582. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  3583. this._adapter.InsertCommand.Connection = this.Connection;
  3584. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Накладная] ([Название_товара], [Количество], [Стоимость], [Дата_привоза_товара], [Код_поставщика], [Код_сотрудника]) VALUES (@Название_товара, @Количество, @Стоимость, @Дата_привоза_товара, @Код_поставщика, @Код_сотрудника);
  3585. SELECT Название_товара, Количество, Стоимость, Дата_привоза_товара, Код_поставщика, Код_сотрудника, Код_накладной FROM Накладная WHERE (Код_накладной = SCOPE_IDENTITY())";
  3586. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  3587. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Название_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3588. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3589. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Стоимость", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Стоимость", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3590. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_привоза_товара", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_привоза_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3591. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3592. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3593. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  3594. this._adapter.UpdateCommand.Connection = this.Connection;
  3595. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Накладная] SET [Название_товара] = @Название_товара, [Количество] = @Количество, [Стоимость] = @Стоимость, [Дата_привоза_товара] = @Дата_привоза_товара, [Код_поставщика] = @Код_поставщика, [Код_сотрудника] = @Код_сотрудника WHERE (([Название_товара] = @Original_Название_товара) AND ([Количество] = @Original_Количество) AND ([Стоимость] = @Original_Стоимость) AND ([Дата_привоза_товара] = @Original_Дата_привоза_товара) AND ([Код_поставщика] = @Original_Код_поставщика) AND ([Код_сотрудника] = @Original_Код_сотрудника) AND ([Код_накладной] = @Original_Код_накладной));
  3596. SELECT Название_товара, Количество, Стоимость, Дата_привоза_товара, Код_поставщика, Код_сотрудника, Код_накладной FROM Накладная WHERE (Код_накладной = @Код_накладной)";
  3597. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  3598. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Название_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3599. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3600. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Стоимость", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Стоимость", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3601. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_привоза_товара", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_привоза_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3602. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3603. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3604. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Название_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3605. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3606. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Стоимость", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Стоимость", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3607. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Дата_привоза_товара", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_привоза_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3608. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3609. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3610. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_накладной", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_накладной", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3611. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_накладной", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Код_накладной", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3612. }
  3613. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3614. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3615. private void InitConnection() {
  3616. this._connection = new global::System.Data.SqlClient.SqlConnection();
  3617. this._connection.ConnectionString = global::Lyakhov_Tovar.Properties.Settings.Default.ЛяховConnectionString;
  3618. }
  3619. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3620. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3621. private void InitCommandCollection() {
  3622. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2];
  3623. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  3624. this._commandCollection[0].Connection = this.Connection;
  3625. this._commandCollection[0].CommandText = "SELECT Название_товара, Количество, Стоимость, Дата_привоза_товара, Код_поставщик" +
  3626. "а, Код_сотрудника, Код_накладной FROM dbo.Накладная";
  3627. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  3628. this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand();
  3629. this._commandCollection[1].Connection = this.Connection;
  3630. this._commandCollection[1].CommandText = "SELECT Название_товара, Количество, Стоимость, Дата_привоза_товара, Код_поставщик" +
  3631. "а, Код_сотрудника, Код_накладной FROM dbo.Накладная";
  3632. this._commandCollection[1].CommandType = global::System.Data.CommandType.Text;
  3633. }
  3634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3635. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3636. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3637. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  3638. public virtual int Fill(ЛяховDataSet.НакладнаяDataTable dataTable) {
  3639. this.Adapter.SelectCommand = this.CommandCollection[0];
  3640. if ((this.ClearBeforeFill == true)) {
  3641. dataTable.Clear();
  3642. }
  3643. int returnValue = this.Adapter.Fill(dataTable);
  3644. return returnValue;
  3645. }
  3646. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3647. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3648. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3649. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  3650. public virtual ЛяховDataSet.НакладнаяDataTable GetData() {
  3651. this.Adapter.SelectCommand = this.CommandCollection[0];
  3652. ЛяховDataSet.НакладнаяDataTable dataTable = new ЛяховDataSet.НакладнаяDataTable();
  3653. this.Adapter.Fill(dataTable);
  3654. return dataTable;
  3655. }
  3656. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3657. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3658. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3659. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)]
  3660. public virtual int FillBy(ЛяховDataSet.НакладнаяDataTable dataTable) {
  3661. this.Adapter.SelectCommand = this.CommandCollection[1];
  3662. if ((this.ClearBeforeFill == true)) {
  3663. dataTable.Clear();
  3664. }
  3665. int returnValue = this.Adapter.Fill(dataTable);
  3666. return returnValue;
  3667. }
  3668. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3669. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3670. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3671. public virtual int Update(ЛяховDataSet.НакладнаяDataTable dataTable) {
  3672. return this.Adapter.Update(dataTable);
  3673. }
  3674. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3675. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3676. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3677. public virtual int Update(ЛяховDataSet dataSet) {
  3678. return this.Adapter.Update(dataSet, "Накладная");
  3679. }
  3680. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3681. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3682. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3683. public virtual int Update(global::System.Data.DataRow dataRow) {
  3684. return this.Adapter.Update(new global::System.Data.DataRow[] {
  3685. dataRow});
  3686. }
  3687. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3688. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3689. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3690. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  3691. return this.Adapter.Update(dataRows);
  3692. }
  3693. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3694. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3695. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3696. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  3697. public virtual int Delete(string Original_Название_товара, int Original_Количество, decimal Original_Стоимость, System.DateTime Original_Дата_привоза_товара, int Original_Код_поставщика, int Original_Код_сотрудника, int Original_Код_накладной) {
  3698. if ((Original_Название_товара == null)) {
  3699. throw new global::System.ArgumentNullException("Original_Название_товара");
  3700. }
  3701. else {
  3702. this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Название_товара));
  3703. }
  3704. this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_Количество));
  3705. this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_Стоимость));
  3706. this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_Дата_привоза_товара));
  3707. this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Код_поставщика));
  3708. this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_Код_сотрудника));
  3709. this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_Код_накладной));
  3710. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  3711. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3712. != global::System.Data.ConnectionState.Open)) {
  3713. this.Adapter.DeleteCommand.Connection.Open();
  3714. }
  3715. try {
  3716. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  3717. return returnValue;
  3718. }
  3719. finally {
  3720. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3721. this.Adapter.DeleteCommand.Connection.Close();
  3722. }
  3723. }
  3724. }
  3725. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3726. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3727. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3728. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  3729. public virtual int Insert(string Название_товара, int Количество, decimal Стоимость, System.DateTime Дата_привоза_товара, int Код_поставщика, int Код_сотрудника) {
  3730. if ((Название_товара == null)) {
  3731. throw new global::System.ArgumentNullException("Название_товара");
  3732. }
  3733. else {
  3734. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Название_товара));
  3735. }
  3736. this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Количество));
  3737. this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(Стоимость));
  3738. this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(Дата_привоза_товара));
  3739. this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Код_поставщика));
  3740. this.Adapter.InsertCommand.Parameters[5].Value = ((int)(Код_сотрудника));
  3741. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  3742. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3743. != global::System.Data.ConnectionState.Open)) {
  3744. this.Adapter.InsertCommand.Connection.Open();
  3745. }
  3746. try {
  3747. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  3748. return returnValue;
  3749. }
  3750. finally {
  3751. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3752. this.Adapter.InsertCommand.Connection.Close();
  3753. }
  3754. }
  3755. }
  3756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3757. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3758. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3759. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3760. public virtual int Update(string Название_товара, int Количество, decimal Стоимость, System.DateTime Дата_привоза_товара, int Код_поставщика, int Код_сотрудника, string Original_Название_товара, int Original_Количество, decimal Original_Стоимость, System.DateTime Original_Дата_привоза_товара, int Original_Код_поставщика, int Original_Код_сотрудника, int Original_Код_накладной, int Код_накладной) {
  3761. if ((Название_товара == null)) {
  3762. throw new global::System.ArgumentNullException("Название_товара");
  3763. }
  3764. else {
  3765. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Название_товара));
  3766. }
  3767. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Количество));
  3768. this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(Стоимость));
  3769. this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(Дата_привоза_товара));
  3770. this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Код_поставщика));
  3771. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Код_сотрудника));
  3772. if ((Original_Название_товара == null)) {
  3773. throw new global::System.ArgumentNullException("Original_Название_товара");
  3774. }
  3775. else {
  3776. this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Название_товара));
  3777. }
  3778. this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Количество));
  3779. this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(Original_Стоимость));
  3780. this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_Дата_привоза_товара));
  3781. this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_Код_поставщика));
  3782. this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_Код_сотрудника));
  3783. this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_Код_накладной));
  3784. this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Код_накладной));
  3785. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  3786. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3787. != global::System.Data.ConnectionState.Open)) {
  3788. this.Adapter.UpdateCommand.Connection.Open();
  3789. }
  3790. try {
  3791. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  3792. return returnValue;
  3793. }
  3794. finally {
  3795. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3796. this.Adapter.UpdateCommand.Connection.Close();
  3797. }
  3798. }
  3799. }
  3800. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3801. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3802. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3803. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3804. public virtual int Update(string Название_товара, int Количество, decimal Стоимость, System.DateTime Дата_привоза_товара, int Код_поставщика, int Код_сотрудника, string Original_Название_товара, int Original_Количество, decimal Original_Стоимость, System.DateTime Original_Дата_привоза_товара, int Original_Код_поставщика, int Original_Код_сотрудника, int Original_Код_накладной) {
  3805. return this.Update(Название_товара, Количество, Стоимость, Дата_привоза_товара, Код_поставщика, Код_сотрудника, Original_Название_товара, Original_Количество, Original_Стоимость, Original_Дата_привоза_товара, Original_Код_поставщика, Original_Код_сотрудника, Original_Код_накладной, Original_Код_накладной);
  3806. }
  3807. }
  3808. /// <summary>
  3809. ///Represents the connection and commands used to retrieve and save data.
  3810. ///</summary>
  3811. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  3812. [global::System.ComponentModel.ToolboxItem(true)]
  3813. [global::System.ComponentModel.DataObjectAttribute(true)]
  3814. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  3815. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  3816. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3817. public partial class ПоставщикTableAdapter : global::System.ComponentModel.Component {
  3818. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  3819. private global::System.Data.SqlClient.SqlConnection _connection;
  3820. private global::System.Data.SqlClient.SqlTransaction _transaction;
  3821. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  3822. private bool _clearBeforeFill;
  3823. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3824. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3825. public ПоставщикTableAdapter() {
  3826. this.ClearBeforeFill = true;
  3827. }
  3828. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3829. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3830. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  3831. get {
  3832. if ((this._adapter == null)) {
  3833. this.InitAdapter();
  3834. }
  3835. return this._adapter;
  3836. }
  3837. }
  3838. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3839. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3840. internal global::System.Data.SqlClient.SqlConnection Connection {
  3841. get {
  3842. if ((this._connection == null)) {
  3843. this.InitConnection();
  3844. }
  3845. return this._connection;
  3846. }
  3847. set {
  3848. this._connection = value;
  3849. if ((this.Adapter.InsertCommand != null)) {
  3850. this.Adapter.InsertCommand.Connection = value;
  3851. }
  3852. if ((this.Adapter.DeleteCommand != null)) {
  3853. this.Adapter.DeleteCommand.Connection = value;
  3854. }
  3855. if ((this.Adapter.UpdateCommand != null)) {
  3856. this.Adapter.UpdateCommand.Connection = value;
  3857. }
  3858. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3859. if ((this.CommandCollection[i] != null)) {
  3860. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  3861. }
  3862. }
  3863. }
  3864. }
  3865. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3866. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3867. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  3868. get {
  3869. return this._transaction;
  3870. }
  3871. set {
  3872. this._transaction = value;
  3873. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3874. this.CommandCollection[i].Transaction = this._transaction;
  3875. }
  3876. if (((this.Adapter != null)
  3877. && (this.Adapter.DeleteCommand != null))) {
  3878. this.Adapter.DeleteCommand.Transaction = this._transaction;
  3879. }
  3880. if (((this.Adapter != null)
  3881. && (this.Adapter.InsertCommand != null))) {
  3882. this.Adapter.InsertCommand.Transaction = this._transaction;
  3883. }
  3884. if (((this.Adapter != null)
  3885. && (this.Adapter.UpdateCommand != null))) {
  3886. this.Adapter.UpdateCommand.Transaction = this._transaction;
  3887. }
  3888. }
  3889. }
  3890. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3891. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3892. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  3893. get {
  3894. if ((this._commandCollection == null)) {
  3895. this.InitCommandCollection();
  3896. }
  3897. return this._commandCollection;
  3898. }
  3899. }
  3900. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3901. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3902. public bool ClearBeforeFill {
  3903. get {
  3904. return this._clearBeforeFill;
  3905. }
  3906. set {
  3907. this._clearBeforeFill = value;
  3908. }
  3909. }
  3910. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3911. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3912. private void InitAdapter() {
  3913. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  3914. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  3915. tableMapping.SourceTable = "Table";
  3916. tableMapping.DataSetTable = "Поставщик";
  3917. tableMapping.ColumnMappings.Add("Название_фирмы_поставщика", "Название_фирмы_поставщика");
  3918. tableMapping.ColumnMappings.Add("Количество_привезенного_товара", "Количество_привезенного_товара");
  3919. tableMapping.ColumnMappings.Add("Цена_товара", "Цена_товара");
  3920. tableMapping.ColumnMappings.Add("Адрес", "Адрес");
  3921. tableMapping.ColumnMappings.Add("Код_поставщика", "Код_поставщика");
  3922. tableMapping.ColumnMappings.Add("Код_заказа", "Код_заказа");
  3923. tableMapping.ColumnMappings.Add("Код_накладной", "Код_накладной");
  3924. this._adapter.TableMappings.Add(tableMapping);
  3925. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  3926. this._adapter.DeleteCommand.Connection = this.Connection;
  3927. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Поставщик] WHERE (([Название_фирмы_поставщика] = @Original_Название_фирмы_поставщика) AND ([Количество_привезенного_товара] = @Original_Количество_привезенного_товара) AND ([Цена_товара] = @Original_Цена_товара) AND ([Адрес] = @Original_Адрес) AND ([Код_поставщика] = @Original_Код_поставщика) AND ((@IsNull_Код_заказа = 1 AND [Код_заказа] IS NULL) OR ([Код_заказа] = @Original_Код_заказа)) AND ((@IsNull_Код_накладной = 1 AND [Код_накладной] IS NULL) OR ([Код_накладной] = @Original_Код_накладной)))";
  3928. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  3929. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Название_фирмы_поставщика", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_фирмы_поставщика", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3930. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество_привезенного_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество_привезенного_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3931. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Цена_товара", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3932. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Адрес", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Адрес", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3933. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3934. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3935. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3936. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Код_накладной", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_накладной", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3937. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_накладной", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_накладной", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3938. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  3939. this._adapter.InsertCommand.Connection = this.Connection;
  3940. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Поставщик] ([Название_фирмы_поставщика], [Количество_привезенного_товара], [Цена_товара], [Адрес], [Код_заказа], [Код_накладной]) VALUES (@Название_фирмы_поставщика, @Количество_привезенного_товара, @Цена_товара, @Адрес, @Код_заказа, @Код_накладной);
  3941. SELECT Название_фирмы_поставщика, Количество_привезенного_товара, Цена_товара, Адрес, Код_поставщика, Код_заказа, Код_накладной FROM Поставщик WHERE (Код_поставщика = SCOPE_IDENTITY())";
  3942. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  3943. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Название_фирмы_поставщика", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_фирмы_поставщика", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3944. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество_привезенного_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество_привезенного_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3945. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Цена_товара", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3946. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Адрес", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Адрес", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3947. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3948. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_накладной", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_накладной", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3949. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  3950. this._adapter.UpdateCommand.Connection = this.Connection;
  3951. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Поставщик] SET [Название_фирмы_поставщика] = @Название_фирмы_поставщика, [Количество_привезенного_товара] = @Количество_привезенного_товара, [Цена_товара] = @Цена_товара, [Адрес] = @Адрес, [Код_заказа] = @Код_заказа, [Код_накладной] = @Код_накладной WHERE (([Название_фирмы_поставщика] = @Original_Название_фирмы_поставщика) AND ([Количество_привезенного_товара] = @Original_Количество_привезенного_товара) AND ([Цена_товара] = @Original_Цена_товара) AND ([Адрес] = @Original_Адрес) AND ([Код_поставщика] = @Original_Код_поставщика) AND ((@IsNull_Код_заказа = 1 AND [Код_заказа] IS NULL) OR ([Код_заказа] = @Original_Код_заказа)) AND ((@IsNull_Код_накладной = 1 AND [Код_накладной] IS NULL) OR ([Код_накладной] = @Original_Код_накладной)));
  3952. SELECT Название_фирмы_поставщика, Количество_привезенного_товара, Цена_товара, Адрес, Код_поставщика, Код_заказа, Код_накладной FROM Поставщик WHERE (Код_поставщика = @Код_поставщика)";
  3953. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  3954. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Название_фирмы_поставщика", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_фирмы_поставщика", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3955. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество_привезенного_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество_привезенного_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3956. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Цена_товара", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3957. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Адрес", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Адрес", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3958. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3959. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_накладной", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_накладной", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3960. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Название_фирмы_поставщика", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_фирмы_поставщика", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3961. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество_привезенного_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество_привезенного_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3962. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Цена_товара", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3963. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Адрес", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Адрес", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3964. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_поставщика", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3965. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3966. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3967. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Код_накладной", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_накладной", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3968. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_накладной", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_накладной", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3969. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_поставщика", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Код_поставщика", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3970. }
  3971. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3972. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3973. private void InitConnection() {
  3974. this._connection = new global::System.Data.SqlClient.SqlConnection();
  3975. this._connection.ConnectionString = global::Lyakhov_Tovar.Properties.Settings.Default.ЛяховConnectionString;
  3976. }
  3977. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3978. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3979. private void InitCommandCollection() {
  3980. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  3981. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  3982. this._commandCollection[0].Connection = this.Connection;
  3983. this._commandCollection[0].CommandText = "SELECT Название_фирмы_поставщика, Количество_привезенного_товара, Цена_товара, Ад" +
  3984. "рес, Код_поставщика, Код_заказа, Код_накладной FROM dbo.Поставщик";
  3985. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  3986. }
  3987. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3988. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  3989. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3990. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  3991. public virtual int Fill(ЛяховDataSet.ПоставщикDataTable dataTable) {
  3992. this.Adapter.SelectCommand = this.CommandCollection[0];
  3993. if ((this.ClearBeforeFill == true)) {
  3994. dataTable.Clear();
  3995. }
  3996. int returnValue = this.Adapter.Fill(dataTable);
  3997. return returnValue;
  3998. }
  3999. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4000. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4001. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4002. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  4003. public virtual ЛяховDataSet.ПоставщикDataTable GetData() {
  4004. this.Adapter.SelectCommand = this.CommandCollection[0];
  4005. ЛяховDataSet.ПоставщикDataTable dataTable = new ЛяховDataSet.ПоставщикDataTable();
  4006. this.Adapter.Fill(dataTable);
  4007. return dataTable;
  4008. }
  4009. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4010. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4011. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4012. public virtual int Update(ЛяховDataSet.ПоставщикDataTable dataTable) {
  4013. return this.Adapter.Update(dataTable);
  4014. }
  4015. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4016. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4017. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4018. public virtual int Update(ЛяховDataSet dataSet) {
  4019. return this.Adapter.Update(dataSet, "Поставщик");
  4020. }
  4021. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4022. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4023. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4024. public virtual int Update(global::System.Data.DataRow dataRow) {
  4025. return this.Adapter.Update(new global::System.Data.DataRow[] {
  4026. dataRow});
  4027. }
  4028. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4029. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4030. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4031. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  4032. return this.Adapter.Update(dataRows);
  4033. }
  4034. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4035. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4036. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4037. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  4038. public virtual int Delete(string Original_Название_фирмы_поставщика, int Original_Количество_привезенного_товара, decimal Original_Цена_товара, string Original_Адрес, int Original_Код_поставщика, global::System.Nullable<int> Original_Код_заказа, global::System.Nullable<int> Original_Код_накладной) {
  4039. if ((Original_Название_фирмы_поставщика == null)) {
  4040. throw new global::System.ArgumentNullException("Original_Название_фирмы_поставщика");
  4041. }
  4042. else {
  4043. this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Название_фирмы_поставщика));
  4044. }
  4045. this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_Количество_привезенного_товара));
  4046. this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_Цена_товара));
  4047. if ((Original_Адрес == null)) {
  4048. throw new global::System.ArgumentNullException("Original_Адрес");
  4049. }
  4050. else {
  4051. this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Адрес));
  4052. }
  4053. this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Код_поставщика));
  4054. if ((Original_Код_заказа.HasValue == true)) {
  4055. this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
  4056. this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_Код_заказа.Value));
  4057. }
  4058. else {
  4059. this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
  4060. this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
  4061. }
  4062. if ((Original_Код_накладной.HasValue == true)) {
  4063. this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
  4064. this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_Код_накладной.Value));
  4065. }
  4066. else {
  4067. this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
  4068. this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
  4069. }
  4070. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  4071. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4072. != global::System.Data.ConnectionState.Open)) {
  4073. this.Adapter.DeleteCommand.Connection.Open();
  4074. }
  4075. try {
  4076. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  4077. return returnValue;
  4078. }
  4079. finally {
  4080. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4081. this.Adapter.DeleteCommand.Connection.Close();
  4082. }
  4083. }
  4084. }
  4085. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4086. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4087. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4088. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  4089. public virtual int Insert(string Название_фирмы_поставщика, int Количество_привезенного_товара, decimal Цена_товара, string Адрес, global::System.Nullable<int> Код_заказа, global::System.Nullable<int> Код_накладной) {
  4090. if ((Название_фирмы_поставщика == null)) {
  4091. throw new global::System.ArgumentNullException("Название_фирмы_поставщика");
  4092. }
  4093. else {
  4094. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Название_фирмы_поставщика));
  4095. }
  4096. this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Количество_привезенного_товара));
  4097. this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(Цена_товара));
  4098. if ((Адрес == null)) {
  4099. throw new global::System.ArgumentNullException("Адрес");
  4100. }
  4101. else {
  4102. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Адрес));
  4103. }
  4104. if ((Код_заказа.HasValue == true)) {
  4105. this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Код_заказа.Value));
  4106. }
  4107. else {
  4108. this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
  4109. }
  4110. if ((Код_накладной.HasValue == true)) {
  4111. this.Adapter.InsertCommand.Parameters[5].Value = ((int)(Код_накладной.Value));
  4112. }
  4113. else {
  4114. this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
  4115. }
  4116. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  4117. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4118. != global::System.Data.ConnectionState.Open)) {
  4119. this.Adapter.InsertCommand.Connection.Open();
  4120. }
  4121. try {
  4122. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  4123. return returnValue;
  4124. }
  4125. finally {
  4126. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4127. this.Adapter.InsertCommand.Connection.Close();
  4128. }
  4129. }
  4130. }
  4131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4132. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4133. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4134. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4135. public virtual int Update(string Название_фирмы_поставщика, int Количество_привезенного_товара, decimal Цена_товара, string Адрес, global::System.Nullable<int> Код_заказа, global::System.Nullable<int> Код_накладной, string Original_Название_фирмы_поставщика, int Original_Количество_привезенного_товара, decimal Original_Цена_товара, string Original_Адрес, int Original_Код_поставщика, global::System.Nullable<int> Original_Код_заказа, global::System.Nullable<int> Original_Код_накладной, int Код_поставщика) {
  4136. if ((Название_фирмы_поставщика == null)) {
  4137. throw new global::System.ArgumentNullException("Название_фирмы_поставщика");
  4138. }
  4139. else {
  4140. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Название_фирмы_поставщика));
  4141. }
  4142. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Количество_привезенного_товара));
  4143. this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(Цена_товара));
  4144. if ((Адрес == null)) {
  4145. throw new global::System.ArgumentNullException("Адрес");
  4146. }
  4147. else {
  4148. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Адрес));
  4149. }
  4150. if ((Код_заказа.HasValue == true)) {
  4151. this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Код_заказа.Value));
  4152. }
  4153. else {
  4154. this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
  4155. }
  4156. if ((Код_накладной.HasValue == true)) {
  4157. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Код_накладной.Value));
  4158. }
  4159. else {
  4160. this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
  4161. }
  4162. if ((Original_Название_фирмы_поставщика == null)) {
  4163. throw new global::System.ArgumentNullException("Original_Название_фирмы_поставщика");
  4164. }
  4165. else {
  4166. this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Название_фирмы_поставщика));
  4167. }
  4168. this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Количество_привезенного_товара));
  4169. this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(Original_Цена_товара));
  4170. if ((Original_Адрес == null)) {
  4171. throw new global::System.ArgumentNullException("Original_Адрес");
  4172. }
  4173. else {
  4174. this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Адрес));
  4175. }
  4176. this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_Код_поставщика));
  4177. if ((Original_Код_заказа.HasValue == true)) {
  4178. this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
  4179. this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_Код_заказа.Value));
  4180. }
  4181. else {
  4182. this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
  4183. this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
  4184. }
  4185. if ((Original_Код_накладной.HasValue == true)) {
  4186. this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
  4187. this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_Код_накладной.Value));
  4188. }
  4189. else {
  4190. this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
  4191. this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
  4192. }
  4193. this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Код_поставщика));
  4194. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  4195. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4196. != global::System.Data.ConnectionState.Open)) {
  4197. this.Adapter.UpdateCommand.Connection.Open();
  4198. }
  4199. try {
  4200. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  4201. return returnValue;
  4202. }
  4203. finally {
  4204. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4205. this.Adapter.UpdateCommand.Connection.Close();
  4206. }
  4207. }
  4208. }
  4209. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4210. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4211. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4212. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4213. public virtual int Update(string Название_фирмы_поставщика, int Количество_привезенного_товара, decimal Цена_товара, string Адрес, global::System.Nullable<int> Код_заказа, global::System.Nullable<int> Код_накладной, string Original_Название_фирмы_поставщика, int Original_Количество_привезенного_товара, decimal Original_Цена_товара, string Original_Адрес, int Original_Код_поставщика, global::System.Nullable<int> Original_Код_заказа, global::System.Nullable<int> Original_Код_накладной) {
  4214. return this.Update(Название_фирмы_поставщика, Количество_привезенного_товара, Цена_товара, Адрес, Код_заказа, Код_накладной, Original_Название_фирмы_поставщика, Original_Количество_привезенного_товара, Original_Цена_товара, Original_Адрес, Original_Код_поставщика, Original_Код_заказа, Original_Код_накладной, Original_Код_поставщика);
  4215. }
  4216. }
  4217. /// <summary>
  4218. ///Represents the connection and commands used to retrieve and save data.
  4219. ///</summary>
  4220. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  4221. [global::System.ComponentModel.ToolboxItem(true)]
  4222. [global::System.ComponentModel.DataObjectAttribute(true)]
  4223. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  4224. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  4225. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4226. public partial class Продажа_товараTableAdapter : global::System.ComponentModel.Component {
  4227. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  4228. private global::System.Data.SqlClient.SqlConnection _connection;
  4229. private global::System.Data.SqlClient.SqlTransaction _transaction;
  4230. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  4231. private bool _clearBeforeFill;
  4232. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4233. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4234. public Продажа_товараTableAdapter() {
  4235. this.ClearBeforeFill = true;
  4236. }
  4237. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4238. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4239. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  4240. get {
  4241. if ((this._adapter == null)) {
  4242. this.InitAdapter();
  4243. }
  4244. return this._adapter;
  4245. }
  4246. }
  4247. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4248. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4249. internal global::System.Data.SqlClient.SqlConnection Connection {
  4250. get {
  4251. if ((this._connection == null)) {
  4252. this.InitConnection();
  4253. }
  4254. return this._connection;
  4255. }
  4256. set {
  4257. this._connection = value;
  4258. if ((this.Adapter.InsertCommand != null)) {
  4259. this.Adapter.InsertCommand.Connection = value;
  4260. }
  4261. if ((this.Adapter.DeleteCommand != null)) {
  4262. this.Adapter.DeleteCommand.Connection = value;
  4263. }
  4264. if ((this.Adapter.UpdateCommand != null)) {
  4265. this.Adapter.UpdateCommand.Connection = value;
  4266. }
  4267. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  4268. if ((this.CommandCollection[i] != null)) {
  4269. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  4270. }
  4271. }
  4272. }
  4273. }
  4274. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4275. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4276. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  4277. get {
  4278. return this._transaction;
  4279. }
  4280. set {
  4281. this._transaction = value;
  4282. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  4283. this.CommandCollection[i].Transaction = this._transaction;
  4284. }
  4285. if (((this.Adapter != null)
  4286. && (this.Adapter.DeleteCommand != null))) {
  4287. this.Adapter.DeleteCommand.Transaction = this._transaction;
  4288. }
  4289. if (((this.Adapter != null)
  4290. && (this.Adapter.InsertCommand != null))) {
  4291. this.Adapter.InsertCommand.Transaction = this._transaction;
  4292. }
  4293. if (((this.Adapter != null)
  4294. && (this.Adapter.UpdateCommand != null))) {
  4295. this.Adapter.UpdateCommand.Transaction = this._transaction;
  4296. }
  4297. }
  4298. }
  4299. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4300. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4301. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  4302. get {
  4303. if ((this._commandCollection == null)) {
  4304. this.InitCommandCollection();
  4305. }
  4306. return this._commandCollection;
  4307. }
  4308. }
  4309. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4310. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4311. public bool ClearBeforeFill {
  4312. get {
  4313. return this._clearBeforeFill;
  4314. }
  4315. set {
  4316. this._clearBeforeFill = value;
  4317. }
  4318. }
  4319. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4320. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4321. private void InitAdapter() {
  4322. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  4323. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  4324. tableMapping.SourceTable = "Table";
  4325. tableMapping.DataSetTable = "Продажа товара";
  4326. tableMapping.ColumnMappings.Add("Код_товара", "Код_товара");
  4327. tableMapping.ColumnMappings.Add("Количество", "Количество");
  4328. tableMapping.ColumnMappings.Add("Цена", "Цена");
  4329. tableMapping.ColumnMappings.Add("Дата_продажи", "Дата_продажи");
  4330. tableMapping.ColumnMappings.Add("Время_продажи_товара", "Время_продажи_товара");
  4331. tableMapping.ColumnMappings.Add("Код_сотрудника", "Код_сотрудника");
  4332. tableMapping.ColumnMappings.Add("Код_продажи", "Код_продажи");
  4333. this._adapter.TableMappings.Add(tableMapping);
  4334. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  4335. this._adapter.DeleteCommand.Connection = this.Connection;
  4336. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Продажа товара] WHERE (([Код_товара] = @Original_Код_товара) AND ([Количество] = @Original_Количество) AND ([Цена] = @Original_Цена) AND ([Дата_продажи] = @Original_Дата_продажи) AND ([Время_продажи_товара] = @Original_Время_продажи_товара) AND ([Код_сотрудника] = @Original_Код_сотрудника) AND ([Код_продажи] = @Original_Код_продажи))";
  4337. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  4338. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4339. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4340. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Цена", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4341. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Дата_продажи", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_продажи", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4342. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Время_продажи_товара", global::System.Data.SqlDbType.Time, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Время_продажи_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4343. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4344. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_продажи", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_продажи", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4345. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  4346. this._adapter.InsertCommand.Connection = this.Connection;
  4347. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Продажа товара] ([Код_товара], [Количество], [Цена], [Дата_продажи], [Время_продажи_товара], [Код_сотрудника]) VALUES (@Код_товара, @Количество, @Цена, @Дата_продажи, @Время_продажи_товара, @Код_сотрудника);
  4348. SELECT Код_товара, Количество, Цена, Дата_продажи, Время_продажи_товара, Код_сотрудника, Код_продажи FROM [Продажа товара] WHERE (Код_продажи = SCOPE_IDENTITY())";
  4349. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  4350. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4351. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4352. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Цена", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4353. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_продажи", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_продажи", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4354. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Время_продажи_товара", global::System.Data.SqlDbType.Time, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Время_продажи_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4355. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4356. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  4357. this._adapter.UpdateCommand.Connection = this.Connection;
  4358. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Продажа товара] SET [Код_товара] = @Код_товара, [Количество] = @Количество, [Цена] = @Цена, [Дата_продажи] = @Дата_продажи, [Время_продажи_товара] = @Время_продажи_товара, [Код_сотрудника] = @Код_сотрудника WHERE (([Код_товара] = @Original_Код_товара) AND ([Количество] = @Original_Количество) AND ([Цена] = @Original_Цена) AND ([Дата_продажи] = @Original_Дата_продажи) AND ([Время_продажи_товара] = @Original_Время_продажи_товара) AND ([Код_сотрудника] = @Original_Код_сотрудника) AND ([Код_продажи] = @Original_Код_продажи));
  4359. SELECT Код_товара, Количество, Цена, Дата_продажи, Время_продажи_товара, Код_сотрудника, Код_продажи FROM [Продажа товара] WHERE (Код_продажи = @Код_продажи)";
  4360. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  4361. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4362. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4363. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Цена", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4364. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_продажи", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_продажи", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4365. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Время_продажи_товара", global::System.Data.SqlDbType.Time, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Время_продажи_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4366. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4367. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4368. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4369. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Цена", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4370. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Дата_продажи", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_продажи", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4371. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Время_продажи_товара", global::System.Data.SqlDbType.Time, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Время_продажи_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4372. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4373. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_продажи", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_продажи", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4374. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_продажи", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Код_продажи", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4375. }
  4376. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4377. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4378. private void InitConnection() {
  4379. this._connection = new global::System.Data.SqlClient.SqlConnection();
  4380. this._connection.ConnectionString = global::Lyakhov_Tovar.Properties.Settings.Default.ЛяховConnectionString;
  4381. }
  4382. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4383. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4384. private void InitCommandCollection() {
  4385. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  4386. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  4387. this._commandCollection[0].Connection = this.Connection;
  4388. this._commandCollection[0].CommandText = "SELECT Код_товара, Количество, Цена, Дата_продажи, Время_продажи_товара, Код_сотр" +
  4389. "удника, Код_продажи FROM dbo.[Продажа товара]";
  4390. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  4391. }
  4392. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4393. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4394. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4395. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  4396. public virtual int Fill(ЛяховDataSet.Продажа_товараDataTable dataTable) {
  4397. this.Adapter.SelectCommand = this.CommandCollection[0];
  4398. if ((this.ClearBeforeFill == true)) {
  4399. dataTable.Clear();
  4400. }
  4401. int returnValue = this.Adapter.Fill(dataTable);
  4402. return returnValue;
  4403. }
  4404. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4405. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4406. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4407. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  4408. public virtual ЛяховDataSet.Продажа_товараDataTable GetData() {
  4409. this.Adapter.SelectCommand = this.CommandCollection[0];
  4410. ЛяховDataSet.Продажа_товараDataTable dataTable = new ЛяховDataSet.Продажа_товараDataTable();
  4411. this.Adapter.Fill(dataTable);
  4412. return dataTable;
  4413. }
  4414. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4415. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4416. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4417. public virtual int Update(ЛяховDataSet.Продажа_товараDataTable dataTable) {
  4418. return this.Adapter.Update(dataTable);
  4419. }
  4420. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4421. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4422. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4423. public virtual int Update(ЛяховDataSet dataSet) {
  4424. return this.Adapter.Update(dataSet, "Продажа товара");
  4425. }
  4426. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4427. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4428. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4429. public virtual int Update(global::System.Data.DataRow dataRow) {
  4430. return this.Adapter.Update(new global::System.Data.DataRow[] {
  4431. dataRow});
  4432. }
  4433. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4434. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4435. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4436. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  4437. return this.Adapter.Update(dataRows);
  4438. }
  4439. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4440. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4441. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4442. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  4443. public virtual int Delete(int Original_Код_товара, int Original_Количество, decimal Original_Цена, System.DateTime Original_Дата_продажи, System.TimeSpan Original_Время_продажи_товара, int Original_Код_сотрудника, int Original_Код_продажи) {
  4444. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Код_товара));
  4445. this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_Количество));
  4446. this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_Цена));
  4447. this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_Дата_продажи));
  4448. this.Adapter.DeleteCommand.Parameters[4].Value = ((System.TimeSpan)(Original_Время_продажи_товара));
  4449. this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_Код_сотрудника));
  4450. this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_Код_продажи));
  4451. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  4452. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4453. != global::System.Data.ConnectionState.Open)) {
  4454. this.Adapter.DeleteCommand.Connection.Open();
  4455. }
  4456. try {
  4457. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  4458. return returnValue;
  4459. }
  4460. finally {
  4461. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4462. this.Adapter.DeleteCommand.Connection.Close();
  4463. }
  4464. }
  4465. }
  4466. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4467. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4468. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4469. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  4470. public virtual int Insert(int Код_товара, int Количество, decimal Цена, System.DateTime Дата_продажи, System.TimeSpan Время_продажи_товара, int Код_сотрудника) {
  4471. this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Код_товара));
  4472. this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Количество));
  4473. this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(Цена));
  4474. this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(Дата_продажи));
  4475. this.Adapter.InsertCommand.Parameters[4].Value = ((System.TimeSpan)(Время_продажи_товара));
  4476. this.Adapter.InsertCommand.Parameters[5].Value = ((int)(Код_сотрудника));
  4477. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  4478. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4479. != global::System.Data.ConnectionState.Open)) {
  4480. this.Adapter.InsertCommand.Connection.Open();
  4481. }
  4482. try {
  4483. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  4484. return returnValue;
  4485. }
  4486. finally {
  4487. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4488. this.Adapter.InsertCommand.Connection.Close();
  4489. }
  4490. }
  4491. }
  4492. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4493. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4494. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4495. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4496. public virtual int Update(int Код_товара, int Количество, decimal Цена, System.DateTime Дата_продажи, System.TimeSpan Время_продажи_товара, int Код_сотрудника, int Original_Код_товара, int Original_Количество, decimal Original_Цена, System.DateTime Original_Дата_продажи, System.TimeSpan Original_Время_продажи_товара, int Original_Код_сотрудника, int Original_Код_продажи, int Код_продажи) {
  4497. this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Код_товара));
  4498. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Количество));
  4499. this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(Цена));
  4500. this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(Дата_продажи));
  4501. this.Adapter.UpdateCommand.Parameters[4].Value = ((System.TimeSpan)(Время_продажи_товара));
  4502. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Код_сотрудника));
  4503. this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Код_товара));
  4504. this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Количество));
  4505. this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(Original_Цена));
  4506. this.Adapter.UpdateCommand.Parameters[9].Value = ((System.DateTime)(Original_Дата_продажи));
  4507. this.Adapter.UpdateCommand.Parameters[10].Value = ((System.TimeSpan)(Original_Время_продажи_товара));
  4508. this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_Код_сотрудника));
  4509. this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_Код_продажи));
  4510. this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Код_продажи));
  4511. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  4512. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4513. != global::System.Data.ConnectionState.Open)) {
  4514. this.Adapter.UpdateCommand.Connection.Open();
  4515. }
  4516. try {
  4517. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  4518. return returnValue;
  4519. }
  4520. finally {
  4521. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4522. this.Adapter.UpdateCommand.Connection.Close();
  4523. }
  4524. }
  4525. }
  4526. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4527. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4528. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4529. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4530. public virtual int Update(int Код_товара, int Количество, decimal Цена, System.DateTime Дата_продажи, System.TimeSpan Время_продажи_товара, int Код_сотрудника, int Original_Код_товара, int Original_Количество, decimal Original_Цена, System.DateTime Original_Дата_продажи, System.TimeSpan Original_Время_продажи_товара, int Original_Код_сотрудника, int Original_Код_продажи) {
  4531. return this.Update(Код_товара, Количество, Цена, Дата_продажи, Время_продажи_товара, Код_сотрудника, Original_Код_товара, Original_Количество, Original_Цена, Original_Дата_продажи, Original_Время_продажи_товара, Original_Код_сотрудника, Original_Код_продажи, Original_Код_продажи);
  4532. }
  4533. }
  4534. /// <summary>
  4535. ///Represents the connection and commands used to retrieve and save data.
  4536. ///</summary>
  4537. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  4538. [global::System.ComponentModel.ToolboxItem(true)]
  4539. [global::System.ComponentModel.DataObjectAttribute(true)]
  4540. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  4541. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  4542. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4543. public partial class СотрудникTableAdapter : global::System.ComponentModel.Component {
  4544. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  4545. private global::System.Data.SqlClient.SqlConnection _connection;
  4546. private global::System.Data.SqlClient.SqlTransaction _transaction;
  4547. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  4548. private bool _clearBeforeFill;
  4549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4550. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4551. public СотрудникTableAdapter() {
  4552. this.ClearBeforeFill = true;
  4553. }
  4554. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4555. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4556. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  4557. get {
  4558. if ((this._adapter == null)) {
  4559. this.InitAdapter();
  4560. }
  4561. return this._adapter;
  4562. }
  4563. }
  4564. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4565. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4566. internal global::System.Data.SqlClient.SqlConnection Connection {
  4567. get {
  4568. if ((this._connection == null)) {
  4569. this.InitConnection();
  4570. }
  4571. return this._connection;
  4572. }
  4573. set {
  4574. this._connection = value;
  4575. if ((this.Adapter.InsertCommand != null)) {
  4576. this.Adapter.InsertCommand.Connection = value;
  4577. }
  4578. if ((this.Adapter.DeleteCommand != null)) {
  4579. this.Adapter.DeleteCommand.Connection = value;
  4580. }
  4581. if ((this.Adapter.UpdateCommand != null)) {
  4582. this.Adapter.UpdateCommand.Connection = value;
  4583. }
  4584. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  4585. if ((this.CommandCollection[i] != null)) {
  4586. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  4587. }
  4588. }
  4589. }
  4590. }
  4591. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4592. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4593. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  4594. get {
  4595. return this._transaction;
  4596. }
  4597. set {
  4598. this._transaction = value;
  4599. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  4600. this.CommandCollection[i].Transaction = this._transaction;
  4601. }
  4602. if (((this.Adapter != null)
  4603. && (this.Adapter.DeleteCommand != null))) {
  4604. this.Adapter.DeleteCommand.Transaction = this._transaction;
  4605. }
  4606. if (((this.Adapter != null)
  4607. && (this.Adapter.InsertCommand != null))) {
  4608. this.Adapter.InsertCommand.Transaction = this._transaction;
  4609. }
  4610. if (((this.Adapter != null)
  4611. && (this.Adapter.UpdateCommand != null))) {
  4612. this.Adapter.UpdateCommand.Transaction = this._transaction;
  4613. }
  4614. }
  4615. }
  4616. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4617. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4618. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  4619. get {
  4620. if ((this._commandCollection == null)) {
  4621. this.InitCommandCollection();
  4622. }
  4623. return this._commandCollection;
  4624. }
  4625. }
  4626. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4627. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4628. public bool ClearBeforeFill {
  4629. get {
  4630. return this._clearBeforeFill;
  4631. }
  4632. set {
  4633. this._clearBeforeFill = value;
  4634. }
  4635. }
  4636. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4637. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4638. private void InitAdapter() {
  4639. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  4640. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  4641. tableMapping.SourceTable = "Table";
  4642. tableMapping.DataSetTable = "Сотрудник";
  4643. tableMapping.ColumnMappings.Add("Имя", "Имя");
  4644. tableMapping.ColumnMappings.Add("Фамилия", "Фамилия");
  4645. tableMapping.ColumnMappings.Add("Отчество", "Отчество");
  4646. tableMapping.ColumnMappings.Add("Телефон", "Телефон");
  4647. tableMapping.ColumnMappings.Add("Код_сотрудника", "Код_сотрудника");
  4648. tableMapping.ColumnMappings.Add("Логин", "Логин");
  4649. tableMapping.ColumnMappings.Add("Пароль", "Пароль");
  4650. this._adapter.TableMappings.Add(tableMapping);
  4651. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  4652. this._adapter.DeleteCommand.Connection = this.Connection;
  4653. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Сотрудник] WHERE (([Имя] = @Original_Имя) AND ([Фамилия] = @Original_Фамилия) AND ([Отчество] = @Original_Отчество) AND ([Телефон] = @Original_Телефон) AND ([Код_сотрудника] = @Original_Код_сотрудника) AND ([Логин] = @Original_Логин) AND ([Пароль] = @Original_Пароль))";
  4654. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  4655. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Имя", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Имя", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4656. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Фамилия", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фамилия", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4657. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Отчество", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Отчество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4658. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Телефон", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Телефон", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4659. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4660. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Логин", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4661. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Пароль", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4662. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  4663. this._adapter.InsertCommand.Connection = this.Connection;
  4664. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Сотрудник] ([Имя], [Фамилия], [Отчество], [Телефон], [Логин], [Пароль]) VALUES (@Имя, @Фамилия, @Отчество, @Телефон, @Логин, @Пароль);
  4665. SELECT Имя, Фамилия, Отчество, Телефон, Код_сотрудника, Логин, Пароль FROM Сотрудник WHERE (Код_сотрудника = SCOPE_IDENTITY())";
  4666. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  4667. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Имя", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Имя", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4668. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Фамилия", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фамилия", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4669. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Отчество", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Отчество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4670. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Телефон", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Телефон", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4671. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Логин", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4672. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Пароль", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4673. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  4674. this._adapter.UpdateCommand.Connection = this.Connection;
  4675. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Сотрудник] SET [Имя] = @Имя, [Фамилия] = @Фамилия, [Отчество] = @Отчество, [Телефон] = @Телефон, [Логин] = @Логин, [Пароль] = @Пароль WHERE (([Имя] = @Original_Имя) AND ([Фамилия] = @Original_Фамилия) AND ([Отчество] = @Original_Отчество) AND ([Телефон] = @Original_Телефон) AND ([Код_сотрудника] = @Original_Код_сотрудника) AND ([Логин] = @Original_Логин) AND ([Пароль] = @Original_Пароль));
  4676. SELECT Имя, Фамилия, Отчество, Телефон, Код_сотрудника, Логин, Пароль FROM Сотрудник WHERE (Код_сотрудника = @Код_сотрудника)";
  4677. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  4678. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Имя", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Имя", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4679. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Фамилия", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фамилия", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4680. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Отчество", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Отчество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4681. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Телефон", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Телефон", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4682. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Логин", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4683. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Пароль", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4684. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Имя", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Имя", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4685. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Фамилия", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Фамилия", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4686. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Отчество", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Отчество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4687. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Телефон", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Телефон", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4688. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_сотрудника", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4689. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Логин", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Логин", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4690. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Пароль", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Пароль", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4691. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_сотрудника", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Код_сотрудника", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4692. }
  4693. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4694. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4695. private void InitConnection() {
  4696. this._connection = new global::System.Data.SqlClient.SqlConnection();
  4697. this._connection.ConnectionString = global::Lyakhov_Tovar.Properties.Settings.Default.ЛяховConnectionString;
  4698. }
  4699. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4700. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4701. private void InitCommandCollection() {
  4702. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  4703. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  4704. this._commandCollection[0].Connection = this.Connection;
  4705. this._commandCollection[0].CommandText = "SELECT Имя, Фамилия, Отчество, Телефон, Код_сотрудника, Логин, Пароль FROM dbo.Со" +
  4706. "трудник";
  4707. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  4708. }
  4709. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4710. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4711. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4712. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  4713. public virtual int Fill(ЛяховDataSet.СотрудникDataTable dataTable) {
  4714. this.Adapter.SelectCommand = this.CommandCollection[0];
  4715. if ((this.ClearBeforeFill == true)) {
  4716. dataTable.Clear();
  4717. }
  4718. int returnValue = this.Adapter.Fill(dataTable);
  4719. return returnValue;
  4720. }
  4721. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4722. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4723. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4724. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  4725. public virtual ЛяховDataSet.СотрудникDataTable GetData() {
  4726. this.Adapter.SelectCommand = this.CommandCollection[0];
  4727. ЛяховDataSet.СотрудникDataTable dataTable = new ЛяховDataSet.СотрудникDataTable();
  4728. this.Adapter.Fill(dataTable);
  4729. return dataTable;
  4730. }
  4731. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4732. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4733. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4734. public virtual int Update(ЛяховDataSet.СотрудникDataTable dataTable) {
  4735. return this.Adapter.Update(dataTable);
  4736. }
  4737. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4738. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4739. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4740. public virtual int Update(ЛяховDataSet dataSet) {
  4741. return this.Adapter.Update(dataSet, "Сотрудник");
  4742. }
  4743. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4744. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4745. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4746. public virtual int Update(global::System.Data.DataRow dataRow) {
  4747. return this.Adapter.Update(new global::System.Data.DataRow[] {
  4748. dataRow});
  4749. }
  4750. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4751. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4752. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4753. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  4754. return this.Adapter.Update(dataRows);
  4755. }
  4756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4757. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4758. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4759. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  4760. public virtual int Delete(string Original_Имя, string Original_Фамилия, string Original_Отчество, string Original_Телефон, int Original_Код_сотрудника, string Original_Логин, string Original_Пароль) {
  4761. if ((Original_Имя == null)) {
  4762. throw new global::System.ArgumentNullException("Original_Имя");
  4763. }
  4764. else {
  4765. this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Имя));
  4766. }
  4767. if ((Original_Фамилия == null)) {
  4768. throw new global::System.ArgumentNullException("Original_Фамилия");
  4769. }
  4770. else {
  4771. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Фамилия));
  4772. }
  4773. if ((Original_Отчество == null)) {
  4774. throw new global::System.ArgumentNullException("Original_Отчество");
  4775. }
  4776. else {
  4777. this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Отчество));
  4778. }
  4779. if ((Original_Телефон == null)) {
  4780. throw new global::System.ArgumentNullException("Original_Телефон");
  4781. }
  4782. else {
  4783. this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Телефон));
  4784. }
  4785. this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Код_сотрудника));
  4786. if ((Original_Логин == null)) {
  4787. throw new global::System.ArgumentNullException("Original_Логин");
  4788. }
  4789. else {
  4790. this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_Логин));
  4791. }
  4792. if ((Original_Пароль == null)) {
  4793. throw new global::System.ArgumentNullException("Original_Пароль");
  4794. }
  4795. else {
  4796. this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Пароль));
  4797. }
  4798. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  4799. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4800. != global::System.Data.ConnectionState.Open)) {
  4801. this.Adapter.DeleteCommand.Connection.Open();
  4802. }
  4803. try {
  4804. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  4805. return returnValue;
  4806. }
  4807. finally {
  4808. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4809. this.Adapter.DeleteCommand.Connection.Close();
  4810. }
  4811. }
  4812. }
  4813. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4814. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4815. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4816. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  4817. public virtual int Insert(string Имя, string Фамилия, string Отчество, string Телефон, string Логин, string Пароль) {
  4818. if ((Имя == null)) {
  4819. throw new global::System.ArgumentNullException("Имя");
  4820. }
  4821. else {
  4822. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Имя));
  4823. }
  4824. if ((Фамилия == null)) {
  4825. throw new global::System.ArgumentNullException("Фамилия");
  4826. }
  4827. else {
  4828. this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Фамилия));
  4829. }
  4830. if ((Отчество == null)) {
  4831. throw new global::System.ArgumentNullException("Отчество");
  4832. }
  4833. else {
  4834. this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Отчество));
  4835. }
  4836. if ((Телефон == null)) {
  4837. throw new global::System.ArgumentNullException("Телефон");
  4838. }
  4839. else {
  4840. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Телефон));
  4841. }
  4842. if ((Логин == null)) {
  4843. throw new global::System.ArgumentNullException("Логин");
  4844. }
  4845. else {
  4846. this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Логин));
  4847. }
  4848. if ((Пароль == null)) {
  4849. throw new global::System.ArgumentNullException("Пароль");
  4850. }
  4851. else {
  4852. this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Пароль));
  4853. }
  4854. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  4855. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4856. != global::System.Data.ConnectionState.Open)) {
  4857. this.Adapter.InsertCommand.Connection.Open();
  4858. }
  4859. try {
  4860. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  4861. return returnValue;
  4862. }
  4863. finally {
  4864. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4865. this.Adapter.InsertCommand.Connection.Close();
  4866. }
  4867. }
  4868. }
  4869. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4870. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4871. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4872. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4873. public virtual int Update(string Имя, string Фамилия, string Отчество, string Телефон, string Логин, string Пароль, string Original_Имя, string Original_Фамилия, string Original_Отчество, string Original_Телефон, int Original_Код_сотрудника, string Original_Логин, string Original_Пароль, int Код_сотрудника) {
  4874. if ((Имя == null)) {
  4875. throw new global::System.ArgumentNullException("Имя");
  4876. }
  4877. else {
  4878. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Имя));
  4879. }
  4880. if ((Фамилия == null)) {
  4881. throw new global::System.ArgumentNullException("Фамилия");
  4882. }
  4883. else {
  4884. this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Фамилия));
  4885. }
  4886. if ((Отчество == null)) {
  4887. throw new global::System.ArgumentNullException("Отчество");
  4888. }
  4889. else {
  4890. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Отчество));
  4891. }
  4892. if ((Телефон == null)) {
  4893. throw new global::System.ArgumentNullException("Телефон");
  4894. }
  4895. else {
  4896. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Телефон));
  4897. }
  4898. if ((Логин == null)) {
  4899. throw new global::System.ArgumentNullException("Логин");
  4900. }
  4901. else {
  4902. this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Логин));
  4903. }
  4904. if ((Пароль == null)) {
  4905. throw new global::System.ArgumentNullException("Пароль");
  4906. }
  4907. else {
  4908. this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Пароль));
  4909. }
  4910. if ((Original_Имя == null)) {
  4911. throw new global::System.ArgumentNullException("Original_Имя");
  4912. }
  4913. else {
  4914. this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Имя));
  4915. }
  4916. if ((Original_Фамилия == null)) {
  4917. throw new global::System.ArgumentNullException("Original_Фамилия");
  4918. }
  4919. else {
  4920. this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_Фамилия));
  4921. }
  4922. if ((Original_Отчество == null)) {
  4923. throw new global::System.ArgumentNullException("Original_Отчество");
  4924. }
  4925. else {
  4926. this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_Отчество));
  4927. }
  4928. if ((Original_Телефон == null)) {
  4929. throw new global::System.ArgumentNullException("Original_Телефон");
  4930. }
  4931. else {
  4932. this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Телефон));
  4933. }
  4934. this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_Код_сотрудника));
  4935. if ((Original_Логин == null)) {
  4936. throw new global::System.ArgumentNullException("Original_Логин");
  4937. }
  4938. else {
  4939. this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Логин));
  4940. }
  4941. if ((Original_Пароль == null)) {
  4942. throw new global::System.ArgumentNullException("Original_Пароль");
  4943. }
  4944. else {
  4945. this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_Пароль));
  4946. }
  4947. this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Код_сотрудника));
  4948. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  4949. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4950. != global::System.Data.ConnectionState.Open)) {
  4951. this.Adapter.UpdateCommand.Connection.Open();
  4952. }
  4953. try {
  4954. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  4955. return returnValue;
  4956. }
  4957. finally {
  4958. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4959. this.Adapter.UpdateCommand.Connection.Close();
  4960. }
  4961. }
  4962. }
  4963. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4964. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4965. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4966. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4967. public virtual int Update(string Имя, string Фамилия, string Отчество, string Телефон, string Логин, string Пароль, string Original_Имя, string Original_Фамилия, string Original_Отчество, string Original_Телефон, int Original_Код_сотрудника, string Original_Логин, string Original_Пароль) {
  4968. return this.Update(Имя, Фамилия, Отчество, Телефон, Логин, Пароль, Original_Имя, Original_Фамилия, Original_Отчество, Original_Телефон, Original_Код_сотрудника, Original_Логин, Original_Пароль, Original_Код_сотрудника);
  4969. }
  4970. }
  4971. /// <summary>
  4972. ///Represents the connection and commands used to retrieve and save data.
  4973. ///</summary>
  4974. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  4975. [global::System.ComponentModel.ToolboxItem(true)]
  4976. [global::System.ComponentModel.DataObjectAttribute(true)]
  4977. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  4978. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  4979. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4980. public partial class ТоварыTableAdapter : global::System.ComponentModel.Component {
  4981. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  4982. private global::System.Data.SqlClient.SqlConnection _connection;
  4983. private global::System.Data.SqlClient.SqlTransaction _transaction;
  4984. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  4985. private bool _clearBeforeFill;
  4986. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4987. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4988. public ТоварыTableAdapter() {
  4989. this.ClearBeforeFill = true;
  4990. }
  4991. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4992. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  4993. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  4994. get {
  4995. if ((this._adapter == null)) {
  4996. this.InitAdapter();
  4997. }
  4998. return this._adapter;
  4999. }
  5000. }
  5001. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5002. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5003. internal global::System.Data.SqlClient.SqlConnection Connection {
  5004. get {
  5005. if ((this._connection == null)) {
  5006. this.InitConnection();
  5007. }
  5008. return this._connection;
  5009. }
  5010. set {
  5011. this._connection = value;
  5012. if ((this.Adapter.InsertCommand != null)) {
  5013. this.Adapter.InsertCommand.Connection = value;
  5014. }
  5015. if ((this.Adapter.DeleteCommand != null)) {
  5016. this.Adapter.DeleteCommand.Connection = value;
  5017. }
  5018. if ((this.Adapter.UpdateCommand != null)) {
  5019. this.Adapter.UpdateCommand.Connection = value;
  5020. }
  5021. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  5022. if ((this.CommandCollection[i] != null)) {
  5023. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  5024. }
  5025. }
  5026. }
  5027. }
  5028. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5029. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5030. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  5031. get {
  5032. return this._transaction;
  5033. }
  5034. set {
  5035. this._transaction = value;
  5036. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  5037. this.CommandCollection[i].Transaction = this._transaction;
  5038. }
  5039. if (((this.Adapter != null)
  5040. && (this.Adapter.DeleteCommand != null))) {
  5041. this.Adapter.DeleteCommand.Transaction = this._transaction;
  5042. }
  5043. if (((this.Adapter != null)
  5044. && (this.Adapter.InsertCommand != null))) {
  5045. this.Adapter.InsertCommand.Transaction = this._transaction;
  5046. }
  5047. if (((this.Adapter != null)
  5048. && (this.Adapter.UpdateCommand != null))) {
  5049. this.Adapter.UpdateCommand.Transaction = this._transaction;
  5050. }
  5051. }
  5052. }
  5053. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5054. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5055. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  5056. get {
  5057. if ((this._commandCollection == null)) {
  5058. this.InitCommandCollection();
  5059. }
  5060. return this._commandCollection;
  5061. }
  5062. }
  5063. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5064. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5065. public bool ClearBeforeFill {
  5066. get {
  5067. return this._clearBeforeFill;
  5068. }
  5069. set {
  5070. this._clearBeforeFill = value;
  5071. }
  5072. }
  5073. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5074. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5075. private void InitAdapter() {
  5076. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  5077. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  5078. tableMapping.SourceTable = "Table";
  5079. tableMapping.DataSetTable = "Товары";
  5080. tableMapping.ColumnMappings.Add("Название_товара", "Название_товара");
  5081. tableMapping.ColumnMappings.Add("Количество", "Количество");
  5082. tableMapping.ColumnMappings.Add("Цена_за_штуку", "Цена_за_штуку");
  5083. tableMapping.ColumnMappings.Add("Код_товара", "Код_товара");
  5084. tableMapping.ColumnMappings.Add("Код_заказа", "Код_заказа");
  5085. this._adapter.TableMappings.Add(tableMapping);
  5086. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  5087. this._adapter.DeleteCommand.Connection = this.Connection;
  5088. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Товары] WHERE (([Название_товара] = @Original_Название_товара) AND ([Количество] = @Original_Количество) AND ([Цена_за_штуку] = @Original_Цена_за_штуку) AND ([Код_товара] = @Original_Код_товара) AND ((@IsNull_Код_заказа = 1 AND [Код_заказа] IS NULL) OR ([Код_заказа] = @Original_Код_заказа)))";
  5089. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  5090. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Название_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5091. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5092. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Цена_за_штуку", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена_за_штуку", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5093. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5094. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  5095. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5096. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  5097. this._adapter.InsertCommand.Connection = this.Connection;
  5098. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Товары] ([Название_товара], [Количество], [Цена_за_штуку], [Код_заказа]) VALUES (@Название_товара, @Количество, @Цена_за_штуку, @Код_заказа);
  5099. SELECT Название_товара, Количество, Цена_за_штуку, Код_товара, Код_заказа FROM Товары WHERE (Код_товара = SCOPE_IDENTITY())";
  5100. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  5101. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Название_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  5102. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  5103. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Цена_за_штуку", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена_за_штуку", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  5104. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  5105. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  5106. this._adapter.UpdateCommand.Connection = this.Connection;
  5107. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Товары] SET [Название_товара] = @Название_товара, [Количество] = @Количество, [Цена_за_штуку] = @Цена_за_штуку, [Код_заказа] = @Код_заказа WHERE (([Название_товара] = @Original_Название_товара) AND ([Количество] = @Original_Количество) AND ([Цена_за_штуку] = @Original_Цена_за_штуку) AND ([Код_товара] = @Original_Код_товара) AND ((@IsNull_Код_заказа = 1 AND [Код_заказа] IS NULL) OR ([Код_заказа] = @Original_Код_заказа)));
  5108. SELECT Название_товара, Количество, Цена_за_штуку, Код_товара, Код_заказа FROM Товары WHERE (Код_товара = @Код_товара)";
  5109. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  5110. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Название_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  5111. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  5112. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Цена_за_штуку", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена_за_штуку", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  5113. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  5114. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Название_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5115. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Количество", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5116. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Цена_за_штуку", global::System.Data.SqlDbType.Money, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена_за_штуку", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5117. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_товара", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5118. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  5119. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Код_заказа", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Код_заказа", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  5120. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Код_товара", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Код_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  5121. }
  5122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5123. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5124. private void InitConnection() {
  5125. this._connection = new global::System.Data.SqlClient.SqlConnection();
  5126. this._connection.ConnectionString = global::Lyakhov_Tovar.Properties.Settings.Default.ЛяховConnectionString;
  5127. }
  5128. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5129. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5130. private void InitCommandCollection() {
  5131. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  5132. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  5133. this._commandCollection[0].Connection = this.Connection;
  5134. this._commandCollection[0].CommandText = "SELECT Название_товара, Количество, Цена_за_штуку, Код_товара, Код_заказа FROM db" +
  5135. "o.Товары";
  5136. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  5137. }
  5138. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5139. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5140. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5141. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  5142. public virtual int Fill(ЛяховDataSet.ТоварыDataTable dataTable) {
  5143. this.Adapter.SelectCommand = this.CommandCollection[0];
  5144. if ((this.ClearBeforeFill == true)) {
  5145. dataTable.Clear();
  5146. }
  5147. int returnValue = this.Adapter.Fill(dataTable);
  5148. return returnValue;
  5149. }
  5150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5151. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5152. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5153. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  5154. public virtual ЛяховDataSet.ТоварыDataTable GetData() {
  5155. this.Adapter.SelectCommand = this.CommandCollection[0];
  5156. ЛяховDataSet.ТоварыDataTable dataTable = new ЛяховDataSet.ТоварыDataTable();
  5157. this.Adapter.Fill(dataTable);
  5158. return dataTable;
  5159. }
  5160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5161. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5162. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5163. public virtual int Update(ЛяховDataSet.ТоварыDataTable dataTable) {
  5164. return this.Adapter.Update(dataTable);
  5165. }
  5166. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5167. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5168. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5169. public virtual int Update(ЛяховDataSet dataSet) {
  5170. return this.Adapter.Update(dataSet, "Товары");
  5171. }
  5172. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5173. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5174. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5175. public virtual int Update(global::System.Data.DataRow dataRow) {
  5176. return this.Adapter.Update(new global::System.Data.DataRow[] {
  5177. dataRow});
  5178. }
  5179. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5180. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5181. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5182. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  5183. return this.Adapter.Update(dataRows);
  5184. }
  5185. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5186. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5187. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5188. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  5189. public virtual int Delete(string Original_Название_товара, int Original_Количество, decimal Original_Цена_за_штуку, int Original_Код_товара, global::System.Nullable<int> Original_Код_заказа) {
  5190. if ((Original_Название_товара == null)) {
  5191. throw new global::System.ArgumentNullException("Original_Название_товара");
  5192. }
  5193. else {
  5194. this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Название_товара));
  5195. }
  5196. this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_Количество));
  5197. this.Adapter.DeleteCommand.Parameters[2].Value = ((decimal)(Original_Цена_за_штуку));
  5198. this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_Код_товара));
  5199. if ((Original_Код_заказа.HasValue == true)) {
  5200. this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0));
  5201. this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_Код_заказа.Value));
  5202. }
  5203. else {
  5204. this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1));
  5205. this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value;
  5206. }
  5207. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  5208. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  5209. != global::System.Data.ConnectionState.Open)) {
  5210. this.Adapter.DeleteCommand.Connection.Open();
  5211. }
  5212. try {
  5213. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  5214. return returnValue;
  5215. }
  5216. finally {
  5217. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  5218. this.Adapter.DeleteCommand.Connection.Close();
  5219. }
  5220. }
  5221. }
  5222. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5223. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5224. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5225. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  5226. public virtual int Insert(string Название_товара, int Количество, decimal Цена_за_штуку, global::System.Nullable<int> Код_заказа) {
  5227. if ((Название_товара == null)) {
  5228. throw new global::System.ArgumentNullException("Название_товара");
  5229. }
  5230. else {
  5231. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Название_товара));
  5232. }
  5233. this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Количество));
  5234. this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(Цена_за_штуку));
  5235. if ((Код_заказа.HasValue == true)) {
  5236. this.Adapter.InsertCommand.Parameters[3].Value = ((int)(Код_заказа.Value));
  5237. }
  5238. else {
  5239. this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
  5240. }
  5241. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  5242. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  5243. != global::System.Data.ConnectionState.Open)) {
  5244. this.Adapter.InsertCommand.Connection.Open();
  5245. }
  5246. try {
  5247. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  5248. return returnValue;
  5249. }
  5250. finally {
  5251. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  5252. this.Adapter.InsertCommand.Connection.Close();
  5253. }
  5254. }
  5255. }
  5256. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5257. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5258. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5259. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  5260. public virtual int Update(string Название_товара, int Количество, decimal Цена_за_штуку, global::System.Nullable<int> Код_заказа, string Original_Название_товара, int Original_Количество, decimal Original_Цена_за_штуку, int Original_Код_товара, global::System.Nullable<int> Original_Код_заказа, int Код_товара) {
  5261. if ((Название_товара == null)) {
  5262. throw new global::System.ArgumentNullException("Название_товара");
  5263. }
  5264. else {
  5265. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Название_товара));
  5266. }
  5267. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Количество));
  5268. this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(Цена_за_штуку));
  5269. if ((Код_заказа.HasValue == true)) {
  5270. this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Код_заказа.Value));
  5271. }
  5272. else {
  5273. this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
  5274. }
  5275. if ((Original_Название_товара == null)) {
  5276. throw new global::System.ArgumentNullException("Original_Название_товара");
  5277. }
  5278. else {
  5279. this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Название_товара));
  5280. }
  5281. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_Количество));
  5282. this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(Original_Цена_за_штуку));
  5283. this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Код_товара));
  5284. if ((Original_Код_заказа.HasValue == true)) {
  5285. this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0));
  5286. this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_Код_заказа.Value));
  5287. }
  5288. else {
  5289. this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1));
  5290. this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value;
  5291. }
  5292. this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Код_товара));
  5293. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  5294. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  5295. != global::System.Data.ConnectionState.Open)) {
  5296. this.Adapter.UpdateCommand.Connection.Open();
  5297. }
  5298. try {
  5299. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  5300. return returnValue;
  5301. }
  5302. finally {
  5303. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  5304. this.Adapter.UpdateCommand.Connection.Close();
  5305. }
  5306. }
  5307. }
  5308. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5309. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5310. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  5311. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  5312. public virtual int Update(string Название_товара, int Количество, decimal Цена_за_штуку, global::System.Nullable<int> Код_заказа, string Original_Название_товара, int Original_Количество, decimal Original_Цена_за_штуку, int Original_Код_товара, global::System.Nullable<int> Original_Код_заказа) {
  5313. return this.Update(Название_товара, Количество, Цена_за_штуку, Код_заказа, Original_Название_товара, Original_Количество, Original_Цена_за_штуку, Original_Код_товара, Original_Код_заказа, Original_Код_товара);
  5314. }
  5315. }
  5316. /// <summary>
  5317. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  5318. ///</summary>
  5319. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  5320. [global::System.ComponentModel.ToolboxItem(true)]
  5321. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  5322. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  5323. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  5324. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  5325. private UpdateOrderOption _updateOrder;
  5326. private Заказ_товараTableAdapter _заказ_товараTableAdapter;
  5327. private НакладнаяTableAdapter _накладнаяTableAdapter;
  5328. private ПоставщикTableAdapter _поставщикTableAdapter;
  5329. private Продажа_товараTableAdapter _продажа_товараTableAdapter;
  5330. private СотрудникTableAdapter _сотрудникTableAdapter;
  5331. private ТоварыTableAdapter _товарыTableAdapter;
  5332. private bool _backupDataSetBeforeUpdate;
  5333. private global::System.Data.IDbConnection _connection;
  5334. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5335. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5336. public UpdateOrderOption UpdateOrder {
  5337. get {
  5338. return this._updateOrder;
  5339. }
  5340. set {
  5341. this._updateOrder = value;
  5342. }
  5343. }
  5344. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5345. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5346. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  5347. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  5348. "a", "System.Drawing.Design.UITypeEditor")]
  5349. public Заказ_товараTableAdapter Заказ_товараTableAdapter {
  5350. get {
  5351. return this._заказ_товараTableAdapter;
  5352. }
  5353. set {
  5354. this._заказ_товараTableAdapter = value;
  5355. }
  5356. }
  5357. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5358. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5359. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  5360. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  5361. "a", "System.Drawing.Design.UITypeEditor")]
  5362. public НакладнаяTableAdapter НакладнаяTableAdapter {
  5363. get {
  5364. return this._накладнаяTableAdapter;
  5365. }
  5366. set {
  5367. this._накладнаяTableAdapter = value;
  5368. }
  5369. }
  5370. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5371. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5372. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  5373. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  5374. "a", "System.Drawing.Design.UITypeEditor")]
  5375. public ПоставщикTableAdapter ПоставщикTableAdapter {
  5376. get {
  5377. return this._поставщикTableAdapter;
  5378. }
  5379. set {
  5380. this._поставщикTableAdapter = value;
  5381. }
  5382. }
  5383. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5384. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5385. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  5386. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  5387. "a", "System.Drawing.Design.UITypeEditor")]
  5388. public Продажа_товараTableAdapter Продажа_товараTableAdapter {
  5389. get {
  5390. return this._продажа_товараTableAdapter;
  5391. }
  5392. set {
  5393. this._продажа_товараTableAdapter = value;
  5394. }
  5395. }
  5396. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5397. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5398. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  5399. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  5400. "a", "System.Drawing.Design.UITypeEditor")]
  5401. public СотрудникTableAdapter СотрудникTableAdapter {
  5402. get {
  5403. return this._сотрудникTableAdapter;
  5404. }
  5405. set {
  5406. this._сотрудникTableAdapter = value;
  5407. }
  5408. }
  5409. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5410. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5411. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  5412. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  5413. "a", "System.Drawing.Design.UITypeEditor")]
  5414. public ТоварыTableAdapter ТоварыTableAdapter {
  5415. get {
  5416. return this._товарыTableAdapter;
  5417. }
  5418. set {
  5419. this._товарыTableAdapter = value;
  5420. }
  5421. }
  5422. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5423. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5424. public bool BackupDataSetBeforeUpdate {
  5425. get {
  5426. return this._backupDataSetBeforeUpdate;
  5427. }
  5428. set {
  5429. this._backupDataSetBeforeUpdate = value;
  5430. }
  5431. }
  5432. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5433. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5434. [global::System.ComponentModel.Browsable(false)]
  5435. public global::System.Data.IDbConnection Connection {
  5436. get {
  5437. if ((this._connection != null)) {
  5438. return this._connection;
  5439. }
  5440. if (((this._заказ_товараTableAdapter != null)
  5441. && (this._заказ_товараTableAdapter.Connection != null))) {
  5442. return this._заказ_товараTableAdapter.Connection;
  5443. }
  5444. if (((this._накладнаяTableAdapter != null)
  5445. && (this._накладнаяTableAdapter.Connection != null))) {
  5446. return this._накладнаяTableAdapter.Connection;
  5447. }
  5448. if (((this._поставщикTableAdapter != null)
  5449. && (this._поставщикTableAdapter.Connection != null))) {
  5450. return this._поставщикTableAdapter.Connection;
  5451. }
  5452. if (((this._продажа_товараTableAdapter != null)
  5453. && (this._продажа_товараTableAdapter.Connection != null))) {
  5454. return this._продажа_товараTableAdapter.Connection;
  5455. }
  5456. if (((this._сотрудникTableAdapter != null)
  5457. && (this._сотрудникTableAdapter.Connection != null))) {
  5458. return this._сотрудникTableAdapter.Connection;
  5459. }
  5460. if (((this._товарыTableAdapter != null)
  5461. && (this._товарыTableAdapter.Connection != null))) {
  5462. return this._товарыTableAdapter.Connection;
  5463. }
  5464. return null;
  5465. }
  5466. set {
  5467. this._connection = value;
  5468. }
  5469. }
  5470. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5471. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5472. [global::System.ComponentModel.Browsable(false)]
  5473. public int TableAdapterInstanceCount {
  5474. get {
  5475. int count = 0;
  5476. if ((this._заказ_товараTableAdapter != null)) {
  5477. count = (count + 1);
  5478. }
  5479. if ((this._накладнаяTableAdapter != null)) {
  5480. count = (count + 1);
  5481. }
  5482. if ((this._поставщикTableAdapter != null)) {
  5483. count = (count + 1);
  5484. }
  5485. if ((this._продажа_товараTableAdapter != null)) {
  5486. count = (count + 1);
  5487. }
  5488. if ((this._сотрудникTableAdapter != null)) {
  5489. count = (count + 1);
  5490. }
  5491. if ((this._товарыTableAdapter != null)) {
  5492. count = (count + 1);
  5493. }
  5494. return count;
  5495. }
  5496. }
  5497. /// <summary>
  5498. ///Update rows in top-down order.
  5499. ///</summary>
  5500. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5501. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5502. private int UpdateUpdatedRows(ЛяховDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  5503. int result = 0;
  5504. if ((this._сотрудникTableAdapter != null)) {
  5505. global::System.Data.DataRow[] updatedRows = dataSet.Сотрудник.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  5506. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  5507. if (((updatedRows != null)
  5508. && (0 < updatedRows.Length))) {
  5509. result = (result + this._сотрудникTableAdapter.Update(updatedRows));
  5510. allChangedRows.AddRange(updatedRows);
  5511. }
  5512. }
  5513. if ((this._заказ_товараTableAdapter != null)) {
  5514. global::System.Data.DataRow[] updatedRows = dataSet.Заказ_товара.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  5515. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  5516. if (((updatedRows != null)
  5517. && (0 < updatedRows.Length))) {
  5518. result = (result + this._заказ_товараTableAdapter.Update(updatedRows));
  5519. allChangedRows.AddRange(updatedRows);
  5520. }
  5521. }
  5522. if ((this._накладнаяTableAdapter != null)) {
  5523. global::System.Data.DataRow[] updatedRows = dataSet.Накладная.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  5524. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  5525. if (((updatedRows != null)
  5526. && (0 < updatedRows.Length))) {
  5527. result = (result + this._накладнаяTableAdapter.Update(updatedRows));
  5528. allChangedRows.AddRange(updatedRows);
  5529. }
  5530. }
  5531. if ((this._товарыTableAdapter != null)) {
  5532. global::System.Data.DataRow[] updatedRows = dataSet.Товары.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  5533. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  5534. if (((updatedRows != null)
  5535. && (0 < updatedRows.Length))) {
  5536. result = (result + this._товарыTableAdapter.Update(updatedRows));
  5537. allChangedRows.AddRange(updatedRows);
  5538. }
  5539. }
  5540. if ((this._поставщикTableAdapter != null)) {
  5541. global::System.Data.DataRow[] updatedRows = dataSet.Поставщик.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  5542. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  5543. if (((updatedRows != null)
  5544. && (0 < updatedRows.Length))) {
  5545. result = (result + this._поставщикTableAdapter.Update(updatedRows));
  5546. allChangedRows.AddRange(updatedRows);
  5547. }
  5548. }
  5549. if ((this._продажа_товараTableAdapter != null)) {
  5550. global::System.Data.DataRow[] updatedRows = dataSet.Продажа_товара.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  5551. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  5552. if (((updatedRows != null)
  5553. && (0 < updatedRows.Length))) {
  5554. result = (result + this._продажа_товараTableAdapter.Update(updatedRows));
  5555. allChangedRows.AddRange(updatedRows);
  5556. }
  5557. }
  5558. return result;
  5559. }
  5560. /// <summary>
  5561. ///Insert rows in top-down order.
  5562. ///</summary>
  5563. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5564. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5565. private int UpdateInsertedRows(ЛяховDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  5566. int result = 0;
  5567. if ((this._сотрудникTableAdapter != null)) {
  5568. global::System.Data.DataRow[] addedRows = dataSet.Сотрудник.Select(null, null, global::System.Data.DataViewRowState.Added);
  5569. if (((addedRows != null)
  5570. && (0 < addedRows.Length))) {
  5571. result = (result + this._сотрудникTableAdapter.Update(addedRows));
  5572. allAddedRows.AddRange(addedRows);
  5573. }
  5574. }
  5575. if ((this._заказ_товараTableAdapter != null)) {
  5576. global::System.Data.DataRow[] addedRows = dataSet.Заказ_товара.Select(null, null, global::System.Data.DataViewRowState.Added);
  5577. if (((addedRows != null)
  5578. && (0 < addedRows.Length))) {
  5579. result = (result + this._заказ_товараTableAdapter.Update(addedRows));
  5580. allAddedRows.AddRange(addedRows);
  5581. }
  5582. }
  5583. if ((this._накладнаяTableAdapter != null)) {
  5584. global::System.Data.DataRow[] addedRows = dataSet.Накладная.Select(null, null, global::System.Data.DataViewRowState.Added);
  5585. if (((addedRows != null)
  5586. && (0 < addedRows.Length))) {
  5587. result = (result + this._накладнаяTableAdapter.Update(addedRows));
  5588. allAddedRows.AddRange(addedRows);
  5589. }
  5590. }
  5591. if ((this._товарыTableAdapter != null)) {
  5592. global::System.Data.DataRow[] addedRows = dataSet.Товары.Select(null, null, global::System.Data.DataViewRowState.Added);
  5593. if (((addedRows != null)
  5594. && (0 < addedRows.Length))) {
  5595. result = (result + this._товарыTableAdapter.Update(addedRows));
  5596. allAddedRows.AddRange(addedRows);
  5597. }
  5598. }
  5599. if ((this._поставщикTableAdapter != null)) {
  5600. global::System.Data.DataRow[] addedRows = dataSet.Поставщик.Select(null, null, global::System.Data.DataViewRowState.Added);
  5601. if (((addedRows != null)
  5602. && (0 < addedRows.Length))) {
  5603. result = (result + this._поставщикTableAdapter.Update(addedRows));
  5604. allAddedRows.AddRange(addedRows);
  5605. }
  5606. }
  5607. if ((this._продажа_товараTableAdapter != null)) {
  5608. global::System.Data.DataRow[] addedRows = dataSet.Продажа_товара.Select(null, null, global::System.Data.DataViewRowState.Added);
  5609. if (((addedRows != null)
  5610. && (0 < addedRows.Length))) {
  5611. result = (result + this._продажа_товараTableAdapter.Update(addedRows));
  5612. allAddedRows.AddRange(addedRows);
  5613. }
  5614. }
  5615. return result;
  5616. }
  5617. /// <summary>
  5618. ///Delete rows in bottom-up order.
  5619. ///</summary>
  5620. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5621. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5622. private int UpdateDeletedRows(ЛяховDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  5623. int result = 0;
  5624. if ((this._продажа_товараTableAdapter != null)) {
  5625. global::System.Data.DataRow[] deletedRows = dataSet.Продажа_товара.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  5626. if (((deletedRows != null)
  5627. && (0 < deletedRows.Length))) {
  5628. result = (result + this._продажа_товараTableAdapter.Update(deletedRows));
  5629. allChangedRows.AddRange(deletedRows);
  5630. }
  5631. }
  5632. if ((this._поставщикTableAdapter != null)) {
  5633. global::System.Data.DataRow[] deletedRows = dataSet.Поставщик.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  5634. if (((deletedRows != null)
  5635. && (0 < deletedRows.Length))) {
  5636. result = (result + this._поставщикTableAdapter.Update(deletedRows));
  5637. allChangedRows.AddRange(deletedRows);
  5638. }
  5639. }
  5640. if ((this._товарыTableAdapter != null)) {
  5641. global::System.Data.DataRow[] deletedRows = dataSet.Товары.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  5642. if (((deletedRows != null)
  5643. && (0 < deletedRows.Length))) {
  5644. result = (result + this._товарыTableAdapter.Update(deletedRows));
  5645. allChangedRows.AddRange(deletedRows);
  5646. }
  5647. }
  5648. if ((this._накладнаяTableAdapter != null)) {
  5649. global::System.Data.DataRow[] deletedRows = dataSet.Накладная.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  5650. if (((deletedRows != null)
  5651. && (0 < deletedRows.Length))) {
  5652. result = (result + this._накладнаяTableAdapter.Update(deletedRows));
  5653. allChangedRows.AddRange(deletedRows);
  5654. }
  5655. }
  5656. if ((this._заказ_товараTableAdapter != null)) {
  5657. global::System.Data.DataRow[] deletedRows = dataSet.Заказ_товара.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  5658. if (((deletedRows != null)
  5659. && (0 < deletedRows.Length))) {
  5660. result = (result + this._заказ_товараTableAdapter.Update(deletedRows));
  5661. allChangedRows.AddRange(deletedRows);
  5662. }
  5663. }
  5664. if ((this._сотрудникTableAdapter != null)) {
  5665. global::System.Data.DataRow[] deletedRows = dataSet.Сотрудник.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  5666. if (((deletedRows != null)
  5667. && (0 < deletedRows.Length))) {
  5668. result = (result + this._сотрудникTableAdapter.Update(deletedRows));
  5669. allChangedRows.AddRange(deletedRows);
  5670. }
  5671. }
  5672. return result;
  5673. }
  5674. /// <summary>
  5675. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  5676. ///</summary>
  5677. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5678. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5679. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  5680. if (((updatedRows == null)
  5681. || (updatedRows.Length < 1))) {
  5682. return updatedRows;
  5683. }
  5684. if (((allAddedRows == null)
  5685. || (allAddedRows.Count < 1))) {
  5686. return updatedRows;
  5687. }
  5688. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  5689. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  5690. global::System.Data.DataRow row = updatedRows[i];
  5691. if ((allAddedRows.Contains(row) == false)) {
  5692. realUpdatedRows.Add(row);
  5693. }
  5694. }
  5695. return realUpdatedRows.ToArray();
  5696. }
  5697. /// <summary>
  5698. ///Update all changes to the dataset.
  5699. ///</summary>
  5700. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5701. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5702. public virtual int UpdateAll(ЛяховDataSet dataSet) {
  5703. if ((dataSet == null)) {
  5704. throw new global::System.ArgumentNullException("dataSet");
  5705. }
  5706. if ((dataSet.HasChanges() == false)) {
  5707. return 0;
  5708. }
  5709. if (((this._заказ_товараTableAdapter != null)
  5710. && (this.MatchTableAdapterConnection(this._заказ_товараTableAdapter.Connection) == false))) {
  5711. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  5712. "r, должны использовать одинаковую строку подключения.");
  5713. }
  5714. if (((this._накладнаяTableAdapter != null)
  5715. && (this.MatchTableAdapterConnection(this._накладнаяTableAdapter.Connection) == false))) {
  5716. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  5717. "r, должны использовать одинаковую строку подключения.");
  5718. }
  5719. if (((this._поставщикTableAdapter != null)
  5720. && (this.MatchTableAdapterConnection(this._поставщикTableAdapter.Connection) == false))) {
  5721. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  5722. "r, должны использовать одинаковую строку подключения.");
  5723. }
  5724. if (((this._продажа_товараTableAdapter != null)
  5725. && (this.MatchTableAdapterConnection(this._продажа_товараTableAdapter.Connection) == false))) {
  5726. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  5727. "r, должны использовать одинаковую строку подключения.");
  5728. }
  5729. if (((this._сотрудникTableAdapter != null)
  5730. && (this.MatchTableAdapterConnection(this._сотрудникTableAdapter.Connection) == false))) {
  5731. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  5732. "r, должны использовать одинаковую строку подключения.");
  5733. }
  5734. if (((this._товарыTableAdapter != null)
  5735. && (this.MatchTableAdapterConnection(this._товарыTableAdapter.Connection) == false))) {
  5736. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  5737. "r, должны использовать одинаковую строку подключения.");
  5738. }
  5739. global::System.Data.IDbConnection workConnection = this.Connection;
  5740. if ((workConnection == null)) {
  5741. throw new global::System.ApplicationException("TableAdapterManager не содержит сведений о подключении. Укажите для каждого адапт" +
  5742. "ера таблицы TableAdapterManager допустимый экземпляр адаптера таблицы.");
  5743. }
  5744. bool workConnOpened = false;
  5745. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  5746. == global::System.Data.ConnectionState.Broken)) {
  5747. workConnection.Close();
  5748. }
  5749. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  5750. workConnection.Open();
  5751. workConnOpened = true;
  5752. }
  5753. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  5754. if ((workTransaction == null)) {
  5755. throw new global::System.ApplicationException("Не удается начать транзакцию. Текущее соединение данных не поддерживает транзакци" +
  5756. "и или текущее состояние не позволяет начать транзакцию.");
  5757. }
  5758. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  5759. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  5760. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  5761. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  5762. int result = 0;
  5763. global::System.Data.DataSet backupDataSet = null;
  5764. if (this.BackupDataSetBeforeUpdate) {
  5765. backupDataSet = new global::System.Data.DataSet();
  5766. backupDataSet.Merge(dataSet);
  5767. }
  5768. try {
  5769. // ---- Prepare for update -----------
  5770. //
  5771. if ((this._заказ_товараTableAdapter != null)) {
  5772. revertConnections.Add(this._заказ_товараTableAdapter, this._заказ_товараTableAdapter.Connection);
  5773. this._заказ_товараTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5774. this._заказ_товараTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5775. if (this._заказ_товараTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5776. this._заказ_товараTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5777. adaptersWithAcceptChangesDuringUpdate.Add(this._заказ_товараTableAdapter.Adapter);
  5778. }
  5779. }
  5780. if ((this._накладнаяTableAdapter != null)) {
  5781. revertConnections.Add(this._накладнаяTableAdapter, this._накладнаяTableAdapter.Connection);
  5782. this._накладнаяTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5783. this._накладнаяTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5784. if (this._накладнаяTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5785. this._накладнаяTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5786. adaptersWithAcceptChangesDuringUpdate.Add(this._накладнаяTableAdapter.Adapter);
  5787. }
  5788. }
  5789. if ((this._поставщикTableAdapter != null)) {
  5790. revertConnections.Add(this._поставщикTableAdapter, this._поставщикTableAdapter.Connection);
  5791. this._поставщикTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5792. this._поставщикTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5793. if (this._поставщикTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5794. this._поставщикTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5795. adaptersWithAcceptChangesDuringUpdate.Add(this._поставщикTableAdapter.Adapter);
  5796. }
  5797. }
  5798. if ((this._продажа_товараTableAdapter != null)) {
  5799. revertConnections.Add(this._продажа_товараTableAdapter, this._продажа_товараTableAdapter.Connection);
  5800. this._продажа_товараTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5801. this._продажа_товараTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5802. if (this._продажа_товараTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5803. this._продажа_товараTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5804. adaptersWithAcceptChangesDuringUpdate.Add(this._продажа_товараTableAdapter.Adapter);
  5805. }
  5806. }
  5807. if ((this._сотрудникTableAdapter != null)) {
  5808. revertConnections.Add(this._сотрудникTableAdapter, this._сотрудникTableAdapter.Connection);
  5809. this._сотрудникTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5810. this._сотрудникTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5811. if (this._сотрудникTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5812. this._сотрудникTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5813. adaptersWithAcceptChangesDuringUpdate.Add(this._сотрудникTableAdapter.Adapter);
  5814. }
  5815. }
  5816. if ((this._товарыTableAdapter != null)) {
  5817. revertConnections.Add(this._товарыTableAdapter, this._товарыTableAdapter.Connection);
  5818. this._товарыTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5819. this._товарыTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5820. if (this._товарыTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5821. this._товарыTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5822. adaptersWithAcceptChangesDuringUpdate.Add(this._товарыTableAdapter.Adapter);
  5823. }
  5824. }
  5825. //
  5826. //---- Perform updates -----------
  5827. //
  5828. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  5829. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  5830. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  5831. }
  5832. else {
  5833. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  5834. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  5835. }
  5836. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  5837. //
  5838. //---- Commit updates -----------
  5839. //
  5840. workTransaction.Commit();
  5841. if ((0 < allAddedRows.Count)) {
  5842. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  5843. allAddedRows.CopyTo(rows);
  5844. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  5845. global::System.Data.DataRow row = rows[i];
  5846. row.AcceptChanges();
  5847. }
  5848. }
  5849. if ((0 < allChangedRows.Count)) {
  5850. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  5851. allChangedRows.CopyTo(rows);
  5852. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  5853. global::System.Data.DataRow row = rows[i];
  5854. row.AcceptChanges();
  5855. }
  5856. }
  5857. }
  5858. catch (global::System.Exception ex) {
  5859. workTransaction.Rollback();
  5860. // ---- Restore the dataset -----------
  5861. if (this.BackupDataSetBeforeUpdate) {
  5862. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  5863. dataSet.Clear();
  5864. dataSet.Merge(backupDataSet);
  5865. }
  5866. else {
  5867. if ((0 < allAddedRows.Count)) {
  5868. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  5869. allAddedRows.CopyTo(rows);
  5870. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  5871. global::System.Data.DataRow row = rows[i];
  5872. row.AcceptChanges();
  5873. row.SetAdded();
  5874. }
  5875. }
  5876. }
  5877. throw ex;
  5878. }
  5879. finally {
  5880. if (workConnOpened) {
  5881. workConnection.Close();
  5882. }
  5883. if ((this._заказ_товараTableAdapter != null)) {
  5884. this._заказ_товараTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._заказ_товараTableAdapter]));
  5885. this._заказ_товараTableAdapter.Transaction = null;
  5886. }
  5887. if ((this._накладнаяTableAdapter != null)) {
  5888. this._накладнаяTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._накладнаяTableAdapter]));
  5889. this._накладнаяTableAdapter.Transaction = null;
  5890. }
  5891. if ((this._поставщикTableAdapter != null)) {
  5892. this._поставщикTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._поставщикTableAdapter]));
  5893. this._поставщикTableAdapter.Transaction = null;
  5894. }
  5895. if ((this._продажа_товараTableAdapter != null)) {
  5896. this._продажа_товараTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._продажа_товараTableAdapter]));
  5897. this._продажа_товараTableAdapter.Transaction = null;
  5898. }
  5899. if ((this._сотрудникTableAdapter != null)) {
  5900. this._сотрудникTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._сотрудникTableAdapter]));
  5901. this._сотрудникTableAdapter.Transaction = null;
  5902. }
  5903. if ((this._товарыTableAdapter != null)) {
  5904. this._товарыTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._товарыTableAdapter]));
  5905. this._товарыTableAdapter.Transaction = null;
  5906. }
  5907. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  5908. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  5909. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  5910. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  5911. global::System.Data.Common.DataAdapter adapter = adapters[i];
  5912. adapter.AcceptChangesDuringUpdate = true;
  5913. }
  5914. }
  5915. }
  5916. return result;
  5917. }
  5918. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5919. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5920. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  5921. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  5922. }
  5923. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5924. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5925. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  5926. if ((this._connection != null)) {
  5927. return true;
  5928. }
  5929. if (((this.Connection == null)
  5930. || (inputConnection == null))) {
  5931. return true;
  5932. }
  5933. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  5934. return true;
  5935. }
  5936. return false;
  5937. }
  5938. /// <summary>
  5939. ///Update Order Option
  5940. ///</summary>
  5941. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5942. public enum UpdateOrderOption {
  5943. InsertUpdateDelete = 0,
  5944. UpdateInsertDelete = 1,
  5945. }
  5946. /// <summary>
  5947. ///Used to sort self-referenced table's rows
  5948. ///</summary>
  5949. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5950. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  5951. private global::System.Data.DataRelation _relation;
  5952. private int _childFirst;
  5953. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5954. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5955. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  5956. this._relation = relation;
  5957. if (childFirst) {
  5958. this._childFirst = -1;
  5959. }
  5960. else {
  5961. this._childFirst = 1;
  5962. }
  5963. }
  5964. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5965. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  5966. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  5967. global::System.Diagnostics.Debug.Assert((row != null));
  5968. global::System.Data.DataRow root = row;
  5969. distance = 0;
  5970. global::System.Collections.Generic.IDictionary<global::System.Data.DataRow, global::System.Data.DataRow> traversedRows = new global::System.Collections.Generic.Dictionary<global::System.Data.DataRow, global::System.Data.DataRow>();
  5971. traversedRows[row] = row;
  5972. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  5973. for (
  5974. ; ((parent != null)
  5975. && (traversedRows.ContainsKey(parent) == false));
  5976. ) {
  5977. distance = (distance + 1);
  5978. root = parent;
  5979. traversedRows[parent] = parent;
  5980. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  5981. }
  5982. if ((distance == 0)) {
  5983. traversedRows.Clear();
  5984. traversedRows[row] = row;
  5985. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  5986. for (
  5987. ; ((parent != null)
  5988. && (traversedRows.ContainsKey(parent) == false));
  5989. ) {
  5990. distance = (distance + 1);
  5991. root = parent;
  5992. traversedRows[parent] = parent;
  5993. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  5994. }
  5995. }
  5996. return root;
  5997. }
  5998. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5999. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  6000. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  6001. if (object.ReferenceEquals(row1, row2)) {
  6002. return 0;
  6003. }
  6004. if ((row1 == null)) {
  6005. return -1;
  6006. }
  6007. if ((row2 == null)) {
  6008. return 1;
  6009. }
  6010. int distance1 = 0;
  6011. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  6012. int distance2 = 0;
  6013. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  6014. if (object.ReferenceEquals(root1, root2)) {
  6015. return (this._childFirst * distance1.CompareTo(distance2));
  6016. }
  6017. else {
  6018. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  6019. && (root2.Table != null)));
  6020. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  6021. return -1;
  6022. }
  6023. else {
  6024. return 1;
  6025. }
  6026. }
  6027. }
  6028. }
  6029. }
  6030. }
  6031. #pragma warning restore 1591