1
0

agentRUDDataSet.Designer.cs 353 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. // Runtime Version:4.0.30319.42000
  5. //
  6. // Changes to this file may cause incorrect behavior and will be lost if
  7. // the code is regenerated.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. #pragma warning disable 1591
  11. namespace Prakt2 {
  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("agentRUDDataSet")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class agentRUDDataSet : global::System.Data.DataSet {
  22. private AgentDataTable tableAgent;
  23. private AgentTypeDataTable tableAgentType;
  24. private ProductDataTable tableProduct;
  25. private ProductSaleDataTable tableProductSale;
  26. private ProductTypeDataTable tableProductType;
  27. private global::System.Data.DataRelation relationFK_Agent_AgentType;
  28. private global::System.Data.DataRelation relationFK_Product_ProductType;
  29. private global::System.Data.DataRelation relationFK_ProductSale_Agent;
  30. private global::System.Data.DataRelation relationFK_ProductSale_Product;
  31. private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  32. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  33. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  34. public agentRUDDataSet() {
  35. this.BeginInit();
  36. this.InitClass();
  37. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  38. base.Tables.CollectionChanged += schemaChangedHandler;
  39. base.Relations.CollectionChanged += schemaChangedHandler;
  40. this.EndInit();
  41. }
  42. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  43. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  44. protected agentRUDDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  45. base(info, context, false) {
  46. if ((this.IsBinarySerialized(info, context) == true)) {
  47. this.InitVars(false);
  48. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  49. this.Tables.CollectionChanged += schemaChangedHandler1;
  50. this.Relations.CollectionChanged += schemaChangedHandler1;
  51. return;
  52. }
  53. string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
  54. if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  55. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  56. ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  57. if ((ds.Tables["Agent"] != null)) {
  58. base.Tables.Add(new AgentDataTable(ds.Tables["Agent"]));
  59. }
  60. if ((ds.Tables["AgentType"] != null)) {
  61. base.Tables.Add(new AgentTypeDataTable(ds.Tables["AgentType"]));
  62. }
  63. if ((ds.Tables["Product"] != null)) {
  64. base.Tables.Add(new ProductDataTable(ds.Tables["Product"]));
  65. }
  66. if ((ds.Tables["ProductSale"] != null)) {
  67. base.Tables.Add(new ProductSaleDataTable(ds.Tables["ProductSale"]));
  68. }
  69. if ((ds.Tables["ProductType"] != null)) {
  70. base.Tables.Add(new ProductTypeDataTable(ds.Tables["ProductType"]));
  71. }
  72. this.DataSetName = ds.DataSetName;
  73. this.Prefix = ds.Prefix;
  74. this.Namespace = ds.Namespace;
  75. this.Locale = ds.Locale;
  76. this.CaseSensitive = ds.CaseSensitive;
  77. this.EnforceConstraints = ds.EnforceConstraints;
  78. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  79. this.InitVars();
  80. }
  81. else {
  82. this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  83. }
  84. this.GetSerializationData(info, context);
  85. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  86. base.Tables.CollectionChanged += schemaChangedHandler;
  87. this.Relations.CollectionChanged += schemaChangedHandler;
  88. }
  89. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  90. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  91. [global::System.ComponentModel.Browsable(false)]
  92. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  93. public AgentDataTable Agent {
  94. get {
  95. return this.tableAgent;
  96. }
  97. }
  98. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  99. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  100. [global::System.ComponentModel.Browsable(false)]
  101. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  102. public AgentTypeDataTable AgentType {
  103. get {
  104. return this.tableAgentType;
  105. }
  106. }
  107. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  108. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  109. [global::System.ComponentModel.Browsable(false)]
  110. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  111. public ProductDataTable Product {
  112. get {
  113. return this.tableProduct;
  114. }
  115. }
  116. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  117. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  118. [global::System.ComponentModel.Browsable(false)]
  119. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  120. public ProductSaleDataTable ProductSale {
  121. get {
  122. return this.tableProductSale;
  123. }
  124. }
  125. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  126. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  127. [global::System.ComponentModel.Browsable(false)]
  128. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  129. public ProductTypeDataTable ProductType {
  130. get {
  131. return this.tableProductType;
  132. }
  133. }
  134. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  135. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  136. [global::System.ComponentModel.BrowsableAttribute(true)]
  137. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
  138. public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
  139. get {
  140. return this._schemaSerializationMode;
  141. }
  142. set {
  143. this._schemaSerializationMode = value;
  144. }
  145. }
  146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  147. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  148. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  149. public new global::System.Data.DataTableCollection Tables {
  150. get {
  151. return base.Tables;
  152. }
  153. }
  154. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  155. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  156. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  157. public new global::System.Data.DataRelationCollection Relations {
  158. get {
  159. return base.Relations;
  160. }
  161. }
  162. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  163. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  164. protected override void InitializeDerivedDataSet() {
  165. this.BeginInit();
  166. this.InitClass();
  167. this.EndInit();
  168. }
  169. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  170. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  171. public override global::System.Data.DataSet Clone() {
  172. agentRUDDataSet cln = ((agentRUDDataSet)(base.Clone()));
  173. cln.InitVars();
  174. cln.SchemaSerializationMode = this.SchemaSerializationMode;
  175. return cln;
  176. }
  177. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  178. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  179. protected override bool ShouldSerializeTables() {
  180. return false;
  181. }
  182. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  183. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  184. protected override bool ShouldSerializeRelations() {
  185. return false;
  186. }
  187. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  188. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  189. protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
  190. if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  191. this.Reset();
  192. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  193. ds.ReadXml(reader);
  194. if ((ds.Tables["Agent"] != null)) {
  195. base.Tables.Add(new AgentDataTable(ds.Tables["Agent"]));
  196. }
  197. if ((ds.Tables["AgentType"] != null)) {
  198. base.Tables.Add(new AgentTypeDataTable(ds.Tables["AgentType"]));
  199. }
  200. if ((ds.Tables["Product"] != null)) {
  201. base.Tables.Add(new ProductDataTable(ds.Tables["Product"]));
  202. }
  203. if ((ds.Tables["ProductSale"] != null)) {
  204. base.Tables.Add(new ProductSaleDataTable(ds.Tables["ProductSale"]));
  205. }
  206. if ((ds.Tables["ProductType"] != null)) {
  207. base.Tables.Add(new ProductTypeDataTable(ds.Tables["ProductType"]));
  208. }
  209. this.DataSetName = ds.DataSetName;
  210. this.Prefix = ds.Prefix;
  211. this.Namespace = ds.Namespace;
  212. this.Locale = ds.Locale;
  213. this.CaseSensitive = ds.CaseSensitive;
  214. this.EnforceConstraints = ds.EnforceConstraints;
  215. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  216. this.InitVars();
  217. }
  218. else {
  219. this.ReadXml(reader);
  220. this.InitVars();
  221. }
  222. }
  223. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  224. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  225. protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
  226. global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
  227. this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
  228. stream.Position = 0;
  229. return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
  230. }
  231. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  232. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  233. internal void InitVars() {
  234. this.InitVars(true);
  235. }
  236. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  237. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  238. internal void InitVars(bool initTable) {
  239. this.tableAgent = ((AgentDataTable)(base.Tables["Agent"]));
  240. if ((initTable == true)) {
  241. if ((this.tableAgent != null)) {
  242. this.tableAgent.InitVars();
  243. }
  244. }
  245. this.tableAgentType = ((AgentTypeDataTable)(base.Tables["AgentType"]));
  246. if ((initTable == true)) {
  247. if ((this.tableAgentType != null)) {
  248. this.tableAgentType.InitVars();
  249. }
  250. }
  251. this.tableProduct = ((ProductDataTable)(base.Tables["Product"]));
  252. if ((initTable == true)) {
  253. if ((this.tableProduct != null)) {
  254. this.tableProduct.InitVars();
  255. }
  256. }
  257. this.tableProductSale = ((ProductSaleDataTable)(base.Tables["ProductSale"]));
  258. if ((initTable == true)) {
  259. if ((this.tableProductSale != null)) {
  260. this.tableProductSale.InitVars();
  261. }
  262. }
  263. this.tableProductType = ((ProductTypeDataTable)(base.Tables["ProductType"]));
  264. if ((initTable == true)) {
  265. if ((this.tableProductType != null)) {
  266. this.tableProductType.InitVars();
  267. }
  268. }
  269. this.relationFK_Agent_AgentType = this.Relations["FK_Agent_AgentType"];
  270. this.relationFK_Product_ProductType = this.Relations["FK_Product_ProductType"];
  271. this.relationFK_ProductSale_Agent = this.Relations["FK_ProductSale_Agent"];
  272. this.relationFK_ProductSale_Product = this.Relations["FK_ProductSale_Product"];
  273. }
  274. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  275. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  276. private void InitClass() {
  277. this.DataSetName = "agentRUDDataSet";
  278. this.Prefix = "";
  279. this.Namespace = "http://tempuri.org/agentRUDDataSet.xsd";
  280. this.EnforceConstraints = true;
  281. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  282. this.tableAgent = new AgentDataTable();
  283. base.Tables.Add(this.tableAgent);
  284. this.tableAgentType = new AgentTypeDataTable();
  285. base.Tables.Add(this.tableAgentType);
  286. this.tableProduct = new ProductDataTable();
  287. base.Tables.Add(this.tableProduct);
  288. this.tableProductSale = new ProductSaleDataTable();
  289. base.Tables.Add(this.tableProductSale);
  290. this.tableProductType = new ProductTypeDataTable();
  291. base.Tables.Add(this.tableProductType);
  292. this.relationFK_Agent_AgentType = new global::System.Data.DataRelation("FK_Agent_AgentType", new global::System.Data.DataColumn[] {
  293. this.tableAgentType.IDColumn}, new global::System.Data.DataColumn[] {
  294. this.tableAgent.AgentTypeIDColumn}, false);
  295. this.Relations.Add(this.relationFK_Agent_AgentType);
  296. this.relationFK_Product_ProductType = new global::System.Data.DataRelation("FK_Product_ProductType", new global::System.Data.DataColumn[] {
  297. this.tableProductType.IDColumn}, new global::System.Data.DataColumn[] {
  298. this.tableProduct.ProductTypeIDColumn}, false);
  299. this.Relations.Add(this.relationFK_Product_ProductType);
  300. this.relationFK_ProductSale_Agent = new global::System.Data.DataRelation("FK_ProductSale_Agent", new global::System.Data.DataColumn[] {
  301. this.tableAgent.IDColumn}, new global::System.Data.DataColumn[] {
  302. this.tableProductSale.AgentIDColumn}, false);
  303. this.Relations.Add(this.relationFK_ProductSale_Agent);
  304. this.relationFK_ProductSale_Product = new global::System.Data.DataRelation("FK_ProductSale_Product", new global::System.Data.DataColumn[] {
  305. this.tableProduct.IDColumn}, new global::System.Data.DataColumn[] {
  306. this.tableProductSale.ProductIDColumn}, false);
  307. this.Relations.Add(this.relationFK_ProductSale_Product);
  308. }
  309. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  310. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  311. private bool ShouldSerializeAgent() {
  312. return false;
  313. }
  314. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  315. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  316. private bool ShouldSerializeAgentType() {
  317. return false;
  318. }
  319. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  320. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  321. private bool ShouldSerializeProduct() {
  322. return false;
  323. }
  324. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  325. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  326. private bool ShouldSerializeProductSale() {
  327. return false;
  328. }
  329. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  330. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  331. private bool ShouldSerializeProductType() {
  332. return false;
  333. }
  334. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  335. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  336. private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
  337. if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
  338. this.InitVars();
  339. }
  340. }
  341. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  342. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  343. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  344. agentRUDDataSet ds = new agentRUDDataSet();
  345. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  346. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  347. global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
  348. any.Namespace = ds.Namespace;
  349. sequence.Items.Add(any);
  350. type.Particle = sequence;
  351. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  352. if (xs.Contains(dsSchema.TargetNamespace)) {
  353. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  354. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  355. try {
  356. global::System.Xml.Schema.XmlSchema schema = null;
  357. dsSchema.Write(s1);
  358. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  359. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  360. s2.SetLength(0);
  361. schema.Write(s2);
  362. if ((s1.Length == s2.Length)) {
  363. s1.Position = 0;
  364. s2.Position = 0;
  365. for (; ((s1.Position != s1.Length)
  366. && (s1.ReadByte() == s2.ReadByte())); ) {
  367. ;
  368. }
  369. if ((s1.Position == s1.Length)) {
  370. return type;
  371. }
  372. }
  373. }
  374. }
  375. finally {
  376. if ((s1 != null)) {
  377. s1.Close();
  378. }
  379. if ((s2 != null)) {
  380. s2.Close();
  381. }
  382. }
  383. }
  384. xs.Add(dsSchema);
  385. return type;
  386. }
  387. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  388. public delegate void AgentRowChangeEventHandler(object sender, AgentRowChangeEvent e);
  389. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  390. public delegate void AgentTypeRowChangeEventHandler(object sender, AgentTypeRowChangeEvent e);
  391. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  392. public delegate void ProductRowChangeEventHandler(object sender, ProductRowChangeEvent e);
  393. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  394. public delegate void ProductSaleRowChangeEventHandler(object sender, ProductSaleRowChangeEvent e);
  395. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  396. public delegate void ProductTypeRowChangeEventHandler(object sender, ProductTypeRowChangeEvent e);
  397. /// <summary>
  398. ///Represents the strongly named DataTable class.
  399. ///</summary>
  400. [global::System.Serializable()]
  401. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  402. public partial class AgentDataTable : global::System.Data.TypedTableBase<AgentRow> {
  403. private global::System.Data.DataColumn columnID;
  404. private global::System.Data.DataColumn columnTitle;
  405. private global::System.Data.DataColumn columnAgentTypeID;
  406. private global::System.Data.DataColumn columnAddress;
  407. private global::System.Data.DataColumn columnINN;
  408. private global::System.Data.DataColumn columnKPP;
  409. private global::System.Data.DataColumn columnDirectorName;
  410. private global::System.Data.DataColumn columnPhone;
  411. private global::System.Data.DataColumn columnEmail;
  412. private global::System.Data.DataColumn columnLogo;
  413. private global::System.Data.DataColumn columnPriority;
  414. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  415. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  416. public AgentDataTable() {
  417. this.TableName = "Agent";
  418. this.BeginInit();
  419. this.InitClass();
  420. this.EndInit();
  421. }
  422. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  423. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  424. internal AgentDataTable(global::System.Data.DataTable table) {
  425. this.TableName = table.TableName;
  426. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  427. this.CaseSensitive = table.CaseSensitive;
  428. }
  429. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  430. this.Locale = table.Locale;
  431. }
  432. if ((table.Namespace != table.DataSet.Namespace)) {
  433. this.Namespace = table.Namespace;
  434. }
  435. this.Prefix = table.Prefix;
  436. this.MinimumCapacity = table.MinimumCapacity;
  437. }
  438. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  439. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  440. protected AgentDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  441. base(info, context) {
  442. this.InitVars();
  443. }
  444. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  445. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  446. public global::System.Data.DataColumn IDColumn {
  447. get {
  448. return this.columnID;
  449. }
  450. }
  451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  452. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  453. public global::System.Data.DataColumn TitleColumn {
  454. get {
  455. return this.columnTitle;
  456. }
  457. }
  458. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  459. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  460. public global::System.Data.DataColumn AgentTypeIDColumn {
  461. get {
  462. return this.columnAgentTypeID;
  463. }
  464. }
  465. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  466. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  467. public global::System.Data.DataColumn AddressColumn {
  468. get {
  469. return this.columnAddress;
  470. }
  471. }
  472. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  473. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  474. public global::System.Data.DataColumn INNColumn {
  475. get {
  476. return this.columnINN;
  477. }
  478. }
  479. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  480. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  481. public global::System.Data.DataColumn KPPColumn {
  482. get {
  483. return this.columnKPP;
  484. }
  485. }
  486. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  487. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  488. public global::System.Data.DataColumn DirectorNameColumn {
  489. get {
  490. return this.columnDirectorName;
  491. }
  492. }
  493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  494. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  495. public global::System.Data.DataColumn PhoneColumn {
  496. get {
  497. return this.columnPhone;
  498. }
  499. }
  500. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  501. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  502. public global::System.Data.DataColumn EmailColumn {
  503. get {
  504. return this.columnEmail;
  505. }
  506. }
  507. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  508. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  509. public global::System.Data.DataColumn LogoColumn {
  510. get {
  511. return this.columnLogo;
  512. }
  513. }
  514. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  515. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  516. public global::System.Data.DataColumn PriorityColumn {
  517. get {
  518. return this.columnPriority;
  519. }
  520. }
  521. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  522. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  523. [global::System.ComponentModel.Browsable(false)]
  524. public int Count {
  525. get {
  526. return this.Rows.Count;
  527. }
  528. }
  529. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  530. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  531. public AgentRow this[int index] {
  532. get {
  533. return ((AgentRow)(this.Rows[index]));
  534. }
  535. }
  536. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  537. public event AgentRowChangeEventHandler AgentRowChanging;
  538. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  539. public event AgentRowChangeEventHandler AgentRowChanged;
  540. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  541. public event AgentRowChangeEventHandler AgentRowDeleting;
  542. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  543. public event AgentRowChangeEventHandler AgentRowDeleted;
  544. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  545. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  546. public void AddAgentRow(AgentRow row) {
  547. this.Rows.Add(row);
  548. }
  549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  550. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  551. public AgentRow AddAgentRow(string Title, AgentTypeRow parentAgentTypeRowByFK_Agent_AgentType, string Address, string INN, string KPP, string DirectorName, string Phone, string Email, string Logo, int Priority) {
  552. AgentRow rowAgentRow = ((AgentRow)(this.NewRow()));
  553. object[] columnValuesArray = new object[] {
  554. null,
  555. Title,
  556. null,
  557. Address,
  558. INN,
  559. KPP,
  560. DirectorName,
  561. Phone,
  562. Email,
  563. Logo,
  564. Priority};
  565. if ((parentAgentTypeRowByFK_Agent_AgentType != null)) {
  566. columnValuesArray[2] = parentAgentTypeRowByFK_Agent_AgentType[0];
  567. }
  568. rowAgentRow.ItemArray = columnValuesArray;
  569. this.Rows.Add(rowAgentRow);
  570. return rowAgentRow;
  571. }
  572. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  573. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  574. public AgentRow FindByID(int ID) {
  575. return ((AgentRow)(this.Rows.Find(new object[] {
  576. ID})));
  577. }
  578. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  579. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  580. public override global::System.Data.DataTable Clone() {
  581. AgentDataTable cln = ((AgentDataTable)(base.Clone()));
  582. cln.InitVars();
  583. return cln;
  584. }
  585. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  586. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  587. protected override global::System.Data.DataTable CreateInstance() {
  588. return new AgentDataTable();
  589. }
  590. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  591. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  592. internal void InitVars() {
  593. this.columnID = base.Columns["ID"];
  594. this.columnTitle = base.Columns["Title"];
  595. this.columnAgentTypeID = base.Columns["AgentTypeID"];
  596. this.columnAddress = base.Columns["Address"];
  597. this.columnINN = base.Columns["INN"];
  598. this.columnKPP = base.Columns["KPP"];
  599. this.columnDirectorName = base.Columns["DirectorName"];
  600. this.columnPhone = base.Columns["Phone"];
  601. this.columnEmail = base.Columns["Email"];
  602. this.columnLogo = base.Columns["Logo"];
  603. this.columnPriority = base.Columns["Priority"];
  604. }
  605. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  606. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  607. private void InitClass() {
  608. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  609. base.Columns.Add(this.columnID);
  610. this.columnTitle = new global::System.Data.DataColumn("Title", typeof(string), null, global::System.Data.MappingType.Element);
  611. base.Columns.Add(this.columnTitle);
  612. this.columnAgentTypeID = new global::System.Data.DataColumn("AgentTypeID", typeof(int), null, global::System.Data.MappingType.Element);
  613. base.Columns.Add(this.columnAgentTypeID);
  614. this.columnAddress = new global::System.Data.DataColumn("Address", typeof(string), null, global::System.Data.MappingType.Element);
  615. base.Columns.Add(this.columnAddress);
  616. this.columnINN = new global::System.Data.DataColumn("INN", typeof(string), null, global::System.Data.MappingType.Element);
  617. base.Columns.Add(this.columnINN);
  618. this.columnKPP = new global::System.Data.DataColumn("KPP", typeof(string), null, global::System.Data.MappingType.Element);
  619. base.Columns.Add(this.columnKPP);
  620. this.columnDirectorName = new global::System.Data.DataColumn("DirectorName", typeof(string), null, global::System.Data.MappingType.Element);
  621. base.Columns.Add(this.columnDirectorName);
  622. this.columnPhone = new global::System.Data.DataColumn("Phone", typeof(string), null, global::System.Data.MappingType.Element);
  623. base.Columns.Add(this.columnPhone);
  624. this.columnEmail = new global::System.Data.DataColumn("Email", typeof(string), null, global::System.Data.MappingType.Element);
  625. base.Columns.Add(this.columnEmail);
  626. this.columnLogo = new global::System.Data.DataColumn("Logo", typeof(string), null, global::System.Data.MappingType.Element);
  627. base.Columns.Add(this.columnLogo);
  628. this.columnPriority = new global::System.Data.DataColumn("Priority", typeof(int), null, global::System.Data.MappingType.Element);
  629. base.Columns.Add(this.columnPriority);
  630. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  631. this.columnID}, true));
  632. this.columnID.AutoIncrement = true;
  633. this.columnID.AutoIncrementSeed = -1;
  634. this.columnID.AutoIncrementStep = -1;
  635. this.columnID.AllowDBNull = false;
  636. this.columnID.ReadOnly = true;
  637. this.columnID.Unique = true;
  638. this.columnTitle.AllowDBNull = false;
  639. this.columnTitle.MaxLength = 150;
  640. this.columnAgentTypeID.AllowDBNull = false;
  641. this.columnAddress.MaxLength = 300;
  642. this.columnINN.AllowDBNull = false;
  643. this.columnINN.MaxLength = 12;
  644. this.columnKPP.MaxLength = 9;
  645. this.columnDirectorName.MaxLength = 100;
  646. this.columnPhone.AllowDBNull = false;
  647. this.columnPhone.MaxLength = 20;
  648. this.columnEmail.MaxLength = 255;
  649. this.columnLogo.MaxLength = 100;
  650. this.columnPriority.AllowDBNull = false;
  651. }
  652. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  653. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  654. public AgentRow NewAgentRow() {
  655. return ((AgentRow)(this.NewRow()));
  656. }
  657. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  658. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  659. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  660. return new AgentRow(builder);
  661. }
  662. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  663. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  664. protected override global::System.Type GetRowType() {
  665. return typeof(AgentRow);
  666. }
  667. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  668. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  669. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  670. base.OnRowChanged(e);
  671. if ((this.AgentRowChanged != null)) {
  672. this.AgentRowChanged(this, new AgentRowChangeEvent(((AgentRow)(e.Row)), e.Action));
  673. }
  674. }
  675. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  676. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  677. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  678. base.OnRowChanging(e);
  679. if ((this.AgentRowChanging != null)) {
  680. this.AgentRowChanging(this, new AgentRowChangeEvent(((AgentRow)(e.Row)), e.Action));
  681. }
  682. }
  683. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  684. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  685. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  686. base.OnRowDeleted(e);
  687. if ((this.AgentRowDeleted != null)) {
  688. this.AgentRowDeleted(this, new AgentRowChangeEvent(((AgentRow)(e.Row)), e.Action));
  689. }
  690. }
  691. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  692. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  693. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  694. base.OnRowDeleting(e);
  695. if ((this.AgentRowDeleting != null)) {
  696. this.AgentRowDeleting(this, new AgentRowChangeEvent(((AgentRow)(e.Row)), e.Action));
  697. }
  698. }
  699. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  700. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  701. public void RemoveAgentRow(AgentRow row) {
  702. this.Rows.Remove(row);
  703. }
  704. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  705. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  706. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  707. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  708. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  709. agentRUDDataSet ds = new agentRUDDataSet();
  710. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  711. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  712. any1.MinOccurs = new decimal(0);
  713. any1.MaxOccurs = decimal.MaxValue;
  714. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  715. sequence.Items.Add(any1);
  716. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  717. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  718. any2.MinOccurs = new decimal(1);
  719. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  720. sequence.Items.Add(any2);
  721. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  722. attribute1.Name = "namespace";
  723. attribute1.FixedValue = ds.Namespace;
  724. type.Attributes.Add(attribute1);
  725. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  726. attribute2.Name = "tableTypeName";
  727. attribute2.FixedValue = "AgentDataTable";
  728. type.Attributes.Add(attribute2);
  729. type.Particle = sequence;
  730. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  731. if (xs.Contains(dsSchema.TargetNamespace)) {
  732. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  733. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  734. try {
  735. global::System.Xml.Schema.XmlSchema schema = null;
  736. dsSchema.Write(s1);
  737. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  738. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  739. s2.SetLength(0);
  740. schema.Write(s2);
  741. if ((s1.Length == s2.Length)) {
  742. s1.Position = 0;
  743. s2.Position = 0;
  744. for (; ((s1.Position != s1.Length)
  745. && (s1.ReadByte() == s2.ReadByte())); ) {
  746. ;
  747. }
  748. if ((s1.Position == s1.Length)) {
  749. return type;
  750. }
  751. }
  752. }
  753. }
  754. finally {
  755. if ((s1 != null)) {
  756. s1.Close();
  757. }
  758. if ((s2 != null)) {
  759. s2.Close();
  760. }
  761. }
  762. }
  763. xs.Add(dsSchema);
  764. return type;
  765. }
  766. }
  767. /// <summary>
  768. ///Represents the strongly named DataTable class.
  769. ///</summary>
  770. [global::System.Serializable()]
  771. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  772. public partial class AgentTypeDataTable : global::System.Data.TypedTableBase<AgentTypeRow> {
  773. private global::System.Data.DataColumn columnID;
  774. private global::System.Data.DataColumn columnTitle;
  775. private global::System.Data.DataColumn columnImage;
  776. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  777. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  778. public AgentTypeDataTable() {
  779. this.TableName = "AgentType";
  780. this.BeginInit();
  781. this.InitClass();
  782. this.EndInit();
  783. }
  784. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  785. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  786. internal AgentTypeDataTable(global::System.Data.DataTable table) {
  787. this.TableName = table.TableName;
  788. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  789. this.CaseSensitive = table.CaseSensitive;
  790. }
  791. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  792. this.Locale = table.Locale;
  793. }
  794. if ((table.Namespace != table.DataSet.Namespace)) {
  795. this.Namespace = table.Namespace;
  796. }
  797. this.Prefix = table.Prefix;
  798. this.MinimumCapacity = table.MinimumCapacity;
  799. }
  800. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  801. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  802. protected AgentTypeDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  803. base(info, context) {
  804. this.InitVars();
  805. }
  806. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  807. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  808. public global::System.Data.DataColumn IDColumn {
  809. get {
  810. return this.columnID;
  811. }
  812. }
  813. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  814. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  815. public global::System.Data.DataColumn TitleColumn {
  816. get {
  817. return this.columnTitle;
  818. }
  819. }
  820. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  821. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  822. public global::System.Data.DataColumn ImageColumn {
  823. get {
  824. return this.columnImage;
  825. }
  826. }
  827. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  828. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  829. [global::System.ComponentModel.Browsable(false)]
  830. public int Count {
  831. get {
  832. return this.Rows.Count;
  833. }
  834. }
  835. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  836. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  837. public AgentTypeRow this[int index] {
  838. get {
  839. return ((AgentTypeRow)(this.Rows[index]));
  840. }
  841. }
  842. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  843. public event AgentTypeRowChangeEventHandler AgentTypeRowChanging;
  844. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  845. public event AgentTypeRowChangeEventHandler AgentTypeRowChanged;
  846. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  847. public event AgentTypeRowChangeEventHandler AgentTypeRowDeleting;
  848. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  849. public event AgentTypeRowChangeEventHandler AgentTypeRowDeleted;
  850. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  851. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  852. public void AddAgentTypeRow(AgentTypeRow row) {
  853. this.Rows.Add(row);
  854. }
  855. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  856. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  857. public AgentTypeRow AddAgentTypeRow(string Title, string Image) {
  858. AgentTypeRow rowAgentTypeRow = ((AgentTypeRow)(this.NewRow()));
  859. object[] columnValuesArray = new object[] {
  860. null,
  861. Title,
  862. Image};
  863. rowAgentTypeRow.ItemArray = columnValuesArray;
  864. this.Rows.Add(rowAgentTypeRow);
  865. return rowAgentTypeRow;
  866. }
  867. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  868. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  869. public AgentTypeRow FindByID(int ID) {
  870. return ((AgentTypeRow)(this.Rows.Find(new object[] {
  871. ID})));
  872. }
  873. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  874. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  875. public override global::System.Data.DataTable Clone() {
  876. AgentTypeDataTable cln = ((AgentTypeDataTable)(base.Clone()));
  877. cln.InitVars();
  878. return cln;
  879. }
  880. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  881. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  882. protected override global::System.Data.DataTable CreateInstance() {
  883. return new AgentTypeDataTable();
  884. }
  885. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  886. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  887. internal void InitVars() {
  888. this.columnID = base.Columns["ID"];
  889. this.columnTitle = base.Columns["Title"];
  890. this.columnImage = base.Columns["Image"];
  891. }
  892. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  893. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  894. private void InitClass() {
  895. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  896. base.Columns.Add(this.columnID);
  897. this.columnTitle = new global::System.Data.DataColumn("Title", typeof(string), null, global::System.Data.MappingType.Element);
  898. base.Columns.Add(this.columnTitle);
  899. this.columnImage = new global::System.Data.DataColumn("Image", typeof(string), null, global::System.Data.MappingType.Element);
  900. base.Columns.Add(this.columnImage);
  901. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  902. this.columnID}, true));
  903. this.columnID.AutoIncrement = true;
  904. this.columnID.AutoIncrementSeed = -1;
  905. this.columnID.AutoIncrementStep = -1;
  906. this.columnID.AllowDBNull = false;
  907. this.columnID.ReadOnly = true;
  908. this.columnID.Unique = true;
  909. this.columnTitle.AllowDBNull = false;
  910. this.columnTitle.MaxLength = 50;
  911. this.columnImage.MaxLength = 100;
  912. }
  913. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  914. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  915. public AgentTypeRow NewAgentTypeRow() {
  916. return ((AgentTypeRow)(this.NewRow()));
  917. }
  918. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  919. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  920. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  921. return new AgentTypeRow(builder);
  922. }
  923. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  924. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  925. protected override global::System.Type GetRowType() {
  926. return typeof(AgentTypeRow);
  927. }
  928. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  929. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  930. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  931. base.OnRowChanged(e);
  932. if ((this.AgentTypeRowChanged != null)) {
  933. this.AgentTypeRowChanged(this, new AgentTypeRowChangeEvent(((AgentTypeRow)(e.Row)), e.Action));
  934. }
  935. }
  936. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  937. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  938. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  939. base.OnRowChanging(e);
  940. if ((this.AgentTypeRowChanging != null)) {
  941. this.AgentTypeRowChanging(this, new AgentTypeRowChangeEvent(((AgentTypeRow)(e.Row)), e.Action));
  942. }
  943. }
  944. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  945. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  946. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  947. base.OnRowDeleted(e);
  948. if ((this.AgentTypeRowDeleted != null)) {
  949. this.AgentTypeRowDeleted(this, new AgentTypeRowChangeEvent(((AgentTypeRow)(e.Row)), e.Action));
  950. }
  951. }
  952. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  953. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  954. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  955. base.OnRowDeleting(e);
  956. if ((this.AgentTypeRowDeleting != null)) {
  957. this.AgentTypeRowDeleting(this, new AgentTypeRowChangeEvent(((AgentTypeRow)(e.Row)), e.Action));
  958. }
  959. }
  960. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  961. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  962. public void RemoveAgentTypeRow(AgentTypeRow row) {
  963. this.Rows.Remove(row);
  964. }
  965. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  966. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  967. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  968. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  969. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  970. agentRUDDataSet ds = new agentRUDDataSet();
  971. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  972. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  973. any1.MinOccurs = new decimal(0);
  974. any1.MaxOccurs = decimal.MaxValue;
  975. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  976. sequence.Items.Add(any1);
  977. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  978. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  979. any2.MinOccurs = new decimal(1);
  980. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  981. sequence.Items.Add(any2);
  982. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  983. attribute1.Name = "namespace";
  984. attribute1.FixedValue = ds.Namespace;
  985. type.Attributes.Add(attribute1);
  986. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  987. attribute2.Name = "tableTypeName";
  988. attribute2.FixedValue = "AgentTypeDataTable";
  989. type.Attributes.Add(attribute2);
  990. type.Particle = sequence;
  991. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  992. if (xs.Contains(dsSchema.TargetNamespace)) {
  993. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  994. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  995. try {
  996. global::System.Xml.Schema.XmlSchema schema = null;
  997. dsSchema.Write(s1);
  998. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  999. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1000. s2.SetLength(0);
  1001. schema.Write(s2);
  1002. if ((s1.Length == s2.Length)) {
  1003. s1.Position = 0;
  1004. s2.Position = 0;
  1005. for (; ((s1.Position != s1.Length)
  1006. && (s1.ReadByte() == s2.ReadByte())); ) {
  1007. ;
  1008. }
  1009. if ((s1.Position == s1.Length)) {
  1010. return type;
  1011. }
  1012. }
  1013. }
  1014. }
  1015. finally {
  1016. if ((s1 != null)) {
  1017. s1.Close();
  1018. }
  1019. if ((s2 != null)) {
  1020. s2.Close();
  1021. }
  1022. }
  1023. }
  1024. xs.Add(dsSchema);
  1025. return type;
  1026. }
  1027. }
  1028. /// <summary>
  1029. ///Represents the strongly named DataTable class.
  1030. ///</summary>
  1031. [global::System.Serializable()]
  1032. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  1033. public partial class ProductDataTable : global::System.Data.TypedTableBase<ProductRow> {
  1034. private global::System.Data.DataColumn columnID;
  1035. private global::System.Data.DataColumn columnTitle;
  1036. private global::System.Data.DataColumn columnProductTypeID;
  1037. private global::System.Data.DataColumn columnArticleNumber;
  1038. private global::System.Data.DataColumn columnDescription;
  1039. private global::System.Data.DataColumn columnImage;
  1040. private global::System.Data.DataColumn columnProductionPersonCount;
  1041. private global::System.Data.DataColumn columnProductionWorkshopNumber;
  1042. private global::System.Data.DataColumn columnMinCostForAgent;
  1043. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1044. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1045. public ProductDataTable() {
  1046. this.TableName = "Product";
  1047. this.BeginInit();
  1048. this.InitClass();
  1049. this.EndInit();
  1050. }
  1051. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1052. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1053. internal ProductDataTable(global::System.Data.DataTable table) {
  1054. this.TableName = table.TableName;
  1055. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  1056. this.CaseSensitive = table.CaseSensitive;
  1057. }
  1058. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  1059. this.Locale = table.Locale;
  1060. }
  1061. if ((table.Namespace != table.DataSet.Namespace)) {
  1062. this.Namespace = table.Namespace;
  1063. }
  1064. this.Prefix = table.Prefix;
  1065. this.MinimumCapacity = table.MinimumCapacity;
  1066. }
  1067. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1068. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1069. protected ProductDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  1070. base(info, context) {
  1071. this.InitVars();
  1072. }
  1073. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1074. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1075. public global::System.Data.DataColumn IDColumn {
  1076. get {
  1077. return this.columnID;
  1078. }
  1079. }
  1080. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1081. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1082. public global::System.Data.DataColumn TitleColumn {
  1083. get {
  1084. return this.columnTitle;
  1085. }
  1086. }
  1087. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1088. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1089. public global::System.Data.DataColumn ProductTypeIDColumn {
  1090. get {
  1091. return this.columnProductTypeID;
  1092. }
  1093. }
  1094. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1095. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1096. public global::System.Data.DataColumn ArticleNumberColumn {
  1097. get {
  1098. return this.columnArticleNumber;
  1099. }
  1100. }
  1101. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1102. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1103. public global::System.Data.DataColumn DescriptionColumn {
  1104. get {
  1105. return this.columnDescription;
  1106. }
  1107. }
  1108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1109. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1110. public global::System.Data.DataColumn ImageColumn {
  1111. get {
  1112. return this.columnImage;
  1113. }
  1114. }
  1115. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1116. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1117. public global::System.Data.DataColumn ProductionPersonCountColumn {
  1118. get {
  1119. return this.columnProductionPersonCount;
  1120. }
  1121. }
  1122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1123. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1124. public global::System.Data.DataColumn ProductionWorkshopNumberColumn {
  1125. get {
  1126. return this.columnProductionWorkshopNumber;
  1127. }
  1128. }
  1129. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1130. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1131. public global::System.Data.DataColumn MinCostForAgentColumn {
  1132. get {
  1133. return this.columnMinCostForAgent;
  1134. }
  1135. }
  1136. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1137. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1138. [global::System.ComponentModel.Browsable(false)]
  1139. public int Count {
  1140. get {
  1141. return this.Rows.Count;
  1142. }
  1143. }
  1144. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1145. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1146. public ProductRow this[int index] {
  1147. get {
  1148. return ((ProductRow)(this.Rows[index]));
  1149. }
  1150. }
  1151. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1152. public event ProductRowChangeEventHandler ProductRowChanging;
  1153. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1154. public event ProductRowChangeEventHandler ProductRowChanged;
  1155. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1156. public event ProductRowChangeEventHandler ProductRowDeleting;
  1157. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1158. public event ProductRowChangeEventHandler ProductRowDeleted;
  1159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1160. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1161. public void AddProductRow(ProductRow row) {
  1162. this.Rows.Add(row);
  1163. }
  1164. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1165. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1166. public ProductRow AddProductRow(string Title, ProductTypeRow parentProductTypeRowByFK_Product_ProductType, string ArticleNumber, string Description, string Image, int ProductionPersonCount, int ProductionWorkshopNumber, decimal MinCostForAgent) {
  1167. ProductRow rowProductRow = ((ProductRow)(this.NewRow()));
  1168. object[] columnValuesArray = new object[] {
  1169. null,
  1170. Title,
  1171. null,
  1172. ArticleNumber,
  1173. Description,
  1174. Image,
  1175. ProductionPersonCount,
  1176. ProductionWorkshopNumber,
  1177. MinCostForAgent};
  1178. if ((parentProductTypeRowByFK_Product_ProductType != null)) {
  1179. columnValuesArray[2] = parentProductTypeRowByFK_Product_ProductType[0];
  1180. }
  1181. rowProductRow.ItemArray = columnValuesArray;
  1182. this.Rows.Add(rowProductRow);
  1183. return rowProductRow;
  1184. }
  1185. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1186. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1187. public ProductRow FindByID(int ID) {
  1188. return ((ProductRow)(this.Rows.Find(new object[] {
  1189. ID})));
  1190. }
  1191. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1192. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1193. public override global::System.Data.DataTable Clone() {
  1194. ProductDataTable cln = ((ProductDataTable)(base.Clone()));
  1195. cln.InitVars();
  1196. return cln;
  1197. }
  1198. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1199. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1200. protected override global::System.Data.DataTable CreateInstance() {
  1201. return new ProductDataTable();
  1202. }
  1203. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1204. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1205. internal void InitVars() {
  1206. this.columnID = base.Columns["ID"];
  1207. this.columnTitle = base.Columns["Title"];
  1208. this.columnProductTypeID = base.Columns["ProductTypeID"];
  1209. this.columnArticleNumber = base.Columns["ArticleNumber"];
  1210. this.columnDescription = base.Columns["Description"];
  1211. this.columnImage = base.Columns["Image"];
  1212. this.columnProductionPersonCount = base.Columns["ProductionPersonCount"];
  1213. this.columnProductionWorkshopNumber = base.Columns["ProductionWorkshopNumber"];
  1214. this.columnMinCostForAgent = base.Columns["MinCostForAgent"];
  1215. }
  1216. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1217. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1218. private void InitClass() {
  1219. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  1220. base.Columns.Add(this.columnID);
  1221. this.columnTitle = new global::System.Data.DataColumn("Title", typeof(string), null, global::System.Data.MappingType.Element);
  1222. base.Columns.Add(this.columnTitle);
  1223. this.columnProductTypeID = new global::System.Data.DataColumn("ProductTypeID", typeof(int), null, global::System.Data.MappingType.Element);
  1224. base.Columns.Add(this.columnProductTypeID);
  1225. this.columnArticleNumber = new global::System.Data.DataColumn("ArticleNumber", typeof(string), null, global::System.Data.MappingType.Element);
  1226. base.Columns.Add(this.columnArticleNumber);
  1227. this.columnDescription = new global::System.Data.DataColumn("Description", typeof(string), null, global::System.Data.MappingType.Element);
  1228. base.Columns.Add(this.columnDescription);
  1229. this.columnImage = new global::System.Data.DataColumn("Image", typeof(string), null, global::System.Data.MappingType.Element);
  1230. base.Columns.Add(this.columnImage);
  1231. this.columnProductionPersonCount = new global::System.Data.DataColumn("ProductionPersonCount", typeof(int), null, global::System.Data.MappingType.Element);
  1232. base.Columns.Add(this.columnProductionPersonCount);
  1233. this.columnProductionWorkshopNumber = new global::System.Data.DataColumn("ProductionWorkshopNumber", typeof(int), null, global::System.Data.MappingType.Element);
  1234. base.Columns.Add(this.columnProductionWorkshopNumber);
  1235. this.columnMinCostForAgent = new global::System.Data.DataColumn("MinCostForAgent", typeof(decimal), null, global::System.Data.MappingType.Element);
  1236. base.Columns.Add(this.columnMinCostForAgent);
  1237. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  1238. this.columnID}, true));
  1239. this.columnID.AutoIncrement = true;
  1240. this.columnID.AutoIncrementSeed = -1;
  1241. this.columnID.AutoIncrementStep = -1;
  1242. this.columnID.AllowDBNull = false;
  1243. this.columnID.ReadOnly = true;
  1244. this.columnID.Unique = true;
  1245. this.columnTitle.AllowDBNull = false;
  1246. this.columnTitle.MaxLength = 100;
  1247. this.columnArticleNumber.AllowDBNull = false;
  1248. this.columnArticleNumber.MaxLength = 10;
  1249. this.columnDescription.MaxLength = 2147483647;
  1250. this.columnImage.MaxLength = 100;
  1251. this.columnMinCostForAgent.AllowDBNull = false;
  1252. }
  1253. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1254. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1255. public ProductRow NewProductRow() {
  1256. return ((ProductRow)(this.NewRow()));
  1257. }
  1258. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1259. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1260. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  1261. return new ProductRow(builder);
  1262. }
  1263. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1264. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1265. protected override global::System.Type GetRowType() {
  1266. return typeof(ProductRow);
  1267. }
  1268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1269. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1270. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  1271. base.OnRowChanged(e);
  1272. if ((this.ProductRowChanged != null)) {
  1273. this.ProductRowChanged(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action));
  1274. }
  1275. }
  1276. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1277. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1278. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  1279. base.OnRowChanging(e);
  1280. if ((this.ProductRowChanging != null)) {
  1281. this.ProductRowChanging(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action));
  1282. }
  1283. }
  1284. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1285. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1286. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  1287. base.OnRowDeleted(e);
  1288. if ((this.ProductRowDeleted != null)) {
  1289. this.ProductRowDeleted(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action));
  1290. }
  1291. }
  1292. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1293. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1294. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  1295. base.OnRowDeleting(e);
  1296. if ((this.ProductRowDeleting != null)) {
  1297. this.ProductRowDeleting(this, new ProductRowChangeEvent(((ProductRow)(e.Row)), e.Action));
  1298. }
  1299. }
  1300. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1301. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1302. public void RemoveProductRow(ProductRow row) {
  1303. this.Rows.Remove(row);
  1304. }
  1305. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1306. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1307. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1308. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1309. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1310. agentRUDDataSet ds = new agentRUDDataSet();
  1311. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1312. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1313. any1.MinOccurs = new decimal(0);
  1314. any1.MaxOccurs = decimal.MaxValue;
  1315. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1316. sequence.Items.Add(any1);
  1317. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1318. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1319. any2.MinOccurs = new decimal(1);
  1320. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1321. sequence.Items.Add(any2);
  1322. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1323. attribute1.Name = "namespace";
  1324. attribute1.FixedValue = ds.Namespace;
  1325. type.Attributes.Add(attribute1);
  1326. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1327. attribute2.Name = "tableTypeName";
  1328. attribute2.FixedValue = "ProductDataTable";
  1329. type.Attributes.Add(attribute2);
  1330. type.Particle = sequence;
  1331. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1332. if (xs.Contains(dsSchema.TargetNamespace)) {
  1333. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1334. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1335. try {
  1336. global::System.Xml.Schema.XmlSchema schema = null;
  1337. dsSchema.Write(s1);
  1338. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1339. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1340. s2.SetLength(0);
  1341. schema.Write(s2);
  1342. if ((s1.Length == s2.Length)) {
  1343. s1.Position = 0;
  1344. s2.Position = 0;
  1345. for (; ((s1.Position != s1.Length)
  1346. && (s1.ReadByte() == s2.ReadByte())); ) {
  1347. ;
  1348. }
  1349. if ((s1.Position == s1.Length)) {
  1350. return type;
  1351. }
  1352. }
  1353. }
  1354. }
  1355. finally {
  1356. if ((s1 != null)) {
  1357. s1.Close();
  1358. }
  1359. if ((s2 != null)) {
  1360. s2.Close();
  1361. }
  1362. }
  1363. }
  1364. xs.Add(dsSchema);
  1365. return type;
  1366. }
  1367. }
  1368. /// <summary>
  1369. ///Represents the strongly named DataTable class.
  1370. ///</summary>
  1371. [global::System.Serializable()]
  1372. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  1373. public partial class ProductSaleDataTable : global::System.Data.TypedTableBase<ProductSaleRow> {
  1374. private global::System.Data.DataColumn columnID;
  1375. private global::System.Data.DataColumn columnAgentID;
  1376. private global::System.Data.DataColumn columnProductID;
  1377. private global::System.Data.DataColumn columnSaleDate;
  1378. private global::System.Data.DataColumn columnProductCount;
  1379. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1380. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1381. public ProductSaleDataTable() {
  1382. this.TableName = "ProductSale";
  1383. this.BeginInit();
  1384. this.InitClass();
  1385. this.EndInit();
  1386. }
  1387. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1388. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1389. internal ProductSaleDataTable(global::System.Data.DataTable table) {
  1390. this.TableName = table.TableName;
  1391. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  1392. this.CaseSensitive = table.CaseSensitive;
  1393. }
  1394. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  1395. this.Locale = table.Locale;
  1396. }
  1397. if ((table.Namespace != table.DataSet.Namespace)) {
  1398. this.Namespace = table.Namespace;
  1399. }
  1400. this.Prefix = table.Prefix;
  1401. this.MinimumCapacity = table.MinimumCapacity;
  1402. }
  1403. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1404. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1405. protected ProductSaleDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  1406. base(info, context) {
  1407. this.InitVars();
  1408. }
  1409. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1410. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1411. public global::System.Data.DataColumn IDColumn {
  1412. get {
  1413. return this.columnID;
  1414. }
  1415. }
  1416. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1417. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1418. public global::System.Data.DataColumn AgentIDColumn {
  1419. get {
  1420. return this.columnAgentID;
  1421. }
  1422. }
  1423. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1424. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1425. public global::System.Data.DataColumn ProductIDColumn {
  1426. get {
  1427. return this.columnProductID;
  1428. }
  1429. }
  1430. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1431. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1432. public global::System.Data.DataColumn SaleDateColumn {
  1433. get {
  1434. return this.columnSaleDate;
  1435. }
  1436. }
  1437. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1438. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1439. public global::System.Data.DataColumn ProductCountColumn {
  1440. get {
  1441. return this.columnProductCount;
  1442. }
  1443. }
  1444. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1445. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1446. [global::System.ComponentModel.Browsable(false)]
  1447. public int Count {
  1448. get {
  1449. return this.Rows.Count;
  1450. }
  1451. }
  1452. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1453. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1454. public ProductSaleRow this[int index] {
  1455. get {
  1456. return ((ProductSaleRow)(this.Rows[index]));
  1457. }
  1458. }
  1459. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1460. public event ProductSaleRowChangeEventHandler ProductSaleRowChanging;
  1461. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1462. public event ProductSaleRowChangeEventHandler ProductSaleRowChanged;
  1463. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1464. public event ProductSaleRowChangeEventHandler ProductSaleRowDeleting;
  1465. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1466. public event ProductSaleRowChangeEventHandler ProductSaleRowDeleted;
  1467. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1468. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1469. public void AddProductSaleRow(ProductSaleRow row) {
  1470. this.Rows.Add(row);
  1471. }
  1472. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1473. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1474. public ProductSaleRow AddProductSaleRow(AgentRow parentAgentRowByFK_ProductSale_Agent, ProductRow parentProductRowByFK_ProductSale_Product, System.DateTime SaleDate, int ProductCount) {
  1475. ProductSaleRow rowProductSaleRow = ((ProductSaleRow)(this.NewRow()));
  1476. object[] columnValuesArray = new object[] {
  1477. null,
  1478. null,
  1479. null,
  1480. SaleDate,
  1481. ProductCount};
  1482. if ((parentAgentRowByFK_ProductSale_Agent != null)) {
  1483. columnValuesArray[1] = parentAgentRowByFK_ProductSale_Agent[0];
  1484. }
  1485. if ((parentProductRowByFK_ProductSale_Product != null)) {
  1486. columnValuesArray[2] = parentProductRowByFK_ProductSale_Product[0];
  1487. }
  1488. rowProductSaleRow.ItemArray = columnValuesArray;
  1489. this.Rows.Add(rowProductSaleRow);
  1490. return rowProductSaleRow;
  1491. }
  1492. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1493. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1494. public ProductSaleRow FindByID(int ID) {
  1495. return ((ProductSaleRow)(this.Rows.Find(new object[] {
  1496. ID})));
  1497. }
  1498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1499. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1500. public override global::System.Data.DataTable Clone() {
  1501. ProductSaleDataTable cln = ((ProductSaleDataTable)(base.Clone()));
  1502. cln.InitVars();
  1503. return cln;
  1504. }
  1505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1506. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1507. protected override global::System.Data.DataTable CreateInstance() {
  1508. return new ProductSaleDataTable();
  1509. }
  1510. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1511. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1512. internal void InitVars() {
  1513. this.columnID = base.Columns["ID"];
  1514. this.columnAgentID = base.Columns["AgentID"];
  1515. this.columnProductID = base.Columns["ProductID"];
  1516. this.columnSaleDate = base.Columns["SaleDate"];
  1517. this.columnProductCount = base.Columns["ProductCount"];
  1518. }
  1519. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1520. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1521. private void InitClass() {
  1522. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  1523. base.Columns.Add(this.columnID);
  1524. this.columnAgentID = new global::System.Data.DataColumn("AgentID", typeof(int), null, global::System.Data.MappingType.Element);
  1525. base.Columns.Add(this.columnAgentID);
  1526. this.columnProductID = new global::System.Data.DataColumn("ProductID", typeof(int), null, global::System.Data.MappingType.Element);
  1527. base.Columns.Add(this.columnProductID);
  1528. this.columnSaleDate = new global::System.Data.DataColumn("SaleDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
  1529. base.Columns.Add(this.columnSaleDate);
  1530. this.columnProductCount = new global::System.Data.DataColumn("ProductCount", typeof(int), null, global::System.Data.MappingType.Element);
  1531. base.Columns.Add(this.columnProductCount);
  1532. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  1533. this.columnID}, true));
  1534. this.columnID.AutoIncrement = true;
  1535. this.columnID.AutoIncrementSeed = -1;
  1536. this.columnID.AutoIncrementStep = -1;
  1537. this.columnID.AllowDBNull = false;
  1538. this.columnID.ReadOnly = true;
  1539. this.columnID.Unique = true;
  1540. this.columnAgentID.AllowDBNull = false;
  1541. this.columnProductID.AllowDBNull = false;
  1542. this.columnSaleDate.AllowDBNull = false;
  1543. this.columnProductCount.AllowDBNull = false;
  1544. }
  1545. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1546. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1547. public ProductSaleRow NewProductSaleRow() {
  1548. return ((ProductSaleRow)(this.NewRow()));
  1549. }
  1550. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1551. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1552. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  1553. return new ProductSaleRow(builder);
  1554. }
  1555. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1556. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1557. protected override global::System.Type GetRowType() {
  1558. return typeof(ProductSaleRow);
  1559. }
  1560. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1561. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1562. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  1563. base.OnRowChanged(e);
  1564. if ((this.ProductSaleRowChanged != null)) {
  1565. this.ProductSaleRowChanged(this, new ProductSaleRowChangeEvent(((ProductSaleRow)(e.Row)), e.Action));
  1566. }
  1567. }
  1568. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1569. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1570. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  1571. base.OnRowChanging(e);
  1572. if ((this.ProductSaleRowChanging != null)) {
  1573. this.ProductSaleRowChanging(this, new ProductSaleRowChangeEvent(((ProductSaleRow)(e.Row)), e.Action));
  1574. }
  1575. }
  1576. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1577. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1578. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  1579. base.OnRowDeleted(e);
  1580. if ((this.ProductSaleRowDeleted != null)) {
  1581. this.ProductSaleRowDeleted(this, new ProductSaleRowChangeEvent(((ProductSaleRow)(e.Row)), e.Action));
  1582. }
  1583. }
  1584. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1585. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1586. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  1587. base.OnRowDeleting(e);
  1588. if ((this.ProductSaleRowDeleting != null)) {
  1589. this.ProductSaleRowDeleting(this, new ProductSaleRowChangeEvent(((ProductSaleRow)(e.Row)), e.Action));
  1590. }
  1591. }
  1592. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1593. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1594. public void RemoveProductSaleRow(ProductSaleRow row) {
  1595. this.Rows.Remove(row);
  1596. }
  1597. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1598. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1599. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1600. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1601. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1602. agentRUDDataSet ds = new agentRUDDataSet();
  1603. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1604. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1605. any1.MinOccurs = new decimal(0);
  1606. any1.MaxOccurs = decimal.MaxValue;
  1607. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1608. sequence.Items.Add(any1);
  1609. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1610. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1611. any2.MinOccurs = new decimal(1);
  1612. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1613. sequence.Items.Add(any2);
  1614. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1615. attribute1.Name = "namespace";
  1616. attribute1.FixedValue = ds.Namespace;
  1617. type.Attributes.Add(attribute1);
  1618. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1619. attribute2.Name = "tableTypeName";
  1620. attribute2.FixedValue = "ProductSaleDataTable";
  1621. type.Attributes.Add(attribute2);
  1622. type.Particle = sequence;
  1623. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1624. if (xs.Contains(dsSchema.TargetNamespace)) {
  1625. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1626. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1627. try {
  1628. global::System.Xml.Schema.XmlSchema schema = null;
  1629. dsSchema.Write(s1);
  1630. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1631. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1632. s2.SetLength(0);
  1633. schema.Write(s2);
  1634. if ((s1.Length == s2.Length)) {
  1635. s1.Position = 0;
  1636. s2.Position = 0;
  1637. for (; ((s1.Position != s1.Length)
  1638. && (s1.ReadByte() == s2.ReadByte())); ) {
  1639. ;
  1640. }
  1641. if ((s1.Position == s1.Length)) {
  1642. return type;
  1643. }
  1644. }
  1645. }
  1646. }
  1647. finally {
  1648. if ((s1 != null)) {
  1649. s1.Close();
  1650. }
  1651. if ((s2 != null)) {
  1652. s2.Close();
  1653. }
  1654. }
  1655. }
  1656. xs.Add(dsSchema);
  1657. return type;
  1658. }
  1659. }
  1660. /// <summary>
  1661. ///Represents the strongly named DataTable class.
  1662. ///</summary>
  1663. [global::System.Serializable()]
  1664. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  1665. public partial class ProductTypeDataTable : global::System.Data.TypedTableBase<ProductTypeRow> {
  1666. private global::System.Data.DataColumn columnID;
  1667. private global::System.Data.DataColumn columnTitle;
  1668. private global::System.Data.DataColumn columnDefectedPercent;
  1669. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1670. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1671. public ProductTypeDataTable() {
  1672. this.TableName = "ProductType";
  1673. this.BeginInit();
  1674. this.InitClass();
  1675. this.EndInit();
  1676. }
  1677. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1678. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1679. internal ProductTypeDataTable(global::System.Data.DataTable table) {
  1680. this.TableName = table.TableName;
  1681. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  1682. this.CaseSensitive = table.CaseSensitive;
  1683. }
  1684. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  1685. this.Locale = table.Locale;
  1686. }
  1687. if ((table.Namespace != table.DataSet.Namespace)) {
  1688. this.Namespace = table.Namespace;
  1689. }
  1690. this.Prefix = table.Prefix;
  1691. this.MinimumCapacity = table.MinimumCapacity;
  1692. }
  1693. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1694. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1695. protected ProductTypeDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  1696. base(info, context) {
  1697. this.InitVars();
  1698. }
  1699. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1700. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1701. public global::System.Data.DataColumn IDColumn {
  1702. get {
  1703. return this.columnID;
  1704. }
  1705. }
  1706. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1707. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1708. public global::System.Data.DataColumn TitleColumn {
  1709. get {
  1710. return this.columnTitle;
  1711. }
  1712. }
  1713. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1714. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1715. public global::System.Data.DataColumn DefectedPercentColumn {
  1716. get {
  1717. return this.columnDefectedPercent;
  1718. }
  1719. }
  1720. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1721. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1722. [global::System.ComponentModel.Browsable(false)]
  1723. public int Count {
  1724. get {
  1725. return this.Rows.Count;
  1726. }
  1727. }
  1728. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1729. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1730. public ProductTypeRow this[int index] {
  1731. get {
  1732. return ((ProductTypeRow)(this.Rows[index]));
  1733. }
  1734. }
  1735. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1736. public event ProductTypeRowChangeEventHandler ProductTypeRowChanging;
  1737. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1738. public event ProductTypeRowChangeEventHandler ProductTypeRowChanged;
  1739. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1740. public event ProductTypeRowChangeEventHandler ProductTypeRowDeleting;
  1741. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1742. public event ProductTypeRowChangeEventHandler ProductTypeRowDeleted;
  1743. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1744. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1745. public void AddProductTypeRow(ProductTypeRow row) {
  1746. this.Rows.Add(row);
  1747. }
  1748. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1749. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1750. public ProductTypeRow AddProductTypeRow(string Title, double DefectedPercent) {
  1751. ProductTypeRow rowProductTypeRow = ((ProductTypeRow)(this.NewRow()));
  1752. object[] columnValuesArray = new object[] {
  1753. null,
  1754. Title,
  1755. DefectedPercent};
  1756. rowProductTypeRow.ItemArray = columnValuesArray;
  1757. this.Rows.Add(rowProductTypeRow);
  1758. return rowProductTypeRow;
  1759. }
  1760. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1761. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1762. public ProductTypeRow FindByID(int ID) {
  1763. return ((ProductTypeRow)(this.Rows.Find(new object[] {
  1764. ID})));
  1765. }
  1766. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1767. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1768. public override global::System.Data.DataTable Clone() {
  1769. ProductTypeDataTable cln = ((ProductTypeDataTable)(base.Clone()));
  1770. cln.InitVars();
  1771. return cln;
  1772. }
  1773. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1774. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1775. protected override global::System.Data.DataTable CreateInstance() {
  1776. return new ProductTypeDataTable();
  1777. }
  1778. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1779. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1780. internal void InitVars() {
  1781. this.columnID = base.Columns["ID"];
  1782. this.columnTitle = base.Columns["Title"];
  1783. this.columnDefectedPercent = base.Columns["DefectedPercent"];
  1784. }
  1785. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1786. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1787. private void InitClass() {
  1788. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  1789. base.Columns.Add(this.columnID);
  1790. this.columnTitle = new global::System.Data.DataColumn("Title", typeof(string), null, global::System.Data.MappingType.Element);
  1791. base.Columns.Add(this.columnTitle);
  1792. this.columnDefectedPercent = new global::System.Data.DataColumn("DefectedPercent", typeof(double), null, global::System.Data.MappingType.Element);
  1793. base.Columns.Add(this.columnDefectedPercent);
  1794. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  1795. this.columnID}, true));
  1796. this.columnID.AutoIncrement = true;
  1797. this.columnID.AutoIncrementSeed = -1;
  1798. this.columnID.AutoIncrementStep = -1;
  1799. this.columnID.AllowDBNull = false;
  1800. this.columnID.ReadOnly = true;
  1801. this.columnID.Unique = true;
  1802. this.columnTitle.AllowDBNull = false;
  1803. this.columnTitle.MaxLength = 50;
  1804. this.columnDefectedPercent.AllowDBNull = false;
  1805. }
  1806. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1807. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1808. public ProductTypeRow NewProductTypeRow() {
  1809. return ((ProductTypeRow)(this.NewRow()));
  1810. }
  1811. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1812. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1813. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  1814. return new ProductTypeRow(builder);
  1815. }
  1816. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1817. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1818. protected override global::System.Type GetRowType() {
  1819. return typeof(ProductTypeRow);
  1820. }
  1821. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1822. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1823. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  1824. base.OnRowChanged(e);
  1825. if ((this.ProductTypeRowChanged != null)) {
  1826. this.ProductTypeRowChanged(this, new ProductTypeRowChangeEvent(((ProductTypeRow)(e.Row)), e.Action));
  1827. }
  1828. }
  1829. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1830. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1831. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  1832. base.OnRowChanging(e);
  1833. if ((this.ProductTypeRowChanging != null)) {
  1834. this.ProductTypeRowChanging(this, new ProductTypeRowChangeEvent(((ProductTypeRow)(e.Row)), e.Action));
  1835. }
  1836. }
  1837. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1838. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1839. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  1840. base.OnRowDeleted(e);
  1841. if ((this.ProductTypeRowDeleted != null)) {
  1842. this.ProductTypeRowDeleted(this, new ProductTypeRowChangeEvent(((ProductTypeRow)(e.Row)), e.Action));
  1843. }
  1844. }
  1845. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1846. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1847. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  1848. base.OnRowDeleting(e);
  1849. if ((this.ProductTypeRowDeleting != null)) {
  1850. this.ProductTypeRowDeleting(this, new ProductTypeRowChangeEvent(((ProductTypeRow)(e.Row)), e.Action));
  1851. }
  1852. }
  1853. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1854. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1855. public void RemoveProductTypeRow(ProductTypeRow row) {
  1856. this.Rows.Remove(row);
  1857. }
  1858. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1859. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1860. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1861. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1862. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1863. agentRUDDataSet ds = new agentRUDDataSet();
  1864. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1865. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1866. any1.MinOccurs = new decimal(0);
  1867. any1.MaxOccurs = decimal.MaxValue;
  1868. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1869. sequence.Items.Add(any1);
  1870. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1871. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1872. any2.MinOccurs = new decimal(1);
  1873. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1874. sequence.Items.Add(any2);
  1875. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1876. attribute1.Name = "namespace";
  1877. attribute1.FixedValue = ds.Namespace;
  1878. type.Attributes.Add(attribute1);
  1879. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1880. attribute2.Name = "tableTypeName";
  1881. attribute2.FixedValue = "ProductTypeDataTable";
  1882. type.Attributes.Add(attribute2);
  1883. type.Particle = sequence;
  1884. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1885. if (xs.Contains(dsSchema.TargetNamespace)) {
  1886. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1887. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1888. try {
  1889. global::System.Xml.Schema.XmlSchema schema = null;
  1890. dsSchema.Write(s1);
  1891. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1892. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1893. s2.SetLength(0);
  1894. schema.Write(s2);
  1895. if ((s1.Length == s2.Length)) {
  1896. s1.Position = 0;
  1897. s2.Position = 0;
  1898. for (; ((s1.Position != s1.Length)
  1899. && (s1.ReadByte() == s2.ReadByte())); ) {
  1900. ;
  1901. }
  1902. if ((s1.Position == s1.Length)) {
  1903. return type;
  1904. }
  1905. }
  1906. }
  1907. }
  1908. finally {
  1909. if ((s1 != null)) {
  1910. s1.Close();
  1911. }
  1912. if ((s2 != null)) {
  1913. s2.Close();
  1914. }
  1915. }
  1916. }
  1917. xs.Add(dsSchema);
  1918. return type;
  1919. }
  1920. }
  1921. /// <summary>
  1922. ///Represents strongly named DataRow class.
  1923. ///</summary>
  1924. public partial class AgentRow : global::System.Data.DataRow {
  1925. private AgentDataTable tableAgent;
  1926. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1927. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1928. internal AgentRow(global::System.Data.DataRowBuilder rb) :
  1929. base(rb) {
  1930. this.tableAgent = ((AgentDataTable)(this.Table));
  1931. }
  1932. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1933. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1934. public int ID {
  1935. get {
  1936. return ((int)(this[this.tableAgent.IDColumn]));
  1937. }
  1938. set {
  1939. this[this.tableAgent.IDColumn] = value;
  1940. }
  1941. }
  1942. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1943. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1944. public string Title {
  1945. get {
  1946. return ((string)(this[this.tableAgent.TitleColumn]));
  1947. }
  1948. set {
  1949. this[this.tableAgent.TitleColumn] = value;
  1950. }
  1951. }
  1952. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1953. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1954. public int AgentTypeID {
  1955. get {
  1956. return ((int)(this[this.tableAgent.AgentTypeIDColumn]));
  1957. }
  1958. set {
  1959. this[this.tableAgent.AgentTypeIDColumn] = value;
  1960. }
  1961. }
  1962. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1963. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1964. public string Address {
  1965. get {
  1966. try {
  1967. return ((string)(this[this.tableAgent.AddressColumn]));
  1968. }
  1969. catch (global::System.InvalidCastException e) {
  1970. throw new global::System.Data.StrongTypingException("The value for column \'Address\' in table \'Agent\' is DBNull.", e);
  1971. }
  1972. }
  1973. set {
  1974. this[this.tableAgent.AddressColumn] = value;
  1975. }
  1976. }
  1977. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1978. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1979. public string INN {
  1980. get {
  1981. return ((string)(this[this.tableAgent.INNColumn]));
  1982. }
  1983. set {
  1984. this[this.tableAgent.INNColumn] = value;
  1985. }
  1986. }
  1987. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1988. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1989. public string KPP {
  1990. get {
  1991. try {
  1992. return ((string)(this[this.tableAgent.KPPColumn]));
  1993. }
  1994. catch (global::System.InvalidCastException e) {
  1995. throw new global::System.Data.StrongTypingException("The value for column \'KPP\' in table \'Agent\' is DBNull.", e);
  1996. }
  1997. }
  1998. set {
  1999. this[this.tableAgent.KPPColumn] = value;
  2000. }
  2001. }
  2002. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2003. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2004. public string DirectorName {
  2005. get {
  2006. try {
  2007. return ((string)(this[this.tableAgent.DirectorNameColumn]));
  2008. }
  2009. catch (global::System.InvalidCastException e) {
  2010. throw new global::System.Data.StrongTypingException("The value for column \'DirectorName\' in table \'Agent\' is DBNull.", e);
  2011. }
  2012. }
  2013. set {
  2014. this[this.tableAgent.DirectorNameColumn] = value;
  2015. }
  2016. }
  2017. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2018. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2019. public string Phone {
  2020. get {
  2021. return ((string)(this[this.tableAgent.PhoneColumn]));
  2022. }
  2023. set {
  2024. this[this.tableAgent.PhoneColumn] = value;
  2025. }
  2026. }
  2027. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2028. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2029. public string Email {
  2030. get {
  2031. try {
  2032. return ((string)(this[this.tableAgent.EmailColumn]));
  2033. }
  2034. catch (global::System.InvalidCastException e) {
  2035. throw new global::System.Data.StrongTypingException("The value for column \'Email\' in table \'Agent\' is DBNull.", e);
  2036. }
  2037. }
  2038. set {
  2039. this[this.tableAgent.EmailColumn] = value;
  2040. }
  2041. }
  2042. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2043. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2044. public string Logo {
  2045. get {
  2046. try {
  2047. return ((string)(this[this.tableAgent.LogoColumn]));
  2048. }
  2049. catch (global::System.InvalidCastException e) {
  2050. throw new global::System.Data.StrongTypingException("The value for column \'Logo\' in table \'Agent\' is DBNull.", e);
  2051. }
  2052. }
  2053. set {
  2054. this[this.tableAgent.LogoColumn] = value;
  2055. }
  2056. }
  2057. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2058. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2059. public int Priority {
  2060. get {
  2061. return ((int)(this[this.tableAgent.PriorityColumn]));
  2062. }
  2063. set {
  2064. this[this.tableAgent.PriorityColumn] = value;
  2065. }
  2066. }
  2067. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2068. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2069. public AgentTypeRow AgentTypeRow {
  2070. get {
  2071. return ((AgentTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_Agent_AgentType"])));
  2072. }
  2073. set {
  2074. this.SetParentRow(value, this.Table.ParentRelations["FK_Agent_AgentType"]);
  2075. }
  2076. }
  2077. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2078. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2079. public bool IsAddressNull() {
  2080. return this.IsNull(this.tableAgent.AddressColumn);
  2081. }
  2082. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2083. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2084. public void SetAddressNull() {
  2085. this[this.tableAgent.AddressColumn] = global::System.Convert.DBNull;
  2086. }
  2087. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2088. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2089. public bool IsKPPNull() {
  2090. return this.IsNull(this.tableAgent.KPPColumn);
  2091. }
  2092. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2093. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2094. public void SetKPPNull() {
  2095. this[this.tableAgent.KPPColumn] = global::System.Convert.DBNull;
  2096. }
  2097. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2098. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2099. public bool IsDirectorNameNull() {
  2100. return this.IsNull(this.tableAgent.DirectorNameColumn);
  2101. }
  2102. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2103. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2104. public void SetDirectorNameNull() {
  2105. this[this.tableAgent.DirectorNameColumn] = global::System.Convert.DBNull;
  2106. }
  2107. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2108. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2109. public bool IsEmailNull() {
  2110. return this.IsNull(this.tableAgent.EmailColumn);
  2111. }
  2112. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2113. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2114. public void SetEmailNull() {
  2115. this[this.tableAgent.EmailColumn] = global::System.Convert.DBNull;
  2116. }
  2117. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2118. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2119. public bool IsLogoNull() {
  2120. return this.IsNull(this.tableAgent.LogoColumn);
  2121. }
  2122. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2123. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2124. public void SetLogoNull() {
  2125. this[this.tableAgent.LogoColumn] = global::System.Convert.DBNull;
  2126. }
  2127. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2128. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2129. public ProductSaleRow[] GetProductSaleRows() {
  2130. if ((this.Table.ChildRelations["FK_ProductSale_Agent"] == null)) {
  2131. return new ProductSaleRow[0];
  2132. }
  2133. else {
  2134. return ((ProductSaleRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductSale_Agent"])));
  2135. }
  2136. }
  2137. }
  2138. /// <summary>
  2139. ///Represents strongly named DataRow class.
  2140. ///</summary>
  2141. public partial class AgentTypeRow : global::System.Data.DataRow {
  2142. private AgentTypeDataTable tableAgentType;
  2143. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2144. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2145. internal AgentTypeRow(global::System.Data.DataRowBuilder rb) :
  2146. base(rb) {
  2147. this.tableAgentType = ((AgentTypeDataTable)(this.Table));
  2148. }
  2149. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2150. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2151. public int ID {
  2152. get {
  2153. return ((int)(this[this.tableAgentType.IDColumn]));
  2154. }
  2155. set {
  2156. this[this.tableAgentType.IDColumn] = value;
  2157. }
  2158. }
  2159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2160. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2161. public string Title {
  2162. get {
  2163. return ((string)(this[this.tableAgentType.TitleColumn]));
  2164. }
  2165. set {
  2166. this[this.tableAgentType.TitleColumn] = value;
  2167. }
  2168. }
  2169. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2170. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2171. public string Image {
  2172. get {
  2173. try {
  2174. return ((string)(this[this.tableAgentType.ImageColumn]));
  2175. }
  2176. catch (global::System.InvalidCastException e) {
  2177. throw new global::System.Data.StrongTypingException("The value for column \'Image\' in table \'AgentType\' is DBNull.", e);
  2178. }
  2179. }
  2180. set {
  2181. this[this.tableAgentType.ImageColumn] = value;
  2182. }
  2183. }
  2184. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2185. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2186. public bool IsImageNull() {
  2187. return this.IsNull(this.tableAgentType.ImageColumn);
  2188. }
  2189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2190. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2191. public void SetImageNull() {
  2192. this[this.tableAgentType.ImageColumn] = global::System.Convert.DBNull;
  2193. }
  2194. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2195. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2196. public AgentRow[] GetAgentRows() {
  2197. if ((this.Table.ChildRelations["FK_Agent_AgentType"] == null)) {
  2198. return new AgentRow[0];
  2199. }
  2200. else {
  2201. return ((AgentRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Agent_AgentType"])));
  2202. }
  2203. }
  2204. }
  2205. /// <summary>
  2206. ///Represents strongly named DataRow class.
  2207. ///</summary>
  2208. public partial class ProductRow : global::System.Data.DataRow {
  2209. private ProductDataTable tableProduct;
  2210. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2211. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2212. internal ProductRow(global::System.Data.DataRowBuilder rb) :
  2213. base(rb) {
  2214. this.tableProduct = ((ProductDataTable)(this.Table));
  2215. }
  2216. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2217. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2218. public int ID {
  2219. get {
  2220. return ((int)(this[this.tableProduct.IDColumn]));
  2221. }
  2222. set {
  2223. this[this.tableProduct.IDColumn] = value;
  2224. }
  2225. }
  2226. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2227. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2228. public string Title {
  2229. get {
  2230. return ((string)(this[this.tableProduct.TitleColumn]));
  2231. }
  2232. set {
  2233. this[this.tableProduct.TitleColumn] = value;
  2234. }
  2235. }
  2236. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2237. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2238. public int ProductTypeID {
  2239. get {
  2240. try {
  2241. return ((int)(this[this.tableProduct.ProductTypeIDColumn]));
  2242. }
  2243. catch (global::System.InvalidCastException e) {
  2244. throw new global::System.Data.StrongTypingException("The value for column \'ProductTypeID\' in table \'Product\' is DBNull.", e);
  2245. }
  2246. }
  2247. set {
  2248. this[this.tableProduct.ProductTypeIDColumn] = value;
  2249. }
  2250. }
  2251. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2252. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2253. public string ArticleNumber {
  2254. get {
  2255. return ((string)(this[this.tableProduct.ArticleNumberColumn]));
  2256. }
  2257. set {
  2258. this[this.tableProduct.ArticleNumberColumn] = value;
  2259. }
  2260. }
  2261. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2262. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2263. public string Description {
  2264. get {
  2265. try {
  2266. return ((string)(this[this.tableProduct.DescriptionColumn]));
  2267. }
  2268. catch (global::System.InvalidCastException e) {
  2269. throw new global::System.Data.StrongTypingException("The value for column \'Description\' in table \'Product\' is DBNull.", e);
  2270. }
  2271. }
  2272. set {
  2273. this[this.tableProduct.DescriptionColumn] = value;
  2274. }
  2275. }
  2276. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2277. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2278. public string Image {
  2279. get {
  2280. try {
  2281. return ((string)(this[this.tableProduct.ImageColumn]));
  2282. }
  2283. catch (global::System.InvalidCastException e) {
  2284. throw new global::System.Data.StrongTypingException("The value for column \'Image\' in table \'Product\' is DBNull.", e);
  2285. }
  2286. }
  2287. set {
  2288. this[this.tableProduct.ImageColumn] = value;
  2289. }
  2290. }
  2291. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2292. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2293. public int ProductionPersonCount {
  2294. get {
  2295. try {
  2296. return ((int)(this[this.tableProduct.ProductionPersonCountColumn]));
  2297. }
  2298. catch (global::System.InvalidCastException e) {
  2299. throw new global::System.Data.StrongTypingException("The value for column \'ProductionPersonCount\' in table \'Product\' is DBNull.", e);
  2300. }
  2301. }
  2302. set {
  2303. this[this.tableProduct.ProductionPersonCountColumn] = value;
  2304. }
  2305. }
  2306. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2307. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2308. public int ProductionWorkshopNumber {
  2309. get {
  2310. try {
  2311. return ((int)(this[this.tableProduct.ProductionWorkshopNumberColumn]));
  2312. }
  2313. catch (global::System.InvalidCastException e) {
  2314. throw new global::System.Data.StrongTypingException("The value for column \'ProductionWorkshopNumber\' in table \'Product\' is DBNull.", e);
  2315. }
  2316. }
  2317. set {
  2318. this[this.tableProduct.ProductionWorkshopNumberColumn] = value;
  2319. }
  2320. }
  2321. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2322. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2323. public decimal MinCostForAgent {
  2324. get {
  2325. return ((decimal)(this[this.tableProduct.MinCostForAgentColumn]));
  2326. }
  2327. set {
  2328. this[this.tableProduct.MinCostForAgentColumn] = value;
  2329. }
  2330. }
  2331. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2332. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2333. public ProductTypeRow ProductTypeRow {
  2334. get {
  2335. return ((ProductTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_Product_ProductType"])));
  2336. }
  2337. set {
  2338. this.SetParentRow(value, this.Table.ParentRelations["FK_Product_ProductType"]);
  2339. }
  2340. }
  2341. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2342. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2343. public bool IsProductTypeIDNull() {
  2344. return this.IsNull(this.tableProduct.ProductTypeIDColumn);
  2345. }
  2346. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2347. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2348. public void SetProductTypeIDNull() {
  2349. this[this.tableProduct.ProductTypeIDColumn] = global::System.Convert.DBNull;
  2350. }
  2351. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2352. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2353. public bool IsDescriptionNull() {
  2354. return this.IsNull(this.tableProduct.DescriptionColumn);
  2355. }
  2356. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2357. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2358. public void SetDescriptionNull() {
  2359. this[this.tableProduct.DescriptionColumn] = global::System.Convert.DBNull;
  2360. }
  2361. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2362. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2363. public bool IsImageNull() {
  2364. return this.IsNull(this.tableProduct.ImageColumn);
  2365. }
  2366. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2367. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2368. public void SetImageNull() {
  2369. this[this.tableProduct.ImageColumn] = global::System.Convert.DBNull;
  2370. }
  2371. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2372. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2373. public bool IsProductionPersonCountNull() {
  2374. return this.IsNull(this.tableProduct.ProductionPersonCountColumn);
  2375. }
  2376. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2377. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2378. public void SetProductionPersonCountNull() {
  2379. this[this.tableProduct.ProductionPersonCountColumn] = global::System.Convert.DBNull;
  2380. }
  2381. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2382. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2383. public bool IsProductionWorkshopNumberNull() {
  2384. return this.IsNull(this.tableProduct.ProductionWorkshopNumberColumn);
  2385. }
  2386. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2387. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2388. public void SetProductionWorkshopNumberNull() {
  2389. this[this.tableProduct.ProductionWorkshopNumberColumn] = global::System.Convert.DBNull;
  2390. }
  2391. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2392. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2393. public ProductSaleRow[] GetProductSaleRows() {
  2394. if ((this.Table.ChildRelations["FK_ProductSale_Product"] == null)) {
  2395. return new ProductSaleRow[0];
  2396. }
  2397. else {
  2398. return ((ProductSaleRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProductSale_Product"])));
  2399. }
  2400. }
  2401. }
  2402. /// <summary>
  2403. ///Represents strongly named DataRow class.
  2404. ///</summary>
  2405. public partial class ProductSaleRow : global::System.Data.DataRow {
  2406. private ProductSaleDataTable tableProductSale;
  2407. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2408. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2409. internal ProductSaleRow(global::System.Data.DataRowBuilder rb) :
  2410. base(rb) {
  2411. this.tableProductSale = ((ProductSaleDataTable)(this.Table));
  2412. }
  2413. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2414. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2415. public int ID {
  2416. get {
  2417. return ((int)(this[this.tableProductSale.IDColumn]));
  2418. }
  2419. set {
  2420. this[this.tableProductSale.IDColumn] = value;
  2421. }
  2422. }
  2423. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2424. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2425. public int AgentID {
  2426. get {
  2427. return ((int)(this[this.tableProductSale.AgentIDColumn]));
  2428. }
  2429. set {
  2430. this[this.tableProductSale.AgentIDColumn] = value;
  2431. }
  2432. }
  2433. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2434. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2435. public int ProductID {
  2436. get {
  2437. return ((int)(this[this.tableProductSale.ProductIDColumn]));
  2438. }
  2439. set {
  2440. this[this.tableProductSale.ProductIDColumn] = value;
  2441. }
  2442. }
  2443. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2444. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2445. public System.DateTime SaleDate {
  2446. get {
  2447. return ((global::System.DateTime)(this[this.tableProductSale.SaleDateColumn]));
  2448. }
  2449. set {
  2450. this[this.tableProductSale.SaleDateColumn] = value;
  2451. }
  2452. }
  2453. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2454. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2455. public int ProductCount {
  2456. get {
  2457. return ((int)(this[this.tableProductSale.ProductCountColumn]));
  2458. }
  2459. set {
  2460. this[this.tableProductSale.ProductCountColumn] = value;
  2461. }
  2462. }
  2463. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2464. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2465. public AgentRow AgentRow {
  2466. get {
  2467. return ((AgentRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductSale_Agent"])));
  2468. }
  2469. set {
  2470. this.SetParentRow(value, this.Table.ParentRelations["FK_ProductSale_Agent"]);
  2471. }
  2472. }
  2473. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2474. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2475. public ProductRow ProductRow {
  2476. get {
  2477. return ((ProductRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProductSale_Product"])));
  2478. }
  2479. set {
  2480. this.SetParentRow(value, this.Table.ParentRelations["FK_ProductSale_Product"]);
  2481. }
  2482. }
  2483. }
  2484. /// <summary>
  2485. ///Represents strongly named DataRow class.
  2486. ///</summary>
  2487. public partial class ProductTypeRow : global::System.Data.DataRow {
  2488. private ProductTypeDataTable tableProductType;
  2489. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2490. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2491. internal ProductTypeRow(global::System.Data.DataRowBuilder rb) :
  2492. base(rb) {
  2493. this.tableProductType = ((ProductTypeDataTable)(this.Table));
  2494. }
  2495. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2496. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2497. public int ID {
  2498. get {
  2499. return ((int)(this[this.tableProductType.IDColumn]));
  2500. }
  2501. set {
  2502. this[this.tableProductType.IDColumn] = value;
  2503. }
  2504. }
  2505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2506. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2507. public string Title {
  2508. get {
  2509. return ((string)(this[this.tableProductType.TitleColumn]));
  2510. }
  2511. set {
  2512. this[this.tableProductType.TitleColumn] = value;
  2513. }
  2514. }
  2515. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2516. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2517. public double DefectedPercent {
  2518. get {
  2519. return ((double)(this[this.tableProductType.DefectedPercentColumn]));
  2520. }
  2521. set {
  2522. this[this.tableProductType.DefectedPercentColumn] = value;
  2523. }
  2524. }
  2525. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2526. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2527. public ProductRow[] GetProductRows() {
  2528. if ((this.Table.ChildRelations["FK_Product_ProductType"] == null)) {
  2529. return new ProductRow[0];
  2530. }
  2531. else {
  2532. return ((ProductRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Product_ProductType"])));
  2533. }
  2534. }
  2535. }
  2536. /// <summary>
  2537. ///Row event argument class
  2538. ///</summary>
  2539. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2540. public class AgentRowChangeEvent : global::System.EventArgs {
  2541. private AgentRow eventRow;
  2542. private global::System.Data.DataRowAction eventAction;
  2543. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2544. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2545. public AgentRowChangeEvent(AgentRow row, global::System.Data.DataRowAction action) {
  2546. this.eventRow = row;
  2547. this.eventAction = action;
  2548. }
  2549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2550. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2551. public AgentRow Row {
  2552. get {
  2553. return this.eventRow;
  2554. }
  2555. }
  2556. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2557. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2558. public global::System.Data.DataRowAction Action {
  2559. get {
  2560. return this.eventAction;
  2561. }
  2562. }
  2563. }
  2564. /// <summary>
  2565. ///Row event argument class
  2566. ///</summary>
  2567. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2568. public class AgentTypeRowChangeEvent : global::System.EventArgs {
  2569. private AgentTypeRow eventRow;
  2570. private global::System.Data.DataRowAction eventAction;
  2571. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2572. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2573. public AgentTypeRowChangeEvent(AgentTypeRow row, global::System.Data.DataRowAction action) {
  2574. this.eventRow = row;
  2575. this.eventAction = action;
  2576. }
  2577. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2578. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2579. public AgentTypeRow Row {
  2580. get {
  2581. return this.eventRow;
  2582. }
  2583. }
  2584. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2585. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2586. public global::System.Data.DataRowAction Action {
  2587. get {
  2588. return this.eventAction;
  2589. }
  2590. }
  2591. }
  2592. /// <summary>
  2593. ///Row event argument class
  2594. ///</summary>
  2595. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2596. public class ProductRowChangeEvent : global::System.EventArgs {
  2597. private ProductRow eventRow;
  2598. private global::System.Data.DataRowAction eventAction;
  2599. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2600. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2601. public ProductRowChangeEvent(ProductRow row, global::System.Data.DataRowAction action) {
  2602. this.eventRow = row;
  2603. this.eventAction = action;
  2604. }
  2605. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2606. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2607. public ProductRow Row {
  2608. get {
  2609. return this.eventRow;
  2610. }
  2611. }
  2612. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2613. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2614. public global::System.Data.DataRowAction Action {
  2615. get {
  2616. return this.eventAction;
  2617. }
  2618. }
  2619. }
  2620. /// <summary>
  2621. ///Row event argument class
  2622. ///</summary>
  2623. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2624. public class ProductSaleRowChangeEvent : global::System.EventArgs {
  2625. private ProductSaleRow eventRow;
  2626. private global::System.Data.DataRowAction eventAction;
  2627. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2628. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2629. public ProductSaleRowChangeEvent(ProductSaleRow row, global::System.Data.DataRowAction action) {
  2630. this.eventRow = row;
  2631. this.eventAction = action;
  2632. }
  2633. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2634. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2635. public ProductSaleRow Row {
  2636. get {
  2637. return this.eventRow;
  2638. }
  2639. }
  2640. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2641. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2642. public global::System.Data.DataRowAction Action {
  2643. get {
  2644. return this.eventAction;
  2645. }
  2646. }
  2647. }
  2648. /// <summary>
  2649. ///Row event argument class
  2650. ///</summary>
  2651. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2652. public class ProductTypeRowChangeEvent : global::System.EventArgs {
  2653. private ProductTypeRow eventRow;
  2654. private global::System.Data.DataRowAction eventAction;
  2655. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2656. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2657. public ProductTypeRowChangeEvent(ProductTypeRow row, global::System.Data.DataRowAction action) {
  2658. this.eventRow = row;
  2659. this.eventAction = action;
  2660. }
  2661. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2662. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2663. public ProductTypeRow Row {
  2664. get {
  2665. return this.eventRow;
  2666. }
  2667. }
  2668. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2669. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2670. public global::System.Data.DataRowAction Action {
  2671. get {
  2672. return this.eventAction;
  2673. }
  2674. }
  2675. }
  2676. }
  2677. }
  2678. namespace Prakt2.agentRUDDataSetTableAdapters {
  2679. /// <summary>
  2680. ///Represents the connection and commands used to retrieve and save data.
  2681. ///</summary>
  2682. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  2683. [global::System.ComponentModel.ToolboxItem(true)]
  2684. [global::System.ComponentModel.DataObjectAttribute(true)]
  2685. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  2686. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  2687. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2688. public partial class AgentTableAdapter : global::System.ComponentModel.Component {
  2689. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  2690. private global::System.Data.SqlClient.SqlConnection _connection;
  2691. private global::System.Data.SqlClient.SqlTransaction _transaction;
  2692. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  2693. private bool _clearBeforeFill;
  2694. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2695. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2696. public AgentTableAdapter() {
  2697. this.ClearBeforeFill = true;
  2698. }
  2699. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2700. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2701. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  2702. get {
  2703. if ((this._adapter == null)) {
  2704. this.InitAdapter();
  2705. }
  2706. return this._adapter;
  2707. }
  2708. }
  2709. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2710. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2711. internal global::System.Data.SqlClient.SqlConnection Connection {
  2712. get {
  2713. if ((this._connection == null)) {
  2714. this.InitConnection();
  2715. }
  2716. return this._connection;
  2717. }
  2718. set {
  2719. this._connection = value;
  2720. if ((this.Adapter.InsertCommand != null)) {
  2721. this.Adapter.InsertCommand.Connection = value;
  2722. }
  2723. if ((this.Adapter.DeleteCommand != null)) {
  2724. this.Adapter.DeleteCommand.Connection = value;
  2725. }
  2726. if ((this.Adapter.UpdateCommand != null)) {
  2727. this.Adapter.UpdateCommand.Connection = value;
  2728. }
  2729. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2730. if ((this.CommandCollection[i] != null)) {
  2731. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  2732. }
  2733. }
  2734. }
  2735. }
  2736. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2737. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2738. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  2739. get {
  2740. return this._transaction;
  2741. }
  2742. set {
  2743. this._transaction = value;
  2744. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2745. this.CommandCollection[i].Transaction = this._transaction;
  2746. }
  2747. if (((this.Adapter != null)
  2748. && (this.Adapter.DeleteCommand != null))) {
  2749. this.Adapter.DeleteCommand.Transaction = this._transaction;
  2750. }
  2751. if (((this.Adapter != null)
  2752. && (this.Adapter.InsertCommand != null))) {
  2753. this.Adapter.InsertCommand.Transaction = this._transaction;
  2754. }
  2755. if (((this.Adapter != null)
  2756. && (this.Adapter.UpdateCommand != null))) {
  2757. this.Adapter.UpdateCommand.Transaction = this._transaction;
  2758. }
  2759. }
  2760. }
  2761. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2762. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2763. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  2764. get {
  2765. if ((this._commandCollection == null)) {
  2766. this.InitCommandCollection();
  2767. }
  2768. return this._commandCollection;
  2769. }
  2770. }
  2771. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2772. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2773. public bool ClearBeforeFill {
  2774. get {
  2775. return this._clearBeforeFill;
  2776. }
  2777. set {
  2778. this._clearBeforeFill = value;
  2779. }
  2780. }
  2781. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2782. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2783. private void InitAdapter() {
  2784. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  2785. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  2786. tableMapping.SourceTable = "Table";
  2787. tableMapping.DataSetTable = "Agent";
  2788. tableMapping.ColumnMappings.Add("ID", "ID");
  2789. tableMapping.ColumnMappings.Add("Title", "Title");
  2790. tableMapping.ColumnMappings.Add("AgentTypeID", "AgentTypeID");
  2791. tableMapping.ColumnMappings.Add("Address", "Address");
  2792. tableMapping.ColumnMappings.Add("INN", "INN");
  2793. tableMapping.ColumnMappings.Add("KPP", "KPP");
  2794. tableMapping.ColumnMappings.Add("DirectorName", "DirectorName");
  2795. tableMapping.ColumnMappings.Add("Phone", "Phone");
  2796. tableMapping.ColumnMappings.Add("Email", "Email");
  2797. tableMapping.ColumnMappings.Add("Logo", "Logo");
  2798. tableMapping.ColumnMappings.Add("Priority", "Priority");
  2799. this._adapter.TableMappings.Add(tableMapping);
  2800. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  2801. this._adapter.DeleteCommand.Connection = this.Connection;
  2802. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Agent] WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([AgentTypeID] = @Original_AgentTypeID) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ([INN] = @Original_INN) AND ((@IsNull_KPP = 1 AND [KPP] IS NULL) OR ([KPP] = @Original_KPP)) AND ((@IsNull_DirectorName = 1 AND [DirectorName] IS NULL) OR ([DirectorName] = @Original_DirectorName)) AND ([Phone] = @Original_Phone) AND ((@IsNull_Email = 1 AND [Email] IS NULL) OR ([Email] = @Original_Email)) AND ((@IsNull_Logo = 1 AND [Logo] IS NULL) OR ([Logo] = @Original_Logo)) AND ([Priority] = @Original_Priority))";
  2803. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  2804. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2805. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2806. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2807. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2808. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2809. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2810. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_KPP", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2811. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2812. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DirectorName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2813. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2814. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2815. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Email", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2816. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2817. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Logo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2818. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2819. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2820. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  2821. this._adapter.InsertCommand.Connection = this.Connection;
  2822. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Agent] ([Title], [AgentTypeID], [Address], [INN], [KPP], [DirectorName], [Phone], [Email], [Logo], [Priority]) VALUES (@Title, @AgentTypeID, @Address, @INN, @KPP, @DirectorName, @Phone, @Email, @Logo, @Priority);
  2823. SELECT ID, Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority FROM Agent WHERE (ID = SCOPE_IDENTITY())";
  2824. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  2825. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2826. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2827. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2828. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2829. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2830. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2831. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2832. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2833. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2834. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2835. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  2836. this._adapter.UpdateCommand.Connection = this.Connection;
  2837. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Agent] SET [Title] = @Title, [AgentTypeID] = @AgentTypeID, [Address] = @Address, [INN] = @INN, [KPP] = @KPP, [DirectorName] = @DirectorName, [Phone] = @Phone, [Email] = @Email, [Logo] = @Logo, [Priority] = @Priority WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([AgentTypeID] = @Original_AgentTypeID) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ([INN] = @Original_INN) AND ((@IsNull_KPP = 1 AND [KPP] IS NULL) OR ([KPP] = @Original_KPP)) AND ((@IsNull_DirectorName = 1 AND [DirectorName] IS NULL) OR ([DirectorName] = @Original_DirectorName)) AND ([Phone] = @Original_Phone) AND ((@IsNull_Email = 1 AND [Email] IS NULL) OR ([Email] = @Original_Email)) AND ((@IsNull_Logo = 1 AND [Logo] IS NULL) OR ([Logo] = @Original_Logo)) AND ([Priority] = @Original_Priority));
  2838. SELECT ID, Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority FROM Agent WHERE (ID = @ID)";
  2839. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  2840. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2841. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2842. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2843. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2844. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2845. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2846. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2847. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2848. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2849. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2850. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2851. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2852. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2853. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2854. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2855. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2856. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_KPP", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2857. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2858. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DirectorName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2859. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2860. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2861. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Email", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2862. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2863. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Logo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  2864. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2865. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2866. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2867. }
  2868. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2869. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2870. private void InitConnection() {
  2871. this._connection = new global::System.Data.SqlClient.SqlConnection();
  2872. this._connection.ConnectionString = global::Prakt2.Properties.Settings.Default.agentRUDConnectionString;
  2873. }
  2874. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2875. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2876. private void InitCommandCollection() {
  2877. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  2878. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  2879. this._commandCollection[0].Connection = this.Connection;
  2880. this._commandCollection[0].CommandText = "SELECT ID, Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Log" +
  2881. "o, Priority FROM dbo.Agent";
  2882. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  2883. }
  2884. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2885. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2886. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2887. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  2888. public virtual int Fill(agentRUDDataSet.AgentDataTable dataTable) {
  2889. this.Adapter.SelectCommand = this.CommandCollection[0];
  2890. if ((this.ClearBeforeFill == true)) {
  2891. dataTable.Clear();
  2892. }
  2893. int returnValue = this.Adapter.Fill(dataTable);
  2894. return returnValue;
  2895. }
  2896. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2897. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2898. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2899. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  2900. public virtual agentRUDDataSet.AgentDataTable GetData() {
  2901. this.Adapter.SelectCommand = this.CommandCollection[0];
  2902. agentRUDDataSet.AgentDataTable dataTable = new agentRUDDataSet.AgentDataTable();
  2903. this.Adapter.Fill(dataTable);
  2904. return dataTable;
  2905. }
  2906. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2907. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2908. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2909. public virtual int Update(agentRUDDataSet.AgentDataTable dataTable) {
  2910. return this.Adapter.Update(dataTable);
  2911. }
  2912. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2913. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2914. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2915. public virtual int Update(agentRUDDataSet dataSet) {
  2916. return this.Adapter.Update(dataSet, "Agent");
  2917. }
  2918. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2919. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2920. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2921. public virtual int Update(global::System.Data.DataRow dataRow) {
  2922. return this.Adapter.Update(new global::System.Data.DataRow[] {
  2923. dataRow});
  2924. }
  2925. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2926. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2927. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2928. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  2929. return this.Adapter.Update(dataRows);
  2930. }
  2931. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2932. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2933. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2934. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  2935. public virtual int Delete(int Original_ID, string Original_Title, int Original_AgentTypeID, string Original_Address, string Original_INN, string Original_KPP, string Original_DirectorName, string Original_Phone, string Original_Email, string Original_Logo, int Original_Priority) {
  2936. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  2937. if ((Original_Title == null)) {
  2938. throw new global::System.ArgumentNullException("Original_Title");
  2939. }
  2940. else {
  2941. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Title));
  2942. }
  2943. this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AgentTypeID));
  2944. if ((Original_Address == null)) {
  2945. this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
  2946. this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
  2947. }
  2948. else {
  2949. this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
  2950. this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Address));
  2951. }
  2952. if ((Original_INN == null)) {
  2953. throw new global::System.ArgumentNullException("Original_INN");
  2954. }
  2955. else {
  2956. this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_INN));
  2957. }
  2958. if ((Original_KPP == null)) {
  2959. this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1));
  2960. this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value;
  2961. }
  2962. else {
  2963. this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0));
  2964. this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_KPP));
  2965. }
  2966. if ((Original_DirectorName == null)) {
  2967. this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1));
  2968. this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value;
  2969. }
  2970. else {
  2971. this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0));
  2972. this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_DirectorName));
  2973. }
  2974. if ((Original_Phone == null)) {
  2975. throw new global::System.ArgumentNullException("Original_Phone");
  2976. }
  2977. else {
  2978. this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_Phone));
  2979. }
  2980. if ((Original_Email == null)) {
  2981. this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1));
  2982. this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value;
  2983. }
  2984. else {
  2985. this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0));
  2986. this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Email));
  2987. }
  2988. if ((Original_Logo == null)) {
  2989. this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1));
  2990. this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value;
  2991. }
  2992. else {
  2993. this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0));
  2994. this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_Logo));
  2995. }
  2996. this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(Original_Priority));
  2997. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  2998. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2999. != global::System.Data.ConnectionState.Open)) {
  3000. this.Adapter.DeleteCommand.Connection.Open();
  3001. }
  3002. try {
  3003. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  3004. return returnValue;
  3005. }
  3006. finally {
  3007. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3008. this.Adapter.DeleteCommand.Connection.Close();
  3009. }
  3010. }
  3011. }
  3012. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3013. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3014. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3015. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  3016. public virtual int Insert(string Title, int AgentTypeID, string Address, string INN, string KPP, string DirectorName, string Phone, string Email, string Logo, int Priority) {
  3017. if ((Title == null)) {
  3018. throw new global::System.ArgumentNullException("Title");
  3019. }
  3020. else {
  3021. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title));
  3022. }
  3023. this.Adapter.InsertCommand.Parameters[1].Value = ((int)(AgentTypeID));
  3024. if ((Address == null)) {
  3025. this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
  3026. }
  3027. else {
  3028. this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Address));
  3029. }
  3030. if ((INN == null)) {
  3031. throw new global::System.ArgumentNullException("INN");
  3032. }
  3033. else {
  3034. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(INN));
  3035. }
  3036. if ((KPP == null)) {
  3037. this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
  3038. }
  3039. else {
  3040. this.Adapter.InsertCommand.Parameters[4].Value = ((string)(KPP));
  3041. }
  3042. if ((DirectorName == null)) {
  3043. this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
  3044. }
  3045. else {
  3046. this.Adapter.InsertCommand.Parameters[5].Value = ((string)(DirectorName));
  3047. }
  3048. if ((Phone == null)) {
  3049. throw new global::System.ArgumentNullException("Phone");
  3050. }
  3051. else {
  3052. this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Phone));
  3053. }
  3054. if ((Email == null)) {
  3055. this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value;
  3056. }
  3057. else {
  3058. this.Adapter.InsertCommand.Parameters[7].Value = ((string)(Email));
  3059. }
  3060. if ((Logo == null)) {
  3061. this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value;
  3062. }
  3063. else {
  3064. this.Adapter.InsertCommand.Parameters[8].Value = ((string)(Logo));
  3065. }
  3066. this.Adapter.InsertCommand.Parameters[9].Value = ((int)(Priority));
  3067. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  3068. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3069. != global::System.Data.ConnectionState.Open)) {
  3070. this.Adapter.InsertCommand.Connection.Open();
  3071. }
  3072. try {
  3073. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  3074. return returnValue;
  3075. }
  3076. finally {
  3077. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3078. this.Adapter.InsertCommand.Connection.Close();
  3079. }
  3080. }
  3081. }
  3082. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3083. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3084. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3085. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3086. public virtual int Update(
  3087. string Title,
  3088. int AgentTypeID,
  3089. string Address,
  3090. string INN,
  3091. string KPP,
  3092. string DirectorName,
  3093. string Phone,
  3094. string Email,
  3095. string Logo,
  3096. int Priority,
  3097. int Original_ID,
  3098. string Original_Title,
  3099. int Original_AgentTypeID,
  3100. string Original_Address,
  3101. string Original_INN,
  3102. string Original_KPP,
  3103. string Original_DirectorName,
  3104. string Original_Phone,
  3105. string Original_Email,
  3106. string Original_Logo,
  3107. int Original_Priority,
  3108. int ID) {
  3109. if ((Title == null)) {
  3110. throw new global::System.ArgumentNullException("Title");
  3111. }
  3112. else {
  3113. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title));
  3114. }
  3115. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(AgentTypeID));
  3116. if ((Address == null)) {
  3117. this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
  3118. }
  3119. else {
  3120. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Address));
  3121. }
  3122. if ((INN == null)) {
  3123. throw new global::System.ArgumentNullException("INN");
  3124. }
  3125. else {
  3126. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(INN));
  3127. }
  3128. if ((KPP == null)) {
  3129. this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
  3130. }
  3131. else {
  3132. this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(KPP));
  3133. }
  3134. if ((DirectorName == null)) {
  3135. this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
  3136. }
  3137. else {
  3138. this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(DirectorName));
  3139. }
  3140. if ((Phone == null)) {
  3141. throw new global::System.ArgumentNullException("Phone");
  3142. }
  3143. else {
  3144. this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Phone));
  3145. }
  3146. if ((Email == null)) {
  3147. this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value;
  3148. }
  3149. else {
  3150. this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Email));
  3151. }
  3152. if ((Logo == null)) {
  3153. this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value;
  3154. }
  3155. else {
  3156. this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Logo));
  3157. }
  3158. this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Priority));
  3159. this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_ID));
  3160. if ((Original_Title == null)) {
  3161. throw new global::System.ArgumentNullException("Original_Title");
  3162. }
  3163. else {
  3164. this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Title));
  3165. }
  3166. this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_AgentTypeID));
  3167. if ((Original_Address == null)) {
  3168. this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
  3169. this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
  3170. }
  3171. else {
  3172. this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
  3173. this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Address));
  3174. }
  3175. if ((Original_INN == null)) {
  3176. throw new global::System.ArgumentNullException("Original_INN");
  3177. }
  3178. else {
  3179. this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_INN));
  3180. }
  3181. if ((Original_KPP == null)) {
  3182. this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1));
  3183. this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value;
  3184. }
  3185. else {
  3186. this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0));
  3187. this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_KPP));
  3188. }
  3189. if ((Original_DirectorName == null)) {
  3190. this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1));
  3191. this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value;
  3192. }
  3193. else {
  3194. this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0));
  3195. this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_DirectorName));
  3196. }
  3197. if ((Original_Phone == null)) {
  3198. throw new global::System.ArgumentNullException("Original_Phone");
  3199. }
  3200. else {
  3201. this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_Phone));
  3202. }
  3203. if ((Original_Email == null)) {
  3204. this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1));
  3205. this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value;
  3206. }
  3207. else {
  3208. this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0));
  3209. this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_Email));
  3210. }
  3211. if ((Original_Logo == null)) {
  3212. this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1));
  3213. this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value;
  3214. }
  3215. else {
  3216. this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0));
  3217. this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_Logo));
  3218. }
  3219. this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Original_Priority));
  3220. this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(ID));
  3221. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  3222. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3223. != global::System.Data.ConnectionState.Open)) {
  3224. this.Adapter.UpdateCommand.Connection.Open();
  3225. }
  3226. try {
  3227. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  3228. return returnValue;
  3229. }
  3230. finally {
  3231. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3232. this.Adapter.UpdateCommand.Connection.Close();
  3233. }
  3234. }
  3235. }
  3236. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3237. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3238. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3239. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3240. public virtual int Update(
  3241. string Title,
  3242. int AgentTypeID,
  3243. string Address,
  3244. string INN,
  3245. string KPP,
  3246. string DirectorName,
  3247. string Phone,
  3248. string Email,
  3249. string Logo,
  3250. int Priority,
  3251. int Original_ID,
  3252. string Original_Title,
  3253. int Original_AgentTypeID,
  3254. string Original_Address,
  3255. string Original_INN,
  3256. string Original_KPP,
  3257. string Original_DirectorName,
  3258. string Original_Phone,
  3259. string Original_Email,
  3260. string Original_Logo,
  3261. int Original_Priority) {
  3262. return this.Update(Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority, Original_ID, Original_Title, Original_AgentTypeID, Original_Address, Original_INN, Original_KPP, Original_DirectorName, Original_Phone, Original_Email, Original_Logo, Original_Priority, Original_ID);
  3263. }
  3264. }
  3265. /// <summary>
  3266. ///Represents the connection and commands used to retrieve and save data.
  3267. ///</summary>
  3268. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  3269. [global::System.ComponentModel.ToolboxItem(true)]
  3270. [global::System.ComponentModel.DataObjectAttribute(true)]
  3271. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  3272. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  3273. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3274. public partial class AgentTypeTableAdapter : global::System.ComponentModel.Component {
  3275. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  3276. private global::System.Data.SqlClient.SqlConnection _connection;
  3277. private global::System.Data.SqlClient.SqlTransaction _transaction;
  3278. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  3279. private bool _clearBeforeFill;
  3280. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3281. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3282. public AgentTypeTableAdapter() {
  3283. this.ClearBeforeFill = true;
  3284. }
  3285. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3286. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3287. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  3288. get {
  3289. if ((this._adapter == null)) {
  3290. this.InitAdapter();
  3291. }
  3292. return this._adapter;
  3293. }
  3294. }
  3295. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3296. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3297. internal global::System.Data.SqlClient.SqlConnection Connection {
  3298. get {
  3299. if ((this._connection == null)) {
  3300. this.InitConnection();
  3301. }
  3302. return this._connection;
  3303. }
  3304. set {
  3305. this._connection = value;
  3306. if ((this.Adapter.InsertCommand != null)) {
  3307. this.Adapter.InsertCommand.Connection = value;
  3308. }
  3309. if ((this.Adapter.DeleteCommand != null)) {
  3310. this.Adapter.DeleteCommand.Connection = value;
  3311. }
  3312. if ((this.Adapter.UpdateCommand != null)) {
  3313. this.Adapter.UpdateCommand.Connection = value;
  3314. }
  3315. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3316. if ((this.CommandCollection[i] != null)) {
  3317. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  3318. }
  3319. }
  3320. }
  3321. }
  3322. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3323. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3324. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  3325. get {
  3326. return this._transaction;
  3327. }
  3328. set {
  3329. this._transaction = value;
  3330. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3331. this.CommandCollection[i].Transaction = this._transaction;
  3332. }
  3333. if (((this.Adapter != null)
  3334. && (this.Adapter.DeleteCommand != null))) {
  3335. this.Adapter.DeleteCommand.Transaction = this._transaction;
  3336. }
  3337. if (((this.Adapter != null)
  3338. && (this.Adapter.InsertCommand != null))) {
  3339. this.Adapter.InsertCommand.Transaction = this._transaction;
  3340. }
  3341. if (((this.Adapter != null)
  3342. && (this.Adapter.UpdateCommand != null))) {
  3343. this.Adapter.UpdateCommand.Transaction = this._transaction;
  3344. }
  3345. }
  3346. }
  3347. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3348. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3349. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  3350. get {
  3351. if ((this._commandCollection == null)) {
  3352. this.InitCommandCollection();
  3353. }
  3354. return this._commandCollection;
  3355. }
  3356. }
  3357. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3358. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3359. public bool ClearBeforeFill {
  3360. get {
  3361. return this._clearBeforeFill;
  3362. }
  3363. set {
  3364. this._clearBeforeFill = value;
  3365. }
  3366. }
  3367. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3368. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3369. private void InitAdapter() {
  3370. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  3371. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  3372. tableMapping.SourceTable = "Table";
  3373. tableMapping.DataSetTable = "AgentType";
  3374. tableMapping.ColumnMappings.Add("ID", "ID");
  3375. tableMapping.ColumnMappings.Add("Title", "Title");
  3376. tableMapping.ColumnMappings.Add("Image", "Image");
  3377. this._adapter.TableMappings.Add(tableMapping);
  3378. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  3379. this._adapter.DeleteCommand.Connection = this.Connection;
  3380. this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[AgentType] WHERE (([ID] = @Original_ID) AND ([Title] = @Origin" +
  3381. "al_Title) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_I" +
  3382. "mage)))";
  3383. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  3384. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3385. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3386. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3387. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3388. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  3389. this._adapter.InsertCommand.Connection = this.Connection;
  3390. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[AgentType] ([Title], [Image]) VALUES (@Title, @Image);\r\nSELECT" +
  3391. " ID, Title, Image FROM AgentType WHERE (ID = SCOPE_IDENTITY())";
  3392. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  3393. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3394. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3395. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  3396. this._adapter.UpdateCommand.Connection = this.Connection;
  3397. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[AgentType] SET [Title] = @Title, [Image] = @Image WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image)));
  3398. SELECT ID, Title, Image FROM AgentType WHERE (ID = @ID)";
  3399. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  3400. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3401. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3402. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3403. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3404. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3405. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3406. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3407. }
  3408. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3409. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3410. private void InitConnection() {
  3411. this._connection = new global::System.Data.SqlClient.SqlConnection();
  3412. this._connection.ConnectionString = global::Prakt2.Properties.Settings.Default.agentRUDConnectionString;
  3413. }
  3414. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3415. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3416. private void InitCommandCollection() {
  3417. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  3418. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  3419. this._commandCollection[0].Connection = this.Connection;
  3420. this._commandCollection[0].CommandText = "SELECT ID, Title, Image FROM dbo.AgentType";
  3421. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  3422. }
  3423. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3424. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3425. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3426. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  3427. public virtual int Fill(agentRUDDataSet.AgentTypeDataTable dataTable) {
  3428. this.Adapter.SelectCommand = this.CommandCollection[0];
  3429. if ((this.ClearBeforeFill == true)) {
  3430. dataTable.Clear();
  3431. }
  3432. int returnValue = this.Adapter.Fill(dataTable);
  3433. return returnValue;
  3434. }
  3435. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3436. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3437. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3438. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  3439. public virtual agentRUDDataSet.AgentTypeDataTable GetData() {
  3440. this.Adapter.SelectCommand = this.CommandCollection[0];
  3441. agentRUDDataSet.AgentTypeDataTable dataTable = new agentRUDDataSet.AgentTypeDataTable();
  3442. this.Adapter.Fill(dataTable);
  3443. return dataTable;
  3444. }
  3445. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3446. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3447. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3448. public virtual int Update(agentRUDDataSet.AgentTypeDataTable dataTable) {
  3449. return this.Adapter.Update(dataTable);
  3450. }
  3451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3452. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3453. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3454. public virtual int Update(agentRUDDataSet dataSet) {
  3455. return this.Adapter.Update(dataSet, "AgentType");
  3456. }
  3457. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3458. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3459. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3460. public virtual int Update(global::System.Data.DataRow dataRow) {
  3461. return this.Adapter.Update(new global::System.Data.DataRow[] {
  3462. dataRow});
  3463. }
  3464. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3465. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3466. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3467. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  3468. return this.Adapter.Update(dataRows);
  3469. }
  3470. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3471. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3472. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3473. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  3474. public virtual int Delete(int Original_ID, string Original_Title, string Original_Image) {
  3475. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  3476. if ((Original_Title == null)) {
  3477. throw new global::System.ArgumentNullException("Original_Title");
  3478. }
  3479. else {
  3480. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Title));
  3481. }
  3482. if ((Original_Image == null)) {
  3483. this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1));
  3484. this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value;
  3485. }
  3486. else {
  3487. this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0));
  3488. this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Image));
  3489. }
  3490. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  3491. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3492. != global::System.Data.ConnectionState.Open)) {
  3493. this.Adapter.DeleteCommand.Connection.Open();
  3494. }
  3495. try {
  3496. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  3497. return returnValue;
  3498. }
  3499. finally {
  3500. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3501. this.Adapter.DeleteCommand.Connection.Close();
  3502. }
  3503. }
  3504. }
  3505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3506. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3507. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3508. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  3509. public virtual int Insert(string Title, string Image) {
  3510. if ((Title == null)) {
  3511. throw new global::System.ArgumentNullException("Title");
  3512. }
  3513. else {
  3514. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title));
  3515. }
  3516. if ((Image == null)) {
  3517. this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
  3518. }
  3519. else {
  3520. this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Image));
  3521. }
  3522. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  3523. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3524. != global::System.Data.ConnectionState.Open)) {
  3525. this.Adapter.InsertCommand.Connection.Open();
  3526. }
  3527. try {
  3528. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  3529. return returnValue;
  3530. }
  3531. finally {
  3532. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3533. this.Adapter.InsertCommand.Connection.Close();
  3534. }
  3535. }
  3536. }
  3537. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3538. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3539. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3540. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3541. public virtual int Update(string Title, string Image, int Original_ID, string Original_Title, string Original_Image, int ID) {
  3542. if ((Title == null)) {
  3543. throw new global::System.ArgumentNullException("Title");
  3544. }
  3545. else {
  3546. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title));
  3547. }
  3548. if ((Image == null)) {
  3549. this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
  3550. }
  3551. else {
  3552. this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Image));
  3553. }
  3554. this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_ID));
  3555. if ((Original_Title == null)) {
  3556. throw new global::System.ArgumentNullException("Original_Title");
  3557. }
  3558. else {
  3559. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Title));
  3560. }
  3561. if ((Original_Image == null)) {
  3562. this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1));
  3563. this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
  3564. }
  3565. else {
  3566. this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0));
  3567. this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_Image));
  3568. }
  3569. this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(ID));
  3570. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  3571. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3572. != global::System.Data.ConnectionState.Open)) {
  3573. this.Adapter.UpdateCommand.Connection.Open();
  3574. }
  3575. try {
  3576. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  3577. return returnValue;
  3578. }
  3579. finally {
  3580. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3581. this.Adapter.UpdateCommand.Connection.Close();
  3582. }
  3583. }
  3584. }
  3585. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3586. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3587. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3588. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3589. public virtual int Update(string Title, string Image, int Original_ID, string Original_Title, string Original_Image) {
  3590. return this.Update(Title, Image, Original_ID, Original_Title, Original_Image, Original_ID);
  3591. }
  3592. }
  3593. /// <summary>
  3594. ///Represents the connection and commands used to retrieve and save data.
  3595. ///</summary>
  3596. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  3597. [global::System.ComponentModel.ToolboxItem(true)]
  3598. [global::System.ComponentModel.DataObjectAttribute(true)]
  3599. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  3600. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  3601. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3602. public partial class ProductTableAdapter : global::System.ComponentModel.Component {
  3603. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  3604. private global::System.Data.SqlClient.SqlConnection _connection;
  3605. private global::System.Data.SqlClient.SqlTransaction _transaction;
  3606. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  3607. private bool _clearBeforeFill;
  3608. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3609. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3610. public ProductTableAdapter() {
  3611. this.ClearBeforeFill = true;
  3612. }
  3613. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3614. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3615. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  3616. get {
  3617. if ((this._adapter == null)) {
  3618. this.InitAdapter();
  3619. }
  3620. return this._adapter;
  3621. }
  3622. }
  3623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3624. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3625. internal global::System.Data.SqlClient.SqlConnection Connection {
  3626. get {
  3627. if ((this._connection == null)) {
  3628. this.InitConnection();
  3629. }
  3630. return this._connection;
  3631. }
  3632. set {
  3633. this._connection = value;
  3634. if ((this.Adapter.InsertCommand != null)) {
  3635. this.Adapter.InsertCommand.Connection = value;
  3636. }
  3637. if ((this.Adapter.DeleteCommand != null)) {
  3638. this.Adapter.DeleteCommand.Connection = value;
  3639. }
  3640. if ((this.Adapter.UpdateCommand != null)) {
  3641. this.Adapter.UpdateCommand.Connection = value;
  3642. }
  3643. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3644. if ((this.CommandCollection[i] != null)) {
  3645. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  3646. }
  3647. }
  3648. }
  3649. }
  3650. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3651. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3652. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  3653. get {
  3654. return this._transaction;
  3655. }
  3656. set {
  3657. this._transaction = value;
  3658. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  3659. this.CommandCollection[i].Transaction = this._transaction;
  3660. }
  3661. if (((this.Adapter != null)
  3662. && (this.Adapter.DeleteCommand != null))) {
  3663. this.Adapter.DeleteCommand.Transaction = this._transaction;
  3664. }
  3665. if (((this.Adapter != null)
  3666. && (this.Adapter.InsertCommand != null))) {
  3667. this.Adapter.InsertCommand.Transaction = this._transaction;
  3668. }
  3669. if (((this.Adapter != null)
  3670. && (this.Adapter.UpdateCommand != null))) {
  3671. this.Adapter.UpdateCommand.Transaction = this._transaction;
  3672. }
  3673. }
  3674. }
  3675. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3676. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3677. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  3678. get {
  3679. if ((this._commandCollection == null)) {
  3680. this.InitCommandCollection();
  3681. }
  3682. return this._commandCollection;
  3683. }
  3684. }
  3685. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3686. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3687. public bool ClearBeforeFill {
  3688. get {
  3689. return this._clearBeforeFill;
  3690. }
  3691. set {
  3692. this._clearBeforeFill = value;
  3693. }
  3694. }
  3695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3696. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3697. private void InitAdapter() {
  3698. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  3699. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  3700. tableMapping.SourceTable = "Table";
  3701. tableMapping.DataSetTable = "Product";
  3702. tableMapping.ColumnMappings.Add("ID", "ID");
  3703. tableMapping.ColumnMappings.Add("Title", "Title");
  3704. tableMapping.ColumnMappings.Add("ProductTypeID", "ProductTypeID");
  3705. tableMapping.ColumnMappings.Add("ArticleNumber", "ArticleNumber");
  3706. tableMapping.ColumnMappings.Add("Description", "Description");
  3707. tableMapping.ColumnMappings.Add("Image", "Image");
  3708. tableMapping.ColumnMappings.Add("ProductionPersonCount", "ProductionPersonCount");
  3709. tableMapping.ColumnMappings.Add("ProductionWorkshopNumber", "ProductionWorkshopNumber");
  3710. tableMapping.ColumnMappings.Add("MinCostForAgent", "MinCostForAgent");
  3711. this._adapter.TableMappings.Add(tableMapping);
  3712. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  3713. this._adapter.DeleteCommand.Connection = this.Connection;
  3714. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Product] WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ((@IsNull_ProductTypeID = 1 AND [ProductTypeID] IS NULL) OR ([ProductTypeID] = @Original_ProductTypeID)) AND ([ArticleNumber] = @Original_ArticleNumber) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image)) AND ((@IsNull_ProductionPersonCount = 1 AND [ProductionPersonCount] IS NULL) OR ([ProductionPersonCount] = @Original_ProductionPersonCount)) AND ((@IsNull_ProductionWorkshopNumber = 1 AND [ProductionWorkshopNumber] IS NULL) OR ([ProductionWorkshopNumber] = @Original_ProductionWorkshopNumber)) AND ([MinCostForAgent] = @Original_MinCostForAgent))";
  3715. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  3716. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3717. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3718. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3719. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3720. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ArticleNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ArticleNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3721. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3722. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3723. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3724. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3725. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3726. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3727. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MinCostForAgent", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "MinCostForAgent", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3728. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  3729. this._adapter.InsertCommand.Connection = this.Connection;
  3730. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Product] ([Title], [ProductTypeID], [ArticleNumber], [Description], [Image], [ProductionPersonCount], [ProductionWorkshopNumber], [MinCostForAgent]) VALUES (@Title, @ProductTypeID, @ArticleNumber, @Description, @Image, @ProductionPersonCount, @ProductionWorkshopNumber, @MinCostForAgent);
  3731. SELECT ID, Title, ProductTypeID, ArticleNumber, Description, Image, ProductionPersonCount, ProductionWorkshopNumber, MinCostForAgent FROM Product WHERE (ID = SCOPE_IDENTITY())";
  3732. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  3733. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3734. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3735. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ArticleNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ArticleNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3736. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3737. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3738. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3739. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3740. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MinCostForAgent", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "MinCostForAgent", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3741. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  3742. this._adapter.UpdateCommand.Connection = this.Connection;
  3743. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Product] SET [Title] = @Title, [ProductTypeID] = @ProductTypeID, [ArticleNumber] = @ArticleNumber, [Description] = @Description, [Image] = @Image, [ProductionPersonCount] = @ProductionPersonCount, [ProductionWorkshopNumber] = @ProductionWorkshopNumber, [MinCostForAgent] = @MinCostForAgent WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ((@IsNull_ProductTypeID = 1 AND [ProductTypeID] IS NULL) OR ([ProductTypeID] = @Original_ProductTypeID)) AND ([ArticleNumber] = @Original_ArticleNumber) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image)) AND ((@IsNull_ProductionPersonCount = 1 AND [ProductionPersonCount] IS NULL) OR ([ProductionPersonCount] = @Original_ProductionPersonCount)) AND ((@IsNull_ProductionWorkshopNumber = 1 AND [ProductionWorkshopNumber] IS NULL) OR ([ProductionWorkshopNumber] = @Original_ProductionWorkshopNumber)) AND ([MinCostForAgent] = @Original_MinCostForAgent));
  3744. SELECT ID, Title, ProductTypeID, ArticleNumber, Description, Image, ProductionPersonCount, ProductionWorkshopNumber, MinCostForAgent FROM Product WHERE (ID = @ID)";
  3745. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  3746. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3747. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3748. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ArticleNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ArticleNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3749. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3750. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3751. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3752. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3753. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MinCostForAgent", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "MinCostForAgent", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3754. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3755. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3756. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3757. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3758. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ArticleNumber", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ArticleNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3759. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3760. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3761. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3762. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductionPersonCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionPersonCount", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3763. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3764. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductionWorkshopNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductionWorkshopNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3765. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MinCostForAgent", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 10, 2, "MinCostForAgent", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3766. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3767. }
  3768. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3769. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3770. private void InitConnection() {
  3771. this._connection = new global::System.Data.SqlClient.SqlConnection();
  3772. this._connection.ConnectionString = global::Prakt2.Properties.Settings.Default.agentRUDConnectionString;
  3773. }
  3774. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3775. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3776. private void InitCommandCollection() {
  3777. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  3778. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  3779. this._commandCollection[0].Connection = this.Connection;
  3780. this._commandCollection[0].CommandText = "SELECT ID, Title, ProductTypeID, ArticleNumber, Description, Image, ProductionPer" +
  3781. "sonCount, ProductionWorkshopNumber, MinCostForAgent FROM dbo.Product";
  3782. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  3783. }
  3784. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3785. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3786. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3787. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  3788. public virtual int Fill(agentRUDDataSet.ProductDataTable dataTable) {
  3789. this.Adapter.SelectCommand = this.CommandCollection[0];
  3790. if ((this.ClearBeforeFill == true)) {
  3791. dataTable.Clear();
  3792. }
  3793. int returnValue = this.Adapter.Fill(dataTable);
  3794. return returnValue;
  3795. }
  3796. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3797. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3798. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3799. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  3800. public virtual agentRUDDataSet.ProductDataTable GetData() {
  3801. this.Adapter.SelectCommand = this.CommandCollection[0];
  3802. agentRUDDataSet.ProductDataTable dataTable = new agentRUDDataSet.ProductDataTable();
  3803. this.Adapter.Fill(dataTable);
  3804. return dataTable;
  3805. }
  3806. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3807. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3808. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3809. public virtual int Update(agentRUDDataSet.ProductDataTable dataTable) {
  3810. return this.Adapter.Update(dataTable);
  3811. }
  3812. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3813. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3814. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3815. public virtual int Update(agentRUDDataSet dataSet) {
  3816. return this.Adapter.Update(dataSet, "Product");
  3817. }
  3818. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3819. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3820. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3821. public virtual int Update(global::System.Data.DataRow dataRow) {
  3822. return this.Adapter.Update(new global::System.Data.DataRow[] {
  3823. dataRow});
  3824. }
  3825. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3826. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3827. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3828. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  3829. return this.Adapter.Update(dataRows);
  3830. }
  3831. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3832. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3833. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3834. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  3835. public virtual int Delete(int Original_ID, string Original_Title, global::System.Nullable<int> Original_ProductTypeID, string Original_ArticleNumber, string Original_Image, global::System.Nullable<int> Original_ProductionPersonCount, global::System.Nullable<int> Original_ProductionWorkshopNumber, decimal Original_MinCostForAgent) {
  3836. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  3837. if ((Original_Title == null)) {
  3838. throw new global::System.ArgumentNullException("Original_Title");
  3839. }
  3840. else {
  3841. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Title));
  3842. }
  3843. if ((Original_ProductTypeID.HasValue == true)) {
  3844. this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0));
  3845. this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_ProductTypeID.Value));
  3846. }
  3847. else {
  3848. this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1));
  3849. this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value;
  3850. }
  3851. if ((Original_ArticleNumber == null)) {
  3852. throw new global::System.ArgumentNullException("Original_ArticleNumber");
  3853. }
  3854. else {
  3855. this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_ArticleNumber));
  3856. }
  3857. if ((Original_Image == null)) {
  3858. this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
  3859. this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
  3860. }
  3861. else {
  3862. this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
  3863. this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Image));
  3864. }
  3865. if ((Original_ProductionPersonCount.HasValue == true)) {
  3866. this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
  3867. this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_ProductionPersonCount.Value));
  3868. }
  3869. else {
  3870. this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
  3871. this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
  3872. }
  3873. if ((Original_ProductionWorkshopNumber.HasValue == true)) {
  3874. this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0));
  3875. this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_ProductionWorkshopNumber.Value));
  3876. }
  3877. else {
  3878. this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1));
  3879. this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value;
  3880. }
  3881. this.Adapter.DeleteCommand.Parameters[11].Value = ((decimal)(Original_MinCostForAgent));
  3882. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  3883. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3884. != global::System.Data.ConnectionState.Open)) {
  3885. this.Adapter.DeleteCommand.Connection.Open();
  3886. }
  3887. try {
  3888. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  3889. return returnValue;
  3890. }
  3891. finally {
  3892. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3893. this.Adapter.DeleteCommand.Connection.Close();
  3894. }
  3895. }
  3896. }
  3897. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3898. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3899. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3900. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  3901. public virtual int Insert(string Title, global::System.Nullable<int> ProductTypeID, string ArticleNumber, string Description, string Image, global::System.Nullable<int> ProductionPersonCount, global::System.Nullable<int> ProductionWorkshopNumber, decimal MinCostForAgent) {
  3902. if ((Title == null)) {
  3903. throw new global::System.ArgumentNullException("Title");
  3904. }
  3905. else {
  3906. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title));
  3907. }
  3908. if ((ProductTypeID.HasValue == true)) {
  3909. this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductTypeID.Value));
  3910. }
  3911. else {
  3912. this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
  3913. }
  3914. if ((ArticleNumber == null)) {
  3915. throw new global::System.ArgumentNullException("ArticleNumber");
  3916. }
  3917. else {
  3918. this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ArticleNumber));
  3919. }
  3920. if ((Description == null)) {
  3921. this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
  3922. }
  3923. else {
  3924. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Description));
  3925. }
  3926. if ((Image == null)) {
  3927. this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
  3928. }
  3929. else {
  3930. this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Image));
  3931. }
  3932. if ((ProductionPersonCount.HasValue == true)) {
  3933. this.Adapter.InsertCommand.Parameters[5].Value = ((int)(ProductionPersonCount.Value));
  3934. }
  3935. else {
  3936. this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
  3937. }
  3938. if ((ProductionWorkshopNumber.HasValue == true)) {
  3939. this.Adapter.InsertCommand.Parameters[6].Value = ((int)(ProductionWorkshopNumber.Value));
  3940. }
  3941. else {
  3942. this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value;
  3943. }
  3944. this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(MinCostForAgent));
  3945. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  3946. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3947. != global::System.Data.ConnectionState.Open)) {
  3948. this.Adapter.InsertCommand.Connection.Open();
  3949. }
  3950. try {
  3951. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  3952. return returnValue;
  3953. }
  3954. finally {
  3955. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3956. this.Adapter.InsertCommand.Connection.Close();
  3957. }
  3958. }
  3959. }
  3960. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3961. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3962. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3963. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3964. public virtual int Update(
  3965. string Title,
  3966. global::System.Nullable<int> ProductTypeID,
  3967. string ArticleNumber,
  3968. string Description,
  3969. string Image,
  3970. global::System.Nullable<int> ProductionPersonCount,
  3971. global::System.Nullable<int> ProductionWorkshopNumber,
  3972. decimal MinCostForAgent,
  3973. int Original_ID,
  3974. string Original_Title,
  3975. global::System.Nullable<int> Original_ProductTypeID,
  3976. string Original_ArticleNumber,
  3977. string Original_Image,
  3978. global::System.Nullable<int> Original_ProductionPersonCount,
  3979. global::System.Nullable<int> Original_ProductionWorkshopNumber,
  3980. decimal Original_MinCostForAgent,
  3981. int ID) {
  3982. if ((Title == null)) {
  3983. throw new global::System.ArgumentNullException("Title");
  3984. }
  3985. else {
  3986. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title));
  3987. }
  3988. if ((ProductTypeID.HasValue == true)) {
  3989. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductTypeID.Value));
  3990. }
  3991. else {
  3992. this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
  3993. }
  3994. if ((ArticleNumber == null)) {
  3995. throw new global::System.ArgumentNullException("ArticleNumber");
  3996. }
  3997. else {
  3998. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ArticleNumber));
  3999. }
  4000. if ((Description == null)) {
  4001. this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
  4002. }
  4003. else {
  4004. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Description));
  4005. }
  4006. if ((Image == null)) {
  4007. this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
  4008. }
  4009. else {
  4010. this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Image));
  4011. }
  4012. if ((ProductionPersonCount.HasValue == true)) {
  4013. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(ProductionPersonCount.Value));
  4014. }
  4015. else {
  4016. this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
  4017. }
  4018. if ((ProductionWorkshopNumber.HasValue == true)) {
  4019. this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(ProductionWorkshopNumber.Value));
  4020. }
  4021. else {
  4022. this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
  4023. }
  4024. this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(MinCostForAgent));
  4025. this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ID));
  4026. if ((Original_Title == null)) {
  4027. throw new global::System.ArgumentNullException("Original_Title");
  4028. }
  4029. else {
  4030. this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Title));
  4031. }
  4032. if ((Original_ProductTypeID.HasValue == true)) {
  4033. this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0));
  4034. this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_ProductTypeID.Value));
  4035. }
  4036. else {
  4037. this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1));
  4038. this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value;
  4039. }
  4040. if ((Original_ArticleNumber == null)) {
  4041. throw new global::System.ArgumentNullException("Original_ArticleNumber");
  4042. }
  4043. else {
  4044. this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_ArticleNumber));
  4045. }
  4046. if ((Original_Image == null)) {
  4047. this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
  4048. this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
  4049. }
  4050. else {
  4051. this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
  4052. this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Image));
  4053. }
  4054. if ((Original_ProductionPersonCount.HasValue == true)) {
  4055. this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
  4056. this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(Original_ProductionPersonCount.Value));
  4057. }
  4058. else {
  4059. this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
  4060. this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value;
  4061. }
  4062. if ((Original_ProductionWorkshopNumber.HasValue == true)) {
  4063. this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0));
  4064. this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(Original_ProductionWorkshopNumber.Value));
  4065. }
  4066. else {
  4067. this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1));
  4068. this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value;
  4069. }
  4070. this.Adapter.UpdateCommand.Parameters[19].Value = ((decimal)(Original_MinCostForAgent));
  4071. this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(ID));
  4072. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  4073. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4074. != global::System.Data.ConnectionState.Open)) {
  4075. this.Adapter.UpdateCommand.Connection.Open();
  4076. }
  4077. try {
  4078. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  4079. return returnValue;
  4080. }
  4081. finally {
  4082. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4083. this.Adapter.UpdateCommand.Connection.Close();
  4084. }
  4085. }
  4086. }
  4087. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4088. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4089. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4090. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4091. public virtual int Update(
  4092. string Title,
  4093. global::System.Nullable<int> ProductTypeID,
  4094. string ArticleNumber,
  4095. string Description,
  4096. string Image,
  4097. global::System.Nullable<int> ProductionPersonCount,
  4098. global::System.Nullable<int> ProductionWorkshopNumber,
  4099. decimal MinCostForAgent,
  4100. int Original_ID,
  4101. string Original_Title,
  4102. global::System.Nullable<int> Original_ProductTypeID,
  4103. string Original_ArticleNumber,
  4104. string Original_Image,
  4105. global::System.Nullable<int> Original_ProductionPersonCount,
  4106. global::System.Nullable<int> Original_ProductionWorkshopNumber,
  4107. decimal Original_MinCostForAgent) {
  4108. return this.Update(Title, ProductTypeID, ArticleNumber, Description, Image, ProductionPersonCount, ProductionWorkshopNumber, MinCostForAgent, Original_ID, Original_Title, Original_ProductTypeID, Original_ArticleNumber, Original_Image, Original_ProductionPersonCount, Original_ProductionWorkshopNumber, Original_MinCostForAgent, Original_ID);
  4109. }
  4110. }
  4111. /// <summary>
  4112. ///Represents the connection and commands used to retrieve and save data.
  4113. ///</summary>
  4114. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  4115. [global::System.ComponentModel.ToolboxItem(true)]
  4116. [global::System.ComponentModel.DataObjectAttribute(true)]
  4117. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  4118. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  4119. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4120. public partial class ProductSaleTableAdapter : global::System.ComponentModel.Component {
  4121. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  4122. private global::System.Data.SqlClient.SqlConnection _connection;
  4123. private global::System.Data.SqlClient.SqlTransaction _transaction;
  4124. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  4125. private bool _clearBeforeFill;
  4126. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4127. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4128. public ProductSaleTableAdapter() {
  4129. this.ClearBeforeFill = true;
  4130. }
  4131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4132. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4133. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  4134. get {
  4135. if ((this._adapter == null)) {
  4136. this.InitAdapter();
  4137. }
  4138. return this._adapter;
  4139. }
  4140. }
  4141. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4142. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4143. internal global::System.Data.SqlClient.SqlConnection Connection {
  4144. get {
  4145. if ((this._connection == null)) {
  4146. this.InitConnection();
  4147. }
  4148. return this._connection;
  4149. }
  4150. set {
  4151. this._connection = value;
  4152. if ((this.Adapter.InsertCommand != null)) {
  4153. this.Adapter.InsertCommand.Connection = value;
  4154. }
  4155. if ((this.Adapter.DeleteCommand != null)) {
  4156. this.Adapter.DeleteCommand.Connection = value;
  4157. }
  4158. if ((this.Adapter.UpdateCommand != null)) {
  4159. this.Adapter.UpdateCommand.Connection = value;
  4160. }
  4161. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  4162. if ((this.CommandCollection[i] != null)) {
  4163. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  4164. }
  4165. }
  4166. }
  4167. }
  4168. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4169. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4170. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  4171. get {
  4172. return this._transaction;
  4173. }
  4174. set {
  4175. this._transaction = value;
  4176. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  4177. this.CommandCollection[i].Transaction = this._transaction;
  4178. }
  4179. if (((this.Adapter != null)
  4180. && (this.Adapter.DeleteCommand != null))) {
  4181. this.Adapter.DeleteCommand.Transaction = this._transaction;
  4182. }
  4183. if (((this.Adapter != null)
  4184. && (this.Adapter.InsertCommand != null))) {
  4185. this.Adapter.InsertCommand.Transaction = this._transaction;
  4186. }
  4187. if (((this.Adapter != null)
  4188. && (this.Adapter.UpdateCommand != null))) {
  4189. this.Adapter.UpdateCommand.Transaction = this._transaction;
  4190. }
  4191. }
  4192. }
  4193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4194. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4195. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  4196. get {
  4197. if ((this._commandCollection == null)) {
  4198. this.InitCommandCollection();
  4199. }
  4200. return this._commandCollection;
  4201. }
  4202. }
  4203. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4204. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4205. public bool ClearBeforeFill {
  4206. get {
  4207. return this._clearBeforeFill;
  4208. }
  4209. set {
  4210. this._clearBeforeFill = value;
  4211. }
  4212. }
  4213. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4214. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4215. private void InitAdapter() {
  4216. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  4217. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  4218. tableMapping.SourceTable = "Table";
  4219. tableMapping.DataSetTable = "ProductSale";
  4220. tableMapping.ColumnMappings.Add("ID", "ID");
  4221. tableMapping.ColumnMappings.Add("AgentID", "AgentID");
  4222. tableMapping.ColumnMappings.Add("ProductID", "ProductID");
  4223. tableMapping.ColumnMappings.Add("SaleDate", "SaleDate");
  4224. tableMapping.ColumnMappings.Add("ProductCount", "ProductCount");
  4225. this._adapter.TableMappings.Add(tableMapping);
  4226. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  4227. this._adapter.DeleteCommand.Connection = this.Connection;
  4228. this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[ProductSale] WHERE (([ID] = @Original_ID) AND ([AgentID] = @Or" +
  4229. "iginal_AgentID) AND ([ProductID] = @Original_ProductID) AND ([SaleDate] = @Origi" +
  4230. "nal_SaleDate) AND ([ProductCount] = @Original_ProductCount))";
  4231. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  4232. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4233. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4234. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4235. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SaleDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleDate", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4236. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductCount", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4237. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  4238. this._adapter.InsertCommand.Connection = this.Connection;
  4239. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[ProductSale] ([AgentID], [ProductID], [SaleDate], [ProductCoun" +
  4240. "t]) VALUES (@AgentID, @ProductID, @SaleDate, @ProductCount);\r\nSELECT ID, AgentID" +
  4241. ", ProductID, SaleDate, ProductCount FROM ProductSale WHERE (ID = SCOPE_IDENTITY(" +
  4242. "))";
  4243. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  4244. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4245. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4246. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SaleDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleDate", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4247. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductCount", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4248. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  4249. this._adapter.UpdateCommand.Connection = this.Connection;
  4250. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[ProductSale] SET [AgentID] = @AgentID, [ProductID] = @ProductID, [SaleDate] = @SaleDate, [ProductCount] = @ProductCount WHERE (([ID] = @Original_ID) AND ([AgentID] = @Original_AgentID) AND ([ProductID] = @Original_ProductID) AND ([SaleDate] = @Original_SaleDate) AND ([ProductCount] = @Original_ProductCount));
  4251. SELECT ID, AgentID, ProductID, SaleDate, ProductCount FROM ProductSale WHERE (ID = @ID)";
  4252. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  4253. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4254. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4255. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SaleDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleDate", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4256. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductCount", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4257. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4258. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4259. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4260. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SaleDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleDate", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4261. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductCount", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductCount", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4262. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4263. }
  4264. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4265. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4266. private void InitConnection() {
  4267. this._connection = new global::System.Data.SqlClient.SqlConnection();
  4268. this._connection.ConnectionString = global::Prakt2.Properties.Settings.Default.agentRUDConnectionString;
  4269. }
  4270. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4271. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4272. private void InitCommandCollection() {
  4273. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  4274. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  4275. this._commandCollection[0].Connection = this.Connection;
  4276. this._commandCollection[0].CommandText = "SELECT ID, AgentID, ProductID, SaleDate, ProductCount FROM dbo.ProductSale";
  4277. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  4278. }
  4279. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4280. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4281. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4282. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  4283. public virtual int Fill(agentRUDDataSet.ProductSaleDataTable dataTable) {
  4284. this.Adapter.SelectCommand = this.CommandCollection[0];
  4285. if ((this.ClearBeforeFill == true)) {
  4286. dataTable.Clear();
  4287. }
  4288. int returnValue = this.Adapter.Fill(dataTable);
  4289. return returnValue;
  4290. }
  4291. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4292. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4293. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4294. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  4295. public virtual agentRUDDataSet.ProductSaleDataTable GetData() {
  4296. this.Adapter.SelectCommand = this.CommandCollection[0];
  4297. agentRUDDataSet.ProductSaleDataTable dataTable = new agentRUDDataSet.ProductSaleDataTable();
  4298. this.Adapter.Fill(dataTable);
  4299. return dataTable;
  4300. }
  4301. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4302. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4303. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4304. public virtual int Update(agentRUDDataSet.ProductSaleDataTable dataTable) {
  4305. return this.Adapter.Update(dataTable);
  4306. }
  4307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4308. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4309. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4310. public virtual int Update(agentRUDDataSet dataSet) {
  4311. return this.Adapter.Update(dataSet, "ProductSale");
  4312. }
  4313. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4314. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4315. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4316. public virtual int Update(global::System.Data.DataRow dataRow) {
  4317. return this.Adapter.Update(new global::System.Data.DataRow[] {
  4318. dataRow});
  4319. }
  4320. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4321. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4322. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4323. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  4324. return this.Adapter.Update(dataRows);
  4325. }
  4326. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4327. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4328. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4329. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  4330. public virtual int Delete(int Original_ID, int Original_AgentID, int Original_ProductID, System.DateTime Original_SaleDate, int Original_ProductCount) {
  4331. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  4332. this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_AgentID));
  4333. this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ProductID));
  4334. this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_SaleDate));
  4335. this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_ProductCount));
  4336. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  4337. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4338. != global::System.Data.ConnectionState.Open)) {
  4339. this.Adapter.DeleteCommand.Connection.Open();
  4340. }
  4341. try {
  4342. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  4343. return returnValue;
  4344. }
  4345. finally {
  4346. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4347. this.Adapter.DeleteCommand.Connection.Close();
  4348. }
  4349. }
  4350. }
  4351. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4352. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4353. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4354. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  4355. public virtual int Insert(int AgentID, int ProductID, System.DateTime SaleDate, int ProductCount) {
  4356. this.Adapter.InsertCommand.Parameters[0].Value = ((int)(AgentID));
  4357. this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ProductID));
  4358. this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(SaleDate));
  4359. this.Adapter.InsertCommand.Parameters[3].Value = ((int)(ProductCount));
  4360. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  4361. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4362. != global::System.Data.ConnectionState.Open)) {
  4363. this.Adapter.InsertCommand.Connection.Open();
  4364. }
  4365. try {
  4366. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  4367. return returnValue;
  4368. }
  4369. finally {
  4370. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4371. this.Adapter.InsertCommand.Connection.Close();
  4372. }
  4373. }
  4374. }
  4375. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4376. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4377. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4378. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4379. public virtual int Update(int AgentID, int ProductID, System.DateTime SaleDate, int ProductCount, int Original_ID, int Original_AgentID, int Original_ProductID, System.DateTime Original_SaleDate, int Original_ProductCount, int ID) {
  4380. this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(AgentID));
  4381. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ProductID));
  4382. this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(SaleDate));
  4383. this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ProductCount));
  4384. this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_ID));
  4385. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_AgentID));
  4386. this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_ProductID));
  4387. this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_SaleDate));
  4388. this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ProductCount));
  4389. this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(ID));
  4390. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  4391. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4392. != global::System.Data.ConnectionState.Open)) {
  4393. this.Adapter.UpdateCommand.Connection.Open();
  4394. }
  4395. try {
  4396. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  4397. return returnValue;
  4398. }
  4399. finally {
  4400. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4401. this.Adapter.UpdateCommand.Connection.Close();
  4402. }
  4403. }
  4404. }
  4405. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4406. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4407. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4408. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4409. public virtual int Update(int AgentID, int ProductID, System.DateTime SaleDate, int ProductCount, int Original_ID, int Original_AgentID, int Original_ProductID, System.DateTime Original_SaleDate, int Original_ProductCount) {
  4410. return this.Update(AgentID, ProductID, SaleDate, ProductCount, Original_ID, Original_AgentID, Original_ProductID, Original_SaleDate, Original_ProductCount, Original_ID);
  4411. }
  4412. }
  4413. /// <summary>
  4414. ///Represents the connection and commands used to retrieve and save data.
  4415. ///</summary>
  4416. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  4417. [global::System.ComponentModel.ToolboxItem(true)]
  4418. [global::System.ComponentModel.DataObjectAttribute(true)]
  4419. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  4420. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  4421. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4422. public partial class ProductTypeTableAdapter : global::System.ComponentModel.Component {
  4423. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  4424. private global::System.Data.SqlClient.SqlConnection _connection;
  4425. private global::System.Data.SqlClient.SqlTransaction _transaction;
  4426. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  4427. private bool _clearBeforeFill;
  4428. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4429. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4430. public ProductTypeTableAdapter() {
  4431. this.ClearBeforeFill = true;
  4432. }
  4433. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4434. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4435. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  4436. get {
  4437. if ((this._adapter == null)) {
  4438. this.InitAdapter();
  4439. }
  4440. return this._adapter;
  4441. }
  4442. }
  4443. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4444. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4445. internal global::System.Data.SqlClient.SqlConnection Connection {
  4446. get {
  4447. if ((this._connection == null)) {
  4448. this.InitConnection();
  4449. }
  4450. return this._connection;
  4451. }
  4452. set {
  4453. this._connection = value;
  4454. if ((this.Adapter.InsertCommand != null)) {
  4455. this.Adapter.InsertCommand.Connection = value;
  4456. }
  4457. if ((this.Adapter.DeleteCommand != null)) {
  4458. this.Adapter.DeleteCommand.Connection = value;
  4459. }
  4460. if ((this.Adapter.UpdateCommand != null)) {
  4461. this.Adapter.UpdateCommand.Connection = value;
  4462. }
  4463. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  4464. if ((this.CommandCollection[i] != null)) {
  4465. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  4466. }
  4467. }
  4468. }
  4469. }
  4470. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4471. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4472. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  4473. get {
  4474. return this._transaction;
  4475. }
  4476. set {
  4477. this._transaction = value;
  4478. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  4479. this.CommandCollection[i].Transaction = this._transaction;
  4480. }
  4481. if (((this.Adapter != null)
  4482. && (this.Adapter.DeleteCommand != null))) {
  4483. this.Adapter.DeleteCommand.Transaction = this._transaction;
  4484. }
  4485. if (((this.Adapter != null)
  4486. && (this.Adapter.InsertCommand != null))) {
  4487. this.Adapter.InsertCommand.Transaction = this._transaction;
  4488. }
  4489. if (((this.Adapter != null)
  4490. && (this.Adapter.UpdateCommand != null))) {
  4491. this.Adapter.UpdateCommand.Transaction = this._transaction;
  4492. }
  4493. }
  4494. }
  4495. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4496. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4497. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  4498. get {
  4499. if ((this._commandCollection == null)) {
  4500. this.InitCommandCollection();
  4501. }
  4502. return this._commandCollection;
  4503. }
  4504. }
  4505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4506. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4507. public bool ClearBeforeFill {
  4508. get {
  4509. return this._clearBeforeFill;
  4510. }
  4511. set {
  4512. this._clearBeforeFill = value;
  4513. }
  4514. }
  4515. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4516. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4517. private void InitAdapter() {
  4518. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  4519. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  4520. tableMapping.SourceTable = "Table";
  4521. tableMapping.DataSetTable = "ProductType";
  4522. tableMapping.ColumnMappings.Add("ID", "ID");
  4523. tableMapping.ColumnMappings.Add("Title", "Title");
  4524. tableMapping.ColumnMappings.Add("DefectedPercent", "DefectedPercent");
  4525. this._adapter.TableMappings.Add(tableMapping);
  4526. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  4527. this._adapter.DeleteCommand.Connection = this.Connection;
  4528. this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[ProductType] WHERE (([ID] = @Original_ID) AND ([Title] = @Orig" +
  4529. "inal_Title) AND ([DefectedPercent] = @Original_DefectedPercent))";
  4530. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  4531. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4532. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4533. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4534. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  4535. this._adapter.InsertCommand.Connection = this.Connection;
  4536. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[ProductType] ([Title], [DefectedPercent]) VALUES (@Title, @Def" +
  4537. "ectedPercent);\r\nSELECT ID, Title, DefectedPercent FROM ProductType WHERE (ID = S" +
  4538. "COPE_IDENTITY())";
  4539. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  4540. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4541. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4542. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  4543. this._adapter.UpdateCommand.Connection = this.Connection;
  4544. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[ProductType] SET [Title] = @Title, [DefectedPercent] = @DefectedPercent WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([DefectedPercent] = @Original_DefectedPercent));
  4545. SELECT ID, Title, DefectedPercent FROM ProductType WHERE (ID = @ID)";
  4546. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  4547. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4548. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4549. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4550. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4551. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DefectedPercent", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DefectedPercent", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  4552. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  4553. }
  4554. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4555. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4556. private void InitConnection() {
  4557. this._connection = new global::System.Data.SqlClient.SqlConnection();
  4558. this._connection.ConnectionString = global::Prakt2.Properties.Settings.Default.agentRUDConnectionString;
  4559. }
  4560. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4561. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4562. private void InitCommandCollection() {
  4563. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  4564. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  4565. this._commandCollection[0].Connection = this.Connection;
  4566. this._commandCollection[0].CommandText = "SELECT ID, Title, DefectedPercent FROM dbo.ProductType";
  4567. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  4568. }
  4569. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4570. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4571. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4572. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  4573. public virtual int Fill(agentRUDDataSet.ProductTypeDataTable dataTable) {
  4574. this.Adapter.SelectCommand = this.CommandCollection[0];
  4575. if ((this.ClearBeforeFill == true)) {
  4576. dataTable.Clear();
  4577. }
  4578. int returnValue = this.Adapter.Fill(dataTable);
  4579. return returnValue;
  4580. }
  4581. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4582. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4583. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4584. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  4585. public virtual agentRUDDataSet.ProductTypeDataTable GetData() {
  4586. this.Adapter.SelectCommand = this.CommandCollection[0];
  4587. agentRUDDataSet.ProductTypeDataTable dataTable = new agentRUDDataSet.ProductTypeDataTable();
  4588. this.Adapter.Fill(dataTable);
  4589. return dataTable;
  4590. }
  4591. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4592. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4593. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4594. public virtual int Update(agentRUDDataSet.ProductTypeDataTable dataTable) {
  4595. return this.Adapter.Update(dataTable);
  4596. }
  4597. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4598. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4599. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4600. public virtual int Update(agentRUDDataSet dataSet) {
  4601. return this.Adapter.Update(dataSet, "ProductType");
  4602. }
  4603. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4604. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4605. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4606. public virtual int Update(global::System.Data.DataRow dataRow) {
  4607. return this.Adapter.Update(new global::System.Data.DataRow[] {
  4608. dataRow});
  4609. }
  4610. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4611. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4612. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4613. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  4614. return this.Adapter.Update(dataRows);
  4615. }
  4616. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4617. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4618. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4619. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  4620. public virtual int Delete(int Original_ID, string Original_Title, double Original_DefectedPercent) {
  4621. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  4622. if ((Original_Title == null)) {
  4623. throw new global::System.ArgumentNullException("Original_Title");
  4624. }
  4625. else {
  4626. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Title));
  4627. }
  4628. this.Adapter.DeleteCommand.Parameters[2].Value = ((double)(Original_DefectedPercent));
  4629. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  4630. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4631. != global::System.Data.ConnectionState.Open)) {
  4632. this.Adapter.DeleteCommand.Connection.Open();
  4633. }
  4634. try {
  4635. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  4636. return returnValue;
  4637. }
  4638. finally {
  4639. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4640. this.Adapter.DeleteCommand.Connection.Close();
  4641. }
  4642. }
  4643. }
  4644. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4645. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4646. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4647. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  4648. public virtual int Insert(string Title, double DefectedPercent) {
  4649. if ((Title == null)) {
  4650. throw new global::System.ArgumentNullException("Title");
  4651. }
  4652. else {
  4653. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title));
  4654. }
  4655. this.Adapter.InsertCommand.Parameters[1].Value = ((double)(DefectedPercent));
  4656. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  4657. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4658. != global::System.Data.ConnectionState.Open)) {
  4659. this.Adapter.InsertCommand.Connection.Open();
  4660. }
  4661. try {
  4662. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  4663. return returnValue;
  4664. }
  4665. finally {
  4666. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4667. this.Adapter.InsertCommand.Connection.Close();
  4668. }
  4669. }
  4670. }
  4671. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4672. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4673. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4674. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4675. public virtual int Update(string Title, double DefectedPercent, int Original_ID, string Original_Title, double Original_DefectedPercent, int ID) {
  4676. if ((Title == null)) {
  4677. throw new global::System.ArgumentNullException("Title");
  4678. }
  4679. else {
  4680. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title));
  4681. }
  4682. this.Adapter.UpdateCommand.Parameters[1].Value = ((double)(DefectedPercent));
  4683. this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_ID));
  4684. if ((Original_Title == null)) {
  4685. throw new global::System.ArgumentNullException("Original_Title");
  4686. }
  4687. else {
  4688. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Title));
  4689. }
  4690. this.Adapter.UpdateCommand.Parameters[4].Value = ((double)(Original_DefectedPercent));
  4691. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(ID));
  4692. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  4693. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  4694. != global::System.Data.ConnectionState.Open)) {
  4695. this.Adapter.UpdateCommand.Connection.Open();
  4696. }
  4697. try {
  4698. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  4699. return returnValue;
  4700. }
  4701. finally {
  4702. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  4703. this.Adapter.UpdateCommand.Connection.Close();
  4704. }
  4705. }
  4706. }
  4707. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4708. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4709. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4710. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  4711. public virtual int Update(string Title, double DefectedPercent, int Original_ID, string Original_Title, double Original_DefectedPercent) {
  4712. return this.Update(Title, DefectedPercent, Original_ID, Original_Title, Original_DefectedPercent, Original_ID);
  4713. }
  4714. }
  4715. /// <summary>
  4716. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  4717. ///</summary>
  4718. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  4719. [global::System.ComponentModel.ToolboxItem(true)]
  4720. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  4721. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  4722. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  4723. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  4724. private UpdateOrderOption _updateOrder;
  4725. private AgentTableAdapter _agentTableAdapter;
  4726. private AgentTypeTableAdapter _agentTypeTableAdapter;
  4727. private ProductTableAdapter _productTableAdapter;
  4728. private ProductSaleTableAdapter _productSaleTableAdapter;
  4729. private ProductTypeTableAdapter _productTypeTableAdapter;
  4730. private bool _backupDataSetBeforeUpdate;
  4731. private global::System.Data.IDbConnection _connection;
  4732. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4733. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4734. public UpdateOrderOption UpdateOrder {
  4735. get {
  4736. return this._updateOrder;
  4737. }
  4738. set {
  4739. this._updateOrder = value;
  4740. }
  4741. }
  4742. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4743. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4744. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  4745. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  4746. "a", "System.Drawing.Design.UITypeEditor")]
  4747. public AgentTableAdapter AgentTableAdapter {
  4748. get {
  4749. return this._agentTableAdapter;
  4750. }
  4751. set {
  4752. this._agentTableAdapter = value;
  4753. }
  4754. }
  4755. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4756. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4757. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  4758. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  4759. "a", "System.Drawing.Design.UITypeEditor")]
  4760. public AgentTypeTableAdapter AgentTypeTableAdapter {
  4761. get {
  4762. return this._agentTypeTableAdapter;
  4763. }
  4764. set {
  4765. this._agentTypeTableAdapter = value;
  4766. }
  4767. }
  4768. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4769. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4770. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  4771. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  4772. "a", "System.Drawing.Design.UITypeEditor")]
  4773. public ProductTableAdapter ProductTableAdapter {
  4774. get {
  4775. return this._productTableAdapter;
  4776. }
  4777. set {
  4778. this._productTableAdapter = value;
  4779. }
  4780. }
  4781. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4782. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4783. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  4784. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  4785. "a", "System.Drawing.Design.UITypeEditor")]
  4786. public ProductSaleTableAdapter ProductSaleTableAdapter {
  4787. get {
  4788. return this._productSaleTableAdapter;
  4789. }
  4790. set {
  4791. this._productSaleTableAdapter = value;
  4792. }
  4793. }
  4794. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4795. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4796. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  4797. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  4798. "a", "System.Drawing.Design.UITypeEditor")]
  4799. public ProductTypeTableAdapter ProductTypeTableAdapter {
  4800. get {
  4801. return this._productTypeTableAdapter;
  4802. }
  4803. set {
  4804. this._productTypeTableAdapter = value;
  4805. }
  4806. }
  4807. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4808. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4809. public bool BackupDataSetBeforeUpdate {
  4810. get {
  4811. return this._backupDataSetBeforeUpdate;
  4812. }
  4813. set {
  4814. this._backupDataSetBeforeUpdate = value;
  4815. }
  4816. }
  4817. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4818. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4819. [global::System.ComponentModel.Browsable(false)]
  4820. public global::System.Data.IDbConnection Connection {
  4821. get {
  4822. if ((this._connection != null)) {
  4823. return this._connection;
  4824. }
  4825. if (((this._agentTableAdapter != null)
  4826. && (this._agentTableAdapter.Connection != null))) {
  4827. return this._agentTableAdapter.Connection;
  4828. }
  4829. if (((this._agentTypeTableAdapter != null)
  4830. && (this._agentTypeTableAdapter.Connection != null))) {
  4831. return this._agentTypeTableAdapter.Connection;
  4832. }
  4833. if (((this._productTableAdapter != null)
  4834. && (this._productTableAdapter.Connection != null))) {
  4835. return this._productTableAdapter.Connection;
  4836. }
  4837. if (((this._productSaleTableAdapter != null)
  4838. && (this._productSaleTableAdapter.Connection != null))) {
  4839. return this._productSaleTableAdapter.Connection;
  4840. }
  4841. if (((this._productTypeTableAdapter != null)
  4842. && (this._productTypeTableAdapter.Connection != null))) {
  4843. return this._productTypeTableAdapter.Connection;
  4844. }
  4845. return null;
  4846. }
  4847. set {
  4848. this._connection = value;
  4849. }
  4850. }
  4851. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4852. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4853. [global::System.ComponentModel.Browsable(false)]
  4854. public int TableAdapterInstanceCount {
  4855. get {
  4856. int count = 0;
  4857. if ((this._agentTableAdapter != null)) {
  4858. count = (count + 1);
  4859. }
  4860. if ((this._agentTypeTableAdapter != null)) {
  4861. count = (count + 1);
  4862. }
  4863. if ((this._productTableAdapter != null)) {
  4864. count = (count + 1);
  4865. }
  4866. if ((this._productSaleTableAdapter != null)) {
  4867. count = (count + 1);
  4868. }
  4869. if ((this._productTypeTableAdapter != null)) {
  4870. count = (count + 1);
  4871. }
  4872. return count;
  4873. }
  4874. }
  4875. /// <summary>
  4876. ///Update rows in top-down order.
  4877. ///</summary>
  4878. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4879. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4880. private int UpdateUpdatedRows(agentRUDDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  4881. int result = 0;
  4882. if ((this._agentTypeTableAdapter != null)) {
  4883. global::System.Data.DataRow[] updatedRows = dataSet.AgentType.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  4884. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  4885. if (((updatedRows != null)
  4886. && (0 < updatedRows.Length))) {
  4887. result = (result + this._agentTypeTableAdapter.Update(updatedRows));
  4888. allChangedRows.AddRange(updatedRows);
  4889. }
  4890. }
  4891. if ((this._productTypeTableAdapter != null)) {
  4892. global::System.Data.DataRow[] updatedRows = dataSet.ProductType.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  4893. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  4894. if (((updatedRows != null)
  4895. && (0 < updatedRows.Length))) {
  4896. result = (result + this._productTypeTableAdapter.Update(updatedRows));
  4897. allChangedRows.AddRange(updatedRows);
  4898. }
  4899. }
  4900. if ((this._agentTableAdapter != null)) {
  4901. global::System.Data.DataRow[] updatedRows = dataSet.Agent.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  4902. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  4903. if (((updatedRows != null)
  4904. && (0 < updatedRows.Length))) {
  4905. result = (result + this._agentTableAdapter.Update(updatedRows));
  4906. allChangedRows.AddRange(updatedRows);
  4907. }
  4908. }
  4909. if ((this._productTableAdapter != null)) {
  4910. global::System.Data.DataRow[] updatedRows = dataSet.Product.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  4911. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  4912. if (((updatedRows != null)
  4913. && (0 < updatedRows.Length))) {
  4914. result = (result + this._productTableAdapter.Update(updatedRows));
  4915. allChangedRows.AddRange(updatedRows);
  4916. }
  4917. }
  4918. if ((this._productSaleTableAdapter != null)) {
  4919. global::System.Data.DataRow[] updatedRows = dataSet.ProductSale.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  4920. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  4921. if (((updatedRows != null)
  4922. && (0 < updatedRows.Length))) {
  4923. result = (result + this._productSaleTableAdapter.Update(updatedRows));
  4924. allChangedRows.AddRange(updatedRows);
  4925. }
  4926. }
  4927. return result;
  4928. }
  4929. /// <summary>
  4930. ///Insert rows in top-down order.
  4931. ///</summary>
  4932. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4933. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4934. private int UpdateInsertedRows(agentRUDDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  4935. int result = 0;
  4936. if ((this._agentTypeTableAdapter != null)) {
  4937. global::System.Data.DataRow[] addedRows = dataSet.AgentType.Select(null, null, global::System.Data.DataViewRowState.Added);
  4938. if (((addedRows != null)
  4939. && (0 < addedRows.Length))) {
  4940. result = (result + this._agentTypeTableAdapter.Update(addedRows));
  4941. allAddedRows.AddRange(addedRows);
  4942. }
  4943. }
  4944. if ((this._productTypeTableAdapter != null)) {
  4945. global::System.Data.DataRow[] addedRows = dataSet.ProductType.Select(null, null, global::System.Data.DataViewRowState.Added);
  4946. if (((addedRows != null)
  4947. && (0 < addedRows.Length))) {
  4948. result = (result + this._productTypeTableAdapter.Update(addedRows));
  4949. allAddedRows.AddRange(addedRows);
  4950. }
  4951. }
  4952. if ((this._agentTableAdapter != null)) {
  4953. global::System.Data.DataRow[] addedRows = dataSet.Agent.Select(null, null, global::System.Data.DataViewRowState.Added);
  4954. if (((addedRows != null)
  4955. && (0 < addedRows.Length))) {
  4956. result = (result + this._agentTableAdapter.Update(addedRows));
  4957. allAddedRows.AddRange(addedRows);
  4958. }
  4959. }
  4960. if ((this._productTableAdapter != null)) {
  4961. global::System.Data.DataRow[] addedRows = dataSet.Product.Select(null, null, global::System.Data.DataViewRowState.Added);
  4962. if (((addedRows != null)
  4963. && (0 < addedRows.Length))) {
  4964. result = (result + this._productTableAdapter.Update(addedRows));
  4965. allAddedRows.AddRange(addedRows);
  4966. }
  4967. }
  4968. if ((this._productSaleTableAdapter != null)) {
  4969. global::System.Data.DataRow[] addedRows = dataSet.ProductSale.Select(null, null, global::System.Data.DataViewRowState.Added);
  4970. if (((addedRows != null)
  4971. && (0 < addedRows.Length))) {
  4972. result = (result + this._productSaleTableAdapter.Update(addedRows));
  4973. allAddedRows.AddRange(addedRows);
  4974. }
  4975. }
  4976. return result;
  4977. }
  4978. /// <summary>
  4979. ///Delete rows in bottom-up order.
  4980. ///</summary>
  4981. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  4982. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  4983. private int UpdateDeletedRows(agentRUDDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  4984. int result = 0;
  4985. if ((this._productSaleTableAdapter != null)) {
  4986. global::System.Data.DataRow[] deletedRows = dataSet.ProductSale.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  4987. if (((deletedRows != null)
  4988. && (0 < deletedRows.Length))) {
  4989. result = (result + this._productSaleTableAdapter.Update(deletedRows));
  4990. allChangedRows.AddRange(deletedRows);
  4991. }
  4992. }
  4993. if ((this._productTableAdapter != null)) {
  4994. global::System.Data.DataRow[] deletedRows = dataSet.Product.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  4995. if (((deletedRows != null)
  4996. && (0 < deletedRows.Length))) {
  4997. result = (result + this._productTableAdapter.Update(deletedRows));
  4998. allChangedRows.AddRange(deletedRows);
  4999. }
  5000. }
  5001. if ((this._agentTableAdapter != null)) {
  5002. global::System.Data.DataRow[] deletedRows = dataSet.Agent.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  5003. if (((deletedRows != null)
  5004. && (0 < deletedRows.Length))) {
  5005. result = (result + this._agentTableAdapter.Update(deletedRows));
  5006. allChangedRows.AddRange(deletedRows);
  5007. }
  5008. }
  5009. if ((this._productTypeTableAdapter != null)) {
  5010. global::System.Data.DataRow[] deletedRows = dataSet.ProductType.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  5011. if (((deletedRows != null)
  5012. && (0 < deletedRows.Length))) {
  5013. result = (result + this._productTypeTableAdapter.Update(deletedRows));
  5014. allChangedRows.AddRange(deletedRows);
  5015. }
  5016. }
  5017. if ((this._agentTypeTableAdapter != null)) {
  5018. global::System.Data.DataRow[] deletedRows = dataSet.AgentType.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  5019. if (((deletedRows != null)
  5020. && (0 < deletedRows.Length))) {
  5021. result = (result + this._agentTypeTableAdapter.Update(deletedRows));
  5022. allChangedRows.AddRange(deletedRows);
  5023. }
  5024. }
  5025. return result;
  5026. }
  5027. /// <summary>
  5028. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  5029. ///</summary>
  5030. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5031. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  5032. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  5033. if (((updatedRows == null)
  5034. || (updatedRows.Length < 1))) {
  5035. return updatedRows;
  5036. }
  5037. if (((allAddedRows == null)
  5038. || (allAddedRows.Count < 1))) {
  5039. return updatedRows;
  5040. }
  5041. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  5042. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  5043. global::System.Data.DataRow row = updatedRows[i];
  5044. if ((allAddedRows.Contains(row) == false)) {
  5045. realUpdatedRows.Add(row);
  5046. }
  5047. }
  5048. return realUpdatedRows.ToArray();
  5049. }
  5050. /// <summary>
  5051. ///Update all changes to the dataset.
  5052. ///</summary>
  5053. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5054. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  5055. public virtual int UpdateAll(agentRUDDataSet dataSet) {
  5056. if ((dataSet == null)) {
  5057. throw new global::System.ArgumentNullException("dataSet");
  5058. }
  5059. if ((dataSet.HasChanges() == false)) {
  5060. return 0;
  5061. }
  5062. if (((this._agentTableAdapter != null)
  5063. && (this.MatchTableAdapterConnection(this._agentTableAdapter.Connection) == false))) {
  5064. throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
  5065. "tring.");
  5066. }
  5067. if (((this._agentTypeTableAdapter != null)
  5068. && (this.MatchTableAdapterConnection(this._agentTypeTableAdapter.Connection) == false))) {
  5069. throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
  5070. "tring.");
  5071. }
  5072. if (((this._productTableAdapter != null)
  5073. && (this.MatchTableAdapterConnection(this._productTableAdapter.Connection) == false))) {
  5074. throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
  5075. "tring.");
  5076. }
  5077. if (((this._productSaleTableAdapter != null)
  5078. && (this.MatchTableAdapterConnection(this._productSaleTableAdapter.Connection) == false))) {
  5079. throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
  5080. "tring.");
  5081. }
  5082. if (((this._productTypeTableAdapter != null)
  5083. && (this.MatchTableAdapterConnection(this._productTypeTableAdapter.Connection) == false))) {
  5084. throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
  5085. "tring.");
  5086. }
  5087. global::System.Data.IDbConnection workConnection = this.Connection;
  5088. if ((workConnection == null)) {
  5089. throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
  5090. "ger TableAdapter property to a valid TableAdapter instance.");
  5091. }
  5092. bool workConnOpened = false;
  5093. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  5094. == global::System.Data.ConnectionState.Broken)) {
  5095. workConnection.Close();
  5096. }
  5097. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  5098. workConnection.Open();
  5099. workConnOpened = true;
  5100. }
  5101. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  5102. if ((workTransaction == null)) {
  5103. throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
  5104. "ctions or the current state is not allowing the transaction to begin.");
  5105. }
  5106. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  5107. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  5108. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  5109. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  5110. int result = 0;
  5111. global::System.Data.DataSet backupDataSet = null;
  5112. if (this.BackupDataSetBeforeUpdate) {
  5113. backupDataSet = new global::System.Data.DataSet();
  5114. backupDataSet.Merge(dataSet);
  5115. }
  5116. try {
  5117. // ---- Prepare for update -----------
  5118. //
  5119. if ((this._agentTableAdapter != null)) {
  5120. revertConnections.Add(this._agentTableAdapter, this._agentTableAdapter.Connection);
  5121. this._agentTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5122. this._agentTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5123. if (this._agentTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5124. this._agentTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5125. adaptersWithAcceptChangesDuringUpdate.Add(this._agentTableAdapter.Adapter);
  5126. }
  5127. }
  5128. if ((this._agentTypeTableAdapter != null)) {
  5129. revertConnections.Add(this._agentTypeTableAdapter, this._agentTypeTableAdapter.Connection);
  5130. this._agentTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5131. this._agentTypeTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5132. if (this._agentTypeTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5133. this._agentTypeTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5134. adaptersWithAcceptChangesDuringUpdate.Add(this._agentTypeTableAdapter.Adapter);
  5135. }
  5136. }
  5137. if ((this._productTableAdapter != null)) {
  5138. revertConnections.Add(this._productTableAdapter, this._productTableAdapter.Connection);
  5139. this._productTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5140. this._productTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5141. if (this._productTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5142. this._productTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5143. adaptersWithAcceptChangesDuringUpdate.Add(this._productTableAdapter.Adapter);
  5144. }
  5145. }
  5146. if ((this._productSaleTableAdapter != null)) {
  5147. revertConnections.Add(this._productSaleTableAdapter, this._productSaleTableAdapter.Connection);
  5148. this._productSaleTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5149. this._productSaleTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5150. if (this._productSaleTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5151. this._productSaleTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5152. adaptersWithAcceptChangesDuringUpdate.Add(this._productSaleTableAdapter.Adapter);
  5153. }
  5154. }
  5155. if ((this._productTypeTableAdapter != null)) {
  5156. revertConnections.Add(this._productTypeTableAdapter, this._productTypeTableAdapter.Connection);
  5157. this._productTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  5158. this._productTypeTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  5159. if (this._productTypeTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  5160. this._productTypeTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  5161. adaptersWithAcceptChangesDuringUpdate.Add(this._productTypeTableAdapter.Adapter);
  5162. }
  5163. }
  5164. //
  5165. //---- Perform updates -----------
  5166. //
  5167. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  5168. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  5169. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  5170. }
  5171. else {
  5172. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  5173. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  5174. }
  5175. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  5176. //
  5177. //---- Commit updates -----------
  5178. //
  5179. workTransaction.Commit();
  5180. if ((0 < allAddedRows.Count)) {
  5181. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  5182. allAddedRows.CopyTo(rows);
  5183. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  5184. global::System.Data.DataRow row = rows[i];
  5185. row.AcceptChanges();
  5186. }
  5187. }
  5188. if ((0 < allChangedRows.Count)) {
  5189. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  5190. allChangedRows.CopyTo(rows);
  5191. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  5192. global::System.Data.DataRow row = rows[i];
  5193. row.AcceptChanges();
  5194. }
  5195. }
  5196. }
  5197. catch (global::System.Exception ex) {
  5198. workTransaction.Rollback();
  5199. // ---- Restore the dataset -----------
  5200. if (this.BackupDataSetBeforeUpdate) {
  5201. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  5202. dataSet.Clear();
  5203. dataSet.Merge(backupDataSet);
  5204. }
  5205. else {
  5206. if ((0 < allAddedRows.Count)) {
  5207. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  5208. allAddedRows.CopyTo(rows);
  5209. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  5210. global::System.Data.DataRow row = rows[i];
  5211. row.AcceptChanges();
  5212. row.SetAdded();
  5213. }
  5214. }
  5215. }
  5216. throw ex;
  5217. }
  5218. finally {
  5219. if (workConnOpened) {
  5220. workConnection.Close();
  5221. }
  5222. if ((this._agentTableAdapter != null)) {
  5223. this._agentTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._agentTableAdapter]));
  5224. this._agentTableAdapter.Transaction = null;
  5225. }
  5226. if ((this._agentTypeTableAdapter != null)) {
  5227. this._agentTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._agentTypeTableAdapter]));
  5228. this._agentTypeTableAdapter.Transaction = null;
  5229. }
  5230. if ((this._productTableAdapter != null)) {
  5231. this._productTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productTableAdapter]));
  5232. this._productTableAdapter.Transaction = null;
  5233. }
  5234. if ((this._productSaleTableAdapter != null)) {
  5235. this._productSaleTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productSaleTableAdapter]));
  5236. this._productSaleTableAdapter.Transaction = null;
  5237. }
  5238. if ((this._productTypeTableAdapter != null)) {
  5239. this._productTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productTypeTableAdapter]));
  5240. this._productTypeTableAdapter.Transaction = null;
  5241. }
  5242. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  5243. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  5244. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  5245. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  5246. global::System.Data.Common.DataAdapter adapter = adapters[i];
  5247. adapter.AcceptChangesDuringUpdate = true;
  5248. }
  5249. }
  5250. }
  5251. return result;
  5252. }
  5253. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5254. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  5255. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  5256. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  5257. }
  5258. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5259. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  5260. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  5261. if ((this._connection != null)) {
  5262. return true;
  5263. }
  5264. if (((this.Connection == null)
  5265. || (inputConnection == null))) {
  5266. return true;
  5267. }
  5268. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  5269. return true;
  5270. }
  5271. return false;
  5272. }
  5273. /// <summary>
  5274. ///Update Order Option
  5275. ///</summary>
  5276. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  5277. public enum UpdateOrderOption {
  5278. InsertUpdateDelete = 0,
  5279. UpdateInsertDelete = 1,
  5280. }
  5281. /// <summary>
  5282. ///Used to sort self-referenced table's rows
  5283. ///</summary>
  5284. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  5285. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  5286. private global::System.Data.DataRelation _relation;
  5287. private int _childFirst;
  5288. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5289. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  5290. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  5291. this._relation = relation;
  5292. if (childFirst) {
  5293. this._childFirst = -1;
  5294. }
  5295. else {
  5296. this._childFirst = 1;
  5297. }
  5298. }
  5299. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5300. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  5301. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  5302. global::System.Diagnostics.Debug.Assert((row != null));
  5303. global::System.Data.DataRow root = row;
  5304. distance = 0;
  5305. 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>();
  5306. traversedRows[row] = row;
  5307. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  5308. for (
  5309. ; ((parent != null)
  5310. && (traversedRows.ContainsKey(parent) == false));
  5311. ) {
  5312. distance = (distance + 1);
  5313. root = parent;
  5314. traversedRows[parent] = parent;
  5315. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  5316. }
  5317. if ((distance == 0)) {
  5318. traversedRows.Clear();
  5319. traversedRows[row] = row;
  5320. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  5321. for (
  5322. ; ((parent != null)
  5323. && (traversedRows.ContainsKey(parent) == false));
  5324. ) {
  5325. distance = (distance + 1);
  5326. root = parent;
  5327. traversedRows[parent] = parent;
  5328. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  5329. }
  5330. }
  5331. return root;
  5332. }
  5333. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  5334. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  5335. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  5336. if (object.ReferenceEquals(row1, row2)) {
  5337. return 0;
  5338. }
  5339. if ((row1 == null)) {
  5340. return -1;
  5341. }
  5342. if ((row2 == null)) {
  5343. return 1;
  5344. }
  5345. int distance1 = 0;
  5346. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  5347. int distance2 = 0;
  5348. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  5349. if (object.ReferenceEquals(root1, root2)) {
  5350. return (this._childFirst * distance1.CompareTo(distance2));
  5351. }
  5352. else {
  5353. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  5354. && (root2.Table != null)));
  5355. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  5356. return -1;
  5357. }
  5358. else {
  5359. return 1;
  5360. }
  5361. }
  5362. }
  5363. }
  5364. }
  5365. }
  5366. #pragma warning restore 1591