謎鹿DataSet.Designer.vb 489 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605
  1. '------------------------------------------------------------------------------
  2. ' <auto-generated>
  3. ' 這段程式碼是由工具產生的。
  4. ' 執行階段版本:4.0.30319.42000
  5. '
  6. ' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼,
  7. ' 變更將會遺失。
  8. ' </auto-generated>
  9. '------------------------------------------------------------------------------
  10. Option Strict Off
  11. Option Explicit On
  12. '''<summary>
  13. '''Represents a strongly typed in-memory cache of data.
  14. '''</summary>
  15. <Global.System.Serializable(), _
  16. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  17. Global.System.ComponentModel.ToolboxItem(true), _
  18. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
  19. Global.System.Xml.Serialization.XmlRootAttribute("謎鹿DataSet"), _
  20. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
  21. Partial Public Class 謎鹿DataSet
  22. Inherits Global.System.Data.DataSet
  23. Private table商品 As 商品DataTable
  24. Private table會員 As 會員DataTable
  25. Private table訂單 As 訂單DataTable
  26. Private table購物車 As 購物車DataTable
  27. Private table紀錄 As 紀錄DataTable
  28. Private table訂購 As 訂購DataTable
  29. Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
  30. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  31. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  32. Public Sub New()
  33. MyBase.New
  34. Me.BeginInit
  35. Me.InitClass
  36. Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
  37. AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
  38. AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
  39. Me.EndInit
  40. End Sub
  41. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  42. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  43. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  44. MyBase.New(info, context, false)
  45. If (Me.IsBinarySerialized(info, context) = true) Then
  46. Me.InitVars(false)
  47. Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
  48. AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
  49. AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
  50. Return
  51. End If
  52. Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
  53. If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
  54. Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
  55. ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
  56. If (Not (ds.Tables("商品")) Is Nothing) Then
  57. MyBase.Tables.Add(New 商品DataTable(ds.Tables("商品")))
  58. End If
  59. If (Not (ds.Tables("會員")) Is Nothing) Then
  60. MyBase.Tables.Add(New 會員DataTable(ds.Tables("會員")))
  61. End If
  62. If (Not (ds.Tables("訂單")) Is Nothing) Then
  63. MyBase.Tables.Add(New 訂單DataTable(ds.Tables("訂單")))
  64. End If
  65. If (Not (ds.Tables("購物車")) Is Nothing) Then
  66. MyBase.Tables.Add(New 購物車DataTable(ds.Tables("購物車")))
  67. End If
  68. If (Not (ds.Tables("紀錄")) Is Nothing) Then
  69. MyBase.Tables.Add(New 紀錄DataTable(ds.Tables("紀錄")))
  70. End If
  71. If (Not (ds.Tables("訂購")) Is Nothing) Then
  72. MyBase.Tables.Add(New 訂購DataTable(ds.Tables("訂購")))
  73. End If
  74. Me.DataSetName = ds.DataSetName
  75. Me.Prefix = ds.Prefix
  76. Me.Namespace = ds.Namespace
  77. Me.Locale = ds.Locale
  78. Me.CaseSensitive = ds.CaseSensitive
  79. Me.EnforceConstraints = ds.EnforceConstraints
  80. Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
  81. Me.InitVars
  82. Else
  83. Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
  84. End If
  85. Me.GetSerializationData(info, context)
  86. Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
  87. AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
  88. AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
  89. End Sub
  90. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  91. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  92. Global.System.ComponentModel.Browsable(false), _
  93. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  94. Public ReadOnly Property 商品() As 商品DataTable
  95. Get
  96. Return Me.table商品
  97. End Get
  98. End Property
  99. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  100. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  101. Global.System.ComponentModel.Browsable(false), _
  102. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  103. Public ReadOnly Property 會員() As 會員DataTable
  104. Get
  105. Return Me.table會員
  106. End Get
  107. End Property
  108. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  109. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  110. Global.System.ComponentModel.Browsable(false), _
  111. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  112. Public ReadOnly Property 訂單() As 訂單DataTable
  113. Get
  114. Return Me.table訂單
  115. End Get
  116. End Property
  117. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  118. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  119. Global.System.ComponentModel.Browsable(false), _
  120. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  121. Public ReadOnly Property 購物車() As 購物車DataTable
  122. Get
  123. Return Me.table購物車
  124. End Get
  125. End Property
  126. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  127. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  128. Global.System.ComponentModel.Browsable(false), _
  129. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  130. Public ReadOnly Property 紀錄() As 紀錄DataTable
  131. Get
  132. Return Me.table紀錄
  133. End Get
  134. End Property
  135. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  136. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  137. Global.System.ComponentModel.Browsable(false), _
  138. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  139. Public ReadOnly Property 訂購() As 訂購DataTable
  140. Get
  141. Return Me.table訂購
  142. End Get
  143. End Property
  144. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  145. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  146. Global.System.ComponentModel.BrowsableAttribute(true), _
  147. Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _
  148. Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
  149. Get
  150. Return Me._schemaSerializationMode
  151. End Get
  152. Set
  153. Me._schemaSerializationMode = value
  154. End Set
  155. End Property
  156. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  157. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  158. Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
  159. Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
  160. Get
  161. Return MyBase.Tables
  162. End Get
  163. End Property
  164. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  165. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  166. Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
  167. Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
  168. Get
  169. Return MyBase.Relations
  170. End Get
  171. End Property
  172. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  173. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  174. Protected Overrides Sub InitializeDerivedDataSet()
  175. Me.BeginInit
  176. Me.InitClass
  177. Me.EndInit
  178. End Sub
  179. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  180. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  181. Public Overrides Function Clone() As Global.System.Data.DataSet
  182. Dim cln As 謎鹿DataSet = CType(MyBase.Clone,謎鹿DataSet)
  183. cln.InitVars
  184. cln.SchemaSerializationMode = Me.SchemaSerializationMode
  185. Return cln
  186. End Function
  187. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  188. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  189. Protected Overrides Function ShouldSerializeTables() As Boolean
  190. Return false
  191. End Function
  192. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  193. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  194. Protected Overrides Function ShouldSerializeRelations() As Boolean
  195. Return false
  196. End Function
  197. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  198. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  199. Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
  200. If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
  201. Me.Reset
  202. Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
  203. ds.ReadXml(reader)
  204. If (Not (ds.Tables("商品")) Is Nothing) Then
  205. MyBase.Tables.Add(New 商品DataTable(ds.Tables("商品")))
  206. End If
  207. If (Not (ds.Tables("會員")) Is Nothing) Then
  208. MyBase.Tables.Add(New 會員DataTable(ds.Tables("會員")))
  209. End If
  210. If (Not (ds.Tables("訂單")) Is Nothing) Then
  211. MyBase.Tables.Add(New 訂單DataTable(ds.Tables("訂單")))
  212. End If
  213. If (Not (ds.Tables("購物車")) Is Nothing) Then
  214. MyBase.Tables.Add(New 購物車DataTable(ds.Tables("購物車")))
  215. End If
  216. If (Not (ds.Tables("紀錄")) Is Nothing) Then
  217. MyBase.Tables.Add(New 紀錄DataTable(ds.Tables("紀錄")))
  218. End If
  219. If (Not (ds.Tables("訂購")) Is Nothing) Then
  220. MyBase.Tables.Add(New 訂購DataTable(ds.Tables("訂購")))
  221. End If
  222. Me.DataSetName = ds.DataSetName
  223. Me.Prefix = ds.Prefix
  224. Me.Namespace = ds.Namespace
  225. Me.Locale = ds.Locale
  226. Me.CaseSensitive = ds.CaseSensitive
  227. Me.EnforceConstraints = ds.EnforceConstraints
  228. Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
  229. Me.InitVars
  230. Else
  231. Me.ReadXml(reader)
  232. Me.InitVars
  233. End If
  234. End Sub
  235. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  236. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  237. Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
  238. Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  239. Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
  240. stream.Position = 0
  241. Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
  242. End Function
  243. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  244. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  245. Friend Overloads Sub InitVars()
  246. Me.InitVars(true)
  247. End Sub
  248. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  249. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  250. Friend Overloads Sub InitVars(ByVal initTable As Boolean)
  251. Me.table商品 = CType(MyBase.Tables("商品"),商品DataTable)
  252. If (initTable = true) Then
  253. If (Not (Me.table商品) Is Nothing) Then
  254. Me.table商品.InitVars
  255. End If
  256. End If
  257. Me.table會員 = CType(MyBase.Tables("會員"),會員DataTable)
  258. If (initTable = true) Then
  259. If (Not (Me.table會員) Is Nothing) Then
  260. Me.table會員.InitVars
  261. End If
  262. End If
  263. Me.table訂單 = CType(MyBase.Tables("訂單"),訂單DataTable)
  264. If (initTable = true) Then
  265. If (Not (Me.table訂單) Is Nothing) Then
  266. Me.table訂單.InitVars
  267. End If
  268. End If
  269. Me.table購物車 = CType(MyBase.Tables("購物車"),購物車DataTable)
  270. If (initTable = true) Then
  271. If (Not (Me.table購物車) Is Nothing) Then
  272. Me.table購物車.InitVars
  273. End If
  274. End If
  275. Me.table紀錄 = CType(MyBase.Tables("紀錄"),紀錄DataTable)
  276. If (initTable = true) Then
  277. If (Not (Me.table紀錄) Is Nothing) Then
  278. Me.table紀錄.InitVars
  279. End If
  280. End If
  281. Me.table訂購 = CType(MyBase.Tables("訂購"),訂購DataTable)
  282. If (initTable = true) Then
  283. If (Not (Me.table訂購) Is Nothing) Then
  284. Me.table訂購.InitVars
  285. End If
  286. End If
  287. End Sub
  288. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  289. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  290. Private Sub InitClass()
  291. Me.DataSetName = "謎鹿DataSet"
  292. Me.Prefix = ""
  293. Me.Namespace = "http://tempuri.org/謎鹿DataSet.xsd"
  294. Me.EnforceConstraints = true
  295. Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
  296. Me.table商品 = New 商品DataTable()
  297. MyBase.Tables.Add(Me.table商品)
  298. Me.table會員 = New 會員DataTable()
  299. MyBase.Tables.Add(Me.table會員)
  300. Me.table訂單 = New 訂單DataTable()
  301. MyBase.Tables.Add(Me.table訂單)
  302. Me.table購物車 = New 購物車DataTable()
  303. MyBase.Tables.Add(Me.table購物車)
  304. Me.table紀錄 = New 紀錄DataTable()
  305. MyBase.Tables.Add(Me.table紀錄)
  306. Me.table訂購 = New 訂購DataTable()
  307. MyBase.Tables.Add(Me.table訂購)
  308. End Sub
  309. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  310. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  311. Private Function ShouldSerialize商品() As Boolean
  312. Return false
  313. End Function
  314. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  315. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  316. Private Function ShouldSerialize會員() As Boolean
  317. Return false
  318. End Function
  319. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  320. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  321. Private Function ShouldSerialize訂單() As Boolean
  322. Return false
  323. End Function
  324. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  325. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  326. Private Function ShouldSerialize購物車() As Boolean
  327. Return false
  328. End Function
  329. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  330. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  331. Private Function ShouldSerialize紀錄() As Boolean
  332. Return false
  333. End Function
  334. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  335. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  336. Private Function ShouldSerialize訂購() As Boolean
  337. Return false
  338. End Function
  339. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  340. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  341. Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
  342. If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
  343. Me.InitVars
  344. End If
  345. End Sub
  346. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  347. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  348. Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  349. Dim ds As 謎鹿DataSet = New 謎鹿DataSet()
  350. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
  351. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
  352. Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  353. any.Namespace = ds.Namespace
  354. sequence.Items.Add(any)
  355. type.Particle = sequence
  356. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  357. If xs.Contains(dsSchema.TargetNamespace) Then
  358. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  359. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  360. Try
  361. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  362. dsSchema.Write(s1)
  363. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  364. Do While schemas.MoveNext
  365. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  366. s2.SetLength(0)
  367. schema.Write(s2)
  368. If (s1.Length = s2.Length) Then
  369. s1.Position = 0
  370. s2.Position = 0
  371. Do While ((s1.Position <> s1.Length) _
  372. AndAlso (s1.ReadByte = s2.ReadByte))
  373. Loop
  374. If (s1.Position = s1.Length) Then
  375. Return type
  376. End If
  377. End If
  378. Loop
  379. Finally
  380. If (Not (s1) Is Nothing) Then
  381. s1.Close
  382. End If
  383. If (Not (s2) Is Nothing) Then
  384. s2.Close
  385. End If
  386. End Try
  387. End If
  388. xs.Add(dsSchema)
  389. Return type
  390. End Function
  391. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  392. Public Delegate Sub 商品RowChangeEventHandler(ByVal sender As Object, ByVal e As 商品RowChangeEvent)
  393. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  394. Public Delegate Sub 會員RowChangeEventHandler(ByVal sender As Object, ByVal e As 會員RowChangeEvent)
  395. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  396. Public Delegate Sub 訂單RowChangeEventHandler(ByVal sender As Object, ByVal e As 訂單RowChangeEvent)
  397. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  398. Public Delegate Sub 購物車RowChangeEventHandler(ByVal sender As Object, ByVal e As 購物車RowChangeEvent)
  399. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  400. Public Delegate Sub 紀錄RowChangeEventHandler(ByVal sender As Object, ByVal e As 紀錄RowChangeEvent)
  401. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  402. Public Delegate Sub 訂購RowChangeEventHandler(ByVal sender As Object, ByVal e As 訂購RowChangeEvent)
  403. '''<summary>
  404. '''Represents the strongly named DataTable class.
  405. '''</summary>
  406. <Global.System.Serializable(), _
  407. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  408. Partial Public Class 商品DataTable
  409. Inherits Global.System.Data.TypedTableBase(Of 商品Row)
  410. Private column商品編號 As Global.System.Data.DataColumn
  411. Private column商品名稱 As Global.System.Data.DataColumn
  412. Private column庫存數量 As Global.System.Data.DataColumn
  413. Private column定價 As Global.System.Data.DataColumn
  414. Private column種類 As Global.System.Data.DataColumn
  415. Private column管理者編號 As Global.System.Data.DataColumn
  416. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  417. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  418. Public Sub New()
  419. MyBase.New
  420. Me.TableName = "商品"
  421. Me.BeginInit
  422. Me.InitClass
  423. Me.EndInit
  424. End Sub
  425. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  426. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  427. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  428. MyBase.New
  429. Me.TableName = table.TableName
  430. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  431. Me.CaseSensitive = table.CaseSensitive
  432. End If
  433. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  434. Me.Locale = table.Locale
  435. End If
  436. If (table.Namespace <> table.DataSet.Namespace) Then
  437. Me.Namespace = table.Namespace
  438. End If
  439. Me.Prefix = table.Prefix
  440. Me.MinimumCapacity = table.MinimumCapacity
  441. End Sub
  442. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  443. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  444. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  445. MyBase.New(info, context)
  446. Me.InitVars
  447. End Sub
  448. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  449. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  450. Public ReadOnly Property 商品編號Column() As Global.System.Data.DataColumn
  451. Get
  452. Return Me.column商品編號
  453. End Get
  454. End Property
  455. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  456. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  457. Public ReadOnly Property 商品名稱Column() As Global.System.Data.DataColumn
  458. Get
  459. Return Me.column商品名稱
  460. End Get
  461. End Property
  462. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  463. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  464. Public ReadOnly Property 庫存數量Column() As Global.System.Data.DataColumn
  465. Get
  466. Return Me.column庫存數量
  467. End Get
  468. End Property
  469. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  470. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  471. Public ReadOnly Property 定價Column() As Global.System.Data.DataColumn
  472. Get
  473. Return Me.column定價
  474. End Get
  475. End Property
  476. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  477. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  478. Public ReadOnly Property 種類Column() As Global.System.Data.DataColumn
  479. Get
  480. Return Me.column種類
  481. End Get
  482. End Property
  483. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  484. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  485. Public ReadOnly Property 管理者編號Column() As Global.System.Data.DataColumn
  486. Get
  487. Return Me.column管理者編號
  488. End Get
  489. End Property
  490. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  491. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  492. Global.System.ComponentModel.Browsable(false)> _
  493. Public ReadOnly Property Count() As Integer
  494. Get
  495. Return Me.Rows.Count
  496. End Get
  497. End Property
  498. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  499. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  500. Public Default ReadOnly Property Item(ByVal index As Integer) As 商品Row
  501. Get
  502. Return CType(Me.Rows(index),商品Row)
  503. End Get
  504. End Property
  505. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  506. Public Event 商品RowChanging As 商品RowChangeEventHandler
  507. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  508. Public Event 商品RowChanged As 商品RowChangeEventHandler
  509. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  510. Public Event 商品RowDeleting As 商品RowChangeEventHandler
  511. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  512. Public Event 商品RowDeleted As 商品RowChangeEventHandler
  513. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  514. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  515. Public Overloads Sub Add商品Row(ByVal row As 商品Row)
  516. Me.Rows.Add(row)
  517. End Sub
  518. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  519. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  520. Public Overloads Function Add商品Row(ByVal 商品編號 As String, ByVal 商品名稱 As String, ByVal 庫存數量 As String, ByVal 定價 As String, ByVal 種類 As String, ByVal 管理者編號 As String) As 商品Row
  521. Dim row商品Row As 商品Row = CType(Me.NewRow,商品Row)
  522. Dim columnValuesArray() As Object = New Object() {商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號}
  523. row商品Row.ItemArray = columnValuesArray
  524. Me.Rows.Add(row商品Row)
  525. Return row商品Row
  526. End Function
  527. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  528. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  529. Public Function FindBy商品編號(ByVal 商品編號 As String) As 商品Row
  530. Return CType(Me.Rows.Find(New Object() {商品編號}),商品Row)
  531. End Function
  532. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  533. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  534. Public Overrides Function Clone() As Global.System.Data.DataTable
  535. Dim cln As 商品DataTable = CType(MyBase.Clone,商品DataTable)
  536. cln.InitVars
  537. Return cln
  538. End Function
  539. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  540. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  541. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  542. Return New 商品DataTable()
  543. End Function
  544. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  545. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  546. Friend Sub InitVars()
  547. Me.column商品編號 = MyBase.Columns("商品編號")
  548. Me.column商品名稱 = MyBase.Columns("商品名稱")
  549. Me.column庫存數量 = MyBase.Columns("庫存數量")
  550. Me.column定價 = MyBase.Columns("定價")
  551. Me.column種類 = MyBase.Columns("種類")
  552. Me.column管理者編號 = MyBase.Columns("管理者編號")
  553. End Sub
  554. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  555. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  556. Private Sub InitClass()
  557. Me.column商品編號 = New Global.System.Data.DataColumn("商品編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  558. MyBase.Columns.Add(Me.column商品編號)
  559. Me.column商品名稱 = New Global.System.Data.DataColumn("商品名稱", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  560. MyBase.Columns.Add(Me.column商品名稱)
  561. Me.column庫存數量 = New Global.System.Data.DataColumn("庫存數量", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  562. MyBase.Columns.Add(Me.column庫存數量)
  563. Me.column定價 = New Global.System.Data.DataColumn("定價", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  564. MyBase.Columns.Add(Me.column定價)
  565. Me.column種類 = New Global.System.Data.DataColumn("種類", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  566. MyBase.Columns.Add(Me.column種類)
  567. Me.column管理者編號 = New Global.System.Data.DataColumn("管理者編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  568. MyBase.Columns.Add(Me.column管理者編號)
  569. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.column商品編號}, true))
  570. Me.column商品編號.AllowDBNull = false
  571. Me.column商品編號.Unique = true
  572. Me.column商品名稱.MaxLength = 10
  573. Me.column庫存數量.MaxLength = 10
  574. Me.column定價.MaxLength = 10
  575. Me.column種類.MaxLength = 10
  576. Me.column管理者編號.MaxLength = 10
  577. End Sub
  578. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  579. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  580. Public Function New商品Row() As 商品Row
  581. Return CType(Me.NewRow,商品Row)
  582. End Function
  583. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  584. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  585. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  586. Return New 商品Row(builder)
  587. End Function
  588. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  589. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  590. Protected Overrides Function GetRowType() As Global.System.Type
  591. Return GetType(商品Row)
  592. End Function
  593. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  594. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  595. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  596. MyBase.OnRowChanged(e)
  597. If (Not (Me.商品RowChangedEvent) Is Nothing) Then
  598. RaiseEvent 商品RowChanged(Me, New 商品RowChangeEvent(CType(e.Row,商品Row), e.Action))
  599. End If
  600. End Sub
  601. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  602. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  603. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  604. MyBase.OnRowChanging(e)
  605. If (Not (Me.商品RowChangingEvent) Is Nothing) Then
  606. RaiseEvent 商品RowChanging(Me, New 商品RowChangeEvent(CType(e.Row,商品Row), e.Action))
  607. End If
  608. End Sub
  609. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  610. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  611. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  612. MyBase.OnRowDeleted(e)
  613. If (Not (Me.商品RowDeletedEvent) Is Nothing) Then
  614. RaiseEvent 商品RowDeleted(Me, New 商品RowChangeEvent(CType(e.Row,商品Row), e.Action))
  615. End If
  616. End Sub
  617. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  618. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  619. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  620. MyBase.OnRowDeleting(e)
  621. If (Not (Me.商品RowDeletingEvent) Is Nothing) Then
  622. RaiseEvent 商品RowDeleting(Me, New 商品RowChangeEvent(CType(e.Row,商品Row), e.Action))
  623. End If
  624. End Sub
  625. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  626. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  627. Public Sub Remove商品Row(ByVal row As 商品Row)
  628. Me.Rows.Remove(row)
  629. End Sub
  630. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  631. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  632. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  633. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
  634. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
  635. Dim ds As 謎鹿DataSet = New 謎鹿DataSet()
  636. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  637. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  638. any1.MinOccurs = New Decimal(0)
  639. any1.MaxOccurs = Decimal.MaxValue
  640. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  641. sequence.Items.Add(any1)
  642. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  643. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  644. any2.MinOccurs = New Decimal(1)
  645. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  646. sequence.Items.Add(any2)
  647. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  648. attribute1.Name = "namespace"
  649. attribute1.FixedValue = ds.Namespace
  650. type.Attributes.Add(attribute1)
  651. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  652. attribute2.Name = "tableTypeName"
  653. attribute2.FixedValue = "商品DataTable"
  654. type.Attributes.Add(attribute2)
  655. type.Particle = sequence
  656. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  657. If xs.Contains(dsSchema.TargetNamespace) Then
  658. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  659. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  660. Try
  661. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  662. dsSchema.Write(s1)
  663. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  664. Do While schemas.MoveNext
  665. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  666. s2.SetLength(0)
  667. schema.Write(s2)
  668. If (s1.Length = s2.Length) Then
  669. s1.Position = 0
  670. s2.Position = 0
  671. Do While ((s1.Position <> s1.Length) _
  672. AndAlso (s1.ReadByte = s2.ReadByte))
  673. Loop
  674. If (s1.Position = s1.Length) Then
  675. Return type
  676. End If
  677. End If
  678. Loop
  679. Finally
  680. If (Not (s1) Is Nothing) Then
  681. s1.Close
  682. End If
  683. If (Not (s2) Is Nothing) Then
  684. s2.Close
  685. End If
  686. End Try
  687. End If
  688. xs.Add(dsSchema)
  689. Return type
  690. End Function
  691. End Class
  692. '''<summary>
  693. '''Represents the strongly named DataTable class.
  694. '''</summary>
  695. <Global.System.Serializable(), _
  696. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  697. Partial Public Class 會員DataTable
  698. Inherits Global.System.Data.TypedTableBase(Of 會員Row)
  699. Private column會員編號 As Global.System.Data.DataColumn
  700. Private column帳號 As Global.System.Data.DataColumn
  701. Private column密碼 As Global.System.Data.DataColumn
  702. Private column姓名 As Global.System.Data.DataColumn
  703. Private column電話 As Global.System.Data.DataColumn
  704. Private column住址 As Global.System.Data.DataColumn
  705. Private columnemail As Global.System.Data.DataColumn
  706. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  707. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  708. Public Sub New()
  709. MyBase.New
  710. Me.TableName = "會員"
  711. Me.BeginInit
  712. Me.InitClass
  713. Me.EndInit
  714. End Sub
  715. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  716. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  717. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  718. MyBase.New
  719. Me.TableName = table.TableName
  720. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  721. Me.CaseSensitive = table.CaseSensitive
  722. End If
  723. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  724. Me.Locale = table.Locale
  725. End If
  726. If (table.Namespace <> table.DataSet.Namespace) Then
  727. Me.Namespace = table.Namespace
  728. End If
  729. Me.Prefix = table.Prefix
  730. Me.MinimumCapacity = table.MinimumCapacity
  731. End Sub
  732. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  733. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  734. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  735. MyBase.New(info, context)
  736. Me.InitVars
  737. End Sub
  738. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  739. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  740. Public ReadOnly Property 會員編號Column() As Global.System.Data.DataColumn
  741. Get
  742. Return Me.column會員編號
  743. End Get
  744. End Property
  745. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  746. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  747. Public ReadOnly Property 帳號Column() As Global.System.Data.DataColumn
  748. Get
  749. Return Me.column帳號
  750. End Get
  751. End Property
  752. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  753. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  754. Public ReadOnly Property 密碼Column() As Global.System.Data.DataColumn
  755. Get
  756. Return Me.column密碼
  757. End Get
  758. End Property
  759. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  760. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  761. Public ReadOnly Property 姓名Column() As Global.System.Data.DataColumn
  762. Get
  763. Return Me.column姓名
  764. End Get
  765. End Property
  766. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  767. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  768. Public ReadOnly Property 電話Column() As Global.System.Data.DataColumn
  769. Get
  770. Return Me.column電話
  771. End Get
  772. End Property
  773. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  774. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  775. Public ReadOnly Property 住址Column() As Global.System.Data.DataColumn
  776. Get
  777. Return Me.column住址
  778. End Get
  779. End Property
  780. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  781. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  782. Public ReadOnly Property emailColumn() As Global.System.Data.DataColumn
  783. Get
  784. Return Me.columnemail
  785. End Get
  786. End Property
  787. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  788. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  789. Global.System.ComponentModel.Browsable(false)> _
  790. Public ReadOnly Property Count() As Integer
  791. Get
  792. Return Me.Rows.Count
  793. End Get
  794. End Property
  795. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  796. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  797. Public Default ReadOnly Property Item(ByVal index As Integer) As 會員Row
  798. Get
  799. Return CType(Me.Rows(index),會員Row)
  800. End Get
  801. End Property
  802. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  803. Public Event 會員RowChanging As 會員RowChangeEventHandler
  804. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  805. Public Event 會員RowChanged As 會員RowChangeEventHandler
  806. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  807. Public Event 會員RowDeleting As 會員RowChangeEventHandler
  808. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  809. Public Event 會員RowDeleted As 會員RowChangeEventHandler
  810. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  811. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  812. Public Overloads Sub Add會員Row(ByVal row As 會員Row)
  813. Me.Rows.Add(row)
  814. End Sub
  815. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  816. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  817. Public Overloads Function Add會員Row(ByVal 會員編號 As String, ByVal 帳號 As String, ByVal 密碼 As String, ByVal 姓名 As String, ByVal 電話 As String, ByVal 住址 As String, ByVal email As String) As 會員Row
  818. Dim row會員Row As 會員Row = CType(Me.NewRow,會員Row)
  819. Dim columnValuesArray() As Object = New Object() {會員編號, 帳號, 密碼, 姓名, 電話, 住址, email}
  820. row會員Row.ItemArray = columnValuesArray
  821. Me.Rows.Add(row會員Row)
  822. Return row會員Row
  823. End Function
  824. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  825. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  826. Public Function FindBy會員編號(ByVal 會員編號 As String) As 會員Row
  827. Return CType(Me.Rows.Find(New Object() {會員編號}),會員Row)
  828. End Function
  829. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  830. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  831. Public Overrides Function Clone() As Global.System.Data.DataTable
  832. Dim cln As 會員DataTable = CType(MyBase.Clone,會員DataTable)
  833. cln.InitVars
  834. Return cln
  835. End Function
  836. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  837. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  838. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  839. Return New 會員DataTable()
  840. End Function
  841. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  842. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  843. Friend Sub InitVars()
  844. Me.column會員編號 = MyBase.Columns("會員編號")
  845. Me.column帳號 = MyBase.Columns("帳號")
  846. Me.column密碼 = MyBase.Columns("密碼")
  847. Me.column姓名 = MyBase.Columns("姓名")
  848. Me.column電話 = MyBase.Columns("電話")
  849. Me.column住址 = MyBase.Columns("住址")
  850. Me.columnemail = MyBase.Columns("email")
  851. End Sub
  852. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  853. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  854. Private Sub InitClass()
  855. Me.column會員編號 = New Global.System.Data.DataColumn("會員編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  856. MyBase.Columns.Add(Me.column會員編號)
  857. Me.column帳號 = New Global.System.Data.DataColumn("帳號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  858. MyBase.Columns.Add(Me.column帳號)
  859. Me.column密碼 = New Global.System.Data.DataColumn("密碼", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  860. MyBase.Columns.Add(Me.column密碼)
  861. Me.column姓名 = New Global.System.Data.DataColumn("姓名", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  862. MyBase.Columns.Add(Me.column姓名)
  863. Me.column電話 = New Global.System.Data.DataColumn("電話", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  864. MyBase.Columns.Add(Me.column電話)
  865. Me.column住址 = New Global.System.Data.DataColumn("住址", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  866. MyBase.Columns.Add(Me.column住址)
  867. Me.columnemail = New Global.System.Data.DataColumn("email", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  868. MyBase.Columns.Add(Me.columnemail)
  869. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.column會員編號}, true))
  870. Me.column會員編號.AllowDBNull = false
  871. Me.column會員編號.Unique = true
  872. Me.column會員編號.MaxLength = 50
  873. Me.column帳號.MaxLength = 50
  874. Me.column密碼.MaxLength = 50
  875. Me.column姓名.MaxLength = 50
  876. Me.column電話.MaxLength = 50
  877. Me.column住址.MaxLength = 50
  878. Me.columnemail.MaxLength = 50
  879. End Sub
  880. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  881. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  882. Public Function New會員Row() As 會員Row
  883. Return CType(Me.NewRow,會員Row)
  884. End Function
  885. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  886. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  887. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  888. Return New 會員Row(builder)
  889. End Function
  890. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  891. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  892. Protected Overrides Function GetRowType() As Global.System.Type
  893. Return GetType(會員Row)
  894. End Function
  895. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  896. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  897. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  898. MyBase.OnRowChanged(e)
  899. If (Not (Me.會員RowChangedEvent) Is Nothing) Then
  900. RaiseEvent 會員RowChanged(Me, New 會員RowChangeEvent(CType(e.Row,會員Row), e.Action))
  901. End If
  902. End Sub
  903. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  904. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  905. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  906. MyBase.OnRowChanging(e)
  907. If (Not (Me.會員RowChangingEvent) Is Nothing) Then
  908. RaiseEvent 會員RowChanging(Me, New 會員RowChangeEvent(CType(e.Row,會員Row), e.Action))
  909. End If
  910. End Sub
  911. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  912. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  913. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  914. MyBase.OnRowDeleted(e)
  915. If (Not (Me.會員RowDeletedEvent) Is Nothing) Then
  916. RaiseEvent 會員RowDeleted(Me, New 會員RowChangeEvent(CType(e.Row,會員Row), e.Action))
  917. End If
  918. End Sub
  919. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  920. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  921. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  922. MyBase.OnRowDeleting(e)
  923. If (Not (Me.會員RowDeletingEvent) Is Nothing) Then
  924. RaiseEvent 會員RowDeleting(Me, New 會員RowChangeEvent(CType(e.Row,會員Row), e.Action))
  925. End If
  926. End Sub
  927. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  928. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  929. Public Sub Remove會員Row(ByVal row As 會員Row)
  930. Me.Rows.Remove(row)
  931. End Sub
  932. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  933. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  934. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  935. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
  936. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
  937. Dim ds As 謎鹿DataSet = New 謎鹿DataSet()
  938. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  939. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  940. any1.MinOccurs = New Decimal(0)
  941. any1.MaxOccurs = Decimal.MaxValue
  942. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  943. sequence.Items.Add(any1)
  944. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  945. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  946. any2.MinOccurs = New Decimal(1)
  947. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  948. sequence.Items.Add(any2)
  949. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  950. attribute1.Name = "namespace"
  951. attribute1.FixedValue = ds.Namespace
  952. type.Attributes.Add(attribute1)
  953. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  954. attribute2.Name = "tableTypeName"
  955. attribute2.FixedValue = "會員DataTable"
  956. type.Attributes.Add(attribute2)
  957. type.Particle = sequence
  958. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  959. If xs.Contains(dsSchema.TargetNamespace) Then
  960. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  961. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  962. Try
  963. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  964. dsSchema.Write(s1)
  965. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  966. Do While schemas.MoveNext
  967. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  968. s2.SetLength(0)
  969. schema.Write(s2)
  970. If (s1.Length = s2.Length) Then
  971. s1.Position = 0
  972. s2.Position = 0
  973. Do While ((s1.Position <> s1.Length) _
  974. AndAlso (s1.ReadByte = s2.ReadByte))
  975. Loop
  976. If (s1.Position = s1.Length) Then
  977. Return type
  978. End If
  979. End If
  980. Loop
  981. Finally
  982. If (Not (s1) Is Nothing) Then
  983. s1.Close
  984. End If
  985. If (Not (s2) Is Nothing) Then
  986. s2.Close
  987. End If
  988. End Try
  989. End If
  990. xs.Add(dsSchema)
  991. Return type
  992. End Function
  993. End Class
  994. '''<summary>
  995. '''Represents the strongly named DataTable class.
  996. '''</summary>
  997. <Global.System.Serializable(), _
  998. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  999. Partial Public Class 訂單DataTable
  1000. Inherits Global.System.Data.TypedTableBase(Of 訂單Row)
  1001. Private column訂單編號 As Global.System.Data.DataColumn
  1002. Private column付款方式 As Global.System.Data.DataColumn
  1003. Private column取貨方式 As Global.System.Data.DataColumn
  1004. Private column訂單日期 As Global.System.Data.DataColumn
  1005. Private column會員編號 As Global.System.Data.DataColumn
  1006. Private column購物車編號 As Global.System.Data.DataColumn
  1007. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1008. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1009. Public Sub New()
  1010. MyBase.New
  1011. Me.TableName = "訂單"
  1012. Me.BeginInit
  1013. Me.InitClass
  1014. Me.EndInit
  1015. End Sub
  1016. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1017. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1018. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  1019. MyBase.New
  1020. Me.TableName = table.TableName
  1021. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  1022. Me.CaseSensitive = table.CaseSensitive
  1023. End If
  1024. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  1025. Me.Locale = table.Locale
  1026. End If
  1027. If (table.Namespace <> table.DataSet.Namespace) Then
  1028. Me.Namespace = table.Namespace
  1029. End If
  1030. Me.Prefix = table.Prefix
  1031. Me.MinimumCapacity = table.MinimumCapacity
  1032. End Sub
  1033. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1034. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1035. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  1036. MyBase.New(info, context)
  1037. Me.InitVars
  1038. End Sub
  1039. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1040. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1041. Public ReadOnly Property 訂單編號Column() As Global.System.Data.DataColumn
  1042. Get
  1043. Return Me.column訂單編號
  1044. End Get
  1045. End Property
  1046. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1047. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1048. Public ReadOnly Property 付款方式Column() As Global.System.Data.DataColumn
  1049. Get
  1050. Return Me.column付款方式
  1051. End Get
  1052. End Property
  1053. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1054. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1055. Public ReadOnly Property 取貨方式Column() As Global.System.Data.DataColumn
  1056. Get
  1057. Return Me.column取貨方式
  1058. End Get
  1059. End Property
  1060. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1061. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1062. Public ReadOnly Property 訂單日期Column() As Global.System.Data.DataColumn
  1063. Get
  1064. Return Me.column訂單日期
  1065. End Get
  1066. End Property
  1067. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1068. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1069. Public ReadOnly Property 會員編號Column() As Global.System.Data.DataColumn
  1070. Get
  1071. Return Me.column會員編號
  1072. End Get
  1073. End Property
  1074. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1075. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1076. Public ReadOnly Property 購物車編號Column() As Global.System.Data.DataColumn
  1077. Get
  1078. Return Me.column購物車編號
  1079. End Get
  1080. End Property
  1081. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1082. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  1083. Global.System.ComponentModel.Browsable(false)> _
  1084. Public ReadOnly Property Count() As Integer
  1085. Get
  1086. Return Me.Rows.Count
  1087. End Get
  1088. End Property
  1089. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1090. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1091. Public Default ReadOnly Property Item(ByVal index As Integer) As 訂單Row
  1092. Get
  1093. Return CType(Me.Rows(index),訂單Row)
  1094. End Get
  1095. End Property
  1096. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1097. Public Event 訂單RowChanging As 訂單RowChangeEventHandler
  1098. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1099. Public Event 訂單RowChanged As 訂單RowChangeEventHandler
  1100. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1101. Public Event 訂單RowDeleting As 訂單RowChangeEventHandler
  1102. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1103. Public Event 訂單RowDeleted As 訂單RowChangeEventHandler
  1104. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1105. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1106. Public Overloads Sub Add訂單Row(ByVal row As 訂單Row)
  1107. Me.Rows.Add(row)
  1108. End Sub
  1109. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1110. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1111. Public Overloads Function Add訂單Row(ByVal 訂單編號 As String, ByVal 付款方式 As String, ByVal 取貨方式 As String, ByVal 訂單日期 As String, ByVal 會員編號 As String, ByVal 購物車編號 As String) As 訂單Row
  1112. Dim row訂單Row As 訂單Row = CType(Me.NewRow,訂單Row)
  1113. Dim columnValuesArray() As Object = New Object() {訂單編號, 付款方式, 取貨方式, 訂單日期, 會員編號, 購物車編號}
  1114. row訂單Row.ItemArray = columnValuesArray
  1115. Me.Rows.Add(row訂單Row)
  1116. Return row訂單Row
  1117. End Function
  1118. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1119. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1120. Public Function FindBy訂單編號(ByVal 訂單編號 As String) As 訂單Row
  1121. Return CType(Me.Rows.Find(New Object() {訂單編號}),訂單Row)
  1122. End Function
  1123. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1124. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1125. Public Overrides Function Clone() As Global.System.Data.DataTable
  1126. Dim cln As 訂單DataTable = CType(MyBase.Clone,訂單DataTable)
  1127. cln.InitVars
  1128. Return cln
  1129. End Function
  1130. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1131. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1132. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  1133. Return New 訂單DataTable()
  1134. End Function
  1135. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1136. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1137. Friend Sub InitVars()
  1138. Me.column訂單編號 = MyBase.Columns("訂單編號")
  1139. Me.column付款方式 = MyBase.Columns("付款方式")
  1140. Me.column取貨方式 = MyBase.Columns("取貨方式")
  1141. Me.column訂單日期 = MyBase.Columns("訂單日期")
  1142. Me.column會員編號 = MyBase.Columns("會員編號")
  1143. Me.column購物車編號 = MyBase.Columns("購物車編號")
  1144. End Sub
  1145. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1146. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1147. Private Sub InitClass()
  1148. Me.column訂單編號 = New Global.System.Data.DataColumn("訂單編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1149. MyBase.Columns.Add(Me.column訂單編號)
  1150. Me.column付款方式 = New Global.System.Data.DataColumn("付款方式", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1151. MyBase.Columns.Add(Me.column付款方式)
  1152. Me.column取貨方式 = New Global.System.Data.DataColumn("取貨方式", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1153. MyBase.Columns.Add(Me.column取貨方式)
  1154. Me.column訂單日期 = New Global.System.Data.DataColumn("訂單日期", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1155. MyBase.Columns.Add(Me.column訂單日期)
  1156. Me.column會員編號 = New Global.System.Data.DataColumn("會員編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1157. MyBase.Columns.Add(Me.column會員編號)
  1158. Me.column購物車編號 = New Global.System.Data.DataColumn("購物車編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1159. MyBase.Columns.Add(Me.column購物車編號)
  1160. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.column訂單編號}, true))
  1161. Me.column訂單編號.AllowDBNull = false
  1162. Me.column訂單編號.Unique = true
  1163. Me.column付款方式.MaxLength = 10
  1164. Me.column取貨方式.MaxLength = 10
  1165. Me.column訂單日期.MaxLength = 10
  1166. Me.column會員編號.MaxLength = 10
  1167. Me.column購物車編號.MaxLength = 10
  1168. End Sub
  1169. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1170. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1171. Public Function New訂單Row() As 訂單Row
  1172. Return CType(Me.NewRow,訂單Row)
  1173. End Function
  1174. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1175. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1176. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  1177. Return New 訂單Row(builder)
  1178. End Function
  1179. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1180. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1181. Protected Overrides Function GetRowType() As Global.System.Type
  1182. Return GetType(訂單Row)
  1183. End Function
  1184. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1185. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1186. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1187. MyBase.OnRowChanged(e)
  1188. If (Not (Me.訂單RowChangedEvent) Is Nothing) Then
  1189. RaiseEvent 訂單RowChanged(Me, New 訂單RowChangeEvent(CType(e.Row,訂單Row), e.Action))
  1190. End If
  1191. End Sub
  1192. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1193. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1194. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1195. MyBase.OnRowChanging(e)
  1196. If (Not (Me.訂單RowChangingEvent) Is Nothing) Then
  1197. RaiseEvent 訂單RowChanging(Me, New 訂單RowChangeEvent(CType(e.Row,訂單Row), e.Action))
  1198. End If
  1199. End Sub
  1200. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1201. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1202. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1203. MyBase.OnRowDeleted(e)
  1204. If (Not (Me.訂單RowDeletedEvent) Is Nothing) Then
  1205. RaiseEvent 訂單RowDeleted(Me, New 訂單RowChangeEvent(CType(e.Row,訂單Row), e.Action))
  1206. End If
  1207. End Sub
  1208. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1209. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1210. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1211. MyBase.OnRowDeleting(e)
  1212. If (Not (Me.訂單RowDeletingEvent) Is Nothing) Then
  1213. RaiseEvent 訂單RowDeleting(Me, New 訂單RowChangeEvent(CType(e.Row,訂單Row), e.Action))
  1214. End If
  1215. End Sub
  1216. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1217. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1218. Public Sub Remove訂單Row(ByVal row As 訂單Row)
  1219. Me.Rows.Remove(row)
  1220. End Sub
  1221. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1222. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1223. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  1224. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
  1225. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
  1226. Dim ds As 謎鹿DataSet = New 謎鹿DataSet()
  1227. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  1228. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  1229. any1.MinOccurs = New Decimal(0)
  1230. any1.MaxOccurs = Decimal.MaxValue
  1231. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1232. sequence.Items.Add(any1)
  1233. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  1234. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  1235. any2.MinOccurs = New Decimal(1)
  1236. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1237. sequence.Items.Add(any2)
  1238. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  1239. attribute1.Name = "namespace"
  1240. attribute1.FixedValue = ds.Namespace
  1241. type.Attributes.Add(attribute1)
  1242. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  1243. attribute2.Name = "tableTypeName"
  1244. attribute2.FixedValue = "訂單DataTable"
  1245. type.Attributes.Add(attribute2)
  1246. type.Particle = sequence
  1247. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  1248. If xs.Contains(dsSchema.TargetNamespace) Then
  1249. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  1250. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  1251. Try
  1252. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  1253. dsSchema.Write(s1)
  1254. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  1255. Do While schemas.MoveNext
  1256. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  1257. s2.SetLength(0)
  1258. schema.Write(s2)
  1259. If (s1.Length = s2.Length) Then
  1260. s1.Position = 0
  1261. s2.Position = 0
  1262. Do While ((s1.Position <> s1.Length) _
  1263. AndAlso (s1.ReadByte = s2.ReadByte))
  1264. Loop
  1265. If (s1.Position = s1.Length) Then
  1266. Return type
  1267. End If
  1268. End If
  1269. Loop
  1270. Finally
  1271. If (Not (s1) Is Nothing) Then
  1272. s1.Close
  1273. End If
  1274. If (Not (s2) Is Nothing) Then
  1275. s2.Close
  1276. End If
  1277. End Try
  1278. End If
  1279. xs.Add(dsSchema)
  1280. Return type
  1281. End Function
  1282. End Class
  1283. '''<summary>
  1284. '''Represents the strongly named DataTable class.
  1285. '''</summary>
  1286. <Global.System.Serializable(), _
  1287. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  1288. Partial Public Class 購物車DataTable
  1289. Inherits Global.System.Data.TypedTableBase(Of 購物車Row)
  1290. Private column會員編號 As Global.System.Data.DataColumn
  1291. Private column運費 As Global.System.Data.DataColumn
  1292. Private column總金額 As Global.System.Data.DataColumn
  1293. Private column購物車編號 As Global.System.Data.DataColumn
  1294. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1295. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1296. Public Sub New()
  1297. MyBase.New
  1298. Me.TableName = "購物車"
  1299. Me.BeginInit
  1300. Me.InitClass
  1301. Me.EndInit
  1302. End Sub
  1303. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1304. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1305. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  1306. MyBase.New
  1307. Me.TableName = table.TableName
  1308. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  1309. Me.CaseSensitive = table.CaseSensitive
  1310. End If
  1311. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  1312. Me.Locale = table.Locale
  1313. End If
  1314. If (table.Namespace <> table.DataSet.Namespace) Then
  1315. Me.Namespace = table.Namespace
  1316. End If
  1317. Me.Prefix = table.Prefix
  1318. Me.MinimumCapacity = table.MinimumCapacity
  1319. End Sub
  1320. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1321. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1322. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  1323. MyBase.New(info, context)
  1324. Me.InitVars
  1325. End Sub
  1326. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1327. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1328. Public ReadOnly Property 會員編號Column() As Global.System.Data.DataColumn
  1329. Get
  1330. Return Me.column會員編號
  1331. End Get
  1332. End Property
  1333. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1334. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1335. Public ReadOnly Property 運費Column() As Global.System.Data.DataColumn
  1336. Get
  1337. Return Me.column運費
  1338. End Get
  1339. End Property
  1340. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1341. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1342. Public ReadOnly Property 總金額Column() As Global.System.Data.DataColumn
  1343. Get
  1344. Return Me.column總金額
  1345. End Get
  1346. End Property
  1347. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1348. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1349. Public ReadOnly Property 購物車編號Column() As Global.System.Data.DataColumn
  1350. Get
  1351. Return Me.column購物車編號
  1352. End Get
  1353. End Property
  1354. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1355. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  1356. Global.System.ComponentModel.Browsable(false)> _
  1357. Public ReadOnly Property Count() As Integer
  1358. Get
  1359. Return Me.Rows.Count
  1360. End Get
  1361. End Property
  1362. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1363. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1364. Public Default ReadOnly Property Item(ByVal index As Integer) As 購物車Row
  1365. Get
  1366. Return CType(Me.Rows(index),購物車Row)
  1367. End Get
  1368. End Property
  1369. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1370. Public Event 購物車RowChanging As 購物車RowChangeEventHandler
  1371. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1372. Public Event 購物車RowChanged As 購物車RowChangeEventHandler
  1373. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1374. Public Event 購物車RowDeleting As 購物車RowChangeEventHandler
  1375. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1376. Public Event 購物車RowDeleted As 購物車RowChangeEventHandler
  1377. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1378. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1379. Public Overloads Sub Add購物車Row(ByVal row As 購物車Row)
  1380. Me.Rows.Add(row)
  1381. End Sub
  1382. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1383. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1384. Public Overloads Function Add購物車Row(ByVal 會員編號 As String, ByVal 運費 As String, ByVal 總金額 As String, ByVal 購物車編號 As String) As 購物車Row
  1385. Dim row購物車Row As 購物車Row = CType(Me.NewRow,購物車Row)
  1386. Dim columnValuesArray() As Object = New Object() {會員編號, 運費, 總金額, 購物車編號}
  1387. row購物車Row.ItemArray = columnValuesArray
  1388. Me.Rows.Add(row購物車Row)
  1389. Return row購物車Row
  1390. End Function
  1391. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1392. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1393. Public Function FindBy會員編號(ByVal 會員編號 As String) As 購物車Row
  1394. Return CType(Me.Rows.Find(New Object() {會員編號}),購物車Row)
  1395. End Function
  1396. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1397. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1398. Public Overrides Function Clone() As Global.System.Data.DataTable
  1399. Dim cln As 購物車DataTable = CType(MyBase.Clone,購物車DataTable)
  1400. cln.InitVars
  1401. Return cln
  1402. End Function
  1403. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1404. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1405. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  1406. Return New 購物車DataTable()
  1407. End Function
  1408. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1409. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1410. Friend Sub InitVars()
  1411. Me.column會員編號 = MyBase.Columns("會員編號")
  1412. Me.column運費 = MyBase.Columns("運費")
  1413. Me.column總金額 = MyBase.Columns("總金額")
  1414. Me.column購物車編號 = MyBase.Columns("購物車編號")
  1415. End Sub
  1416. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1417. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1418. Private Sub InitClass()
  1419. Me.column會員編號 = New Global.System.Data.DataColumn("會員編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1420. MyBase.Columns.Add(Me.column會員編號)
  1421. Me.column運費 = New Global.System.Data.DataColumn("運費", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1422. MyBase.Columns.Add(Me.column運費)
  1423. Me.column總金額 = New Global.System.Data.DataColumn("總金額", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1424. MyBase.Columns.Add(Me.column總金額)
  1425. Me.column購物車編號 = New Global.System.Data.DataColumn("購物車編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1426. MyBase.Columns.Add(Me.column購物車編號)
  1427. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.column會員編號}, true))
  1428. Me.column會員編號.AllowDBNull = false
  1429. Me.column會員編號.Unique = true
  1430. Me.column會員編號.MaxLength = 50
  1431. Me.column運費.MaxLength = 50
  1432. Me.column總金額.MaxLength = 50
  1433. Me.column購物車編號.MaxLength = 50
  1434. End Sub
  1435. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1436. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1437. Public Function New購物車Row() As 購物車Row
  1438. Return CType(Me.NewRow,購物車Row)
  1439. End Function
  1440. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1441. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1442. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  1443. Return New 購物車Row(builder)
  1444. End Function
  1445. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1446. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1447. Protected Overrides Function GetRowType() As Global.System.Type
  1448. Return GetType(購物車Row)
  1449. End Function
  1450. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1451. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1452. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1453. MyBase.OnRowChanged(e)
  1454. If (Not (Me.購物車RowChangedEvent) Is Nothing) Then
  1455. RaiseEvent 購物車RowChanged(Me, New 購物車RowChangeEvent(CType(e.Row,購物車Row), e.Action))
  1456. End If
  1457. End Sub
  1458. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1459. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1460. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1461. MyBase.OnRowChanging(e)
  1462. If (Not (Me.購物車RowChangingEvent) Is Nothing) Then
  1463. RaiseEvent 購物車RowChanging(Me, New 購物車RowChangeEvent(CType(e.Row,購物車Row), e.Action))
  1464. End If
  1465. End Sub
  1466. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1467. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1468. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1469. MyBase.OnRowDeleted(e)
  1470. If (Not (Me.購物車RowDeletedEvent) Is Nothing) Then
  1471. RaiseEvent 購物車RowDeleted(Me, New 購物車RowChangeEvent(CType(e.Row,購物車Row), e.Action))
  1472. End If
  1473. End Sub
  1474. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1475. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1476. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1477. MyBase.OnRowDeleting(e)
  1478. If (Not (Me.購物車RowDeletingEvent) Is Nothing) Then
  1479. RaiseEvent 購物車RowDeleting(Me, New 購物車RowChangeEvent(CType(e.Row,購物車Row), e.Action))
  1480. End If
  1481. End Sub
  1482. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1483. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1484. Public Sub Remove購物車Row(ByVal row As 購物車Row)
  1485. Me.Rows.Remove(row)
  1486. End Sub
  1487. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1488. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1489. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  1490. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
  1491. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
  1492. Dim ds As 謎鹿DataSet = New 謎鹿DataSet()
  1493. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  1494. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  1495. any1.MinOccurs = New Decimal(0)
  1496. any1.MaxOccurs = Decimal.MaxValue
  1497. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1498. sequence.Items.Add(any1)
  1499. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  1500. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  1501. any2.MinOccurs = New Decimal(1)
  1502. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1503. sequence.Items.Add(any2)
  1504. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  1505. attribute1.Name = "namespace"
  1506. attribute1.FixedValue = ds.Namespace
  1507. type.Attributes.Add(attribute1)
  1508. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  1509. attribute2.Name = "tableTypeName"
  1510. attribute2.FixedValue = "購物車DataTable"
  1511. type.Attributes.Add(attribute2)
  1512. type.Particle = sequence
  1513. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  1514. If xs.Contains(dsSchema.TargetNamespace) Then
  1515. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  1516. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  1517. Try
  1518. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  1519. dsSchema.Write(s1)
  1520. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  1521. Do While schemas.MoveNext
  1522. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  1523. s2.SetLength(0)
  1524. schema.Write(s2)
  1525. If (s1.Length = s2.Length) Then
  1526. s1.Position = 0
  1527. s2.Position = 0
  1528. Do While ((s1.Position <> s1.Length) _
  1529. AndAlso (s1.ReadByte = s2.ReadByte))
  1530. Loop
  1531. If (s1.Position = s1.Length) Then
  1532. Return type
  1533. End If
  1534. End If
  1535. Loop
  1536. Finally
  1537. If (Not (s1) Is Nothing) Then
  1538. s1.Close
  1539. End If
  1540. If (Not (s2) Is Nothing) Then
  1541. s2.Close
  1542. End If
  1543. End Try
  1544. End If
  1545. xs.Add(dsSchema)
  1546. Return type
  1547. End Function
  1548. End Class
  1549. '''<summary>
  1550. '''Represents the strongly named DataTable class.
  1551. '''</summary>
  1552. <Global.System.Serializable(), _
  1553. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  1554. Partial Public Class 紀錄DataTable
  1555. Inherits Global.System.Data.TypedTableBase(Of 紀錄Row)
  1556. Private column訂單編號 As Global.System.Data.DataColumn
  1557. Private column商品編號 As Global.System.Data.DataColumn
  1558. Private column訂購數量 As Global.System.Data.DataColumn
  1559. Private column價錢 As Global.System.Data.DataColumn
  1560. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1561. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1562. Public Sub New()
  1563. MyBase.New
  1564. Me.TableName = "紀錄"
  1565. Me.BeginInit
  1566. Me.InitClass
  1567. Me.EndInit
  1568. End Sub
  1569. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1570. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1571. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  1572. MyBase.New
  1573. Me.TableName = table.TableName
  1574. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  1575. Me.CaseSensitive = table.CaseSensitive
  1576. End If
  1577. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  1578. Me.Locale = table.Locale
  1579. End If
  1580. If (table.Namespace <> table.DataSet.Namespace) Then
  1581. Me.Namespace = table.Namespace
  1582. End If
  1583. Me.Prefix = table.Prefix
  1584. Me.MinimumCapacity = table.MinimumCapacity
  1585. End Sub
  1586. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1587. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1588. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  1589. MyBase.New(info, context)
  1590. Me.InitVars
  1591. End Sub
  1592. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1593. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1594. Public ReadOnly Property 訂單編號Column() As Global.System.Data.DataColumn
  1595. Get
  1596. Return Me.column訂單編號
  1597. End Get
  1598. End Property
  1599. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1600. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1601. Public ReadOnly Property 商品編號Column() As Global.System.Data.DataColumn
  1602. Get
  1603. Return Me.column商品編號
  1604. End Get
  1605. End Property
  1606. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1607. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1608. Public ReadOnly Property 訂購數量Column() As Global.System.Data.DataColumn
  1609. Get
  1610. Return Me.column訂購數量
  1611. End Get
  1612. End Property
  1613. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1614. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1615. Public ReadOnly Property 價錢Column() As Global.System.Data.DataColumn
  1616. Get
  1617. Return Me.column價錢
  1618. End Get
  1619. End Property
  1620. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1621. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  1622. Global.System.ComponentModel.Browsable(false)> _
  1623. Public ReadOnly Property Count() As Integer
  1624. Get
  1625. Return Me.Rows.Count
  1626. End Get
  1627. End Property
  1628. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1629. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1630. Public Default ReadOnly Property Item(ByVal index As Integer) As 紀錄Row
  1631. Get
  1632. Return CType(Me.Rows(index),紀錄Row)
  1633. End Get
  1634. End Property
  1635. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1636. Public Event 紀錄RowChanging As 紀錄RowChangeEventHandler
  1637. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1638. Public Event 紀錄RowChanged As 紀錄RowChangeEventHandler
  1639. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1640. Public Event 紀錄RowDeleting As 紀錄RowChangeEventHandler
  1641. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1642. Public Event 紀錄RowDeleted As 紀錄RowChangeEventHandler
  1643. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1644. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1645. Public Overloads Sub Add紀錄Row(ByVal row As 紀錄Row)
  1646. Me.Rows.Add(row)
  1647. End Sub
  1648. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1649. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1650. Public Overloads Function Add紀錄Row(ByVal 訂單編號 As String, ByVal 商品編號 As String, ByVal 訂購數量 As String, ByVal 價錢 As String) As 紀錄Row
  1651. Dim row紀錄Row As 紀錄Row = CType(Me.NewRow,紀錄Row)
  1652. Dim columnValuesArray() As Object = New Object() {訂單編號, 商品編號, 訂購數量, 價錢}
  1653. row紀錄Row.ItemArray = columnValuesArray
  1654. Me.Rows.Add(row紀錄Row)
  1655. Return row紀錄Row
  1656. End Function
  1657. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1658. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1659. Public Function FindBy訂單編號(ByVal 訂單編號 As String) As 紀錄Row
  1660. Return CType(Me.Rows.Find(New Object() {訂單編號}),紀錄Row)
  1661. End Function
  1662. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1663. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1664. Public Overrides Function Clone() As Global.System.Data.DataTable
  1665. Dim cln As 紀錄DataTable = CType(MyBase.Clone,紀錄DataTable)
  1666. cln.InitVars
  1667. Return cln
  1668. End Function
  1669. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1670. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1671. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  1672. Return New 紀錄DataTable()
  1673. End Function
  1674. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1675. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1676. Friend Sub InitVars()
  1677. Me.column訂單編號 = MyBase.Columns("訂單編號")
  1678. Me.column商品編號 = MyBase.Columns("商品編號")
  1679. Me.column訂購數量 = MyBase.Columns("訂購數量")
  1680. Me.column價錢 = MyBase.Columns("價錢")
  1681. End Sub
  1682. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1683. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1684. Private Sub InitClass()
  1685. Me.column訂單編號 = New Global.System.Data.DataColumn("訂單編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1686. MyBase.Columns.Add(Me.column訂單編號)
  1687. Me.column商品編號 = New Global.System.Data.DataColumn("商品編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1688. MyBase.Columns.Add(Me.column商品編號)
  1689. Me.column訂購數量 = New Global.System.Data.DataColumn("訂購數量", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1690. MyBase.Columns.Add(Me.column訂購數量)
  1691. Me.column價錢 = New Global.System.Data.DataColumn("價錢", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1692. MyBase.Columns.Add(Me.column價錢)
  1693. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.column訂單編號}, true))
  1694. Me.column訂單編號.AllowDBNull = false
  1695. Me.column訂單編號.Unique = true
  1696. Me.column訂單編號.MaxLength = 50
  1697. Me.column商品編號.MaxLength = 50
  1698. Me.column訂購數量.MaxLength = 50
  1699. Me.column價錢.MaxLength = 50
  1700. End Sub
  1701. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1702. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1703. Public Function New紀錄Row() As 紀錄Row
  1704. Return CType(Me.NewRow,紀錄Row)
  1705. End Function
  1706. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1707. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1708. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  1709. Return New 紀錄Row(builder)
  1710. End Function
  1711. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1712. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1713. Protected Overrides Function GetRowType() As Global.System.Type
  1714. Return GetType(紀錄Row)
  1715. End Function
  1716. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1717. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1718. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1719. MyBase.OnRowChanged(e)
  1720. If (Not (Me.紀錄RowChangedEvent) Is Nothing) Then
  1721. RaiseEvent 紀錄RowChanged(Me, New 紀錄RowChangeEvent(CType(e.Row,紀錄Row), e.Action))
  1722. End If
  1723. End Sub
  1724. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1725. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1726. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1727. MyBase.OnRowChanging(e)
  1728. If (Not (Me.紀錄RowChangingEvent) Is Nothing) Then
  1729. RaiseEvent 紀錄RowChanging(Me, New 紀錄RowChangeEvent(CType(e.Row,紀錄Row), e.Action))
  1730. End If
  1731. End Sub
  1732. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1733. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1734. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1735. MyBase.OnRowDeleted(e)
  1736. If (Not (Me.紀錄RowDeletedEvent) Is Nothing) Then
  1737. RaiseEvent 紀錄RowDeleted(Me, New 紀錄RowChangeEvent(CType(e.Row,紀錄Row), e.Action))
  1738. End If
  1739. End Sub
  1740. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1741. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1742. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1743. MyBase.OnRowDeleting(e)
  1744. If (Not (Me.紀錄RowDeletingEvent) Is Nothing) Then
  1745. RaiseEvent 紀錄RowDeleting(Me, New 紀錄RowChangeEvent(CType(e.Row,紀錄Row), e.Action))
  1746. End If
  1747. End Sub
  1748. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1749. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1750. Public Sub Remove紀錄Row(ByVal row As 紀錄Row)
  1751. Me.Rows.Remove(row)
  1752. End Sub
  1753. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1754. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1755. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  1756. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
  1757. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
  1758. Dim ds As 謎鹿DataSet = New 謎鹿DataSet()
  1759. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  1760. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  1761. any1.MinOccurs = New Decimal(0)
  1762. any1.MaxOccurs = Decimal.MaxValue
  1763. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1764. sequence.Items.Add(any1)
  1765. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  1766. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  1767. any2.MinOccurs = New Decimal(1)
  1768. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1769. sequence.Items.Add(any2)
  1770. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  1771. attribute1.Name = "namespace"
  1772. attribute1.FixedValue = ds.Namespace
  1773. type.Attributes.Add(attribute1)
  1774. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  1775. attribute2.Name = "tableTypeName"
  1776. attribute2.FixedValue = "紀錄DataTable"
  1777. type.Attributes.Add(attribute2)
  1778. type.Particle = sequence
  1779. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  1780. If xs.Contains(dsSchema.TargetNamespace) Then
  1781. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  1782. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  1783. Try
  1784. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  1785. dsSchema.Write(s1)
  1786. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  1787. Do While schemas.MoveNext
  1788. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  1789. s2.SetLength(0)
  1790. schema.Write(s2)
  1791. If (s1.Length = s2.Length) Then
  1792. s1.Position = 0
  1793. s2.Position = 0
  1794. Do While ((s1.Position <> s1.Length) _
  1795. AndAlso (s1.ReadByte = s2.ReadByte))
  1796. Loop
  1797. If (s1.Position = s1.Length) Then
  1798. Return type
  1799. End If
  1800. End If
  1801. Loop
  1802. Finally
  1803. If (Not (s1) Is Nothing) Then
  1804. s1.Close
  1805. End If
  1806. If (Not (s2) Is Nothing) Then
  1807. s2.Close
  1808. End If
  1809. End Try
  1810. End If
  1811. xs.Add(dsSchema)
  1812. Return type
  1813. End Function
  1814. End Class
  1815. '''<summary>
  1816. '''Represents the strongly named DataTable class.
  1817. '''</summary>
  1818. <Global.System.Serializable(), _
  1819. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  1820. Partial Public Class 訂購DataTable
  1821. Inherits Global.System.Data.TypedTableBase(Of 訂購Row)
  1822. Private column會員編號 As Global.System.Data.DataColumn
  1823. Private column商品編號 As Global.System.Data.DataColumn
  1824. Private column訂購數量 As Global.System.Data.DataColumn
  1825. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1826. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1827. Public Sub New()
  1828. MyBase.New
  1829. Me.TableName = "訂購"
  1830. Me.BeginInit
  1831. Me.InitClass
  1832. Me.EndInit
  1833. End Sub
  1834. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1835. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1836. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  1837. MyBase.New
  1838. Me.TableName = table.TableName
  1839. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  1840. Me.CaseSensitive = table.CaseSensitive
  1841. End If
  1842. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  1843. Me.Locale = table.Locale
  1844. End If
  1845. If (table.Namespace <> table.DataSet.Namespace) Then
  1846. Me.Namespace = table.Namespace
  1847. End If
  1848. Me.Prefix = table.Prefix
  1849. Me.MinimumCapacity = table.MinimumCapacity
  1850. End Sub
  1851. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1852. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1853. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  1854. MyBase.New(info, context)
  1855. Me.InitVars
  1856. End Sub
  1857. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1858. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1859. Public ReadOnly Property 會員編號Column() As Global.System.Data.DataColumn
  1860. Get
  1861. Return Me.column會員編號
  1862. End Get
  1863. End Property
  1864. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1865. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1866. Public ReadOnly Property 商品編號Column() As Global.System.Data.DataColumn
  1867. Get
  1868. Return Me.column商品編號
  1869. End Get
  1870. End Property
  1871. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1872. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1873. Public ReadOnly Property 訂購數量Column() As Global.System.Data.DataColumn
  1874. Get
  1875. Return Me.column訂購數量
  1876. End Get
  1877. End Property
  1878. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1879. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  1880. Global.System.ComponentModel.Browsable(false)> _
  1881. Public ReadOnly Property Count() As Integer
  1882. Get
  1883. Return Me.Rows.Count
  1884. End Get
  1885. End Property
  1886. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1887. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1888. Public Default ReadOnly Property Item(ByVal index As Integer) As 訂購Row
  1889. Get
  1890. Return CType(Me.Rows(index),訂購Row)
  1891. End Get
  1892. End Property
  1893. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1894. Public Event 訂購RowChanging As 訂購RowChangeEventHandler
  1895. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1896. Public Event 訂購RowChanged As 訂購RowChangeEventHandler
  1897. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1898. Public Event 訂購RowDeleting As 訂購RowChangeEventHandler
  1899. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1900. Public Event 訂購RowDeleted As 訂購RowChangeEventHandler
  1901. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1902. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1903. Public Overloads Sub Add訂購Row(ByVal row As 訂購Row)
  1904. Me.Rows.Add(row)
  1905. End Sub
  1906. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1907. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1908. Public Overloads Function Add訂購Row(ByVal 會員編號 As String, ByVal 商品編號 As String, ByVal 訂購數量 As String) As 訂購Row
  1909. Dim row訂購Row As 訂購Row = CType(Me.NewRow,訂購Row)
  1910. Dim columnValuesArray() As Object = New Object() {會員編號, 商品編號, 訂購數量}
  1911. row訂購Row.ItemArray = columnValuesArray
  1912. Me.Rows.Add(row訂購Row)
  1913. Return row訂購Row
  1914. End Function
  1915. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1916. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1917. Public Function FindBy會員編號(ByVal 會員編號 As String) As 訂購Row
  1918. Return CType(Me.Rows.Find(New Object() {會員編號}),訂購Row)
  1919. End Function
  1920. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1921. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1922. Public Overrides Function Clone() As Global.System.Data.DataTable
  1923. Dim cln As 訂購DataTable = CType(MyBase.Clone,訂購DataTable)
  1924. cln.InitVars
  1925. Return cln
  1926. End Function
  1927. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1928. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1929. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  1930. Return New 訂購DataTable()
  1931. End Function
  1932. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1933. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1934. Friend Sub InitVars()
  1935. Me.column會員編號 = MyBase.Columns("會員編號")
  1936. Me.column商品編號 = MyBase.Columns("商品編號")
  1937. Me.column訂購數量 = MyBase.Columns("訂購數量")
  1938. End Sub
  1939. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1940. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1941. Private Sub InitClass()
  1942. Me.column會員編號 = New Global.System.Data.DataColumn("會員編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1943. MyBase.Columns.Add(Me.column會員編號)
  1944. Me.column商品編號 = New Global.System.Data.DataColumn("商品編號", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1945. MyBase.Columns.Add(Me.column商品編號)
  1946. Me.column訂購數量 = New Global.System.Data.DataColumn("訂購數量", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1947. MyBase.Columns.Add(Me.column訂購數量)
  1948. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.column會員編號}, true))
  1949. Me.column會員編號.AllowDBNull = false
  1950. Me.column會員編號.Unique = true
  1951. Me.column會員編號.MaxLength = 50
  1952. Me.column商品編號.MaxLength = 50
  1953. Me.column訂購數量.MaxLength = 50
  1954. End Sub
  1955. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1956. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1957. Public Function New訂購Row() As 訂購Row
  1958. Return CType(Me.NewRow,訂購Row)
  1959. End Function
  1960. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1961. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1962. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  1963. Return New 訂購Row(builder)
  1964. End Function
  1965. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1966. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1967. Protected Overrides Function GetRowType() As Global.System.Type
  1968. Return GetType(訂購Row)
  1969. End Function
  1970. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1971. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1972. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1973. MyBase.OnRowChanged(e)
  1974. If (Not (Me.訂購RowChangedEvent) Is Nothing) Then
  1975. RaiseEvent 訂購RowChanged(Me, New 訂購RowChangeEvent(CType(e.Row,訂購Row), e.Action))
  1976. End If
  1977. End Sub
  1978. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1979. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1980. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1981. MyBase.OnRowChanging(e)
  1982. If (Not (Me.訂購RowChangingEvent) Is Nothing) Then
  1983. RaiseEvent 訂購RowChanging(Me, New 訂購RowChangeEvent(CType(e.Row,訂購Row), e.Action))
  1984. End If
  1985. End Sub
  1986. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1987. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1988. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1989. MyBase.OnRowDeleted(e)
  1990. If (Not (Me.訂購RowDeletedEvent) Is Nothing) Then
  1991. RaiseEvent 訂購RowDeleted(Me, New 訂購RowChangeEvent(CType(e.Row,訂購Row), e.Action))
  1992. End If
  1993. End Sub
  1994. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1995. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  1996. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1997. MyBase.OnRowDeleting(e)
  1998. If (Not (Me.訂購RowDeletingEvent) Is Nothing) Then
  1999. RaiseEvent 訂購RowDeleting(Me, New 訂購RowChangeEvent(CType(e.Row,訂購Row), e.Action))
  2000. End If
  2001. End Sub
  2002. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2003. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2004. Public Sub Remove訂購Row(ByVal row As 訂購Row)
  2005. Me.Rows.Remove(row)
  2006. End Sub
  2007. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2008. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2009. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  2010. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
  2011. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
  2012. Dim ds As 謎鹿DataSet = New 謎鹿DataSet()
  2013. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  2014. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  2015. any1.MinOccurs = New Decimal(0)
  2016. any1.MaxOccurs = Decimal.MaxValue
  2017. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2018. sequence.Items.Add(any1)
  2019. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
  2020. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  2021. any2.MinOccurs = New Decimal(1)
  2022. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2023. sequence.Items.Add(any2)
  2024. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  2025. attribute1.Name = "namespace"
  2026. attribute1.FixedValue = ds.Namespace
  2027. type.Attributes.Add(attribute1)
  2028. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
  2029. attribute2.Name = "tableTypeName"
  2030. attribute2.FixedValue = "訂購DataTable"
  2031. type.Attributes.Add(attribute2)
  2032. type.Particle = sequence
  2033. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  2034. If xs.Contains(dsSchema.TargetNamespace) Then
  2035. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  2036. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
  2037. Try
  2038. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  2039. dsSchema.Write(s1)
  2040. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  2041. Do While schemas.MoveNext
  2042. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  2043. s2.SetLength(0)
  2044. schema.Write(s2)
  2045. If (s1.Length = s2.Length) Then
  2046. s1.Position = 0
  2047. s2.Position = 0
  2048. Do While ((s1.Position <> s1.Length) _
  2049. AndAlso (s1.ReadByte = s2.ReadByte))
  2050. Loop
  2051. If (s1.Position = s1.Length) Then
  2052. Return type
  2053. End If
  2054. End If
  2055. Loop
  2056. Finally
  2057. If (Not (s1) Is Nothing) Then
  2058. s1.Close
  2059. End If
  2060. If (Not (s2) Is Nothing) Then
  2061. s2.Close
  2062. End If
  2063. End Try
  2064. End If
  2065. xs.Add(dsSchema)
  2066. Return type
  2067. End Function
  2068. End Class
  2069. '''<summary>
  2070. '''Represents strongly named DataRow class.
  2071. '''</summary>
  2072. Partial Public Class 商品Row
  2073. Inherits Global.System.Data.DataRow
  2074. Private table商品 As 商品DataTable
  2075. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2076. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2077. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  2078. MyBase.New(rb)
  2079. Me.table商品 = CType(Me.Table,商品DataTable)
  2080. End Sub
  2081. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2082. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2083. Public Property 商品編號() As String
  2084. Get
  2085. Return CType(Me(Me.table商品.商品編號Column),String)
  2086. End Get
  2087. Set
  2088. Me(Me.table商品.商品編號Column) = value
  2089. End Set
  2090. End Property
  2091. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2092. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2093. Public Property 商品名稱() As String
  2094. Get
  2095. Try
  2096. Return CType(Me(Me.table商品.商品名稱Column),String)
  2097. Catch e As Global.System.InvalidCastException
  2098. Throw New Global.System.Data.StrongTypingException("資料表 '商品' 中資料行 '商品名稱' 的值是 DBNull。", e)
  2099. End Try
  2100. End Get
  2101. Set
  2102. Me(Me.table商品.商品名稱Column) = value
  2103. End Set
  2104. End Property
  2105. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2106. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2107. Public Property 庫存數量() As String
  2108. Get
  2109. Try
  2110. Return CType(Me(Me.table商品.庫存數量Column),String)
  2111. Catch e As Global.System.InvalidCastException
  2112. Throw New Global.System.Data.StrongTypingException("資料表 '商品' 中資料行 '庫存數量' 的值是 DBNull。", e)
  2113. End Try
  2114. End Get
  2115. Set
  2116. Me(Me.table商品.庫存數量Column) = value
  2117. End Set
  2118. End Property
  2119. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2120. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2121. Public Property 定價() As String
  2122. Get
  2123. Try
  2124. Return CType(Me(Me.table商品.定價Column),String)
  2125. Catch e As Global.System.InvalidCastException
  2126. Throw New Global.System.Data.StrongTypingException("資料表 '商品' 中資料行 '定價' 的值是 DBNull。", e)
  2127. End Try
  2128. End Get
  2129. Set
  2130. Me(Me.table商品.定價Column) = value
  2131. End Set
  2132. End Property
  2133. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2134. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2135. Public Property 種類() As String
  2136. Get
  2137. Try
  2138. Return CType(Me(Me.table商品.種類Column),String)
  2139. Catch e As Global.System.InvalidCastException
  2140. Throw New Global.System.Data.StrongTypingException("資料表 '商品' 中資料行 '種類' 的值是 DBNull。", e)
  2141. End Try
  2142. End Get
  2143. Set
  2144. Me(Me.table商品.種類Column) = value
  2145. End Set
  2146. End Property
  2147. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2148. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2149. Public Property 管理者編號() As String
  2150. Get
  2151. Try
  2152. Return CType(Me(Me.table商品.管理者編號Column),String)
  2153. Catch e As Global.System.InvalidCastException
  2154. Throw New Global.System.Data.StrongTypingException("資料表 '商品' 中資料行 '管理者編號' 的值是 DBNull。", e)
  2155. End Try
  2156. End Get
  2157. Set
  2158. Me(Me.table商品.管理者編號Column) = value
  2159. End Set
  2160. End Property
  2161. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2162. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2163. Public Function Is商品名稱Null() As Boolean
  2164. Return Me.IsNull(Me.table商品.商品名稱Column)
  2165. End Function
  2166. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2167. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2168. Public Sub Set商品名稱Null()
  2169. Me(Me.table商品.商品名稱Column) = Global.System.Convert.DBNull
  2170. End Sub
  2171. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2172. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2173. Public Function Is庫存數量Null() As Boolean
  2174. Return Me.IsNull(Me.table商品.庫存數量Column)
  2175. End Function
  2176. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2177. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2178. Public Sub Set庫存數量Null()
  2179. Me(Me.table商品.庫存數量Column) = Global.System.Convert.DBNull
  2180. End Sub
  2181. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2182. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2183. Public Function Is定價Null() As Boolean
  2184. Return Me.IsNull(Me.table商品.定價Column)
  2185. End Function
  2186. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2187. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2188. Public Sub Set定價Null()
  2189. Me(Me.table商品.定價Column) = Global.System.Convert.DBNull
  2190. End Sub
  2191. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2192. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2193. Public Function Is種類Null() As Boolean
  2194. Return Me.IsNull(Me.table商品.種類Column)
  2195. End Function
  2196. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2197. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2198. Public Sub Set種類Null()
  2199. Me(Me.table商品.種類Column) = Global.System.Convert.DBNull
  2200. End Sub
  2201. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2202. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2203. Public Function Is管理者編號Null() As Boolean
  2204. Return Me.IsNull(Me.table商品.管理者編號Column)
  2205. End Function
  2206. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2207. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2208. Public Sub Set管理者編號Null()
  2209. Me(Me.table商品.管理者編號Column) = Global.System.Convert.DBNull
  2210. End Sub
  2211. End Class
  2212. '''<summary>
  2213. '''Represents strongly named DataRow class.
  2214. '''</summary>
  2215. Partial Public Class 會員Row
  2216. Inherits Global.System.Data.DataRow
  2217. Private table會員 As 會員DataTable
  2218. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2219. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2220. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  2221. MyBase.New(rb)
  2222. Me.table會員 = CType(Me.Table,會員DataTable)
  2223. End Sub
  2224. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2225. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2226. Public Property 會員編號() As String
  2227. Get
  2228. Return CType(Me(Me.table會員.會員編號Column),String)
  2229. End Get
  2230. Set
  2231. Me(Me.table會員.會員編號Column) = value
  2232. End Set
  2233. End Property
  2234. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2235. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2236. Public Property 帳號() As String
  2237. Get
  2238. Try
  2239. Return CType(Me(Me.table會員.帳號Column),String)
  2240. Catch e As Global.System.InvalidCastException
  2241. Throw New Global.System.Data.StrongTypingException("資料表 '會員' 中資料行 '帳號' 的值是 DBNull。", e)
  2242. End Try
  2243. End Get
  2244. Set
  2245. Me(Me.table會員.帳號Column) = value
  2246. End Set
  2247. End Property
  2248. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2249. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2250. Public Property 密碼() As String
  2251. Get
  2252. Try
  2253. Return CType(Me(Me.table會員.密碼Column),String)
  2254. Catch e As Global.System.InvalidCastException
  2255. Throw New Global.System.Data.StrongTypingException("資料表 '會員' 中資料行 '密碼' 的值是 DBNull。", e)
  2256. End Try
  2257. End Get
  2258. Set
  2259. Me(Me.table會員.密碼Column) = value
  2260. End Set
  2261. End Property
  2262. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2263. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2264. Public Property 姓名() As String
  2265. Get
  2266. Try
  2267. Return CType(Me(Me.table會員.姓名Column),String)
  2268. Catch e As Global.System.InvalidCastException
  2269. Throw New Global.System.Data.StrongTypingException("資料表 '會員' 中資料行 '姓名' 的值是 DBNull。", e)
  2270. End Try
  2271. End Get
  2272. Set
  2273. Me(Me.table會員.姓名Column) = value
  2274. End Set
  2275. End Property
  2276. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2277. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2278. Public Property 電話() As String
  2279. Get
  2280. Try
  2281. Return CType(Me(Me.table會員.電話Column),String)
  2282. Catch e As Global.System.InvalidCastException
  2283. Throw New Global.System.Data.StrongTypingException("資料表 '會員' 中資料行 '電話' 的值是 DBNull。", e)
  2284. End Try
  2285. End Get
  2286. Set
  2287. Me(Me.table會員.電話Column) = value
  2288. End Set
  2289. End Property
  2290. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2291. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2292. Public Property 住址() As String
  2293. Get
  2294. Try
  2295. Return CType(Me(Me.table會員.住址Column),String)
  2296. Catch e As Global.System.InvalidCastException
  2297. Throw New Global.System.Data.StrongTypingException("資料表 '會員' 中資料行 '住址' 的值是 DBNull。", e)
  2298. End Try
  2299. End Get
  2300. Set
  2301. Me(Me.table會員.住址Column) = value
  2302. End Set
  2303. End Property
  2304. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2305. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2306. Public Property email() As String
  2307. Get
  2308. Try
  2309. Return CType(Me(Me.table會員.emailColumn),String)
  2310. Catch e As Global.System.InvalidCastException
  2311. Throw New Global.System.Data.StrongTypingException("資料表 '會員' 中資料行 'email' 的值是 DBNull。", e)
  2312. End Try
  2313. End Get
  2314. Set
  2315. Me(Me.table會員.emailColumn) = value
  2316. End Set
  2317. End Property
  2318. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2319. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2320. Public Function Is帳號Null() As Boolean
  2321. Return Me.IsNull(Me.table會員.帳號Column)
  2322. End Function
  2323. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2324. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2325. Public Sub Set帳號Null()
  2326. Me(Me.table會員.帳號Column) = Global.System.Convert.DBNull
  2327. End Sub
  2328. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2329. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2330. Public Function Is密碼Null() As Boolean
  2331. Return Me.IsNull(Me.table會員.密碼Column)
  2332. End Function
  2333. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2334. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2335. Public Sub Set密碼Null()
  2336. Me(Me.table會員.密碼Column) = Global.System.Convert.DBNull
  2337. End Sub
  2338. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2339. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2340. Public Function Is姓名Null() As Boolean
  2341. Return Me.IsNull(Me.table會員.姓名Column)
  2342. End Function
  2343. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2344. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2345. Public Sub Set姓名Null()
  2346. Me(Me.table會員.姓名Column) = Global.System.Convert.DBNull
  2347. End Sub
  2348. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2349. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2350. Public Function Is電話Null() As Boolean
  2351. Return Me.IsNull(Me.table會員.電話Column)
  2352. End Function
  2353. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2354. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2355. Public Sub Set電話Null()
  2356. Me(Me.table會員.電話Column) = Global.System.Convert.DBNull
  2357. End Sub
  2358. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2359. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2360. Public Function Is住址Null() As Boolean
  2361. Return Me.IsNull(Me.table會員.住址Column)
  2362. End Function
  2363. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2364. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2365. Public Sub Set住址Null()
  2366. Me(Me.table會員.住址Column) = Global.System.Convert.DBNull
  2367. End Sub
  2368. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2369. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2370. Public Function IsemailNull() As Boolean
  2371. Return Me.IsNull(Me.table會員.emailColumn)
  2372. End Function
  2373. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2374. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2375. Public Sub SetemailNull()
  2376. Me(Me.table會員.emailColumn) = Global.System.Convert.DBNull
  2377. End Sub
  2378. End Class
  2379. '''<summary>
  2380. '''Represents strongly named DataRow class.
  2381. '''</summary>
  2382. Partial Public Class 訂單Row
  2383. Inherits Global.System.Data.DataRow
  2384. Private table訂單 As 訂單DataTable
  2385. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2386. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2387. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  2388. MyBase.New(rb)
  2389. Me.table訂單 = CType(Me.Table,訂單DataTable)
  2390. End Sub
  2391. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2392. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2393. Public Property 訂單編號() As String
  2394. Get
  2395. Return CType(Me(Me.table訂單.訂單編號Column),String)
  2396. End Get
  2397. Set
  2398. Me(Me.table訂單.訂單編號Column) = value
  2399. End Set
  2400. End Property
  2401. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2402. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2403. Public Property 付款方式() As String
  2404. Get
  2405. Try
  2406. Return CType(Me(Me.table訂單.付款方式Column),String)
  2407. Catch e As Global.System.InvalidCastException
  2408. Throw New Global.System.Data.StrongTypingException("資料表 '訂單' 中資料行 '付款方式' 的值是 DBNull。", e)
  2409. End Try
  2410. End Get
  2411. Set
  2412. Me(Me.table訂單.付款方式Column) = value
  2413. End Set
  2414. End Property
  2415. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2416. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2417. Public Property 取貨方式() As String
  2418. Get
  2419. Try
  2420. Return CType(Me(Me.table訂單.取貨方式Column),String)
  2421. Catch e As Global.System.InvalidCastException
  2422. Throw New Global.System.Data.StrongTypingException("資料表 '訂單' 中資料行 '取貨方式' 的值是 DBNull。", e)
  2423. End Try
  2424. End Get
  2425. Set
  2426. Me(Me.table訂單.取貨方式Column) = value
  2427. End Set
  2428. End Property
  2429. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2430. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2431. Public Property 訂單日期() As String
  2432. Get
  2433. Try
  2434. Return CType(Me(Me.table訂單.訂單日期Column),String)
  2435. Catch e As Global.System.InvalidCastException
  2436. Throw New Global.System.Data.StrongTypingException("資料表 '訂單' 中資料行 '訂單日期' 的值是 DBNull。", e)
  2437. End Try
  2438. End Get
  2439. Set
  2440. Me(Me.table訂單.訂單日期Column) = value
  2441. End Set
  2442. End Property
  2443. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2444. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2445. Public Property 會員編號() As String
  2446. Get
  2447. Try
  2448. Return CType(Me(Me.table訂單.會員編號Column),String)
  2449. Catch e As Global.System.InvalidCastException
  2450. Throw New Global.System.Data.StrongTypingException("資料表 '訂單' 中資料行 '會員編號' 的值是 DBNull。", e)
  2451. End Try
  2452. End Get
  2453. Set
  2454. Me(Me.table訂單.會員編號Column) = value
  2455. End Set
  2456. End Property
  2457. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2458. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2459. Public Property 購物車編號() As String
  2460. Get
  2461. Try
  2462. Return CType(Me(Me.table訂單.購物車編號Column),String)
  2463. Catch e As Global.System.InvalidCastException
  2464. Throw New Global.System.Data.StrongTypingException("資料表 '訂單' 中資料行 '購物車編號' 的值是 DBNull。", e)
  2465. End Try
  2466. End Get
  2467. Set
  2468. Me(Me.table訂單.購物車編號Column) = value
  2469. End Set
  2470. End Property
  2471. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2472. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2473. Public Function Is付款方式Null() As Boolean
  2474. Return Me.IsNull(Me.table訂單.付款方式Column)
  2475. End Function
  2476. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2477. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2478. Public Sub Set付款方式Null()
  2479. Me(Me.table訂單.付款方式Column) = Global.System.Convert.DBNull
  2480. End Sub
  2481. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2482. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2483. Public Function Is取貨方式Null() As Boolean
  2484. Return Me.IsNull(Me.table訂單.取貨方式Column)
  2485. End Function
  2486. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2487. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2488. Public Sub Set取貨方式Null()
  2489. Me(Me.table訂單.取貨方式Column) = Global.System.Convert.DBNull
  2490. End Sub
  2491. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2492. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2493. Public Function Is訂單日期Null() As Boolean
  2494. Return Me.IsNull(Me.table訂單.訂單日期Column)
  2495. End Function
  2496. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2497. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2498. Public Sub Set訂單日期Null()
  2499. Me(Me.table訂單.訂單日期Column) = Global.System.Convert.DBNull
  2500. End Sub
  2501. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2502. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2503. Public Function Is會員編號Null() As Boolean
  2504. Return Me.IsNull(Me.table訂單.會員編號Column)
  2505. End Function
  2506. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2507. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2508. Public Sub Set會員編號Null()
  2509. Me(Me.table訂單.會員編號Column) = Global.System.Convert.DBNull
  2510. End Sub
  2511. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2512. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2513. Public Function Is購物車編號Null() As Boolean
  2514. Return Me.IsNull(Me.table訂單.購物車編號Column)
  2515. End Function
  2516. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2517. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2518. Public Sub Set購物車編號Null()
  2519. Me(Me.table訂單.購物車編號Column) = Global.System.Convert.DBNull
  2520. End Sub
  2521. End Class
  2522. '''<summary>
  2523. '''Represents strongly named DataRow class.
  2524. '''</summary>
  2525. Partial Public Class 購物車Row
  2526. Inherits Global.System.Data.DataRow
  2527. Private table購物車 As 購物車DataTable
  2528. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2529. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2530. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  2531. MyBase.New(rb)
  2532. Me.table購物車 = CType(Me.Table,購物車DataTable)
  2533. End Sub
  2534. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2535. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2536. Public Property 會員編號() As String
  2537. Get
  2538. Return CType(Me(Me.table購物車.會員編號Column),String)
  2539. End Get
  2540. Set
  2541. Me(Me.table購物車.會員編號Column) = value
  2542. End Set
  2543. End Property
  2544. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2545. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2546. Public Property 運費() As String
  2547. Get
  2548. Try
  2549. Return CType(Me(Me.table購物車.運費Column),String)
  2550. Catch e As Global.System.InvalidCastException
  2551. Throw New Global.System.Data.StrongTypingException("資料表 '購物車' 中資料行 '運費' 的值是 DBNull。", e)
  2552. End Try
  2553. End Get
  2554. Set
  2555. Me(Me.table購物車.運費Column) = value
  2556. End Set
  2557. End Property
  2558. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2559. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2560. Public Property 總金額() As String
  2561. Get
  2562. Try
  2563. Return CType(Me(Me.table購物車.總金額Column),String)
  2564. Catch e As Global.System.InvalidCastException
  2565. Throw New Global.System.Data.StrongTypingException("資料表 '購物車' 中資料行 '總金額' 的值是 DBNull。", e)
  2566. End Try
  2567. End Get
  2568. Set
  2569. Me(Me.table購物車.總金額Column) = value
  2570. End Set
  2571. End Property
  2572. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2573. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2574. Public Property 購物車編號() As String
  2575. Get
  2576. Try
  2577. Return CType(Me(Me.table購物車.購物車編號Column),String)
  2578. Catch e As Global.System.InvalidCastException
  2579. Throw New Global.System.Data.StrongTypingException("資料表 '購物車' 中資料行 '購物車編號' 的值是 DBNull。", e)
  2580. End Try
  2581. End Get
  2582. Set
  2583. Me(Me.table購物車.購物車編號Column) = value
  2584. End Set
  2585. End Property
  2586. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2587. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2588. Public Function Is運費Null() As Boolean
  2589. Return Me.IsNull(Me.table購物車.運費Column)
  2590. End Function
  2591. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2592. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2593. Public Sub Set運費Null()
  2594. Me(Me.table購物車.運費Column) = Global.System.Convert.DBNull
  2595. End Sub
  2596. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2597. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2598. Public Function Is總金額Null() As Boolean
  2599. Return Me.IsNull(Me.table購物車.總金額Column)
  2600. End Function
  2601. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2602. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2603. Public Sub Set總金額Null()
  2604. Me(Me.table購物車.總金額Column) = Global.System.Convert.DBNull
  2605. End Sub
  2606. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2607. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2608. Public Function Is購物車編號Null() As Boolean
  2609. Return Me.IsNull(Me.table購物車.購物車編號Column)
  2610. End Function
  2611. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2612. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2613. Public Sub Set購物車編號Null()
  2614. Me(Me.table購物車.購物車編號Column) = Global.System.Convert.DBNull
  2615. End Sub
  2616. End Class
  2617. '''<summary>
  2618. '''Represents strongly named DataRow class.
  2619. '''</summary>
  2620. Partial Public Class 紀錄Row
  2621. Inherits Global.System.Data.DataRow
  2622. Private table紀錄 As 紀錄DataTable
  2623. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2624. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2625. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  2626. MyBase.New(rb)
  2627. Me.table紀錄 = CType(Me.Table,紀錄DataTable)
  2628. End Sub
  2629. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2630. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2631. Public Property 訂單編號() As String
  2632. Get
  2633. Return CType(Me(Me.table紀錄.訂單編號Column),String)
  2634. End Get
  2635. Set
  2636. Me(Me.table紀錄.訂單編號Column) = value
  2637. End Set
  2638. End Property
  2639. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2640. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2641. Public Property 商品編號() As String
  2642. Get
  2643. Try
  2644. Return CType(Me(Me.table紀錄.商品編號Column),String)
  2645. Catch e As Global.System.InvalidCastException
  2646. Throw New Global.System.Data.StrongTypingException("資料表 '紀錄' 中資料行 '商品編號' 的值是 DBNull。", e)
  2647. End Try
  2648. End Get
  2649. Set
  2650. Me(Me.table紀錄.商品編號Column) = value
  2651. End Set
  2652. End Property
  2653. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2654. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2655. Public Property 訂購數量() As String
  2656. Get
  2657. Try
  2658. Return CType(Me(Me.table紀錄.訂購數量Column),String)
  2659. Catch e As Global.System.InvalidCastException
  2660. Throw New Global.System.Data.StrongTypingException("資料表 '紀錄' 中資料行 '訂購數量' 的值是 DBNull。", e)
  2661. End Try
  2662. End Get
  2663. Set
  2664. Me(Me.table紀錄.訂購數量Column) = value
  2665. End Set
  2666. End Property
  2667. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2668. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2669. Public Property 價錢() As String
  2670. Get
  2671. Try
  2672. Return CType(Me(Me.table紀錄.價錢Column),String)
  2673. Catch e As Global.System.InvalidCastException
  2674. Throw New Global.System.Data.StrongTypingException("資料表 '紀錄' 中資料行 '價錢' 的值是 DBNull。", e)
  2675. End Try
  2676. End Get
  2677. Set
  2678. Me(Me.table紀錄.價錢Column) = value
  2679. End Set
  2680. End Property
  2681. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2682. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2683. Public Function Is商品編號Null() As Boolean
  2684. Return Me.IsNull(Me.table紀錄.商品編號Column)
  2685. End Function
  2686. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2687. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2688. Public Sub Set商品編號Null()
  2689. Me(Me.table紀錄.商品編號Column) = Global.System.Convert.DBNull
  2690. End Sub
  2691. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2692. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2693. Public Function Is訂購數量Null() As Boolean
  2694. Return Me.IsNull(Me.table紀錄.訂購數量Column)
  2695. End Function
  2696. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2697. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2698. Public Sub Set訂購數量Null()
  2699. Me(Me.table紀錄.訂購數量Column) = Global.System.Convert.DBNull
  2700. End Sub
  2701. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2702. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2703. Public Function Is價錢Null() As Boolean
  2704. Return Me.IsNull(Me.table紀錄.價錢Column)
  2705. End Function
  2706. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2707. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2708. Public Sub Set價錢Null()
  2709. Me(Me.table紀錄.價錢Column) = Global.System.Convert.DBNull
  2710. End Sub
  2711. End Class
  2712. '''<summary>
  2713. '''Represents strongly named DataRow class.
  2714. '''</summary>
  2715. Partial Public Class 訂購Row
  2716. Inherits Global.System.Data.DataRow
  2717. Private table訂購 As 訂購DataTable
  2718. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2719. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2720. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  2721. MyBase.New(rb)
  2722. Me.table訂購 = CType(Me.Table,訂購DataTable)
  2723. End Sub
  2724. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2725. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2726. Public Property 會員編號() As String
  2727. Get
  2728. Return CType(Me(Me.table訂購.會員編號Column),String)
  2729. End Get
  2730. Set
  2731. Me(Me.table訂購.會員編號Column) = value
  2732. End Set
  2733. End Property
  2734. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2735. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2736. Public Property 商品編號() As String
  2737. Get
  2738. Try
  2739. Return CType(Me(Me.table訂購.商品編號Column),String)
  2740. Catch e As Global.System.InvalidCastException
  2741. Throw New Global.System.Data.StrongTypingException("資料表 '訂購' 中資料行 '商品編號' 的值是 DBNull。", e)
  2742. End Try
  2743. End Get
  2744. Set
  2745. Me(Me.table訂購.商品編號Column) = value
  2746. End Set
  2747. End Property
  2748. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2749. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2750. Public Property 訂購數量() As String
  2751. Get
  2752. Try
  2753. Return CType(Me(Me.table訂購.訂購數量Column),String)
  2754. Catch e As Global.System.InvalidCastException
  2755. Throw New Global.System.Data.StrongTypingException("資料表 '訂購' 中資料行 '訂購數量' 的值是 DBNull。", e)
  2756. End Try
  2757. End Get
  2758. Set
  2759. Me(Me.table訂購.訂購數量Column) = value
  2760. End Set
  2761. End Property
  2762. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2763. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2764. Public Function Is商品編號Null() As Boolean
  2765. Return Me.IsNull(Me.table訂購.商品編號Column)
  2766. End Function
  2767. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2768. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2769. Public Sub Set商品編號Null()
  2770. Me(Me.table訂購.商品編號Column) = Global.System.Convert.DBNull
  2771. End Sub
  2772. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2773. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2774. Public Function Is訂購數量Null() As Boolean
  2775. Return Me.IsNull(Me.table訂購.訂購數量Column)
  2776. End Function
  2777. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2778. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2779. Public Sub Set訂購數量Null()
  2780. Me(Me.table訂購.訂購數量Column) = Global.System.Convert.DBNull
  2781. End Sub
  2782. End Class
  2783. '''<summary>
  2784. '''Row event argument class
  2785. '''</summary>
  2786. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2787. Public Class 商品RowChangeEvent
  2788. Inherits Global.System.EventArgs
  2789. Private eventRow As 商品Row
  2790. Private eventAction As Global.System.Data.DataRowAction
  2791. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2792. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2793. Public Sub New(ByVal row As 商品Row, ByVal action As Global.System.Data.DataRowAction)
  2794. MyBase.New
  2795. Me.eventRow = row
  2796. Me.eventAction = action
  2797. End Sub
  2798. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2799. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2800. Public ReadOnly Property Row() As 商品Row
  2801. Get
  2802. Return Me.eventRow
  2803. End Get
  2804. End Property
  2805. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2806. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2807. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  2808. Get
  2809. Return Me.eventAction
  2810. End Get
  2811. End Property
  2812. End Class
  2813. '''<summary>
  2814. '''Row event argument class
  2815. '''</summary>
  2816. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2817. Public Class 會員RowChangeEvent
  2818. Inherits Global.System.EventArgs
  2819. Private eventRow As 會員Row
  2820. Private eventAction As Global.System.Data.DataRowAction
  2821. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2822. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2823. Public Sub New(ByVal row As 會員Row, ByVal action As Global.System.Data.DataRowAction)
  2824. MyBase.New
  2825. Me.eventRow = row
  2826. Me.eventAction = action
  2827. End Sub
  2828. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2829. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2830. Public ReadOnly Property Row() As 會員Row
  2831. Get
  2832. Return Me.eventRow
  2833. End Get
  2834. End Property
  2835. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2836. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2837. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  2838. Get
  2839. Return Me.eventAction
  2840. End Get
  2841. End Property
  2842. End Class
  2843. '''<summary>
  2844. '''Row event argument class
  2845. '''</summary>
  2846. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2847. Public Class 訂單RowChangeEvent
  2848. Inherits Global.System.EventArgs
  2849. Private eventRow As 訂單Row
  2850. Private eventAction As Global.System.Data.DataRowAction
  2851. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2852. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2853. Public Sub New(ByVal row As 訂單Row, ByVal action As Global.System.Data.DataRowAction)
  2854. MyBase.New
  2855. Me.eventRow = row
  2856. Me.eventAction = action
  2857. End Sub
  2858. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2859. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2860. Public ReadOnly Property Row() As 訂單Row
  2861. Get
  2862. Return Me.eventRow
  2863. End Get
  2864. End Property
  2865. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2866. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2867. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  2868. Get
  2869. Return Me.eventAction
  2870. End Get
  2871. End Property
  2872. End Class
  2873. '''<summary>
  2874. '''Row event argument class
  2875. '''</summary>
  2876. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2877. Public Class 購物車RowChangeEvent
  2878. Inherits Global.System.EventArgs
  2879. Private eventRow As 購物車Row
  2880. Private eventAction As Global.System.Data.DataRowAction
  2881. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2882. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2883. Public Sub New(ByVal row As 購物車Row, ByVal action As Global.System.Data.DataRowAction)
  2884. MyBase.New
  2885. Me.eventRow = row
  2886. Me.eventAction = action
  2887. End Sub
  2888. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2889. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2890. Public ReadOnly Property Row() As 購物車Row
  2891. Get
  2892. Return Me.eventRow
  2893. End Get
  2894. End Property
  2895. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2896. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2897. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  2898. Get
  2899. Return Me.eventAction
  2900. End Get
  2901. End Property
  2902. End Class
  2903. '''<summary>
  2904. '''Row event argument class
  2905. '''</summary>
  2906. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2907. Public Class 紀錄RowChangeEvent
  2908. Inherits Global.System.EventArgs
  2909. Private eventRow As 紀錄Row
  2910. Private eventAction As Global.System.Data.DataRowAction
  2911. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2912. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2913. Public Sub New(ByVal row As 紀錄Row, ByVal action As Global.System.Data.DataRowAction)
  2914. MyBase.New
  2915. Me.eventRow = row
  2916. Me.eventAction = action
  2917. End Sub
  2918. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2919. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2920. Public ReadOnly Property Row() As 紀錄Row
  2921. Get
  2922. Return Me.eventRow
  2923. End Get
  2924. End Property
  2925. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2926. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2927. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  2928. Get
  2929. Return Me.eventAction
  2930. End Get
  2931. End Property
  2932. End Class
  2933. '''<summary>
  2934. '''Row event argument class
  2935. '''</summary>
  2936. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2937. Public Class 訂購RowChangeEvent
  2938. Inherits Global.System.EventArgs
  2939. Private eventRow As 訂購Row
  2940. Private eventAction As Global.System.Data.DataRowAction
  2941. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2942. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2943. Public Sub New(ByVal row As 訂購Row, ByVal action As Global.System.Data.DataRowAction)
  2944. MyBase.New
  2945. Me.eventRow = row
  2946. Me.eventAction = action
  2947. End Sub
  2948. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2949. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2950. Public ReadOnly Property Row() As 訂購Row
  2951. Get
  2952. Return Me.eventRow
  2953. End Get
  2954. End Property
  2955. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2956. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2957. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  2958. Get
  2959. Return Me.eventAction
  2960. End Get
  2961. End Property
  2962. End Class
  2963. End Class
  2964. Namespace 謎鹿DataSetTableAdapters
  2965. '''<summary>
  2966. '''Represents the connection and commands used to retrieve and save data.
  2967. '''</summary>
  2968. <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  2969. Global.System.ComponentModel.ToolboxItem(true), _
  2970. Global.System.ComponentModel.DataObjectAttribute(true), _
  2971. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  2972. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  2973. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  2974. Partial Public Class 商品TableAdapter
  2975. Inherits Global.System.ComponentModel.Component
  2976. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  2977. Private _connection As Global.System.Data.SqlClient.SqlConnection
  2978. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  2979. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  2980. Private _clearBeforeFill As Boolean
  2981. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2982. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2983. Public Sub New()
  2984. MyBase.New
  2985. Me.ClearBeforeFill = true
  2986. End Sub
  2987. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2988. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2989. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  2990. Get
  2991. If (Me._adapter Is Nothing) Then
  2992. Me.InitAdapter
  2993. End If
  2994. Return Me._adapter
  2995. End Get
  2996. End Property
  2997. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2998. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  2999. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  3000. Get
  3001. If (Me._connection Is Nothing) Then
  3002. Me.InitConnection
  3003. End If
  3004. Return Me._connection
  3005. End Get
  3006. Set
  3007. Me._connection = value
  3008. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  3009. Me.Adapter.InsertCommand.Connection = value
  3010. End If
  3011. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  3012. Me.Adapter.DeleteCommand.Connection = value
  3013. End If
  3014. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  3015. Me.Adapter.UpdateCommand.Connection = value
  3016. End If
  3017. Dim i As Integer = 0
  3018. Do While (i < Me.CommandCollection.Length)
  3019. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  3020. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  3021. End If
  3022. i = (i + 1)
  3023. Loop
  3024. End Set
  3025. End Property
  3026. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3027. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3028. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  3029. Get
  3030. Return Me._transaction
  3031. End Get
  3032. Set
  3033. Me._transaction = value
  3034. Dim i As Integer = 0
  3035. Do While (i < Me.CommandCollection.Length)
  3036. Me.CommandCollection(i).Transaction = Me._transaction
  3037. i = (i + 1)
  3038. Loop
  3039. If ((Not (Me.Adapter) Is Nothing) _
  3040. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  3041. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  3042. End If
  3043. If ((Not (Me.Adapter) Is Nothing) _
  3044. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  3045. Me.Adapter.InsertCommand.Transaction = Me._transaction
  3046. End If
  3047. If ((Not (Me.Adapter) Is Nothing) _
  3048. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  3049. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  3050. End If
  3051. End Set
  3052. End Property
  3053. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3054. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3055. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  3056. Get
  3057. If (Me._commandCollection Is Nothing) Then
  3058. Me.InitCommandCollection
  3059. End If
  3060. Return Me._commandCollection
  3061. End Get
  3062. End Property
  3063. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3064. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3065. Public Property ClearBeforeFill() As Boolean
  3066. Get
  3067. Return Me._clearBeforeFill
  3068. End Get
  3069. Set
  3070. Me._clearBeforeFill = value
  3071. End Set
  3072. End Property
  3073. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3074. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3075. Private Sub InitAdapter()
  3076. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter()
  3077. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
  3078. tableMapping.SourceTable = "Table"
  3079. tableMapping.DataSetTable = "商品"
  3080. tableMapping.ColumnMappings.Add("商品編號", "商品編號")
  3081. tableMapping.ColumnMappings.Add("商品名稱", "商品名稱")
  3082. tableMapping.ColumnMappings.Add("庫存數量", "庫存數量")
  3083. tableMapping.ColumnMappings.Add("定價", "定價")
  3084. tableMapping.ColumnMappings.Add("種類", "種類")
  3085. tableMapping.ColumnMappings.Add("管理者編號", "管理者編號")
  3086. Me._adapter.TableMappings.Add(tableMapping)
  3087. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand()
  3088. Me._adapter.DeleteCommand.Connection = Me.Connection
  3089. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[商品] WHERE (([商品編號] = @Original_商品編號) AND ((@IsNull_商品名稱 = 1 AN"& _
  3090. "D [商品名稱] IS NULL) OR ([商品名稱] = @Original_商品名稱)) AND ((@IsNull_庫存數量 = 1 AND [庫存數量"& _
  3091. "] IS NULL) OR ([庫存數量] = @Original_庫存數量)) AND ((@IsNull_定價 = 1 AND [定價] IS NULL) "& _
  3092. "OR ([定價] = @Original_定價)) AND ((@IsNull_種類 = 1 AND [種類] IS NULL) OR ([種類] = @Ori"& _
  3093. "ginal_種類)) AND ((@IsNull_管理者編號 = 1 AND [管理者編號] IS NULL) OR ([管理者編號] = @Original_"& _
  3094. "管理者編號)))"
  3095. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  3096. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_商品編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3097. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_商品名稱", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品名稱", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3098. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_商品名稱", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品名稱", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3099. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_庫存數量", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "庫存數量", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3100. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_庫存數量", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "庫存數量", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3101. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_定價", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "定價", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3102. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_定價", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "定價", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3103. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_種類", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "種類", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3104. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_種類", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "種類", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3105. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_管理者編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "管理者編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3106. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_管理者編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "管理者編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3107. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand()
  3108. Me._adapter.InsertCommand.Connection = Me.Connection
  3109. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[商品] ([商品編號], [商品名稱], [庫存數量], [定價], [種類], [管理者編號]) VALUES (@商品編"& _
  3110. "號, @商品名稱, @庫存數量, @定價, @種類, @管理者編號);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號 FROM"& _
  3111. " 商品 WHERE (商品編號 = @商品編號)"
  3112. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  3113. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3114. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品名稱", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品名稱", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3115. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@庫存數量", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "庫存數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3116. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@定價", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "定價", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3117. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@種類", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "種類", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3118. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@管理者編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "管理者編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3119. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand()
  3120. Me._adapter.UpdateCommand.Connection = Me.Connection
  3121. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[商品] SET [商品編號] = @商品編號, [商品名稱] = @商品名稱, [庫存數量] = @庫存數量, [定價] = @定價,"& _
  3122. " [種類] = @種類, [管理者編號] = @管理者編號 WHERE (([商品編號] = @Original_商品編號) AND ((@IsNull_商品名"& _
  3123. "稱 = 1 AND [商品名稱] IS NULL) OR ([商品名稱] = @Original_商品名稱)) AND ((@IsNull_庫存數量 = 1 A"& _
  3124. "ND [庫存數量] IS NULL) OR ([庫存數量] = @Original_庫存數量)) AND ((@IsNull_定價 = 1 AND [定價] I"& _
  3125. "S NULL) OR ([定價] = @Original_定價)) AND ((@IsNull_種類 = 1 AND [種類] IS NULL) OR ([種類"& _
  3126. "] = @Original_種類)) AND ((@IsNull_管理者編號 = 1 AND [管理者編號] IS NULL) OR ([管理者編號] = @O"& _
  3127. "riginal_管理者編號)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號 FROM 商品 WHERE (商品編號 = "& _
  3128. "@商品編號)"
  3129. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  3130. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3131. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品名稱", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品名稱", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3132. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@庫存數量", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "庫存數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3133. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@定價", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "定價", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3134. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@種類", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "種類", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3135. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@管理者編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "管理者編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3136. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_商品編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3137. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_商品名稱", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品名稱", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3138. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_商品名稱", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品名稱", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3139. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_庫存數量", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "庫存數量", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3140. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_庫存數量", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "庫存數量", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3141. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_定價", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "定價", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3142. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_定價", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "定價", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3143. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_種類", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "種類", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3144. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_種類", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "種類", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3145. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_管理者編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "管理者編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3146. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_管理者編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "管理者編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3147. End Sub
  3148. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3149. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3150. Private Sub InitConnection()
  3151. Me._connection = New Global.System.Data.SqlClient.SqlConnection()
  3152. Me._connection.ConnectionString = Global.謎鹿進銷存系統.My.MySettings.Default.謎鹿ConnectionString1
  3153. End Sub
  3154. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3155. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3156. Private Sub InitCommandCollection()
  3157. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(6) {}
  3158. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand()
  3159. Me._commandCollection(0).Connection = Me.Connection
  3160. Me._commandCollection(0).CommandText = "SELECT 商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號 FROM dbo.商品"
  3161. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  3162. Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand()
  3163. Me._commandCollection(1).Connection = Me.Connection
  3164. Me._commandCollection(1).CommandText = "DELETE FROM 商品"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (商品編號 = @商品編號)"
  3165. Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text
  3166. Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3167. Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand()
  3168. Me._commandCollection(2).Connection = Me.Connection
  3169. Me._commandCollection(2).CommandText = "SELECT 商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM 商品"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _
  3170. " (商品編號 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (商品名稱 LIKE @keyword) O"& _
  3171. "R"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (庫存數量 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _
  3172. " (定價 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (種類 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _
  3173. " (管理者編號 LIKE @keyword)"
  3174. Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text
  3175. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@keyword", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3176. Me._commandCollection(3) = New Global.System.Data.SqlClient.SqlCommand()
  3177. Me._commandCollection(3).Connection = Me.Connection
  3178. Me._commandCollection(3).CommandText = "SELECT 商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM 商品"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _
  3179. " (商品編號 LIKE @sql)"
  3180. Me._commandCollection(3).CommandType = Global.System.Data.CommandType.Text
  3181. Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sql", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3182. Me._commandCollection(4) = New Global.System.Data.SqlClient.SqlCommand()
  3183. Me._commandCollection(4).Connection = Me.Connection
  3184. Me._commandCollection(4).CommandText = "INSERT INTO 商品"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VA"& _
  3185. "LUES (@商品編號,@商品名稱,@庫存數量,@定價,@種類,@管理者編號); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 商品編號, 商品名稱, 庫存數量, 定價,"& _
  3186. " 種類, 管理者編號 FROM 商品 WHERE (商品編號 = @商品編號)"
  3187. Me._commandCollection(4).CommandType = Global.System.Data.CommandType.Text
  3188. Me._commandCollection(4).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3189. Me._commandCollection(4).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品名稱", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "商品名稱", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3190. Me._commandCollection(4).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@庫存數量", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "庫存數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3191. Me._commandCollection(4).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@定價", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "定價", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3192. Me._commandCollection(4).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@種類", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "種類", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3193. Me._commandCollection(4).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@管理者編號", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "管理者編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3194. Me._commandCollection(5) = New Global.System.Data.SqlClient.SqlCommand()
  3195. Me._commandCollection(5).Connection = Me.Connection
  3196. Me._commandCollection(5).CommandText = "UPDATE 商品"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET 商品編號 = @商品編號, 商品名稱 = @商品名稱, 庫存數量 = @庫存數"& _
  3197. "量, 定價 = @定價, 種類 = @種類, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" 管理者編號 = @管理者編號"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _
  3198. " (商品編號 = @商品編號); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號 FROM 商品 WHERE (商品編號"& _
  3199. " = @商品編號)"
  3200. Me._commandCollection(5).CommandType = Global.System.Data.CommandType.Text
  3201. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3202. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品名稱", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "商品名稱", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3203. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@庫存數量", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "庫存數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3204. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@定價", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "定價", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3205. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@種類", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "種類", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3206. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@管理者編號", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "管理者編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3207. Me._commandCollection(6) = New Global.System.Data.SqlClient.SqlCommand()
  3208. Me._commandCollection(6).Connection = Me.Connection
  3209. Me._commandCollection(6).CommandText = "UPDATE 商品"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET 庫存數量 = @庫存數量"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (商品編號 = @商"& _
  3210. "品編號); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號 FROM 商品 WHERE (商品編號 = @商品編號)"
  3211. Me._commandCollection(6).CommandType = Global.System.Data.CommandType.Text
  3212. Me._commandCollection(6).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@庫存數量", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "庫存數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3213. Me._commandCollection(6).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3214. End Sub
  3215. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3216. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3217. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3218. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  3219. Public Overloads Overridable Function Fill(ByVal dataTable As 謎鹿DataSet.商品DataTable) As Integer
  3220. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  3221. If (Me.ClearBeforeFill = true) Then
  3222. dataTable.Clear
  3223. End If
  3224. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  3225. Return returnValue
  3226. End Function
  3227. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3228. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3229. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3230. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  3231. Public Overloads Overridable Function GetData() As 謎鹿DataSet.商品DataTable
  3232. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  3233. Dim dataTable As 謎鹿DataSet.商品DataTable = New 謎鹿DataSet.商品DataTable()
  3234. Me.Adapter.Fill(dataTable)
  3235. Return dataTable
  3236. End Function
  3237. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3238. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3239. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3240. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
  3241. Public Overloads Overridable Function FillByKeyword(ByVal dataTable As 謎鹿DataSet.商品DataTable, ByVal keyword As String) As Integer
  3242. Me.Adapter.SelectCommand = Me.CommandCollection(2)
  3243. If (keyword Is Nothing) Then
  3244. Throw New Global.System.ArgumentNullException("keyword")
  3245. Else
  3246. Me.Adapter.SelectCommand.Parameters(0).Value = CType(keyword,String)
  3247. End If
  3248. If (Me.ClearBeforeFill = true) Then
  3249. dataTable.Clear
  3250. End If
  3251. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  3252. Return returnValue
  3253. End Function
  3254. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3255. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3256. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3257. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
  3258. Public Overloads Overridable Function FillBysql(ByVal dataTable As 謎鹿DataSet.商品DataTable, ByVal sql As String) As Integer
  3259. Me.Adapter.SelectCommand = Me.CommandCollection(3)
  3260. If (sql Is Nothing) Then
  3261. Throw New Global.System.ArgumentNullException("sql")
  3262. Else
  3263. Me.Adapter.SelectCommand.Parameters(0).Value = CType(sql,String)
  3264. End If
  3265. If (Me.ClearBeforeFill = true) Then
  3266. dataTable.Clear
  3267. End If
  3268. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  3269. Return returnValue
  3270. End Function
  3271. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3272. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3273. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  3274. Public Overloads Overridable Function Update(ByVal dataTable As 謎鹿DataSet.商品DataTable) As Integer
  3275. Return Me.Adapter.Update(dataTable)
  3276. End Function
  3277. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3278. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3279. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  3280. Public Overloads Overridable Function Update(ByVal dataSet As 謎鹿DataSet) As Integer
  3281. Return Me.Adapter.Update(dataSet, "商品")
  3282. End Function
  3283. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3284. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3285. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  3286. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  3287. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  3288. End Function
  3289. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3290. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3291. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  3292. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  3293. Return Me.Adapter.Update(dataRows)
  3294. End Function
  3295. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3296. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3297. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3298. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  3299. Public Overloads Overridable Function Delete(ByVal Original_商品編號 As Integer, ByVal Original_商品名稱 As String, ByVal Original_庫存數量 As String, ByVal Original_定價 As String, ByVal Original_種類 As String, ByVal Original_管理者編號 As String) As Integer
  3300. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_商品編號,Integer)
  3301. If (Original_商品名稱 Is Nothing) Then
  3302. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object)
  3303. Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value
  3304. Else
  3305. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object)
  3306. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_商品名稱,String)
  3307. End If
  3308. If (Original_庫存數量 Is Nothing) Then
  3309. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
  3310. Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
  3311. Else
  3312. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
  3313. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_庫存數量,String)
  3314. End If
  3315. If (Original_定價 Is Nothing) Then
  3316. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object)
  3317. Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value
  3318. Else
  3319. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object)
  3320. Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_定價,String)
  3321. End If
  3322. If (Original_種類 Is Nothing) Then
  3323. Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object)
  3324. Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value
  3325. Else
  3326. Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object)
  3327. Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_種類,String)
  3328. End If
  3329. If (Original_管理者編號 Is Nothing) Then
  3330. Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object)
  3331. Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value
  3332. Else
  3333. Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object)
  3334. Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_管理者編號,String)
  3335. End If
  3336. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  3337. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  3338. <> Global.System.Data.ConnectionState.Open) Then
  3339. Me.Adapter.DeleteCommand.Connection.Open
  3340. End If
  3341. Try
  3342. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  3343. Return returnValue
  3344. Finally
  3345. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  3346. Me.Adapter.DeleteCommand.Connection.Close
  3347. End If
  3348. End Try
  3349. End Function
  3350. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3351. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3352. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3353. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  3354. Public Overloads Overridable Function Insert(ByVal 商品編號 As Integer, ByVal 商品名稱 As String, ByVal 庫存數量 As String, ByVal 定價 As String, ByVal 種類 As String, ByVal 管理者編號 As String) As Integer
  3355. Me.Adapter.InsertCommand.Parameters(0).Value = CType(商品編號,Integer)
  3356. If (商品名稱 Is Nothing) Then
  3357. Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value
  3358. Else
  3359. Me.Adapter.InsertCommand.Parameters(1).Value = CType(商品名稱,String)
  3360. End If
  3361. If (庫存數量 Is Nothing) Then
  3362. Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
  3363. Else
  3364. Me.Adapter.InsertCommand.Parameters(2).Value = CType(庫存數量,String)
  3365. End If
  3366. If (定價 Is Nothing) Then
  3367. Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value
  3368. Else
  3369. Me.Adapter.InsertCommand.Parameters(3).Value = CType(定價,String)
  3370. End If
  3371. If (種類 Is Nothing) Then
  3372. Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
  3373. Else
  3374. Me.Adapter.InsertCommand.Parameters(4).Value = CType(種類,String)
  3375. End If
  3376. If (管理者編號 Is Nothing) Then
  3377. Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value
  3378. Else
  3379. Me.Adapter.InsertCommand.Parameters(5).Value = CType(管理者編號,String)
  3380. End If
  3381. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  3382. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  3383. <> Global.System.Data.ConnectionState.Open) Then
  3384. Me.Adapter.InsertCommand.Connection.Open
  3385. End If
  3386. Try
  3387. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  3388. Return returnValue
  3389. Finally
  3390. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  3391. Me.Adapter.InsertCommand.Connection.Close
  3392. End If
  3393. End Try
  3394. End Function
  3395. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3396. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3397. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3398. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  3399. Public Overloads Overridable Function Update(ByVal 商品編號 As Integer, ByVal 商品名稱 As String, ByVal 庫存數量 As String, ByVal 定價 As String, ByVal 種類 As String, ByVal 管理者編號 As String, ByVal Original_商品編號 As Integer, ByVal Original_商品名稱 As String, ByVal Original_庫存數量 As String, ByVal Original_定價 As String, ByVal Original_種類 As String, ByVal Original_管理者編號 As String) As Integer
  3400. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(商品編號,Integer)
  3401. If (商品名稱 Is Nothing) Then
  3402. Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value
  3403. Else
  3404. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(商品名稱,String)
  3405. End If
  3406. If (庫存數量 Is Nothing) Then
  3407. Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
  3408. Else
  3409. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(庫存數量,String)
  3410. End If
  3411. If (定價 Is Nothing) Then
  3412. Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value
  3413. Else
  3414. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(定價,String)
  3415. End If
  3416. If (種類 Is Nothing) Then
  3417. Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
  3418. Else
  3419. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(種類,String)
  3420. End If
  3421. If (管理者編號 Is Nothing) Then
  3422. Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value
  3423. Else
  3424. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(管理者編號,String)
  3425. End If
  3426. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_商品編號,Integer)
  3427. If (Original_商品名稱 Is Nothing) Then
  3428. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object)
  3429. Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value
  3430. Else
  3431. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object)
  3432. Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_商品名稱,String)
  3433. End If
  3434. If (Original_庫存數量 Is Nothing) Then
  3435. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object)
  3436. Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value
  3437. Else
  3438. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object)
  3439. Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_庫存數量,String)
  3440. End If
  3441. If (Original_定價 Is Nothing) Then
  3442. Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object)
  3443. Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value
  3444. Else
  3445. Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object)
  3446. Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_定價,String)
  3447. End If
  3448. If (Original_種類 Is Nothing) Then
  3449. Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object)
  3450. Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value
  3451. Else
  3452. Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object)
  3453. Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_種類,String)
  3454. End If
  3455. If (Original_管理者編號 Is Nothing) Then
  3456. Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object)
  3457. Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value
  3458. Else
  3459. Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object)
  3460. Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_管理者編號,String)
  3461. End If
  3462. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  3463. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  3464. <> Global.System.Data.ConnectionState.Open) Then
  3465. Me.Adapter.UpdateCommand.Connection.Open
  3466. End If
  3467. Try
  3468. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  3469. Return returnValue
  3470. Finally
  3471. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  3472. Me.Adapter.UpdateCommand.Connection.Close
  3473. End If
  3474. End Try
  3475. End Function
  3476. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3477. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3478. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3479. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  3480. Public Overloads Overridable Function Update(ByVal 商品名稱 As String, ByVal 庫存數量 As String, ByVal 定價 As String, ByVal 種類 As String, ByVal 管理者編號 As String, ByVal Original_商品編號 As Integer, ByVal Original_商品名稱 As String, ByVal Original_庫存數量 As String, ByVal Original_定價 As String, ByVal Original_種類 As String, ByVal Original_管理者編號 As String) As Integer
  3481. Return Me.Update(Original_商品編號, 商品名稱, 庫存數量, 定價, 種類, 管理者編號, Original_商品編號, Original_商品名稱, Original_庫存數量, Original_定價, Original_種類, Original_管理者編號)
  3482. End Function
  3483. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3484. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3485. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3486. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, false)> _
  3487. Public Overloads Overridable Function DeleteQuery(ByVal 商品編號 As Integer) As Integer
  3488. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1)
  3489. command.Parameters(0).Value = CType(商品編號,Integer)
  3490. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  3491. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  3492. <> Global.System.Data.ConnectionState.Open) Then
  3493. command.Connection.Open
  3494. End If
  3495. Dim returnValue As Integer
  3496. Try
  3497. returnValue = command.ExecuteNonQuery
  3498. Finally
  3499. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  3500. command.Connection.Close
  3501. End If
  3502. End Try
  3503. Return returnValue
  3504. End Function
  3505. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3506. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3507. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3508. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, false)> _
  3509. Public Overloads Overridable Function InsertQuery(ByVal 商品編號 As Integer, ByVal 商品名稱 As String, ByVal 庫存數量 As String, ByVal 定價 As String, ByVal 種類 As String, ByVal 管理者編號 As String) As Integer
  3510. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(4)
  3511. command.Parameters(0).Value = CType(商品編號,Integer)
  3512. If (商品名稱 Is Nothing) Then
  3513. command.Parameters(1).Value = Global.System.DBNull.Value
  3514. Else
  3515. command.Parameters(1).Value = CType(商品名稱,String)
  3516. End If
  3517. If (庫存數量 Is Nothing) Then
  3518. command.Parameters(2).Value = Global.System.DBNull.Value
  3519. Else
  3520. command.Parameters(2).Value = CType(庫存數量,String)
  3521. End If
  3522. If (定價 Is Nothing) Then
  3523. command.Parameters(3).Value = Global.System.DBNull.Value
  3524. Else
  3525. command.Parameters(3).Value = CType(定價,String)
  3526. End If
  3527. If (種類 Is Nothing) Then
  3528. command.Parameters(4).Value = Global.System.DBNull.Value
  3529. Else
  3530. command.Parameters(4).Value = CType(種類,String)
  3531. End If
  3532. If (管理者編號 Is Nothing) Then
  3533. command.Parameters(5).Value = Global.System.DBNull.Value
  3534. Else
  3535. command.Parameters(5).Value = CType(管理者編號,String)
  3536. End If
  3537. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  3538. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  3539. <> Global.System.Data.ConnectionState.Open) Then
  3540. command.Connection.Open
  3541. End If
  3542. Dim returnValue As Integer
  3543. Try
  3544. returnValue = command.ExecuteNonQuery
  3545. Finally
  3546. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  3547. command.Connection.Close
  3548. End If
  3549. End Try
  3550. Return returnValue
  3551. End Function
  3552. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3553. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3554. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3555. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, false)> _
  3556. Public Overloads Overridable Function UpdateQuery(ByVal 商品編號 As Integer, ByVal 商品名稱 As String, ByVal 庫存數量 As String, ByVal 定價 As String, ByVal 種類 As String, ByVal 管理者編號 As String) As Integer
  3557. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(5)
  3558. command.Parameters(0).Value = CType(商品編號,Integer)
  3559. If (商品名稱 Is Nothing) Then
  3560. command.Parameters(1).Value = Global.System.DBNull.Value
  3561. Else
  3562. command.Parameters(1).Value = CType(商品名稱,String)
  3563. End If
  3564. If (庫存數量 Is Nothing) Then
  3565. command.Parameters(2).Value = Global.System.DBNull.Value
  3566. Else
  3567. command.Parameters(2).Value = CType(庫存數量,String)
  3568. End If
  3569. If (定價 Is Nothing) Then
  3570. command.Parameters(3).Value = Global.System.DBNull.Value
  3571. Else
  3572. command.Parameters(3).Value = CType(定價,String)
  3573. End If
  3574. If (種類 Is Nothing) Then
  3575. command.Parameters(4).Value = Global.System.DBNull.Value
  3576. Else
  3577. command.Parameters(4).Value = CType(種類,String)
  3578. End If
  3579. If (管理者編號 Is Nothing) Then
  3580. command.Parameters(5).Value = Global.System.DBNull.Value
  3581. Else
  3582. command.Parameters(5).Value = CType(管理者編號,String)
  3583. End If
  3584. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  3585. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  3586. <> Global.System.Data.ConnectionState.Open) Then
  3587. command.Connection.Open
  3588. End If
  3589. Dim returnValue As Integer
  3590. Try
  3591. returnValue = command.ExecuteNonQuery
  3592. Finally
  3593. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  3594. command.Connection.Close
  3595. End If
  3596. End Try
  3597. Return returnValue
  3598. End Function
  3599. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3600. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3601. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3602. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, false)> _
  3603. Public Overloads Overridable Function UpdateQueryNumber(ByVal 庫存數量 As String, ByVal 商品編號 As String) As Integer
  3604. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(6)
  3605. If (庫存數量 Is Nothing) Then
  3606. command.Parameters(0).Value = Global.System.DBNull.Value
  3607. Else
  3608. command.Parameters(0).Value = CType(庫存數量,String)
  3609. End If
  3610. If (商品編號 Is Nothing) Then
  3611. Throw New Global.System.ArgumentNullException("商品編號")
  3612. Else
  3613. command.Parameters(1).Value = CType(商品編號,String)
  3614. End If
  3615. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  3616. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  3617. <> Global.System.Data.ConnectionState.Open) Then
  3618. command.Connection.Open
  3619. End If
  3620. Dim returnValue As Integer
  3621. Try
  3622. returnValue = command.ExecuteNonQuery
  3623. Finally
  3624. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  3625. command.Connection.Close
  3626. End If
  3627. End Try
  3628. Return returnValue
  3629. End Function
  3630. End Class
  3631. '''<summary>
  3632. '''Represents the connection and commands used to retrieve and save data.
  3633. '''</summary>
  3634. <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  3635. Global.System.ComponentModel.ToolboxItem(true), _
  3636. Global.System.ComponentModel.DataObjectAttribute(true), _
  3637. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  3638. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  3639. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  3640. Partial Public Class 會員TableAdapter
  3641. Inherits Global.System.ComponentModel.Component
  3642. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  3643. Private _connection As Global.System.Data.SqlClient.SqlConnection
  3644. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  3645. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  3646. Private _clearBeforeFill As Boolean
  3647. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3648. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3649. Public Sub New()
  3650. MyBase.New
  3651. Me.ClearBeforeFill = true
  3652. End Sub
  3653. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3654. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3655. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  3656. Get
  3657. If (Me._adapter Is Nothing) Then
  3658. Me.InitAdapter
  3659. End If
  3660. Return Me._adapter
  3661. End Get
  3662. End Property
  3663. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3664. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3665. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  3666. Get
  3667. If (Me._connection Is Nothing) Then
  3668. Me.InitConnection
  3669. End If
  3670. Return Me._connection
  3671. End Get
  3672. Set
  3673. Me._connection = value
  3674. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  3675. Me.Adapter.InsertCommand.Connection = value
  3676. End If
  3677. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  3678. Me.Adapter.DeleteCommand.Connection = value
  3679. End If
  3680. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  3681. Me.Adapter.UpdateCommand.Connection = value
  3682. End If
  3683. Dim i As Integer = 0
  3684. Do While (i < Me.CommandCollection.Length)
  3685. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  3686. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  3687. End If
  3688. i = (i + 1)
  3689. Loop
  3690. End Set
  3691. End Property
  3692. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3693. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3694. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  3695. Get
  3696. Return Me._transaction
  3697. End Get
  3698. Set
  3699. Me._transaction = value
  3700. Dim i As Integer = 0
  3701. Do While (i < Me.CommandCollection.Length)
  3702. Me.CommandCollection(i).Transaction = Me._transaction
  3703. i = (i + 1)
  3704. Loop
  3705. If ((Not (Me.Adapter) Is Nothing) _
  3706. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  3707. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  3708. End If
  3709. If ((Not (Me.Adapter) Is Nothing) _
  3710. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  3711. Me.Adapter.InsertCommand.Transaction = Me._transaction
  3712. End If
  3713. If ((Not (Me.Adapter) Is Nothing) _
  3714. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  3715. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  3716. End If
  3717. End Set
  3718. End Property
  3719. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3720. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3721. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  3722. Get
  3723. If (Me._commandCollection Is Nothing) Then
  3724. Me.InitCommandCollection
  3725. End If
  3726. Return Me._commandCollection
  3727. End Get
  3728. End Property
  3729. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3730. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3731. Public Property ClearBeforeFill() As Boolean
  3732. Get
  3733. Return Me._clearBeforeFill
  3734. End Get
  3735. Set
  3736. Me._clearBeforeFill = value
  3737. End Set
  3738. End Property
  3739. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3740. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3741. Private Sub InitAdapter()
  3742. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter()
  3743. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
  3744. tableMapping.SourceTable = "Table"
  3745. tableMapping.DataSetTable = "會員"
  3746. tableMapping.ColumnMappings.Add("會員編號", "會員編號")
  3747. tableMapping.ColumnMappings.Add("帳號", "帳號")
  3748. tableMapping.ColumnMappings.Add("密碼", "密碼")
  3749. tableMapping.ColumnMappings.Add("姓名", "姓名")
  3750. tableMapping.ColumnMappings.Add("電話", "電話")
  3751. tableMapping.ColumnMappings.Add("住址", "住址")
  3752. tableMapping.ColumnMappings.Add("email", "email")
  3753. Me._adapter.TableMappings.Add(tableMapping)
  3754. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand()
  3755. Me._adapter.DeleteCommand.Connection = Me.Connection
  3756. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[會員] WHERE (([會員編號] = @Original_會員編號) AND ((@IsNull_帳號 = 1 AND "& _
  3757. "[帳號] IS NULL) OR ([帳號] = @Original_帳號)) AND ((@IsNull_密碼 = 1 AND [密碼] IS NULL) O"& _
  3758. "R ([密碼] = @Original_密碼)) AND ((@IsNull_姓名 = 1 AND [姓名] IS NULL) OR ([姓名] = @Orig"& _
  3759. "inal_姓名)) AND ((@IsNull_電話 = 1 AND [電話] IS NULL) OR ([電話] = @Original_電話)) AND ("& _
  3760. "(@IsNull_住址 = 1 AND [住址] IS NULL) OR ([住址] = @Original_住址)) AND ((@IsNull_email "& _
  3761. "= 1 AND [email] IS NULL) OR ([email] = @Original_email)))"
  3762. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  3763. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3764. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_帳號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "帳號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3765. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_帳號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "帳號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3766. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_密碼", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "密碼", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3767. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_密碼", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "密碼", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3768. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_姓名", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "姓名", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3769. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_姓名", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "姓名", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3770. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_電話", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "電話", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3771. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_電話", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "電話", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3772. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_住址", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "住址", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3773. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_住址", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "住址", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3774. Me._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, Nothing, "", "", ""))
  3775. Me._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, Nothing, "", "", ""))
  3776. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand()
  3777. Me._adapter.InsertCommand.Connection = Me.Connection
  3778. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[會員] ([會員編號], [帳號], [密碼], [姓名], [電話], [住址], [email]) VALUES (@會"& _
  3779. "員編號, @帳號, @密碼, @姓名, @電話, @住址, @email);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 會員編號, 帳號, 密碼, 姓名, 電話, 住址, email F"& _
  3780. "ROM 會員 WHERE (會員編號 = @會員編號)"
  3781. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  3782. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3783. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@帳號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "帳號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3784. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@密碼", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "密碼", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3785. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@姓名", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "姓名", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3786. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@電話", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "電話", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3787. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@住址", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "住址", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3788. Me._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, Nothing, "", "", ""))
  3789. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand()
  3790. Me._adapter.UpdateCommand.Connection = Me.Connection
  3791. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[會員] SET [會員編號] = @會員編號, [帳號] = @帳號, [密碼] = @密碼, [姓名] = @姓名, [電話] = "& _
  3792. "@電話, [住址] = @住址, [email] = @email WHERE (([會員編號] = @Original_會員編號) AND ((@IsNull"& _
  3793. "_帳號 = 1 AND [帳號] IS NULL) OR ([帳號] = @Original_帳號)) AND ((@IsNull_密碼 = 1 AND [密碼"& _
  3794. "] IS NULL) OR ([密碼] = @Original_密碼)) AND ((@IsNull_姓名 = 1 AND [姓名] IS NULL) OR ("& _
  3795. "[姓名] = @Original_姓名)) AND ((@IsNull_電話 = 1 AND [電話] IS NULL) OR ([電話] = @Origina"& _
  3796. "l_電話)) AND ((@IsNull_住址 = 1 AND [住址] IS NULL) OR ([住址] = @Original_住址)) AND ((@I"& _
  3797. "sNull_email = 1 AND [email] IS NULL) OR ([email] = @Original_email)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 會"& _
  3798. "員編號, 帳號, 密碼, 姓名, 電話, 住址, email FROM 會員 WHERE (會員編號 = @會員編號)"
  3799. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  3800. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3801. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@帳號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "帳號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3802. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@密碼", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "密碼", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3803. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@姓名", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "姓名", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3804. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@電話", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "電話", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3805. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@住址", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "住址", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3806. Me._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, Nothing, "", "", ""))
  3807. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3808. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_帳號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "帳號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3809. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_帳號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "帳號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3810. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_密碼", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "密碼", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3811. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_密碼", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "密碼", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3812. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_姓名", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "姓名", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3813. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_姓名", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "姓名", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3814. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_電話", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "電話", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3815. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_電話", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "電話", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3816. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_住址", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "住址", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  3817. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_住址", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "住址", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3818. Me._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, Nothing, "", "", ""))
  3819. Me._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, Nothing, "", "", ""))
  3820. End Sub
  3821. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3822. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3823. Private Sub InitConnection()
  3824. Me._connection = New Global.System.Data.SqlClient.SqlConnection()
  3825. Me._connection.ConnectionString = Global.謎鹿進銷存系統.My.MySettings.Default.謎鹿ConnectionString1
  3826. End Sub
  3827. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3828. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  3829. Private Sub InitCommandCollection()
  3830. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(6) {}
  3831. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand()
  3832. Me._commandCollection(0).Connection = Me.Connection
  3833. Me._commandCollection(0).CommandText = "SELECT 會員編號, 帳號, 密碼, 姓名, 電話, 住址, email FROM dbo.會員"
  3834. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  3835. Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand()
  3836. Me._commandCollection(1).Connection = Me.Connection
  3837. Me._commandCollection(1).CommandText = "DELETE FROM 會員"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (會員編號 = @會員編號)"
  3838. Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text
  3839. Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  3840. Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand()
  3841. Me._commandCollection(2).Connection = Me.Connection
  3842. Me._commandCollection(2).CommandText = "SELECT 會員編號, 帳號, 密碼, 姓名, 電話, 住址, email"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM 會員"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _
  3843. " (email LIKE @nvarchar)"
  3844. Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text
  3845. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@nvarchar", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "email", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3846. Me._commandCollection(3) = New Global.System.Data.SqlClient.SqlCommand()
  3847. Me._commandCollection(3).Connection = Me.Connection
  3848. Me._commandCollection(3).CommandText = "SELECT 會員編號, 帳號, 密碼, 姓名, 電話, 住址, email"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM 會員"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _
  3849. " (會員編號 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (帳號 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (密碼 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _
  3850. "(姓名 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (電話 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _
  3851. " (住址 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (email "& _
  3852. "LIKE @keyword)"
  3853. Me._commandCollection(3).CommandType = Global.System.Data.CommandType.Text
  3854. Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@keyword", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3855. Me._commandCollection(4) = New Global.System.Data.SqlClient.SqlCommand()
  3856. Me._commandCollection(4).Connection = Me.Connection
  3857. Me._commandCollection(4).CommandText = "SELECT 會員編號, 帳號, 密碼, 姓名, 電話, 住址, email"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM 會員"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _
  3858. " (會員編號 LIKE @sql)"
  3859. Me._commandCollection(4).CommandType = Global.System.Data.CommandType.Text
  3860. Me._commandCollection(4).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sql", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3861. Me._commandCollection(5) = New Global.System.Data.SqlClient.SqlCommand()
  3862. Me._commandCollection(5).Connection = Me.Connection
  3863. Me._commandCollection(5).CommandText = "INSERT INTO 會員"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (會員編號, 帳號, 密碼, 姓名, 電話, 住址, email)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VA"& _
  3864. "LUES (@會員編號,@帳號,@密碼,@姓名,@電話,@住址,@email); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 會員編號, 帳號, 密碼, 姓名, 電話"& _
  3865. ", 住址, email FROM 會員 WHERE (會員編號 = @會員編號)"
  3866. Me._commandCollection(5).CommandType = Global.System.Data.CommandType.Text
  3867. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3868. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@帳號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "帳號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3869. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@密碼", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "密碼", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3870. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@姓名", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "姓名", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3871. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@電話", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "電話", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3872. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@住址", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "住址", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3873. Me._commandCollection(5).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@email", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "email", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3874. Me._commandCollection(6) = New Global.System.Data.SqlClient.SqlCommand()
  3875. Me._commandCollection(6).Connection = Me.Connection
  3876. Me._commandCollection(6).CommandText = "UPDATE 會員"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET 會員編號 = @會員編號, 帳號 = @帳號, 密碼 = @密碼, 姓名 = "& _
  3877. "@姓名, 電話 = @電話, 住址 = @住址, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" email = @email"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE "& _
  3878. " (會員編號 = @會員編號); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 會員編號, 帳號, 密碼, 姓名, 電話, 住址, email FROM 會員 WHERE (會"& _
  3879. "員編號 = @會員編號)"
  3880. Me._commandCollection(6).CommandType = Global.System.Data.CommandType.Text
  3881. Me._commandCollection(6).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3882. Me._commandCollection(6).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@帳號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "帳號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3883. Me._commandCollection(6).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@密碼", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "密碼", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3884. Me._commandCollection(6).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@姓名", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "姓名", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3885. Me._commandCollection(6).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@電話", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "電話", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3886. Me._commandCollection(6).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@住址", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "住址", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3887. Me._commandCollection(6).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@email", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "email", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  3888. End Sub
  3889. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3890. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3891. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3892. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  3893. Public Overloads Overridable Function Fill(ByVal dataTable As 謎鹿DataSet.會員DataTable) As Integer
  3894. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  3895. If (Me.ClearBeforeFill = true) Then
  3896. dataTable.Clear
  3897. End If
  3898. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  3899. Return returnValue
  3900. End Function
  3901. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3902. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3903. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3904. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  3905. Public Overloads Overridable Function GetData() As 謎鹿DataSet.會員DataTable
  3906. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  3907. Dim dataTable As 謎鹿DataSet.會員DataTable = New 謎鹿DataSet.會員DataTable()
  3908. Me.Adapter.Fill(dataTable)
  3909. Return dataTable
  3910. End Function
  3911. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3912. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3913. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3914. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
  3915. Public Overloads Overridable Function FillByemail(ByVal dataTable As 謎鹿DataSet.會員DataTable, ByVal nvarchar As String) As Integer
  3916. Me.Adapter.SelectCommand = Me.CommandCollection(2)
  3917. If (nvarchar Is Nothing) Then
  3918. Me.Adapter.SelectCommand.Parameters(0).Value = Global.System.DBNull.Value
  3919. Else
  3920. Me.Adapter.SelectCommand.Parameters(0).Value = CType(nvarchar,String)
  3921. End If
  3922. If (Me.ClearBeforeFill = true) Then
  3923. dataTable.Clear
  3924. End If
  3925. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  3926. Return returnValue
  3927. End Function
  3928. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3929. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3930. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3931. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
  3932. Public Overloads Overridable Function FillByKeyword(ByVal dataTable As 謎鹿DataSet.會員DataTable, ByVal keyword As String) As Integer
  3933. Me.Adapter.SelectCommand = Me.CommandCollection(3)
  3934. If (keyword Is Nothing) Then
  3935. Throw New Global.System.ArgumentNullException("keyword")
  3936. Else
  3937. Me.Adapter.SelectCommand.Parameters(0).Value = CType(keyword,String)
  3938. End If
  3939. If (Me.ClearBeforeFill = true) Then
  3940. dataTable.Clear
  3941. End If
  3942. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  3943. Return returnValue
  3944. End Function
  3945. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3946. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3947. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3948. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
  3949. Public Overloads Overridable Function FillBysql(ByVal dataTable As 謎鹿DataSet.會員DataTable, ByVal sql As String) As Integer
  3950. Me.Adapter.SelectCommand = Me.CommandCollection(4)
  3951. If (sql Is Nothing) Then
  3952. Throw New Global.System.ArgumentNullException("sql")
  3953. Else
  3954. Me.Adapter.SelectCommand.Parameters(0).Value = CType(sql,String)
  3955. End If
  3956. If (Me.ClearBeforeFill = true) Then
  3957. dataTable.Clear
  3958. End If
  3959. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  3960. Return returnValue
  3961. End Function
  3962. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3963. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3964. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  3965. Public Overloads Overridable Function Update(ByVal dataTable As 謎鹿DataSet.會員DataTable) As Integer
  3966. Return Me.Adapter.Update(dataTable)
  3967. End Function
  3968. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3969. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3970. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  3971. Public Overloads Overridable Function Update(ByVal dataSet As 謎鹿DataSet) As Integer
  3972. Return Me.Adapter.Update(dataSet, "會員")
  3973. End Function
  3974. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3975. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3976. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  3977. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  3978. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  3979. End Function
  3980. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3981. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3982. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  3983. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  3984. Return Me.Adapter.Update(dataRows)
  3985. End Function
  3986. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3987. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  3988. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  3989. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  3990. Public Overloads Overridable Function Delete(ByVal Original_會員編號 As String, ByVal Original_帳號 As String, ByVal Original_密碼 As String, ByVal Original_姓名 As String, ByVal Original_電話 As String, ByVal Original_住址 As String, ByVal Original_email As String) As Integer
  3991. If (Original_會員編號 Is Nothing) Then
  3992. Throw New Global.System.ArgumentNullException("Original_會員編號")
  3993. Else
  3994. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_會員編號,String)
  3995. End If
  3996. If (Original_帳號 Is Nothing) Then
  3997. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object)
  3998. Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value
  3999. Else
  4000. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object)
  4001. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_帳號,String)
  4002. End If
  4003. If (Original_密碼 Is Nothing) Then
  4004. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
  4005. Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
  4006. Else
  4007. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
  4008. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_密碼,String)
  4009. End If
  4010. If (Original_姓名 Is Nothing) Then
  4011. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object)
  4012. Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value
  4013. Else
  4014. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object)
  4015. Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_姓名,String)
  4016. End If
  4017. If (Original_電話 Is Nothing) Then
  4018. Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object)
  4019. Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value
  4020. Else
  4021. Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object)
  4022. Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_電話,String)
  4023. End If
  4024. If (Original_住址 Is Nothing) Then
  4025. Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object)
  4026. Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value
  4027. Else
  4028. Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object)
  4029. Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_住址,String)
  4030. End If
  4031. If (Original_email Is Nothing) Then
  4032. Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object)
  4033. Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value
  4034. Else
  4035. Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object)
  4036. Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_email,String)
  4037. End If
  4038. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  4039. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  4040. <> Global.System.Data.ConnectionState.Open) Then
  4041. Me.Adapter.DeleteCommand.Connection.Open
  4042. End If
  4043. Try
  4044. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  4045. Return returnValue
  4046. Finally
  4047. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4048. Me.Adapter.DeleteCommand.Connection.Close
  4049. End If
  4050. End Try
  4051. End Function
  4052. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4053. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4054. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4055. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  4056. Public Overloads Overridable Function Insert(ByVal 會員編號 As String, ByVal 帳號 As String, ByVal 密碼 As String, ByVal 姓名 As String, ByVal 電話 As String, ByVal 住址 As String, ByVal email As String) As Integer
  4057. If (會員編號 Is Nothing) Then
  4058. Throw New Global.System.ArgumentNullException("會員編號")
  4059. Else
  4060. Me.Adapter.InsertCommand.Parameters(0).Value = CType(會員編號,String)
  4061. End If
  4062. If (帳號 Is Nothing) Then
  4063. Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value
  4064. Else
  4065. Me.Adapter.InsertCommand.Parameters(1).Value = CType(帳號,String)
  4066. End If
  4067. If (密碼 Is Nothing) Then
  4068. Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
  4069. Else
  4070. Me.Adapter.InsertCommand.Parameters(2).Value = CType(密碼,String)
  4071. End If
  4072. If (姓名 Is Nothing) Then
  4073. Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value
  4074. Else
  4075. Me.Adapter.InsertCommand.Parameters(3).Value = CType(姓名,String)
  4076. End If
  4077. If (電話 Is Nothing) Then
  4078. Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
  4079. Else
  4080. Me.Adapter.InsertCommand.Parameters(4).Value = CType(電話,String)
  4081. End If
  4082. If (住址 Is Nothing) Then
  4083. Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value
  4084. Else
  4085. Me.Adapter.InsertCommand.Parameters(5).Value = CType(住址,String)
  4086. End If
  4087. If (email Is Nothing) Then
  4088. Me.Adapter.InsertCommand.Parameters(6).Value = Global.System.DBNull.Value
  4089. Else
  4090. Me.Adapter.InsertCommand.Parameters(6).Value = CType(email,String)
  4091. End If
  4092. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  4093. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  4094. <> Global.System.Data.ConnectionState.Open) Then
  4095. Me.Adapter.InsertCommand.Connection.Open
  4096. End If
  4097. Try
  4098. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  4099. Return returnValue
  4100. Finally
  4101. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4102. Me.Adapter.InsertCommand.Connection.Close
  4103. End If
  4104. End Try
  4105. End Function
  4106. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4107. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4108. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4109. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  4110. Public Overloads Overridable Function Update(ByVal 會員編號 As String, ByVal 帳號 As String, ByVal 密碼 As String, ByVal 姓名 As String, ByVal 電話 As String, ByVal 住址 As String, ByVal email As String, ByVal Original_會員編號 As String, ByVal Original_帳號 As String, ByVal Original_密碼 As String, ByVal Original_姓名 As String, ByVal Original_電話 As String, ByVal Original_住址 As String, ByVal Original_email As String) As Integer
  4111. If (會員編號 Is Nothing) Then
  4112. Throw New Global.System.ArgumentNullException("會員編號")
  4113. Else
  4114. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(會員編號,String)
  4115. End If
  4116. If (帳號 Is Nothing) Then
  4117. Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value
  4118. Else
  4119. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(帳號,String)
  4120. End If
  4121. If (密碼 Is Nothing) Then
  4122. Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
  4123. Else
  4124. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(密碼,String)
  4125. End If
  4126. If (姓名 Is Nothing) Then
  4127. Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value
  4128. Else
  4129. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(姓名,String)
  4130. End If
  4131. If (電話 Is Nothing) Then
  4132. Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
  4133. Else
  4134. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(電話,String)
  4135. End If
  4136. If (住址 Is Nothing) Then
  4137. Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value
  4138. Else
  4139. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(住址,String)
  4140. End If
  4141. If (email Is Nothing) Then
  4142. Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value
  4143. Else
  4144. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(email,String)
  4145. End If
  4146. If (Original_會員編號 Is Nothing) Then
  4147. Throw New Global.System.ArgumentNullException("Original_會員編號")
  4148. Else
  4149. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_會員編號,String)
  4150. End If
  4151. If (Original_帳號 Is Nothing) Then
  4152. Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object)
  4153. Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value
  4154. Else
  4155. Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object)
  4156. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_帳號,String)
  4157. End If
  4158. If (Original_密碼 Is Nothing) Then
  4159. Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object)
  4160. Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value
  4161. Else
  4162. Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object)
  4163. Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_密碼,String)
  4164. End If
  4165. If (Original_姓名 Is Nothing) Then
  4166. Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object)
  4167. Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value
  4168. Else
  4169. Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object)
  4170. Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_姓名,String)
  4171. End If
  4172. If (Original_電話 Is Nothing) Then
  4173. Me.Adapter.UpdateCommand.Parameters(14).Value = CType(1,Object)
  4174. Me.Adapter.UpdateCommand.Parameters(15).Value = Global.System.DBNull.Value
  4175. Else
  4176. Me.Adapter.UpdateCommand.Parameters(14).Value = CType(0,Object)
  4177. Me.Adapter.UpdateCommand.Parameters(15).Value = CType(Original_電話,String)
  4178. End If
  4179. If (Original_住址 Is Nothing) Then
  4180. Me.Adapter.UpdateCommand.Parameters(16).Value = CType(1,Object)
  4181. Me.Adapter.UpdateCommand.Parameters(17).Value = Global.System.DBNull.Value
  4182. Else
  4183. Me.Adapter.UpdateCommand.Parameters(16).Value = CType(0,Object)
  4184. Me.Adapter.UpdateCommand.Parameters(17).Value = CType(Original_住址,String)
  4185. End If
  4186. If (Original_email Is Nothing) Then
  4187. Me.Adapter.UpdateCommand.Parameters(18).Value = CType(1,Object)
  4188. Me.Adapter.UpdateCommand.Parameters(19).Value = Global.System.DBNull.Value
  4189. Else
  4190. Me.Adapter.UpdateCommand.Parameters(18).Value = CType(0,Object)
  4191. Me.Adapter.UpdateCommand.Parameters(19).Value = CType(Original_email,String)
  4192. End If
  4193. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  4194. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  4195. <> Global.System.Data.ConnectionState.Open) Then
  4196. Me.Adapter.UpdateCommand.Connection.Open
  4197. End If
  4198. Try
  4199. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  4200. Return returnValue
  4201. Finally
  4202. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4203. Me.Adapter.UpdateCommand.Connection.Close
  4204. End If
  4205. End Try
  4206. End Function
  4207. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4208. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4209. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4210. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  4211. Public Overloads Overridable Function Update(ByVal 帳號 As String, ByVal 密碼 As String, ByVal 姓名 As String, ByVal 電話 As String, ByVal 住址 As String, ByVal email As String, ByVal Original_會員編號 As String, ByVal Original_帳號 As String, ByVal Original_密碼 As String, ByVal Original_姓名 As String, ByVal Original_電話 As String, ByVal Original_住址 As String, ByVal Original_email As String) As Integer
  4212. Return Me.Update(Original_會員編號, 帳號, 密碼, 姓名, 電話, 住址, email, Original_會員編號, Original_帳號, Original_密碼, Original_姓名, Original_電話, Original_住址, Original_email)
  4213. End Function
  4214. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4215. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4216. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4217. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, false)> _
  4218. Public Overloads Overridable Function DeleteQuery(ByVal 會員編號 As String) As Integer
  4219. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1)
  4220. If (會員編號 Is Nothing) Then
  4221. Throw New Global.System.ArgumentNullException("會員編號")
  4222. Else
  4223. command.Parameters(0).Value = CType(會員編號,String)
  4224. End If
  4225. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  4226. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  4227. <> Global.System.Data.ConnectionState.Open) Then
  4228. command.Connection.Open
  4229. End If
  4230. Dim returnValue As Integer
  4231. Try
  4232. returnValue = command.ExecuteNonQuery
  4233. Finally
  4234. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4235. command.Connection.Close
  4236. End If
  4237. End Try
  4238. Return returnValue
  4239. End Function
  4240. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4241. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4242. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4243. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, false)> _
  4244. Public Overloads Overridable Function InsertQuery(ByVal 會員編號 As String, ByVal 帳號 As String, ByVal 密碼 As String, ByVal 姓名 As String, ByVal 電話 As String, ByVal 住址 As String, ByVal email As String) As Integer
  4245. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(5)
  4246. If (會員編號 Is Nothing) Then
  4247. Throw New Global.System.ArgumentNullException("會員編號")
  4248. Else
  4249. command.Parameters(0).Value = CType(會員編號,String)
  4250. End If
  4251. If (帳號 Is Nothing) Then
  4252. command.Parameters(1).Value = Global.System.DBNull.Value
  4253. Else
  4254. command.Parameters(1).Value = CType(帳號,String)
  4255. End If
  4256. If (密碼 Is Nothing) Then
  4257. command.Parameters(2).Value = Global.System.DBNull.Value
  4258. Else
  4259. command.Parameters(2).Value = CType(密碼,String)
  4260. End If
  4261. If (姓名 Is Nothing) Then
  4262. command.Parameters(3).Value = Global.System.DBNull.Value
  4263. Else
  4264. command.Parameters(3).Value = CType(姓名,String)
  4265. End If
  4266. If (電話 Is Nothing) Then
  4267. command.Parameters(4).Value = Global.System.DBNull.Value
  4268. Else
  4269. command.Parameters(4).Value = CType(電話,String)
  4270. End If
  4271. If (住址 Is Nothing) Then
  4272. command.Parameters(5).Value = Global.System.DBNull.Value
  4273. Else
  4274. command.Parameters(5).Value = CType(住址,String)
  4275. End If
  4276. If (email Is Nothing) Then
  4277. command.Parameters(6).Value = Global.System.DBNull.Value
  4278. Else
  4279. command.Parameters(6).Value = CType(email,String)
  4280. End If
  4281. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  4282. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  4283. <> Global.System.Data.ConnectionState.Open) Then
  4284. command.Connection.Open
  4285. End If
  4286. Dim returnValue As Integer
  4287. Try
  4288. returnValue = command.ExecuteNonQuery
  4289. Finally
  4290. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4291. command.Connection.Close
  4292. End If
  4293. End Try
  4294. Return returnValue
  4295. End Function
  4296. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4297. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4298. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4299. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, false)> _
  4300. Public Overloads Overridable Function UpdateQuery(ByVal 會員編號 As String, ByVal 帳號 As String, ByVal 密碼 As String, ByVal 姓名 As String, ByVal 電話 As String, ByVal 住址 As String, ByVal email As String) As Integer
  4301. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(6)
  4302. If (會員編號 Is Nothing) Then
  4303. Throw New Global.System.ArgumentNullException("會員編號")
  4304. Else
  4305. command.Parameters(0).Value = CType(會員編號,String)
  4306. End If
  4307. If (帳號 Is Nothing) Then
  4308. command.Parameters(1).Value = Global.System.DBNull.Value
  4309. Else
  4310. command.Parameters(1).Value = CType(帳號,String)
  4311. End If
  4312. If (密碼 Is Nothing) Then
  4313. command.Parameters(2).Value = Global.System.DBNull.Value
  4314. Else
  4315. command.Parameters(2).Value = CType(密碼,String)
  4316. End If
  4317. If (姓名 Is Nothing) Then
  4318. command.Parameters(3).Value = Global.System.DBNull.Value
  4319. Else
  4320. command.Parameters(3).Value = CType(姓名,String)
  4321. End If
  4322. If (電話 Is Nothing) Then
  4323. command.Parameters(4).Value = Global.System.DBNull.Value
  4324. Else
  4325. command.Parameters(4).Value = CType(電話,String)
  4326. End If
  4327. If (住址 Is Nothing) Then
  4328. command.Parameters(5).Value = Global.System.DBNull.Value
  4329. Else
  4330. command.Parameters(5).Value = CType(住址,String)
  4331. End If
  4332. If (email Is Nothing) Then
  4333. command.Parameters(6).Value = Global.System.DBNull.Value
  4334. Else
  4335. command.Parameters(6).Value = CType(email,String)
  4336. End If
  4337. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  4338. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  4339. <> Global.System.Data.ConnectionState.Open) Then
  4340. command.Connection.Open
  4341. End If
  4342. Dim returnValue As Integer
  4343. Try
  4344. returnValue = command.ExecuteNonQuery
  4345. Finally
  4346. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4347. command.Connection.Close
  4348. End If
  4349. End Try
  4350. Return returnValue
  4351. End Function
  4352. End Class
  4353. '''<summary>
  4354. '''Represents the connection and commands used to retrieve and save data.
  4355. '''</summary>
  4356. <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  4357. Global.System.ComponentModel.ToolboxItem(true), _
  4358. Global.System.ComponentModel.DataObjectAttribute(true), _
  4359. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  4360. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  4361. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  4362. Partial Public Class 訂單TableAdapter
  4363. Inherits Global.System.ComponentModel.Component
  4364. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  4365. Private _connection As Global.System.Data.SqlClient.SqlConnection
  4366. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  4367. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  4368. Private _clearBeforeFill As Boolean
  4369. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4370. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4371. Public Sub New()
  4372. MyBase.New
  4373. Me.ClearBeforeFill = true
  4374. End Sub
  4375. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4376. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4377. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  4378. Get
  4379. If (Me._adapter Is Nothing) Then
  4380. Me.InitAdapter
  4381. End If
  4382. Return Me._adapter
  4383. End Get
  4384. End Property
  4385. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4386. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4387. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  4388. Get
  4389. If (Me._connection Is Nothing) Then
  4390. Me.InitConnection
  4391. End If
  4392. Return Me._connection
  4393. End Get
  4394. Set
  4395. Me._connection = value
  4396. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  4397. Me.Adapter.InsertCommand.Connection = value
  4398. End If
  4399. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  4400. Me.Adapter.DeleteCommand.Connection = value
  4401. End If
  4402. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  4403. Me.Adapter.UpdateCommand.Connection = value
  4404. End If
  4405. Dim i As Integer = 0
  4406. Do While (i < Me.CommandCollection.Length)
  4407. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  4408. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  4409. End If
  4410. i = (i + 1)
  4411. Loop
  4412. End Set
  4413. End Property
  4414. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4415. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4416. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  4417. Get
  4418. Return Me._transaction
  4419. End Get
  4420. Set
  4421. Me._transaction = value
  4422. Dim i As Integer = 0
  4423. Do While (i < Me.CommandCollection.Length)
  4424. Me.CommandCollection(i).Transaction = Me._transaction
  4425. i = (i + 1)
  4426. Loop
  4427. If ((Not (Me.Adapter) Is Nothing) _
  4428. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  4429. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  4430. End If
  4431. If ((Not (Me.Adapter) Is Nothing) _
  4432. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  4433. Me.Adapter.InsertCommand.Transaction = Me._transaction
  4434. End If
  4435. If ((Not (Me.Adapter) Is Nothing) _
  4436. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  4437. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  4438. End If
  4439. End Set
  4440. End Property
  4441. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4442. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4443. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  4444. Get
  4445. If (Me._commandCollection Is Nothing) Then
  4446. Me.InitCommandCollection
  4447. End If
  4448. Return Me._commandCollection
  4449. End Get
  4450. End Property
  4451. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4452. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4453. Public Property ClearBeforeFill() As Boolean
  4454. Get
  4455. Return Me._clearBeforeFill
  4456. End Get
  4457. Set
  4458. Me._clearBeforeFill = value
  4459. End Set
  4460. End Property
  4461. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4462. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4463. Private Sub InitAdapter()
  4464. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter()
  4465. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
  4466. tableMapping.SourceTable = "Table"
  4467. tableMapping.DataSetTable = "訂單"
  4468. tableMapping.ColumnMappings.Add("訂單編號", "訂單編號")
  4469. tableMapping.ColumnMappings.Add("付款方式", "付款方式")
  4470. tableMapping.ColumnMappings.Add("取貨方式", "取貨方式")
  4471. tableMapping.ColumnMappings.Add("訂單日期", "訂單日期")
  4472. tableMapping.ColumnMappings.Add("會員編號", "會員編號")
  4473. tableMapping.ColumnMappings.Add("購物車編號", "購物車編號")
  4474. Me._adapter.TableMappings.Add(tableMapping)
  4475. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand()
  4476. Me._adapter.DeleteCommand.Connection = Me.Connection
  4477. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[訂單] WHERE (([訂單編號] = @Original_訂單編號) AND ((@IsNull_付款方式 = 1 AN"& _
  4478. "D [付款方式] IS NULL) OR ([付款方式] = @Original_付款方式)) AND ((@IsNull_取貨方式 = 1 AND [取貨方式"& _
  4479. "] IS NULL) OR ([取貨方式] = @Original_取貨方式)) AND ((@IsNull_訂單日期 = 1 AND [訂單日期] IS NU"& _
  4480. "LL) OR ([訂單日期] = @Original_訂單日期)) AND ((@IsNull_會員編號 = 1 AND [會員編號] IS NULL) OR "& _
  4481. "([會員編號] = @Original_會員編號)) AND ((@IsNull_購物車編號 = 1 AND [購物車編號] IS NULL) OR ([購物車"& _
  4482. "編號] = @Original_購物車編號)))"
  4483. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  4484. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂單編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4485. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_付款方式", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "付款方式", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4486. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_付款方式", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "付款方式", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4487. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_取貨方式", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "取貨方式", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4488. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_取貨方式", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "取貨方式", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4489. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_訂單日期", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單日期", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4490. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂單日期", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單日期", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4491. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_會員編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4492. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_會員編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4493. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_購物車編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4494. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_購物車編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4495. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand()
  4496. Me._adapter.InsertCommand.Connection = Me.Connection
  4497. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[訂單] ([訂單編號], [付款方式], [取貨方式], [訂單日期], [會員編號], [購物車編號]) VALUES ("& _
  4498. "@訂單編號, @付款方式, @取貨方式, @訂單日期, @會員編號, @購物車編號);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 訂單編號, 付款方式, 取貨方式, 訂單日期, 會員編號"& _
  4499. ", 購物車編號 FROM 訂單 WHERE (訂單編號 = @訂單編號)"
  4500. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  4501. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4502. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@付款方式", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "付款方式", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4503. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@取貨方式", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "取貨方式", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4504. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單日期", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單日期", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4505. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4506. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@購物車編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4507. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand()
  4508. Me._adapter.UpdateCommand.Connection = Me.Connection
  4509. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[訂單] SET [訂單編號] = @訂單編號, [付款方式] = @付款方式, [取貨方式] = @取貨方式, [訂單日期] = @訂"& _
  4510. "單日期, [會員編號] = @會員編號, [購物車編號] = @購物車編號 WHERE (([訂單編號] = @Original_訂單編號) AND ((@Is"& _
  4511. "Null_付款方式 = 1 AND [付款方式] IS NULL) OR ([付款方式] = @Original_付款方式)) AND ((@IsNull_取貨"& _
  4512. "方式 = 1 AND [取貨方式] IS NULL) OR ([取貨方式] = @Original_取貨方式)) AND ((@IsNull_訂單日期 = 1 "& _
  4513. "AND [訂單日期] IS NULL) OR ([訂單日期] = @Original_訂單日期)) AND ((@IsNull_會員編號 = 1 AND [會員"& _
  4514. "編號] IS NULL) OR ([會員編號] = @Original_會員編號)) AND ((@IsNull_購物車編號 = 1 AND [購物車編號] I"& _
  4515. "S NULL) OR ([購物車編號] = @Original_購物車編號)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 訂單編號, 付款方式, 取貨方式, 訂單日期, 會員編號, "& _
  4516. "購物車編號 FROM 訂單 WHERE (訂單編號 = @訂單編號)"
  4517. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  4518. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4519. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@付款方式", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "付款方式", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4520. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@取貨方式", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "取貨方式", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4521. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單日期", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單日期", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4522. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4523. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@購物車編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4524. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂單編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4525. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_付款方式", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "付款方式", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4526. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_付款方式", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "付款方式", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4527. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_取貨方式", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "取貨方式", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4528. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_取貨方式", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "取貨方式", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4529. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_訂單日期", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單日期", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4530. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂單日期", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單日期", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4531. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_會員編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4532. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_會員編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4533. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_購物車編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  4534. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_購物車編號", Global.System.Data.SqlDbType.NChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4535. End Sub
  4536. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4537. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4538. Private Sub InitConnection()
  4539. Me._connection = New Global.System.Data.SqlClient.SqlConnection()
  4540. Me._connection.ConnectionString = Global.謎鹿進銷存系統.My.MySettings.Default.謎鹿ConnectionString1
  4541. End Sub
  4542. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4543. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4544. Private Sub InitCommandCollection()
  4545. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(2) {}
  4546. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand()
  4547. Me._commandCollection(0).Connection = Me.Connection
  4548. Me._commandCollection(0).CommandText = "SELECT 訂單編號, 付款方式, 取貨方式, 訂單日期, 會員編號, 購物車編號 FROM dbo.訂單"
  4549. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  4550. Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand()
  4551. Me._commandCollection(1).Connection = Me.Connection
  4552. Me._commandCollection(1).CommandText = "DELETE FROM 訂單"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (訂單編號 = @訂單編號)"
  4553. Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text
  4554. Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單編號", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  4555. Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand()
  4556. Me._commandCollection(2).Connection = Me.Connection
  4557. Me._commandCollection(2).CommandText = "INSERT INTO 訂單"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (訂單編號, 付款方式, 取貨方式, 訂單日期, 會員編號, 購物車編號)"& _
  4558. ""&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@訂單編號,@付款方式,@取貨方式,@訂單日期,@會員編號,@購物車編號); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 訂單編號, 付款方式, 取"& _
  4559. "貨方式, 訂單日期, 會員編號, 購物車編號 FROM 訂單 WHERE (訂單編號 = @訂單編號)"
  4560. Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text
  4561. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單編號", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4562. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@付款方式", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "付款方式", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4563. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@取貨方式", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "取貨方式", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4564. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單日期", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單日期", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4565. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4566. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@購物車編號", Global.System.Data.SqlDbType.NChar, 10, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  4567. End Sub
  4568. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4569. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4570. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4571. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  4572. Public Overloads Overridable Function Fill(ByVal dataTable As 謎鹿DataSet.訂單DataTable) As Integer
  4573. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  4574. If (Me.ClearBeforeFill = true) Then
  4575. dataTable.Clear
  4576. End If
  4577. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  4578. Return returnValue
  4579. End Function
  4580. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4581. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4582. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4583. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  4584. Public Overloads Overridable Function GetData() As 謎鹿DataSet.訂單DataTable
  4585. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  4586. Dim dataTable As 謎鹿DataSet.訂單DataTable = New 謎鹿DataSet.訂單DataTable()
  4587. Me.Adapter.Fill(dataTable)
  4588. Return dataTable
  4589. End Function
  4590. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4591. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4592. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  4593. Public Overloads Overridable Function Update(ByVal dataTable As 謎鹿DataSet.訂單DataTable) As Integer
  4594. Return Me.Adapter.Update(dataTable)
  4595. End Function
  4596. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4597. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4598. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  4599. Public Overloads Overridable Function Update(ByVal dataSet As 謎鹿DataSet) As Integer
  4600. Return Me.Adapter.Update(dataSet, "訂單")
  4601. End Function
  4602. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4603. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4604. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  4605. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  4606. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  4607. End Function
  4608. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4609. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4610. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  4611. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  4612. Return Me.Adapter.Update(dataRows)
  4613. End Function
  4614. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4615. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4616. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4617. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  4618. Public Overloads Overridable Function Delete(ByVal Original_訂單編號 As Integer, ByVal Original_付款方式 As String, ByVal Original_取貨方式 As String, ByVal Original_訂單日期 As String, ByVal Original_會員編號 As String, ByVal Original_購物車編號 As String) As Integer
  4619. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_訂單編號,Integer)
  4620. If (Original_付款方式 Is Nothing) Then
  4621. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object)
  4622. Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value
  4623. Else
  4624. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object)
  4625. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_付款方式,String)
  4626. End If
  4627. If (Original_取貨方式 Is Nothing) Then
  4628. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
  4629. Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
  4630. Else
  4631. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
  4632. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_取貨方式,String)
  4633. End If
  4634. If (Original_訂單日期 Is Nothing) Then
  4635. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object)
  4636. Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value
  4637. Else
  4638. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object)
  4639. Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_訂單日期,String)
  4640. End If
  4641. If (Original_會員編號 Is Nothing) Then
  4642. Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object)
  4643. Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value
  4644. Else
  4645. Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object)
  4646. Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_會員編號,String)
  4647. End If
  4648. If (Original_購物車編號 Is Nothing) Then
  4649. Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object)
  4650. Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value
  4651. Else
  4652. Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object)
  4653. Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_購物車編號,String)
  4654. End If
  4655. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  4656. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  4657. <> Global.System.Data.ConnectionState.Open) Then
  4658. Me.Adapter.DeleteCommand.Connection.Open
  4659. End If
  4660. Try
  4661. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  4662. Return returnValue
  4663. Finally
  4664. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4665. Me.Adapter.DeleteCommand.Connection.Close
  4666. End If
  4667. End Try
  4668. End Function
  4669. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4670. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4671. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4672. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  4673. Public Overloads Overridable Function Insert(ByVal 訂單編號 As Integer, ByVal 付款方式 As String, ByVal 取貨方式 As String, ByVal 訂單日期 As String, ByVal 會員編號 As String, ByVal 購物車編號 As String) As Integer
  4674. Me.Adapter.InsertCommand.Parameters(0).Value = CType(訂單編號,Integer)
  4675. If (付款方式 Is Nothing) Then
  4676. Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value
  4677. Else
  4678. Me.Adapter.InsertCommand.Parameters(1).Value = CType(付款方式,String)
  4679. End If
  4680. If (取貨方式 Is Nothing) Then
  4681. Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
  4682. Else
  4683. Me.Adapter.InsertCommand.Parameters(2).Value = CType(取貨方式,String)
  4684. End If
  4685. If (訂單日期 Is Nothing) Then
  4686. Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value
  4687. Else
  4688. Me.Adapter.InsertCommand.Parameters(3).Value = CType(訂單日期,String)
  4689. End If
  4690. If (會員編號 Is Nothing) Then
  4691. Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
  4692. Else
  4693. Me.Adapter.InsertCommand.Parameters(4).Value = CType(會員編號,String)
  4694. End If
  4695. If (購物車編號 Is Nothing) Then
  4696. Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value
  4697. Else
  4698. Me.Adapter.InsertCommand.Parameters(5).Value = CType(購物車編號,String)
  4699. End If
  4700. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  4701. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  4702. <> Global.System.Data.ConnectionState.Open) Then
  4703. Me.Adapter.InsertCommand.Connection.Open
  4704. End If
  4705. Try
  4706. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  4707. Return returnValue
  4708. Finally
  4709. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4710. Me.Adapter.InsertCommand.Connection.Close
  4711. End If
  4712. End Try
  4713. End Function
  4714. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4715. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4716. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4717. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  4718. Public Overloads Overridable Function Update(ByVal 訂單編號 As Integer, ByVal 付款方式 As String, ByVal 取貨方式 As String, ByVal 訂單日期 As String, ByVal 會員編號 As String, ByVal 購物車編號 As String, ByVal Original_訂單編號 As Integer, ByVal Original_付款方式 As String, ByVal Original_取貨方式 As String, ByVal Original_訂單日期 As String, ByVal Original_會員編號 As String, ByVal Original_購物車編號 As String) As Integer
  4719. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(訂單編號,Integer)
  4720. If (付款方式 Is Nothing) Then
  4721. Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value
  4722. Else
  4723. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(付款方式,String)
  4724. End If
  4725. If (取貨方式 Is Nothing) Then
  4726. Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
  4727. Else
  4728. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(取貨方式,String)
  4729. End If
  4730. If (訂單日期 Is Nothing) Then
  4731. Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value
  4732. Else
  4733. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(訂單日期,String)
  4734. End If
  4735. If (會員編號 Is Nothing) Then
  4736. Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
  4737. Else
  4738. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(會員編號,String)
  4739. End If
  4740. If (購物車編號 Is Nothing) Then
  4741. Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value
  4742. Else
  4743. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(購物車編號,String)
  4744. End If
  4745. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_訂單編號,Integer)
  4746. If (Original_付款方式 Is Nothing) Then
  4747. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object)
  4748. Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value
  4749. Else
  4750. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object)
  4751. Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_付款方式,String)
  4752. End If
  4753. If (Original_取貨方式 Is Nothing) Then
  4754. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object)
  4755. Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value
  4756. Else
  4757. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object)
  4758. Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_取貨方式,String)
  4759. End If
  4760. If (Original_訂單日期 Is Nothing) Then
  4761. Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object)
  4762. Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value
  4763. Else
  4764. Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object)
  4765. Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_訂單日期,String)
  4766. End If
  4767. If (Original_會員編號 Is Nothing) Then
  4768. Me.Adapter.UpdateCommand.Parameters(13).Value = CType(1,Object)
  4769. Me.Adapter.UpdateCommand.Parameters(14).Value = Global.System.DBNull.Value
  4770. Else
  4771. Me.Adapter.UpdateCommand.Parameters(13).Value = CType(0,Object)
  4772. Me.Adapter.UpdateCommand.Parameters(14).Value = CType(Original_會員編號,String)
  4773. End If
  4774. If (Original_購物車編號 Is Nothing) Then
  4775. Me.Adapter.UpdateCommand.Parameters(15).Value = CType(1,Object)
  4776. Me.Adapter.UpdateCommand.Parameters(16).Value = Global.System.DBNull.Value
  4777. Else
  4778. Me.Adapter.UpdateCommand.Parameters(15).Value = CType(0,Object)
  4779. Me.Adapter.UpdateCommand.Parameters(16).Value = CType(Original_購物車編號,String)
  4780. End If
  4781. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  4782. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  4783. <> Global.System.Data.ConnectionState.Open) Then
  4784. Me.Adapter.UpdateCommand.Connection.Open
  4785. End If
  4786. Try
  4787. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  4788. Return returnValue
  4789. Finally
  4790. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4791. Me.Adapter.UpdateCommand.Connection.Close
  4792. End If
  4793. End Try
  4794. End Function
  4795. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4796. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4797. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4798. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  4799. Public Overloads Overridable Function Update(ByVal 付款方式 As String, ByVal 取貨方式 As String, ByVal 訂單日期 As String, ByVal 會員編號 As String, ByVal 購物車編號 As String, ByVal Original_訂單編號 As Integer, ByVal Original_付款方式 As String, ByVal Original_取貨方式 As String, ByVal Original_訂單日期 As String, ByVal Original_會員編號 As String, ByVal Original_購物車編號 As String) As Integer
  4800. Return Me.Update(Original_訂單編號, 付款方式, 取貨方式, 訂單日期, 會員編號, 購物車編號, Original_訂單編號, Original_付款方式, Original_取貨方式, Original_訂單日期, Original_會員編號, Original_購物車編號)
  4801. End Function
  4802. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4803. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4804. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4805. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, false)> _
  4806. Public Overloads Overridable Function DeleteQuery(ByVal 訂單編號 As Integer) As Integer
  4807. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1)
  4808. command.Parameters(0).Value = CType(訂單編號,Integer)
  4809. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  4810. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  4811. <> Global.System.Data.ConnectionState.Open) Then
  4812. command.Connection.Open
  4813. End If
  4814. Dim returnValue As Integer
  4815. Try
  4816. returnValue = command.ExecuteNonQuery
  4817. Finally
  4818. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4819. command.Connection.Close
  4820. End If
  4821. End Try
  4822. Return returnValue
  4823. End Function
  4824. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4825. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  4826. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  4827. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, false)> _
  4828. Public Overloads Overridable Function InsertQuery(ByVal 訂單編號 As Integer, ByVal 付款方式 As String, ByVal 取貨方式 As String, ByVal 訂單日期 As String, ByVal 會員編號 As String, ByVal 購物車編號 As String) As Integer
  4829. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(2)
  4830. command.Parameters(0).Value = CType(訂單編號,Integer)
  4831. If (付款方式 Is Nothing) Then
  4832. command.Parameters(1).Value = Global.System.DBNull.Value
  4833. Else
  4834. command.Parameters(1).Value = CType(付款方式,String)
  4835. End If
  4836. If (取貨方式 Is Nothing) Then
  4837. command.Parameters(2).Value = Global.System.DBNull.Value
  4838. Else
  4839. command.Parameters(2).Value = CType(取貨方式,String)
  4840. End If
  4841. If (訂單日期 Is Nothing) Then
  4842. command.Parameters(3).Value = Global.System.DBNull.Value
  4843. Else
  4844. command.Parameters(3).Value = CType(訂單日期,String)
  4845. End If
  4846. If (會員編號 Is Nothing) Then
  4847. command.Parameters(4).Value = Global.System.DBNull.Value
  4848. Else
  4849. command.Parameters(4).Value = CType(會員編號,String)
  4850. End If
  4851. If (購物車編號 Is Nothing) Then
  4852. command.Parameters(5).Value = Global.System.DBNull.Value
  4853. Else
  4854. command.Parameters(5).Value = CType(購物車編號,String)
  4855. End If
  4856. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  4857. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  4858. <> Global.System.Data.ConnectionState.Open) Then
  4859. command.Connection.Open
  4860. End If
  4861. Dim returnValue As Integer
  4862. Try
  4863. returnValue = command.ExecuteNonQuery
  4864. Finally
  4865. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  4866. command.Connection.Close
  4867. End If
  4868. End Try
  4869. Return returnValue
  4870. End Function
  4871. End Class
  4872. '''<summary>
  4873. '''Represents the connection and commands used to retrieve and save data.
  4874. '''</summary>
  4875. <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  4876. Global.System.ComponentModel.ToolboxItem(true), _
  4877. Global.System.ComponentModel.DataObjectAttribute(true), _
  4878. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  4879. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  4880. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  4881. Partial Public Class 購物車TableAdapter
  4882. Inherits Global.System.ComponentModel.Component
  4883. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  4884. Private _connection As Global.System.Data.SqlClient.SqlConnection
  4885. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  4886. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  4887. Private _clearBeforeFill As Boolean
  4888. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4889. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4890. Public Sub New()
  4891. MyBase.New
  4892. Me.ClearBeforeFill = true
  4893. End Sub
  4894. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4895. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4896. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  4897. Get
  4898. If (Me._adapter Is Nothing) Then
  4899. Me.InitAdapter
  4900. End If
  4901. Return Me._adapter
  4902. End Get
  4903. End Property
  4904. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4905. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4906. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  4907. Get
  4908. If (Me._connection Is Nothing) Then
  4909. Me.InitConnection
  4910. End If
  4911. Return Me._connection
  4912. End Get
  4913. Set
  4914. Me._connection = value
  4915. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  4916. Me.Adapter.InsertCommand.Connection = value
  4917. End If
  4918. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  4919. Me.Adapter.DeleteCommand.Connection = value
  4920. End If
  4921. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  4922. Me.Adapter.UpdateCommand.Connection = value
  4923. End If
  4924. Dim i As Integer = 0
  4925. Do While (i < Me.CommandCollection.Length)
  4926. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  4927. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  4928. End If
  4929. i = (i + 1)
  4930. Loop
  4931. End Set
  4932. End Property
  4933. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4934. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4935. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  4936. Get
  4937. Return Me._transaction
  4938. End Get
  4939. Set
  4940. Me._transaction = value
  4941. Dim i As Integer = 0
  4942. Do While (i < Me.CommandCollection.Length)
  4943. Me.CommandCollection(i).Transaction = Me._transaction
  4944. i = (i + 1)
  4945. Loop
  4946. If ((Not (Me.Adapter) Is Nothing) _
  4947. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  4948. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  4949. End If
  4950. If ((Not (Me.Adapter) Is Nothing) _
  4951. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  4952. Me.Adapter.InsertCommand.Transaction = Me._transaction
  4953. End If
  4954. If ((Not (Me.Adapter) Is Nothing) _
  4955. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  4956. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  4957. End If
  4958. End Set
  4959. End Property
  4960. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4961. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4962. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  4963. Get
  4964. If (Me._commandCollection Is Nothing) Then
  4965. Me.InitCommandCollection
  4966. End If
  4967. Return Me._commandCollection
  4968. End Get
  4969. End Property
  4970. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4971. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4972. Public Property ClearBeforeFill() As Boolean
  4973. Get
  4974. Return Me._clearBeforeFill
  4975. End Get
  4976. Set
  4977. Me._clearBeforeFill = value
  4978. End Set
  4979. End Property
  4980. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  4981. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  4982. Private Sub InitAdapter()
  4983. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter()
  4984. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
  4985. tableMapping.SourceTable = "Table"
  4986. tableMapping.DataSetTable = "購物車"
  4987. tableMapping.ColumnMappings.Add("會員編號", "會員編號")
  4988. tableMapping.ColumnMappings.Add("運費", "運費")
  4989. tableMapping.ColumnMappings.Add("總金額", "總金額")
  4990. tableMapping.ColumnMappings.Add("購物車編號", "購物車編號")
  4991. Me._adapter.TableMappings.Add(tableMapping)
  4992. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand()
  4993. Me._adapter.DeleteCommand.Connection = Me.Connection
  4994. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[購物車] WHERE (([會員編號] = @Original_會員編號) AND ((@IsNull_運費 = 1 AND"& _
  4995. " [運費] IS NULL) OR ([運費] = @Original_運費)) AND ((@IsNull_總金額 = 1 AND [總金額] IS NULL"& _
  4996. ") OR ([總金額] = @Original_總金額)) AND ((@IsNull_購物車編號 = 1 AND [購物車編號] IS NULL) OR (["& _
  4997. "購物車編號] = @Original_購物車編號)))"
  4998. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  4999. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5000. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_運費", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "運費", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5001. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_運費", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "運費", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5002. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_總金額", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "總金額", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5003. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_總金額", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "總金額", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5004. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_購物車編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5005. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_購物車編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5006. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand()
  5007. Me._adapter.InsertCommand.Connection = Me.Connection
  5008. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[購物車] ([會員編號], [運費], [總金額], [購物車編號]) VALUES (@會員編號, @運費, @總金額, "& _
  5009. "@購物車編號);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 會員編號, 運費, 總金額, 購物車編號 FROM 購物車 WHERE (會員編號 = @會員編號)"
  5010. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  5011. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5012. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@運費", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "運費", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5013. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@總金額", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "總金額", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5014. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@購物車編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5015. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand()
  5016. Me._adapter.UpdateCommand.Connection = Me.Connection
  5017. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[購物車] SET [會員編號] = @會員編號, [運費] = @運費, [總金額] = @總金額, [購物車編號] = @購物車編號"& _
  5018. " WHERE (([會員編號] = @Original_會員編號) AND ((@IsNull_運費 = 1 AND [運費] IS NULL) OR ([運費"& _
  5019. "] = @Original_運費)) AND ((@IsNull_總金額 = 1 AND [總金額] IS NULL) OR ([總金額] = @Origina"& _
  5020. "l_總金額)) AND ((@IsNull_購物車編號 = 1 AND [購物車編號] IS NULL) OR ([購物車編號] = @Original_購物車"& _
  5021. "編號)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 會員編號, 運費, 總金額, 購物車編號 FROM 購物車 WHERE (會員編號 = @會員編號)"
  5022. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  5023. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5024. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@運費", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "運費", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5025. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@總金額", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "總金額", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5026. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@購物車編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5027. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5028. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_運費", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "運費", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5029. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_運費", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "運費", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5030. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_總金額", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "總金額", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5031. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_總金額", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "總金額", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5032. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_購物車編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5033. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_購物車編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5034. End Sub
  5035. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5036. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5037. Private Sub InitConnection()
  5038. Me._connection = New Global.System.Data.SqlClient.SqlConnection()
  5039. Me._connection.ConnectionString = Global.謎鹿進銷存系統.My.MySettings.Default.謎鹿ConnectionString1
  5040. End Sub
  5041. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5042. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5043. Private Sub InitCommandCollection()
  5044. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(2) {}
  5045. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand()
  5046. Me._commandCollection(0).Connection = Me.Connection
  5047. Me._commandCollection(0).CommandText = "SELECT 會員編號, 運費, 總金額, 購物車編號 FROM dbo.購物車"
  5048. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  5049. Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand()
  5050. Me._commandCollection(1).Connection = Me.Connection
  5051. Me._commandCollection(1).CommandText = "DELETE FROM 購物車"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (會員編號 = @會員編號)"
  5052. Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text
  5053. Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5054. Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand()
  5055. Me._commandCollection(2).Connection = Me.Connection
  5056. Me._commandCollection(2).CommandText = "INSERT INTO 購物車"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (會員編號, 運費, 總金額, 購物車編號)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES "& _
  5057. " (@會員編號,@運費,@總金額,@購物車編號); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 會員編號, 運費, 總金額, 購物車編號 FROM 購物車 WHERE (會員編號 "& _
  5058. "= @會員編號)"
  5059. Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text
  5060. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5061. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@運費", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "運費", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5062. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@總金額", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "總金額", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5063. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@購物車編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "購物車編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5064. End Sub
  5065. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5066. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5067. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5068. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  5069. Public Overloads Overridable Function Fill(ByVal dataTable As 謎鹿DataSet.購物車DataTable) As Integer
  5070. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5071. If (Me.ClearBeforeFill = true) Then
  5072. dataTable.Clear
  5073. End If
  5074. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  5075. Return returnValue
  5076. End Function
  5077. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5078. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5079. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5080. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  5081. Public Overloads Overridable Function GetData() As 謎鹿DataSet.購物車DataTable
  5082. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5083. Dim dataTable As 謎鹿DataSet.購物車DataTable = New 謎鹿DataSet.購物車DataTable()
  5084. Me.Adapter.Fill(dataTable)
  5085. Return dataTable
  5086. End Function
  5087. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5088. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5089. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5090. Public Overloads Overridable Function Update(ByVal dataTable As 謎鹿DataSet.購物車DataTable) As Integer
  5091. Return Me.Adapter.Update(dataTable)
  5092. End Function
  5093. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5094. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5095. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5096. Public Overloads Overridable Function Update(ByVal dataSet As 謎鹿DataSet) As Integer
  5097. Return Me.Adapter.Update(dataSet, "購物車")
  5098. End Function
  5099. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5100. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5101. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5102. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  5103. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  5104. End Function
  5105. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5106. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5107. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5108. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  5109. Return Me.Adapter.Update(dataRows)
  5110. End Function
  5111. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5112. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5113. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5114. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  5115. Public Overloads Overridable Function Delete(ByVal Original_會員編號 As String, ByVal Original_運費 As String, ByVal Original_總金額 As String, ByVal Original_購物車編號 As String) As Integer
  5116. If (Original_會員編號 Is Nothing) Then
  5117. Throw New Global.System.ArgumentNullException("Original_會員編號")
  5118. Else
  5119. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_會員編號,String)
  5120. End If
  5121. If (Original_運費 Is Nothing) Then
  5122. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object)
  5123. Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value
  5124. Else
  5125. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object)
  5126. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_運費,String)
  5127. End If
  5128. If (Original_總金額 Is Nothing) Then
  5129. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
  5130. Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
  5131. Else
  5132. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
  5133. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_總金額,String)
  5134. End If
  5135. If (Original_購物車編號 Is Nothing) Then
  5136. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object)
  5137. Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value
  5138. Else
  5139. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object)
  5140. Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_購物車編號,String)
  5141. End If
  5142. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  5143. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5144. <> Global.System.Data.ConnectionState.Open) Then
  5145. Me.Adapter.DeleteCommand.Connection.Open
  5146. End If
  5147. Try
  5148. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  5149. Return returnValue
  5150. Finally
  5151. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5152. Me.Adapter.DeleteCommand.Connection.Close
  5153. End If
  5154. End Try
  5155. End Function
  5156. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5157. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5158. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5159. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  5160. Public Overloads Overridable Function Insert(ByVal 會員編號 As String, ByVal 運費 As String, ByVal 總金額 As String, ByVal 購物車編號 As String) As Integer
  5161. If (會員編號 Is Nothing) Then
  5162. Throw New Global.System.ArgumentNullException("會員編號")
  5163. Else
  5164. Me.Adapter.InsertCommand.Parameters(0).Value = CType(會員編號,String)
  5165. End If
  5166. If (運費 Is Nothing) Then
  5167. Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value
  5168. Else
  5169. Me.Adapter.InsertCommand.Parameters(1).Value = CType(運費,String)
  5170. End If
  5171. If (總金額 Is Nothing) Then
  5172. Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
  5173. Else
  5174. Me.Adapter.InsertCommand.Parameters(2).Value = CType(總金額,String)
  5175. End If
  5176. If (購物車編號 Is Nothing) Then
  5177. Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value
  5178. Else
  5179. Me.Adapter.InsertCommand.Parameters(3).Value = CType(購物車編號,String)
  5180. End If
  5181. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  5182. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5183. <> Global.System.Data.ConnectionState.Open) Then
  5184. Me.Adapter.InsertCommand.Connection.Open
  5185. End If
  5186. Try
  5187. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  5188. Return returnValue
  5189. Finally
  5190. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5191. Me.Adapter.InsertCommand.Connection.Close
  5192. End If
  5193. End Try
  5194. End Function
  5195. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5196. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5197. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5198. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5199. Public Overloads Overridable Function Update(ByVal 會員編號 As String, ByVal 運費 As String, ByVal 總金額 As String, ByVal 購物車編號 As String, ByVal Original_會員編號 As String, ByVal Original_運費 As String, ByVal Original_總金額 As String, ByVal Original_購物車編號 As String) As Integer
  5200. If (會員編號 Is Nothing) Then
  5201. Throw New Global.System.ArgumentNullException("會員編號")
  5202. Else
  5203. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(會員編號,String)
  5204. End If
  5205. If (運費 Is Nothing) Then
  5206. Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value
  5207. Else
  5208. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(運費,String)
  5209. End If
  5210. If (總金額 Is Nothing) Then
  5211. Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
  5212. Else
  5213. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(總金額,String)
  5214. End If
  5215. If (購物車編號 Is Nothing) Then
  5216. Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value
  5217. Else
  5218. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(購物車編號,String)
  5219. End If
  5220. If (Original_會員編號 Is Nothing) Then
  5221. Throw New Global.System.ArgumentNullException("Original_會員編號")
  5222. Else
  5223. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_會員編號,String)
  5224. End If
  5225. If (Original_運費 Is Nothing) Then
  5226. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(1,Object)
  5227. Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value
  5228. Else
  5229. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(0,Object)
  5230. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_運費,String)
  5231. End If
  5232. If (Original_總金額 Is Nothing) Then
  5233. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object)
  5234. Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value
  5235. Else
  5236. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object)
  5237. Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_總金額,String)
  5238. End If
  5239. If (Original_購物車編號 Is Nothing) Then
  5240. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object)
  5241. Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value
  5242. Else
  5243. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object)
  5244. Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_購物車編號,String)
  5245. End If
  5246. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  5247. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5248. <> Global.System.Data.ConnectionState.Open) Then
  5249. Me.Adapter.UpdateCommand.Connection.Open
  5250. End If
  5251. Try
  5252. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  5253. Return returnValue
  5254. Finally
  5255. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5256. Me.Adapter.UpdateCommand.Connection.Close
  5257. End If
  5258. End Try
  5259. End Function
  5260. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5261. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5262. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5263. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5264. Public Overloads Overridable Function Update(ByVal 運費 As String, ByVal 總金額 As String, ByVal 購物車編號 As String, ByVal Original_會員編號 As String, ByVal Original_運費 As String, ByVal Original_總金額 As String, ByVal Original_購物車編號 As String) As Integer
  5265. Return Me.Update(Original_會員編號, 運費, 總金額, 購物車編號, Original_會員編號, Original_運費, Original_總金額, Original_購物車編號)
  5266. End Function
  5267. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5268. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5269. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5270. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, false)> _
  5271. Public Overloads Overridable Function DeleteQuery(ByVal 會員編號 As String) As Integer
  5272. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(1)
  5273. If (會員編號 Is Nothing) Then
  5274. Throw New Global.System.ArgumentNullException("會員編號")
  5275. Else
  5276. command.Parameters(0).Value = CType(會員編號,String)
  5277. End If
  5278. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  5279. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  5280. <> Global.System.Data.ConnectionState.Open) Then
  5281. command.Connection.Open
  5282. End If
  5283. Dim returnValue As Integer
  5284. Try
  5285. returnValue = command.ExecuteNonQuery
  5286. Finally
  5287. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5288. command.Connection.Close
  5289. End If
  5290. End Try
  5291. Return returnValue
  5292. End Function
  5293. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5294. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5295. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5296. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, false)> _
  5297. Public Overloads Overridable Function InsertQuery(ByVal 會員編號 As String, ByVal 運費 As String, ByVal 總金額 As String, ByVal 購物車編號 As String) As Integer
  5298. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(2)
  5299. If (會員編號 Is Nothing) Then
  5300. Throw New Global.System.ArgumentNullException("會員編號")
  5301. Else
  5302. command.Parameters(0).Value = CType(會員編號,String)
  5303. End If
  5304. If (運費 Is Nothing) Then
  5305. command.Parameters(1).Value = Global.System.DBNull.Value
  5306. Else
  5307. command.Parameters(1).Value = CType(運費,String)
  5308. End If
  5309. If (總金額 Is Nothing) Then
  5310. command.Parameters(2).Value = Global.System.DBNull.Value
  5311. Else
  5312. command.Parameters(2).Value = CType(總金額,String)
  5313. End If
  5314. If (購物車編號 Is Nothing) Then
  5315. command.Parameters(3).Value = Global.System.DBNull.Value
  5316. Else
  5317. command.Parameters(3).Value = CType(購物車編號,String)
  5318. End If
  5319. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  5320. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  5321. <> Global.System.Data.ConnectionState.Open) Then
  5322. command.Connection.Open
  5323. End If
  5324. Dim returnValue As Integer
  5325. Try
  5326. returnValue = command.ExecuteNonQuery
  5327. Finally
  5328. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5329. command.Connection.Close
  5330. End If
  5331. End Try
  5332. Return returnValue
  5333. End Function
  5334. End Class
  5335. '''<summary>
  5336. '''Represents the connection and commands used to retrieve and save data.
  5337. '''</summary>
  5338. <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  5339. Global.System.ComponentModel.ToolboxItem(true), _
  5340. Global.System.ComponentModel.DataObjectAttribute(true), _
  5341. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  5342. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  5343. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5344. Partial Public Class 紀錄TableAdapter
  5345. Inherits Global.System.ComponentModel.Component
  5346. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  5347. Private _connection As Global.System.Data.SqlClient.SqlConnection
  5348. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  5349. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  5350. Private _clearBeforeFill As Boolean
  5351. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5352. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5353. Public Sub New()
  5354. MyBase.New
  5355. Me.ClearBeforeFill = true
  5356. End Sub
  5357. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5358. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5359. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  5360. Get
  5361. If (Me._adapter Is Nothing) Then
  5362. Me.InitAdapter
  5363. End If
  5364. Return Me._adapter
  5365. End Get
  5366. End Property
  5367. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5368. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5369. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  5370. Get
  5371. If (Me._connection Is Nothing) Then
  5372. Me.InitConnection
  5373. End If
  5374. Return Me._connection
  5375. End Get
  5376. Set
  5377. Me._connection = value
  5378. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  5379. Me.Adapter.InsertCommand.Connection = value
  5380. End If
  5381. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  5382. Me.Adapter.DeleteCommand.Connection = value
  5383. End If
  5384. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  5385. Me.Adapter.UpdateCommand.Connection = value
  5386. End If
  5387. Dim i As Integer = 0
  5388. Do While (i < Me.CommandCollection.Length)
  5389. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  5390. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  5391. End If
  5392. i = (i + 1)
  5393. Loop
  5394. End Set
  5395. End Property
  5396. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5397. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5398. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  5399. Get
  5400. Return Me._transaction
  5401. End Get
  5402. Set
  5403. Me._transaction = value
  5404. Dim i As Integer = 0
  5405. Do While (i < Me.CommandCollection.Length)
  5406. Me.CommandCollection(i).Transaction = Me._transaction
  5407. i = (i + 1)
  5408. Loop
  5409. If ((Not (Me.Adapter) Is Nothing) _
  5410. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  5411. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  5412. End If
  5413. If ((Not (Me.Adapter) Is Nothing) _
  5414. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  5415. Me.Adapter.InsertCommand.Transaction = Me._transaction
  5416. End If
  5417. If ((Not (Me.Adapter) Is Nothing) _
  5418. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  5419. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  5420. End If
  5421. End Set
  5422. End Property
  5423. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5424. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5425. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  5426. Get
  5427. If (Me._commandCollection Is Nothing) Then
  5428. Me.InitCommandCollection
  5429. End If
  5430. Return Me._commandCollection
  5431. End Get
  5432. End Property
  5433. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5434. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5435. Public Property ClearBeforeFill() As Boolean
  5436. Get
  5437. Return Me._clearBeforeFill
  5438. End Get
  5439. Set
  5440. Me._clearBeforeFill = value
  5441. End Set
  5442. End Property
  5443. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5444. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5445. Private Sub InitAdapter()
  5446. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter()
  5447. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
  5448. tableMapping.SourceTable = "Table"
  5449. tableMapping.DataSetTable = "紀錄"
  5450. tableMapping.ColumnMappings.Add("訂單編號", "訂單編號")
  5451. tableMapping.ColumnMappings.Add("商品編號", "商品編號")
  5452. tableMapping.ColumnMappings.Add("訂購數量", "訂購數量")
  5453. tableMapping.ColumnMappings.Add("價錢", "價錢")
  5454. Me._adapter.TableMappings.Add(tableMapping)
  5455. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand()
  5456. Me._adapter.DeleteCommand.Connection = Me.Connection
  5457. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[紀錄] WHERE (([訂單編號] = @Original_訂單編號) AND ((@IsNull_商品編號 = 1 AN"& _
  5458. "D [商品編號] IS NULL) OR ([商品編號] = @Original_商品編號)) AND ((@IsNull_訂購數量 = 1 AND [訂購數量"& _
  5459. "] IS NULL) OR ([訂購數量] = @Original_訂購數量)) AND ((@IsNull_價錢 = 1 AND [價錢] IS NULL) "& _
  5460. "OR ([價錢] = @Original_價錢)))"
  5461. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  5462. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂單編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5463. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_商品編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5464. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_商品編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5465. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_訂購數量", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5466. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂購數量", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5467. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_價錢", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "價錢", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5468. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_價錢", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "價錢", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5469. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand()
  5470. Me._adapter.InsertCommand.Connection = Me.Connection
  5471. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[紀錄] ([訂單編號], [商品編號], [訂購數量], [價錢]) VALUES (@訂單編號, @商品編號, @訂購數量"& _
  5472. ", @價錢);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 訂單編號, 商品編號, 訂購數量, 價錢 FROM 紀錄 WHERE (訂單編號 = @訂單編號)"
  5473. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  5474. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5475. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5476. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂購數量", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5477. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@價錢", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "價錢", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5478. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand()
  5479. Me._adapter.UpdateCommand.Connection = Me.Connection
  5480. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[紀錄] SET [訂單編號] = @訂單編號, [商品編號] = @商品編號, [訂購數量] = @訂購數量, [價錢] = @價錢 "& _
  5481. "WHERE (([訂單編號] = @Original_訂單編號) AND ((@IsNull_商品編號 = 1 AND [商品編號] IS NULL) OR ("& _
  5482. "[商品編號] = @Original_商品編號)) AND ((@IsNull_訂購數量 = 1 AND [訂購數量] IS NULL) OR ([訂購數量] "& _
  5483. "= @Original_訂購數量)) AND ((@IsNull_價錢 = 1 AND [價錢] IS NULL) OR ([價錢] = @Original_價"& _
  5484. "錢)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 訂單編號, 商品編號, 訂購數量, 價錢 FROM 紀錄 WHERE (訂單編號 = @訂單編號)"
  5485. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  5486. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5487. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5488. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂購數量", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5489. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@價錢", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "價錢", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5490. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂單編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5491. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_商品編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5492. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_商品編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5493. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_訂購數量", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5494. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂購數量", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5495. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_價錢", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "價錢", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5496. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_價錢", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "價錢", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5497. End Sub
  5498. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5499. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5500. Private Sub InitConnection()
  5501. Me._connection = New Global.System.Data.SqlClient.SqlConnection()
  5502. Me._connection.ConnectionString = Global.謎鹿進銷存系統.My.MySettings.Default.謎鹿ConnectionString1
  5503. End Sub
  5504. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5505. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5506. Private Sub InitCommandCollection()
  5507. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(3) {}
  5508. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand()
  5509. Me._commandCollection(0).Connection = Me.Connection
  5510. Me._commandCollection(0).CommandText = "SELECT 訂單編號, 商品編號, 訂購數量, 價錢 FROM dbo.紀錄"
  5511. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  5512. Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand()
  5513. Me._commandCollection(1).Connection = Me.Connection
  5514. Me._commandCollection(1).CommandText = "SELECT 訂單編號, 商品編號, 訂購數量, 價錢"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM 紀錄"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (訂單編號 "& _
  5515. "LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (商品編號 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _
  5516. " (訂購數量 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (價錢 LIK"& _
  5517. "E @keyword)"
  5518. Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text
  5519. Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@keyword", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5520. Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand()
  5521. Me._commandCollection(2).Connection = Me.Connection
  5522. Me._commandCollection(2).CommandText = "SELECT 訂單編號, 商品編號, 訂購數量, 價錢"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM 紀錄"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (訂單編號 "& _
  5523. "LIKE @sql)"
  5524. Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text
  5525. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sql", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5526. Me._commandCollection(3) = New Global.System.Data.SqlClient.SqlCommand()
  5527. Me._commandCollection(3).Connection = Me.Connection
  5528. Me._commandCollection(3).CommandText = "INSERT INTO 紀錄"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (訂單編號, 商品編號, 訂購數量, 價錢)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES "& _
  5529. " (@訂單編號,@商品編號,@訂購數量,@價錢); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 訂單編號, 商品編號, 訂購數量, 價錢 FROM 紀錄 WHERE (訂單編號 = "& _
  5530. "@訂單編號)"
  5531. Me._commandCollection(3).CommandType = Global.System.Data.CommandType.Text
  5532. Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂單編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "訂單編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5533. Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5534. Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂購數量", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5535. Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@價錢", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "價錢", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5536. End Sub
  5537. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5538. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5539. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5540. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  5541. Public Overloads Overridable Function Fill(ByVal dataTable As 謎鹿DataSet.紀錄DataTable) As Integer
  5542. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5543. If (Me.ClearBeforeFill = true) Then
  5544. dataTable.Clear
  5545. End If
  5546. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  5547. Return returnValue
  5548. End Function
  5549. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5550. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5551. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5552. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  5553. Public Overloads Overridable Function GetData() As 謎鹿DataSet.紀錄DataTable
  5554. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5555. Dim dataTable As 謎鹿DataSet.紀錄DataTable = New 謎鹿DataSet.紀錄DataTable()
  5556. Me.Adapter.Fill(dataTable)
  5557. Return dataTable
  5558. End Function
  5559. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5560. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5561. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5562. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
  5563. Public Overloads Overridable Function FillByKeyword(ByVal dataTable As 謎鹿DataSet.紀錄DataTable, ByVal keyword As String) As Integer
  5564. Me.Adapter.SelectCommand = Me.CommandCollection(1)
  5565. If (keyword Is Nothing) Then
  5566. Throw New Global.System.ArgumentNullException("keyword")
  5567. Else
  5568. Me.Adapter.SelectCommand.Parameters(0).Value = CType(keyword,String)
  5569. End If
  5570. If (Me.ClearBeforeFill = true) Then
  5571. dataTable.Clear
  5572. End If
  5573. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  5574. Return returnValue
  5575. End Function
  5576. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5577. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5578. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5579. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
  5580. Public Overloads Overridable Function FillBysql(ByVal dataTable As 謎鹿DataSet.紀錄DataTable, ByVal sql As String) As Integer
  5581. Me.Adapter.SelectCommand = Me.CommandCollection(2)
  5582. If (sql Is Nothing) Then
  5583. Throw New Global.System.ArgumentNullException("sql")
  5584. Else
  5585. Me.Adapter.SelectCommand.Parameters(0).Value = CType(sql,String)
  5586. End If
  5587. If (Me.ClearBeforeFill = true) Then
  5588. dataTable.Clear
  5589. End If
  5590. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  5591. Return returnValue
  5592. End Function
  5593. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5594. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5595. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5596. Public Overloads Overridable Function Update(ByVal dataTable As 謎鹿DataSet.紀錄DataTable) As Integer
  5597. Return Me.Adapter.Update(dataTable)
  5598. End Function
  5599. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5600. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5601. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5602. Public Overloads Overridable Function Update(ByVal dataSet As 謎鹿DataSet) As Integer
  5603. Return Me.Adapter.Update(dataSet, "紀錄")
  5604. End Function
  5605. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5606. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5607. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5608. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  5609. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  5610. End Function
  5611. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5612. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5613. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5614. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  5615. Return Me.Adapter.Update(dataRows)
  5616. End Function
  5617. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5618. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5619. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5620. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  5621. Public Overloads Overridable Function Delete(ByVal Original_訂單編號 As String, ByVal Original_商品編號 As String, ByVal Original_訂購數量 As String, ByVal Original_價錢 As String) As Integer
  5622. If (Original_訂單編號 Is Nothing) Then
  5623. Throw New Global.System.ArgumentNullException("Original_訂單編號")
  5624. Else
  5625. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_訂單編號,String)
  5626. End If
  5627. If (Original_商品編號 Is Nothing) Then
  5628. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object)
  5629. Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value
  5630. Else
  5631. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object)
  5632. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_商品編號,String)
  5633. End If
  5634. If (Original_訂購數量 Is Nothing) Then
  5635. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
  5636. Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
  5637. Else
  5638. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
  5639. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_訂購數量,String)
  5640. End If
  5641. If (Original_價錢 Is Nothing) Then
  5642. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object)
  5643. Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value
  5644. Else
  5645. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object)
  5646. Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_價錢,String)
  5647. End If
  5648. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  5649. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5650. <> Global.System.Data.ConnectionState.Open) Then
  5651. Me.Adapter.DeleteCommand.Connection.Open
  5652. End If
  5653. Try
  5654. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  5655. Return returnValue
  5656. Finally
  5657. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5658. Me.Adapter.DeleteCommand.Connection.Close
  5659. End If
  5660. End Try
  5661. End Function
  5662. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5663. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5664. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5665. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  5666. Public Overloads Overridable Function Insert(ByVal 訂單編號 As String, ByVal 商品編號 As String, ByVal 訂購數量 As String, ByVal 價錢 As String) As Integer
  5667. If (訂單編號 Is Nothing) Then
  5668. Throw New Global.System.ArgumentNullException("訂單編號")
  5669. Else
  5670. Me.Adapter.InsertCommand.Parameters(0).Value = CType(訂單編號,String)
  5671. End If
  5672. If (商品編號 Is Nothing) Then
  5673. Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value
  5674. Else
  5675. Me.Adapter.InsertCommand.Parameters(1).Value = CType(商品編號,String)
  5676. End If
  5677. If (訂購數量 Is Nothing) Then
  5678. Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
  5679. Else
  5680. Me.Adapter.InsertCommand.Parameters(2).Value = CType(訂購數量,String)
  5681. End If
  5682. If (價錢 Is Nothing) Then
  5683. Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value
  5684. Else
  5685. Me.Adapter.InsertCommand.Parameters(3).Value = CType(價錢,String)
  5686. End If
  5687. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  5688. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5689. <> Global.System.Data.ConnectionState.Open) Then
  5690. Me.Adapter.InsertCommand.Connection.Open
  5691. End If
  5692. Try
  5693. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  5694. Return returnValue
  5695. Finally
  5696. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5697. Me.Adapter.InsertCommand.Connection.Close
  5698. End If
  5699. End Try
  5700. End Function
  5701. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5702. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5703. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5704. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5705. Public Overloads Overridable Function Update(ByVal 訂單編號 As String, ByVal 商品編號 As String, ByVal 訂購數量 As String, ByVal 價錢 As String, ByVal Original_訂單編號 As String, ByVal Original_商品編號 As String, ByVal Original_訂購數量 As String, ByVal Original_價錢 As String) As Integer
  5706. If (訂單編號 Is Nothing) Then
  5707. Throw New Global.System.ArgumentNullException("訂單編號")
  5708. Else
  5709. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(訂單編號,String)
  5710. End If
  5711. If (商品編號 Is Nothing) Then
  5712. Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value
  5713. Else
  5714. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(商品編號,String)
  5715. End If
  5716. If (訂購數量 Is Nothing) Then
  5717. Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
  5718. Else
  5719. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(訂購數量,String)
  5720. End If
  5721. If (價錢 Is Nothing) Then
  5722. Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value
  5723. Else
  5724. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(價錢,String)
  5725. End If
  5726. If (Original_訂單編號 Is Nothing) Then
  5727. Throw New Global.System.ArgumentNullException("Original_訂單編號")
  5728. Else
  5729. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_訂單編號,String)
  5730. End If
  5731. If (Original_商品編號 Is Nothing) Then
  5732. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(1,Object)
  5733. Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value
  5734. Else
  5735. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(0,Object)
  5736. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_商品編號,String)
  5737. End If
  5738. If (Original_訂購數量 Is Nothing) Then
  5739. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(1,Object)
  5740. Me.Adapter.UpdateCommand.Parameters(8).Value = Global.System.DBNull.Value
  5741. Else
  5742. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(0,Object)
  5743. Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_訂購數量,String)
  5744. End If
  5745. If (Original_價錢 Is Nothing) Then
  5746. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object)
  5747. Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value
  5748. Else
  5749. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object)
  5750. Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_價錢,String)
  5751. End If
  5752. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  5753. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5754. <> Global.System.Data.ConnectionState.Open) Then
  5755. Me.Adapter.UpdateCommand.Connection.Open
  5756. End If
  5757. Try
  5758. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  5759. Return returnValue
  5760. Finally
  5761. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5762. Me.Adapter.UpdateCommand.Connection.Close
  5763. End If
  5764. End Try
  5765. End Function
  5766. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5767. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5768. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5769. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5770. Public Overloads Overridable Function Update(ByVal 商品編號 As String, ByVal 訂購數量 As String, ByVal 價錢 As String, ByVal Original_訂單編號 As String, ByVal Original_商品編號 As String, ByVal Original_訂購數量 As String, ByVal Original_價錢 As String) As Integer
  5771. Return Me.Update(Original_訂單編號, 商品編號, 訂購數量, 價錢, Original_訂單編號, Original_商品編號, Original_訂購數量, Original_價錢)
  5772. End Function
  5773. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5774. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  5775. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5776. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, false)> _
  5777. Public Overloads Overridable Function InsertQuery(ByVal 訂單編號 As String, ByVal 商品編號 As String, ByVal 訂購數量 As String, ByVal 價錢 As String) As Integer
  5778. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(3)
  5779. If (訂單編號 Is Nothing) Then
  5780. Throw New Global.System.ArgumentNullException("訂單編號")
  5781. Else
  5782. command.Parameters(0).Value = CType(訂單編號,String)
  5783. End If
  5784. If (商品編號 Is Nothing) Then
  5785. command.Parameters(1).Value = Global.System.DBNull.Value
  5786. Else
  5787. command.Parameters(1).Value = CType(商品編號,String)
  5788. End If
  5789. If (訂購數量 Is Nothing) Then
  5790. command.Parameters(2).Value = Global.System.DBNull.Value
  5791. Else
  5792. command.Parameters(2).Value = CType(訂購數量,String)
  5793. End If
  5794. If (價錢 Is Nothing) Then
  5795. command.Parameters(3).Value = Global.System.DBNull.Value
  5796. Else
  5797. command.Parameters(3).Value = CType(價錢,String)
  5798. End If
  5799. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  5800. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  5801. <> Global.System.Data.ConnectionState.Open) Then
  5802. command.Connection.Open
  5803. End If
  5804. Dim returnValue As Integer
  5805. Try
  5806. returnValue = command.ExecuteNonQuery
  5807. Finally
  5808. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5809. command.Connection.Close
  5810. End If
  5811. End Try
  5812. Return returnValue
  5813. End Function
  5814. End Class
  5815. '''<summary>
  5816. '''Represents the connection and commands used to retrieve and save data.
  5817. '''</summary>
  5818. <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  5819. Global.System.ComponentModel.ToolboxItem(true), _
  5820. Global.System.ComponentModel.DataObjectAttribute(true), _
  5821. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  5822. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  5823. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5824. Partial Public Class 訂購TableAdapter
  5825. Inherits Global.System.ComponentModel.Component
  5826. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  5827. Private _connection As Global.System.Data.SqlClient.SqlConnection
  5828. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  5829. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  5830. Private _clearBeforeFill As Boolean
  5831. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5832. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5833. Public Sub New()
  5834. MyBase.New
  5835. Me.ClearBeforeFill = true
  5836. End Sub
  5837. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5838. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5839. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  5840. Get
  5841. If (Me._adapter Is Nothing) Then
  5842. Me.InitAdapter
  5843. End If
  5844. Return Me._adapter
  5845. End Get
  5846. End Property
  5847. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5848. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5849. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  5850. Get
  5851. If (Me._connection Is Nothing) Then
  5852. Me.InitConnection
  5853. End If
  5854. Return Me._connection
  5855. End Get
  5856. Set
  5857. Me._connection = value
  5858. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  5859. Me.Adapter.InsertCommand.Connection = value
  5860. End If
  5861. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  5862. Me.Adapter.DeleteCommand.Connection = value
  5863. End If
  5864. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  5865. Me.Adapter.UpdateCommand.Connection = value
  5866. End If
  5867. Dim i As Integer = 0
  5868. Do While (i < Me.CommandCollection.Length)
  5869. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  5870. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  5871. End If
  5872. i = (i + 1)
  5873. Loop
  5874. End Set
  5875. End Property
  5876. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5877. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5878. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  5879. Get
  5880. Return Me._transaction
  5881. End Get
  5882. Set
  5883. Me._transaction = value
  5884. Dim i As Integer = 0
  5885. Do While (i < Me.CommandCollection.Length)
  5886. Me.CommandCollection(i).Transaction = Me._transaction
  5887. i = (i + 1)
  5888. Loop
  5889. If ((Not (Me.Adapter) Is Nothing) _
  5890. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  5891. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  5892. End If
  5893. If ((Not (Me.Adapter) Is Nothing) _
  5894. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  5895. Me.Adapter.InsertCommand.Transaction = Me._transaction
  5896. End If
  5897. If ((Not (Me.Adapter) Is Nothing) _
  5898. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  5899. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  5900. End If
  5901. End Set
  5902. End Property
  5903. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5904. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5905. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  5906. Get
  5907. If (Me._commandCollection Is Nothing) Then
  5908. Me.InitCommandCollection
  5909. End If
  5910. Return Me._commandCollection
  5911. End Get
  5912. End Property
  5913. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5914. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5915. Public Property ClearBeforeFill() As Boolean
  5916. Get
  5917. Return Me._clearBeforeFill
  5918. End Get
  5919. Set
  5920. Me._clearBeforeFill = value
  5921. End Set
  5922. End Property
  5923. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5924. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5925. Private Sub InitAdapter()
  5926. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter()
  5927. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
  5928. tableMapping.SourceTable = "Table"
  5929. tableMapping.DataSetTable = "訂購"
  5930. tableMapping.ColumnMappings.Add("會員編號", "會員編號")
  5931. tableMapping.ColumnMappings.Add("商品編號", "商品編號")
  5932. tableMapping.ColumnMappings.Add("訂購數量", "訂購數量")
  5933. Me._adapter.TableMappings.Add(tableMapping)
  5934. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand()
  5935. Me._adapter.DeleteCommand.Connection = Me.Connection
  5936. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[訂購] WHERE (([會員編號] = @Original_會員編號) AND ((@IsNull_商品編號 = 1 AN"& _
  5937. "D [商品編號] IS NULL) OR ([商品編號] = @Original_商品編號)) AND ((@IsNull_訂購數量 = 1 AND [訂購數量"& _
  5938. "] IS NULL) OR ([訂購數量] = @Original_訂購數量)))"
  5939. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  5940. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5941. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_商品編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5942. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_商品編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5943. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_訂購數量", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5944. Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂購數量", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5945. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand()
  5946. Me._adapter.InsertCommand.Connection = Me.Connection
  5947. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[訂購] ([會員編號], [商品編號], [訂購數量]) VALUES (@會員編號, @商品編號, @訂購數量);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SE"& _
  5948. "LECT 會員編號, 商品編號, 訂購數量 FROM 訂購 WHERE (會員編號 = @會員編號)"
  5949. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  5950. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5951. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5952. Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂購數量", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5953. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand()
  5954. Me._adapter.UpdateCommand.Connection = Me.Connection
  5955. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[訂購] SET [會員編號] = @會員編號, [商品編號] = @商品編號, [訂購數量] = @訂購數量 WHERE (([會員編"& _
  5956. "號] = @Original_會員編號) AND ((@IsNull_商品編號 = 1 AND [商品編號] IS NULL) OR ([商品編號] = @Or"& _
  5957. "iginal_商品編號)) AND ((@IsNull_訂購數量 = 1 AND [訂購數量] IS NULL) OR ([訂購數量] = @Original_"& _
  5958. "訂購數量)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 會員編號, 商品編號, 訂購數量 FROM 訂購 WHERE (會員編號 = @會員編號)"
  5959. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  5960. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5961. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5962. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂購數量", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5963. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_會員編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5964. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_商品編號", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5965. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_商品編號", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5966. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_訂購數量", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
  5967. Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_訂購數量", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
  5968. End Sub
  5969. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5970. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5971. Private Sub InitConnection()
  5972. Me._connection = New Global.System.Data.SqlClient.SqlConnection()
  5973. Me._connection.ConnectionString = Global.謎鹿進銷存系統.My.MySettings.Default.謎鹿ConnectionString1
  5974. End Sub
  5975. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5976. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  5977. Private Sub InitCommandCollection()
  5978. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(3) {}
  5979. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand()
  5980. Me._commandCollection(0).Connection = Me.Connection
  5981. Me._commandCollection(0).CommandText = "SELECT 會員編號, 商品編號, 訂購數量 FROM dbo.訂購"
  5982. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  5983. Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand()
  5984. Me._commandCollection(1).Connection = Me.Connection
  5985. Me._commandCollection(1).CommandText = "SELECT 會員編號, 商品編號, 訂購數量"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM 訂購"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (會員編號 LIKE"& _
  5986. " @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (商品編號 LIKE @keyword) OR"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _
  5987. " (訂購數量 LIKE @keyword)"
  5988. Me._commandCollection(1).CommandType = Global.System.Data.CommandType.Text
  5989. Me._commandCollection(1).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@keyword", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5990. Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand()
  5991. Me._commandCollection(2).Connection = Me.Connection
  5992. Me._commandCollection(2).CommandText = "SELECT 會員編號, 商品編號, 訂購數量"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM 訂購"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (會員編號 LIKE"& _
  5993. " @sql)"
  5994. Me._commandCollection(2).CommandType = Global.System.Data.CommandType.Text
  5995. Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@sql", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  5996. Me._commandCollection(3) = New Global.System.Data.SqlClient.SqlCommand()
  5997. Me._commandCollection(3).Connection = Me.Connection
  5998. Me._commandCollection(3).CommandText = "INSERT INTO 訂購"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (會員編號, 商品編號, 訂購數量)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES ("& _
  5999. "@會員編號,@商品編號,@訂購數量); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT 會員編號, 商品編號, 訂購數量 FROM 訂購 WHERE (會員編號 = @會員編號)"
  6000. Me._commandCollection(3).CommandType = Global.System.Data.CommandType.Text
  6001. Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@會員編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "會員編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  6002. Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@商品編號", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "商品編號", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  6003. Me._commandCollection(3).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@訂購數量", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, "訂購數量", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
  6004. End Sub
  6005. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6006. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6007. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6008. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  6009. Public Overloads Overridable Function Fill(ByVal dataTable As 謎鹿DataSet.訂購DataTable) As Integer
  6010. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6011. If (Me.ClearBeforeFill = true) Then
  6012. dataTable.Clear
  6013. End If
  6014. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  6015. Return returnValue
  6016. End Function
  6017. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6018. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6019. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6020. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  6021. Public Overloads Overridable Function GetData() As 謎鹿DataSet.訂購DataTable
  6022. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6023. Dim dataTable As 謎鹿DataSet.訂購DataTable = New 謎鹿DataSet.訂購DataTable()
  6024. Me.Adapter.Fill(dataTable)
  6025. Return dataTable
  6026. End Function
  6027. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6028. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6029. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6030. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
  6031. Public Overloads Overridable Function FillByKeyword(ByVal dataTable As 謎鹿DataSet.訂購DataTable, ByVal keyword As String) As Integer
  6032. Me.Adapter.SelectCommand = Me.CommandCollection(1)
  6033. If (keyword Is Nothing) Then
  6034. Throw New Global.System.ArgumentNullException("keyword")
  6035. Else
  6036. Me.Adapter.SelectCommand.Parameters(0).Value = CType(keyword,String)
  6037. End If
  6038. If (Me.ClearBeforeFill = true) Then
  6039. dataTable.Clear
  6040. End If
  6041. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  6042. Return returnValue
  6043. End Function
  6044. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6045. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6046. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6047. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, false)> _
  6048. Public Overloads Overridable Function FillBysql(ByVal dataTable As 謎鹿DataSet.訂購DataTable, ByVal sql As String) As Integer
  6049. Me.Adapter.SelectCommand = Me.CommandCollection(2)
  6050. If (sql Is Nothing) Then
  6051. Throw New Global.System.ArgumentNullException("sql")
  6052. Else
  6053. Me.Adapter.SelectCommand.Parameters(0).Value = CType(sql,String)
  6054. End If
  6055. If (Me.ClearBeforeFill = true) Then
  6056. dataTable.Clear
  6057. End If
  6058. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  6059. Return returnValue
  6060. End Function
  6061. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6062. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6063. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6064. Public Overloads Overridable Function Update(ByVal dataTable As 謎鹿DataSet.訂購DataTable) As Integer
  6065. Return Me.Adapter.Update(dataTable)
  6066. End Function
  6067. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6068. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6069. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6070. Public Overloads Overridable Function Update(ByVal dataSet As 謎鹿DataSet) As Integer
  6071. Return Me.Adapter.Update(dataSet, "訂購")
  6072. End Function
  6073. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6074. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6075. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6076. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  6077. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  6078. End Function
  6079. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6080. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6081. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6082. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  6083. Return Me.Adapter.Update(dataRows)
  6084. End Function
  6085. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6086. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6087. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6088. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  6089. Public Overloads Overridable Function Delete(ByVal Original_會員編號 As String, ByVal Original_商品編號 As String, ByVal Original_訂購數量 As String) As Integer
  6090. If (Original_會員編號 Is Nothing) Then
  6091. Throw New Global.System.ArgumentNullException("Original_會員編號")
  6092. Else
  6093. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_會員編號,String)
  6094. End If
  6095. If (Original_商品編號 Is Nothing) Then
  6096. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(1,Object)
  6097. Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value
  6098. Else
  6099. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(0,Object)
  6100. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_商品編號,String)
  6101. End If
  6102. If (Original_訂購數量 Is Nothing) Then
  6103. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
  6104. Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
  6105. Else
  6106. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
  6107. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_訂購數量,String)
  6108. End If
  6109. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  6110. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6111. <> Global.System.Data.ConnectionState.Open) Then
  6112. Me.Adapter.DeleteCommand.Connection.Open
  6113. End If
  6114. Try
  6115. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  6116. Return returnValue
  6117. Finally
  6118. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6119. Me.Adapter.DeleteCommand.Connection.Close
  6120. End If
  6121. End Try
  6122. End Function
  6123. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6124. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6125. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6126. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  6127. Public Overloads Overridable Function Insert(ByVal 會員編號 As String, ByVal 商品編號 As String, ByVal 訂購數量 As String) As Integer
  6128. If (會員編號 Is Nothing) Then
  6129. Throw New Global.System.ArgumentNullException("會員編號")
  6130. Else
  6131. Me.Adapter.InsertCommand.Parameters(0).Value = CType(會員編號,String)
  6132. End If
  6133. If (商品編號 Is Nothing) Then
  6134. Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value
  6135. Else
  6136. Me.Adapter.InsertCommand.Parameters(1).Value = CType(商品編號,String)
  6137. End If
  6138. If (訂購數量 Is Nothing) Then
  6139. Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
  6140. Else
  6141. Me.Adapter.InsertCommand.Parameters(2).Value = CType(訂購數量,String)
  6142. End If
  6143. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  6144. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6145. <> Global.System.Data.ConnectionState.Open) Then
  6146. Me.Adapter.InsertCommand.Connection.Open
  6147. End If
  6148. Try
  6149. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  6150. Return returnValue
  6151. Finally
  6152. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6153. Me.Adapter.InsertCommand.Connection.Close
  6154. End If
  6155. End Try
  6156. End Function
  6157. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6158. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6159. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6160. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  6161. Public Overloads Overridable Function Update(ByVal 會員編號 As String, ByVal 商品編號 As String, ByVal 訂購數量 As String, ByVal Original_會員編號 As String, ByVal Original_商品編號 As String, ByVal Original_訂購數量 As String) As Integer
  6162. If (會員編號 Is Nothing) Then
  6163. Throw New Global.System.ArgumentNullException("會員編號")
  6164. Else
  6165. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(會員編號,String)
  6166. End If
  6167. If (商品編號 Is Nothing) Then
  6168. Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value
  6169. Else
  6170. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(商品編號,String)
  6171. End If
  6172. If (訂購數量 Is Nothing) Then
  6173. Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
  6174. Else
  6175. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(訂購數量,String)
  6176. End If
  6177. If (Original_會員編號 Is Nothing) Then
  6178. Throw New Global.System.ArgumentNullException("Original_會員編號")
  6179. Else
  6180. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_會員編號,String)
  6181. End If
  6182. If (Original_商品編號 Is Nothing) Then
  6183. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(1,Object)
  6184. Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value
  6185. Else
  6186. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(0,Object)
  6187. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_商品編號,String)
  6188. End If
  6189. If (Original_訂購數量 Is Nothing) Then
  6190. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object)
  6191. Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value
  6192. Else
  6193. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object)
  6194. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_訂購數量,String)
  6195. End If
  6196. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  6197. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6198. <> Global.System.Data.ConnectionState.Open) Then
  6199. Me.Adapter.UpdateCommand.Connection.Open
  6200. End If
  6201. Try
  6202. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  6203. Return returnValue
  6204. Finally
  6205. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6206. Me.Adapter.UpdateCommand.Connection.Close
  6207. End If
  6208. End Try
  6209. End Function
  6210. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6211. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6212. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6213. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  6214. Public Overloads Overridable Function Update(ByVal 商品編號 As String, ByVal 訂購數量 As String, ByVal Original_會員編號 As String, ByVal Original_商品編號 As String, ByVal Original_訂購數量 As String) As Integer
  6215. Return Me.Update(Original_會員編號, 商品編號, 訂購數量, Original_會員編號, Original_商品編號, Original_訂購數量)
  6216. End Function
  6217. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6218. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6219. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6220. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, false)> _
  6221. Public Overloads Overridable Function InsertQuery(ByVal 會員編號 As String, ByVal 商品編號 As String, ByVal 訂購數量 As String) As Integer
  6222. Dim command As Global.System.Data.SqlClient.SqlCommand = Me.CommandCollection(3)
  6223. If (會員編號 Is Nothing) Then
  6224. Throw New Global.System.ArgumentNullException("會員編號")
  6225. Else
  6226. command.Parameters(0).Value = CType(會員編號,String)
  6227. End If
  6228. If (商品編號 Is Nothing) Then
  6229. command.Parameters(1).Value = Global.System.DBNull.Value
  6230. Else
  6231. command.Parameters(1).Value = CType(商品編號,String)
  6232. End If
  6233. If (訂購數量 Is Nothing) Then
  6234. command.Parameters(2).Value = Global.System.DBNull.Value
  6235. Else
  6236. command.Parameters(2).Value = CType(訂購數量,String)
  6237. End If
  6238. Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
  6239. If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
  6240. <> Global.System.Data.ConnectionState.Open) Then
  6241. command.Connection.Open
  6242. End If
  6243. Dim returnValue As Integer
  6244. Try
  6245. returnValue = command.ExecuteNonQuery
  6246. Finally
  6247. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6248. command.Connection.Close
  6249. End If
  6250. End Try
  6251. Return returnValue
  6252. End Function
  6253. End Class
  6254. '''<summary>
  6255. '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  6256. '''</summary>
  6257. <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  6258. Global.System.ComponentModel.ToolboxItem(true), _
  6259. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD"& _
  6260. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  6261. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")> _
  6262. Partial Public Class TableAdapterManager
  6263. Inherits Global.System.ComponentModel.Component
  6264. Private _updateOrder As UpdateOrderOption
  6265. Private _商品TableAdapter As 商品TableAdapter
  6266. Private _會員TableAdapter As 會員TableAdapter
  6267. Private _訂單TableAdapter As 訂單TableAdapter
  6268. Private _購物車TableAdapter As 購物車TableAdapter
  6269. Private _紀錄TableAdapter As 紀錄TableAdapter
  6270. Private _訂購TableAdapter As 訂購TableAdapter
  6271. Private _backupDataSetBeforeUpdate As Boolean
  6272. Private _connection As Global.System.Data.IDbConnection
  6273. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6274. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6275. Public Property UpdateOrder() As UpdateOrderOption
  6276. Get
  6277. Return Me._updateOrder
  6278. End Get
  6279. Set
  6280. Me._updateOrder = value
  6281. End Set
  6282. End Property
  6283. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6284. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6285. Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
  6286. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
  6287. "a", "System.Drawing.Design.UITypeEditor")> _
  6288. Public Property 商品TableAdapter() As 商品TableAdapter
  6289. Get
  6290. Return Me._商品TableAdapter
  6291. End Get
  6292. Set
  6293. Me._商品TableAdapter = value
  6294. End Set
  6295. End Property
  6296. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6297. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6298. Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
  6299. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
  6300. "a", "System.Drawing.Design.UITypeEditor")> _
  6301. Public Property 會員TableAdapter() As 會員TableAdapter
  6302. Get
  6303. Return Me._會員TableAdapter
  6304. End Get
  6305. Set
  6306. Me._會員TableAdapter = value
  6307. End Set
  6308. End Property
  6309. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6310. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6311. Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
  6312. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
  6313. "a", "System.Drawing.Design.UITypeEditor")> _
  6314. Public Property 訂單TableAdapter() As 訂單TableAdapter
  6315. Get
  6316. Return Me._訂單TableAdapter
  6317. End Get
  6318. Set
  6319. Me._訂單TableAdapter = value
  6320. End Set
  6321. End Property
  6322. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6323. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6324. Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
  6325. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
  6326. "a", "System.Drawing.Design.UITypeEditor")> _
  6327. Public Property 購物車TableAdapter() As 購物車TableAdapter
  6328. Get
  6329. Return Me._購物車TableAdapter
  6330. End Get
  6331. Set
  6332. Me._購物車TableAdapter = value
  6333. End Set
  6334. End Property
  6335. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6336. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6337. Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
  6338. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
  6339. "a", "System.Drawing.Design.UITypeEditor")> _
  6340. Public Property 紀錄TableAdapter() As 紀錄TableAdapter
  6341. Get
  6342. Return Me._紀錄TableAdapter
  6343. End Get
  6344. Set
  6345. Me._紀錄TableAdapter = value
  6346. End Set
  6347. End Property
  6348. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6349. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6350. Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
  6351. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
  6352. "a", "System.Drawing.Design.UITypeEditor")> _
  6353. Public Property 訂購TableAdapter() As 訂購TableAdapter
  6354. Get
  6355. Return Me._訂購TableAdapter
  6356. End Get
  6357. Set
  6358. Me._訂購TableAdapter = value
  6359. End Set
  6360. End Property
  6361. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6362. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6363. Public Property BackupDataSetBeforeUpdate() As Boolean
  6364. Get
  6365. Return Me._backupDataSetBeforeUpdate
  6366. End Get
  6367. Set
  6368. Me._backupDataSetBeforeUpdate = value
  6369. End Set
  6370. End Property
  6371. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6372. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6373. Global.System.ComponentModel.Browsable(false)> _
  6374. Public Property Connection() As Global.System.Data.IDbConnection
  6375. Get
  6376. If (Not (Me._connection) Is Nothing) Then
  6377. Return Me._connection
  6378. End If
  6379. If ((Not (Me._商品TableAdapter) Is Nothing) _
  6380. AndAlso (Not (Me._商品TableAdapter.Connection) Is Nothing)) Then
  6381. Return Me._商品TableAdapter.Connection
  6382. End If
  6383. If ((Not (Me._會員TableAdapter) Is Nothing) _
  6384. AndAlso (Not (Me._會員TableAdapter.Connection) Is Nothing)) Then
  6385. Return Me._會員TableAdapter.Connection
  6386. End If
  6387. If ((Not (Me._訂單TableAdapter) Is Nothing) _
  6388. AndAlso (Not (Me._訂單TableAdapter.Connection) Is Nothing)) Then
  6389. Return Me._訂單TableAdapter.Connection
  6390. End If
  6391. If ((Not (Me._購物車TableAdapter) Is Nothing) _
  6392. AndAlso (Not (Me._購物車TableAdapter.Connection) Is Nothing)) Then
  6393. Return Me._購物車TableAdapter.Connection
  6394. End If
  6395. If ((Not (Me._紀錄TableAdapter) Is Nothing) _
  6396. AndAlso (Not (Me._紀錄TableAdapter.Connection) Is Nothing)) Then
  6397. Return Me._紀錄TableAdapter.Connection
  6398. End If
  6399. If ((Not (Me._訂購TableAdapter) Is Nothing) _
  6400. AndAlso (Not (Me._訂購TableAdapter.Connection) Is Nothing)) Then
  6401. Return Me._訂購TableAdapter.Connection
  6402. End If
  6403. Return Nothing
  6404. End Get
  6405. Set
  6406. Me._connection = value
  6407. End Set
  6408. End Property
  6409. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6410. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0"), _
  6411. Global.System.ComponentModel.Browsable(false)> _
  6412. Public ReadOnly Property TableAdapterInstanceCount() As Integer
  6413. Get
  6414. Dim count As Integer = 0
  6415. If (Not (Me._商品TableAdapter) Is Nothing) Then
  6416. count = (count + 1)
  6417. End If
  6418. If (Not (Me._會員TableAdapter) Is Nothing) Then
  6419. count = (count + 1)
  6420. End If
  6421. If (Not (Me._訂單TableAdapter) Is Nothing) Then
  6422. count = (count + 1)
  6423. End If
  6424. If (Not (Me._購物車TableAdapter) Is Nothing) Then
  6425. count = (count + 1)
  6426. End If
  6427. If (Not (Me._紀錄TableAdapter) Is Nothing) Then
  6428. count = (count + 1)
  6429. End If
  6430. If (Not (Me._訂購TableAdapter) Is Nothing) Then
  6431. count = (count + 1)
  6432. End If
  6433. Return count
  6434. End Get
  6435. End Property
  6436. '''<summary>
  6437. '''Update rows in top-down order.
  6438. '''</summary>
  6439. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6440. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6441. Private Function UpdateUpdatedRows(ByVal dataSet As 謎鹿DataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow), ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
  6442. Dim result As Integer = 0
  6443. If (Not (Me._商品TableAdapter) Is Nothing) Then
  6444. Dim updatedRows() As Global.System.Data.DataRow = dataSet.商品.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
  6445. updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
  6446. If ((Not (updatedRows) Is Nothing) _
  6447. AndAlso (0 < updatedRows.Length)) Then
  6448. result = (result + Me._商品TableAdapter.Update(updatedRows))
  6449. allChangedRows.AddRange(updatedRows)
  6450. End If
  6451. End If
  6452. If (Not (Me._會員TableAdapter) Is Nothing) Then
  6453. Dim updatedRows() As Global.System.Data.DataRow = dataSet.會員.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
  6454. updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
  6455. If ((Not (updatedRows) Is Nothing) _
  6456. AndAlso (0 < updatedRows.Length)) Then
  6457. result = (result + Me._會員TableAdapter.Update(updatedRows))
  6458. allChangedRows.AddRange(updatedRows)
  6459. End If
  6460. End If
  6461. If (Not (Me._訂單TableAdapter) Is Nothing) Then
  6462. Dim updatedRows() As Global.System.Data.DataRow = dataSet.訂單.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
  6463. updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
  6464. If ((Not (updatedRows) Is Nothing) _
  6465. AndAlso (0 < updatedRows.Length)) Then
  6466. result = (result + Me._訂單TableAdapter.Update(updatedRows))
  6467. allChangedRows.AddRange(updatedRows)
  6468. End If
  6469. End If
  6470. If (Not (Me._購物車TableAdapter) Is Nothing) Then
  6471. Dim updatedRows() As Global.System.Data.DataRow = dataSet.購物車.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
  6472. updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
  6473. If ((Not (updatedRows) Is Nothing) _
  6474. AndAlso (0 < updatedRows.Length)) Then
  6475. result = (result + Me._購物車TableAdapter.Update(updatedRows))
  6476. allChangedRows.AddRange(updatedRows)
  6477. End If
  6478. End If
  6479. If (Not (Me._紀錄TableAdapter) Is Nothing) Then
  6480. Dim updatedRows() As Global.System.Data.DataRow = dataSet.紀錄.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
  6481. updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
  6482. If ((Not (updatedRows) Is Nothing) _
  6483. AndAlso (0 < updatedRows.Length)) Then
  6484. result = (result + Me._紀錄TableAdapter.Update(updatedRows))
  6485. allChangedRows.AddRange(updatedRows)
  6486. End If
  6487. End If
  6488. If (Not (Me._訂購TableAdapter) Is Nothing) Then
  6489. Dim updatedRows() As Global.System.Data.DataRow = dataSet.訂購.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
  6490. updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
  6491. If ((Not (updatedRows) Is Nothing) _
  6492. AndAlso (0 < updatedRows.Length)) Then
  6493. result = (result + Me._訂購TableAdapter.Update(updatedRows))
  6494. allChangedRows.AddRange(updatedRows)
  6495. End If
  6496. End If
  6497. Return result
  6498. End Function
  6499. '''<summary>
  6500. '''Insert rows in top-down order.
  6501. '''</summary>
  6502. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6503. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6504. Private Function UpdateInsertedRows(ByVal dataSet As 謎鹿DataSet, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
  6505. Dim result As Integer = 0
  6506. If (Not (Me._商品TableAdapter) Is Nothing) Then
  6507. Dim addedRows() As Global.System.Data.DataRow = dataSet.商品.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
  6508. If ((Not (addedRows) Is Nothing) _
  6509. AndAlso (0 < addedRows.Length)) Then
  6510. result = (result + Me._商品TableAdapter.Update(addedRows))
  6511. allAddedRows.AddRange(addedRows)
  6512. End If
  6513. End If
  6514. If (Not (Me._會員TableAdapter) Is Nothing) Then
  6515. Dim addedRows() As Global.System.Data.DataRow = dataSet.會員.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
  6516. If ((Not (addedRows) Is Nothing) _
  6517. AndAlso (0 < addedRows.Length)) Then
  6518. result = (result + Me._會員TableAdapter.Update(addedRows))
  6519. allAddedRows.AddRange(addedRows)
  6520. End If
  6521. End If
  6522. If (Not (Me._訂單TableAdapter) Is Nothing) Then
  6523. Dim addedRows() As Global.System.Data.DataRow = dataSet.訂單.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
  6524. If ((Not (addedRows) Is Nothing) _
  6525. AndAlso (0 < addedRows.Length)) Then
  6526. result = (result + Me._訂單TableAdapter.Update(addedRows))
  6527. allAddedRows.AddRange(addedRows)
  6528. End If
  6529. End If
  6530. If (Not (Me._購物車TableAdapter) Is Nothing) Then
  6531. Dim addedRows() As Global.System.Data.DataRow = dataSet.購物車.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
  6532. If ((Not (addedRows) Is Nothing) _
  6533. AndAlso (0 < addedRows.Length)) Then
  6534. result = (result + Me._購物車TableAdapter.Update(addedRows))
  6535. allAddedRows.AddRange(addedRows)
  6536. End If
  6537. End If
  6538. If (Not (Me._紀錄TableAdapter) Is Nothing) Then
  6539. Dim addedRows() As Global.System.Data.DataRow = dataSet.紀錄.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
  6540. If ((Not (addedRows) Is Nothing) _
  6541. AndAlso (0 < addedRows.Length)) Then
  6542. result = (result + Me._紀錄TableAdapter.Update(addedRows))
  6543. allAddedRows.AddRange(addedRows)
  6544. End If
  6545. End If
  6546. If (Not (Me._訂購TableAdapter) Is Nothing) Then
  6547. Dim addedRows() As Global.System.Data.DataRow = dataSet.訂購.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
  6548. If ((Not (addedRows) Is Nothing) _
  6549. AndAlso (0 < addedRows.Length)) Then
  6550. result = (result + Me._訂購TableAdapter.Update(addedRows))
  6551. allAddedRows.AddRange(addedRows)
  6552. End If
  6553. End If
  6554. Return result
  6555. End Function
  6556. '''<summary>
  6557. '''Delete rows in bottom-up order.
  6558. '''</summary>
  6559. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6560. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6561. Private Function UpdateDeletedRows(ByVal dataSet As 謎鹿DataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
  6562. Dim result As Integer = 0
  6563. If (Not (Me._訂購TableAdapter) Is Nothing) Then
  6564. Dim deletedRows() As Global.System.Data.DataRow = dataSet.訂購.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
  6565. If ((Not (deletedRows) Is Nothing) _
  6566. AndAlso (0 < deletedRows.Length)) Then
  6567. result = (result + Me._訂購TableAdapter.Update(deletedRows))
  6568. allChangedRows.AddRange(deletedRows)
  6569. End If
  6570. End If
  6571. If (Not (Me._紀錄TableAdapter) Is Nothing) Then
  6572. Dim deletedRows() As Global.System.Data.DataRow = dataSet.紀錄.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
  6573. If ((Not (deletedRows) Is Nothing) _
  6574. AndAlso (0 < deletedRows.Length)) Then
  6575. result = (result + Me._紀錄TableAdapter.Update(deletedRows))
  6576. allChangedRows.AddRange(deletedRows)
  6577. End If
  6578. End If
  6579. If (Not (Me._購物車TableAdapter) Is Nothing) Then
  6580. Dim deletedRows() As Global.System.Data.DataRow = dataSet.購物車.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
  6581. If ((Not (deletedRows) Is Nothing) _
  6582. AndAlso (0 < deletedRows.Length)) Then
  6583. result = (result + Me._購物車TableAdapter.Update(deletedRows))
  6584. allChangedRows.AddRange(deletedRows)
  6585. End If
  6586. End If
  6587. If (Not (Me._訂單TableAdapter) Is Nothing) Then
  6588. Dim deletedRows() As Global.System.Data.DataRow = dataSet.訂單.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
  6589. If ((Not (deletedRows) Is Nothing) _
  6590. AndAlso (0 < deletedRows.Length)) Then
  6591. result = (result + Me._訂單TableAdapter.Update(deletedRows))
  6592. allChangedRows.AddRange(deletedRows)
  6593. End If
  6594. End If
  6595. If (Not (Me._會員TableAdapter) Is Nothing) Then
  6596. Dim deletedRows() As Global.System.Data.DataRow = dataSet.會員.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
  6597. If ((Not (deletedRows) Is Nothing) _
  6598. AndAlso (0 < deletedRows.Length)) Then
  6599. result = (result + Me._會員TableAdapter.Update(deletedRows))
  6600. allChangedRows.AddRange(deletedRows)
  6601. End If
  6602. End If
  6603. If (Not (Me._商品TableAdapter) Is Nothing) Then
  6604. Dim deletedRows() As Global.System.Data.DataRow = dataSet.商品.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
  6605. If ((Not (deletedRows) Is Nothing) _
  6606. AndAlso (0 < deletedRows.Length)) Then
  6607. result = (result + Me._商品TableAdapter.Update(deletedRows))
  6608. allChangedRows.AddRange(deletedRows)
  6609. End If
  6610. End If
  6611. Return result
  6612. End Function
  6613. '''<summary>
  6614. '''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  6615. '''</summary>
  6616. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6617. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6618. Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System.Data.DataRow, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Global.System.Data.DataRow()
  6619. If ((updatedRows Is Nothing) _
  6620. OrElse (updatedRows.Length < 1)) Then
  6621. Return updatedRows
  6622. End If
  6623. If ((allAddedRows Is Nothing) _
  6624. OrElse (allAddedRows.Count < 1)) Then
  6625. Return updatedRows
  6626. End If
  6627. Dim realUpdatedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)()
  6628. Dim i As Integer = 0
  6629. Do While (i < updatedRows.Length)
  6630. Dim row As Global.System.Data.DataRow = updatedRows(i)
  6631. If (allAddedRows.Contains(row) = false) Then
  6632. realUpdatedRows.Add(row)
  6633. End If
  6634. i = (i + 1)
  6635. Loop
  6636. Return realUpdatedRows.ToArray
  6637. End Function
  6638. '''<summary>
  6639. '''Update all changes to the dataset.
  6640. '''</summary>
  6641. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6642. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6643. Public Overridable Function UpdateAll(ByVal dataSet As 謎鹿DataSet) As Integer
  6644. If (dataSet Is Nothing) Then
  6645. Throw New Global.System.ArgumentNullException("dataSet")
  6646. End If
  6647. If (dataSet.HasChanges = false) Then
  6648. Return 0
  6649. End If
  6650. If ((Not (Me._商品TableAdapter) Is Nothing) _
  6651. AndAlso (Me.MatchTableAdapterConnection(Me._商品TableAdapter.Connection) = false)) Then
  6652. Throw New Global.System.ArgumentException("所有以 TableAdapterManager 管理的 TableAdapters 必須使用相同的連接字串。")
  6653. End If
  6654. If ((Not (Me._會員TableAdapter) Is Nothing) _
  6655. AndAlso (Me.MatchTableAdapterConnection(Me._會員TableAdapter.Connection) = false)) Then
  6656. Throw New Global.System.ArgumentException("所有以 TableAdapterManager 管理的 TableAdapters 必須使用相同的連接字串。")
  6657. End If
  6658. If ((Not (Me._訂單TableAdapter) Is Nothing) _
  6659. AndAlso (Me.MatchTableAdapterConnection(Me._訂單TableAdapter.Connection) = false)) Then
  6660. Throw New Global.System.ArgumentException("所有以 TableAdapterManager 管理的 TableAdapters 必須使用相同的連接字串。")
  6661. End If
  6662. If ((Not (Me._購物車TableAdapter) Is Nothing) _
  6663. AndAlso (Me.MatchTableAdapterConnection(Me._購物車TableAdapter.Connection) = false)) Then
  6664. Throw New Global.System.ArgumentException("所有以 TableAdapterManager 管理的 TableAdapters 必須使用相同的連接字串。")
  6665. End If
  6666. If ((Not (Me._紀錄TableAdapter) Is Nothing) _
  6667. AndAlso (Me.MatchTableAdapterConnection(Me._紀錄TableAdapter.Connection) = false)) Then
  6668. Throw New Global.System.ArgumentException("所有以 TableAdapterManager 管理的 TableAdapters 必須使用相同的連接字串。")
  6669. End If
  6670. If ((Not (Me._訂購TableAdapter) Is Nothing) _
  6671. AndAlso (Me.MatchTableAdapterConnection(Me._訂購TableAdapter.Connection) = false)) Then
  6672. Throw New Global.System.ArgumentException("所有以 TableAdapterManager 管理的 TableAdapters 必須使用相同的連接字串。")
  6673. End If
  6674. Dim workConnection As Global.System.Data.IDbConnection = Me.Connection
  6675. If (workConnection Is Nothing) Then
  6676. Throw New Global.System.ApplicationException("TableAdapterManager 未包含連接資訊。請將每個 TableAdapterManager 的 TableAdapter 屬性設成有效的 Table"& _
  6677. "Adapter 執行個體。")
  6678. End If
  6679. Dim workConnOpened As Boolean = false
  6680. If ((workConnection.State And Global.System.Data.ConnectionState.Broken) _
  6681. = Global.System.Data.ConnectionState.Broken) Then
  6682. workConnection.Close
  6683. End If
  6684. If (workConnection.State = Global.System.Data.ConnectionState.Closed) Then
  6685. workConnection.Open
  6686. workConnOpened = true
  6687. End If
  6688. Dim workTransaction As Global.System.Data.IDbTransaction = workConnection.BeginTransaction
  6689. If (workTransaction Is Nothing) Then
  6690. Throw New Global.System.ApplicationException("無法開始異動。目前的資料連接不支援異動或是目前的狀態不允許異動開始。")
  6691. End If
  6692. Dim allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)()
  6693. Dim allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)()
  6694. Dim adaptersWithAcceptChangesDuringUpdate As Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter) = New Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter)()
  6695. Dim revertConnections As Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection) = New Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection)()
  6696. Dim result As Integer = 0
  6697. Dim backupDataSet As Global.System.Data.DataSet = Nothing
  6698. If Me.BackupDataSetBeforeUpdate Then
  6699. backupDataSet = New Global.System.Data.DataSet()
  6700. backupDataSet.Merge(dataSet)
  6701. End If
  6702. Try
  6703. '---- Prepare for update -----------
  6704. '
  6705. If (Not (Me._商品TableAdapter) Is Nothing) Then
  6706. revertConnections.Add(Me._商品TableAdapter, Me._商品TableAdapter.Connection)
  6707. Me._商品TableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
  6708. Me._商品TableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
  6709. If Me._商品TableAdapter.Adapter.AcceptChangesDuringUpdate Then
  6710. Me._商品TableAdapter.Adapter.AcceptChangesDuringUpdate = false
  6711. adaptersWithAcceptChangesDuringUpdate.Add(Me._商品TableAdapter.Adapter)
  6712. End If
  6713. End If
  6714. If (Not (Me._會員TableAdapter) Is Nothing) Then
  6715. revertConnections.Add(Me._會員TableAdapter, Me._會員TableAdapter.Connection)
  6716. Me._會員TableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
  6717. Me._會員TableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
  6718. If Me._會員TableAdapter.Adapter.AcceptChangesDuringUpdate Then
  6719. Me._會員TableAdapter.Adapter.AcceptChangesDuringUpdate = false
  6720. adaptersWithAcceptChangesDuringUpdate.Add(Me._會員TableAdapter.Adapter)
  6721. End If
  6722. End If
  6723. If (Not (Me._訂單TableAdapter) Is Nothing) Then
  6724. revertConnections.Add(Me._訂單TableAdapter, Me._訂單TableAdapter.Connection)
  6725. Me._訂單TableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
  6726. Me._訂單TableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
  6727. If Me._訂單TableAdapter.Adapter.AcceptChangesDuringUpdate Then
  6728. Me._訂單TableAdapter.Adapter.AcceptChangesDuringUpdate = false
  6729. adaptersWithAcceptChangesDuringUpdate.Add(Me._訂單TableAdapter.Adapter)
  6730. End If
  6731. End If
  6732. If (Not (Me._購物車TableAdapter) Is Nothing) Then
  6733. revertConnections.Add(Me._購物車TableAdapter, Me._購物車TableAdapter.Connection)
  6734. Me._購物車TableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
  6735. Me._購物車TableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
  6736. If Me._購物車TableAdapter.Adapter.AcceptChangesDuringUpdate Then
  6737. Me._購物車TableAdapter.Adapter.AcceptChangesDuringUpdate = false
  6738. adaptersWithAcceptChangesDuringUpdate.Add(Me._購物車TableAdapter.Adapter)
  6739. End If
  6740. End If
  6741. If (Not (Me._紀錄TableAdapter) Is Nothing) Then
  6742. revertConnections.Add(Me._紀錄TableAdapter, Me._紀錄TableAdapter.Connection)
  6743. Me._紀錄TableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
  6744. Me._紀錄TableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
  6745. If Me._紀錄TableAdapter.Adapter.AcceptChangesDuringUpdate Then
  6746. Me._紀錄TableAdapter.Adapter.AcceptChangesDuringUpdate = false
  6747. adaptersWithAcceptChangesDuringUpdate.Add(Me._紀錄TableAdapter.Adapter)
  6748. End If
  6749. End If
  6750. If (Not (Me._訂購TableAdapter) Is Nothing) Then
  6751. revertConnections.Add(Me._訂購TableAdapter, Me._訂購TableAdapter.Connection)
  6752. Me._訂購TableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
  6753. Me._訂購TableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
  6754. If Me._訂購TableAdapter.Adapter.AcceptChangesDuringUpdate Then
  6755. Me._訂購TableAdapter.Adapter.AcceptChangesDuringUpdate = false
  6756. adaptersWithAcceptChangesDuringUpdate.Add(Me._訂購TableAdapter.Adapter)
  6757. End If
  6758. End If
  6759. '
  6760. '---- Perform updates -----------
  6761. '
  6762. If (Me.UpdateOrder = UpdateOrderOption.UpdateInsertDelete) Then
  6763. result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
  6764. result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
  6765. Else
  6766. result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
  6767. result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
  6768. End If
  6769. result = (result + Me.UpdateDeletedRows(dataSet, allChangedRows))
  6770. '
  6771. '---- Commit updates -----------
  6772. '
  6773. workTransaction.Commit
  6774. If (0 < allAddedRows.Count) Then
  6775. Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow
  6776. allAddedRows.CopyTo(rows)
  6777. Dim i As Integer = 0
  6778. Do While (i < rows.Length)
  6779. Dim row As Global.System.Data.DataRow = rows(i)
  6780. row.AcceptChanges
  6781. i = (i + 1)
  6782. Loop
  6783. End If
  6784. If (0 < allChangedRows.Count) Then
  6785. Dim rows((allChangedRows.Count) - 1) As Global.System.Data.DataRow
  6786. allChangedRows.CopyTo(rows)
  6787. Dim i As Integer = 0
  6788. Do While (i < rows.Length)
  6789. Dim row As Global.System.Data.DataRow = rows(i)
  6790. row.AcceptChanges
  6791. i = (i + 1)
  6792. Loop
  6793. End If
  6794. Catch ex As Global.System.Exception
  6795. workTransaction.Rollback
  6796. '---- Restore the dataset -----------
  6797. If Me.BackupDataSetBeforeUpdate Then
  6798. Global.System.Diagnostics.Debug.Assert((Not (backupDataSet) Is Nothing))
  6799. dataSet.Clear
  6800. dataSet.Merge(backupDataSet)
  6801. Else
  6802. If (0 < allAddedRows.Count) Then
  6803. Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow
  6804. allAddedRows.CopyTo(rows)
  6805. Dim i As Integer = 0
  6806. Do While (i < rows.Length)
  6807. Dim row As Global.System.Data.DataRow = rows(i)
  6808. row.AcceptChanges
  6809. row.SetAdded
  6810. i = (i + 1)
  6811. Loop
  6812. End If
  6813. End If
  6814. Throw ex
  6815. Finally
  6816. If workConnOpened Then
  6817. workConnection.Close
  6818. End If
  6819. If (Not (Me._商品TableAdapter) Is Nothing) Then
  6820. Me._商品TableAdapter.Connection = CType(revertConnections(Me._商品TableAdapter),Global.System.Data.SqlClient.SqlConnection)
  6821. Me._商品TableAdapter.Transaction = Nothing
  6822. End If
  6823. If (Not (Me._會員TableAdapter) Is Nothing) Then
  6824. Me._會員TableAdapter.Connection = CType(revertConnections(Me._會員TableAdapter),Global.System.Data.SqlClient.SqlConnection)
  6825. Me._會員TableAdapter.Transaction = Nothing
  6826. End If
  6827. If (Not (Me._訂單TableAdapter) Is Nothing) Then
  6828. Me._訂單TableAdapter.Connection = CType(revertConnections(Me._訂單TableAdapter),Global.System.Data.SqlClient.SqlConnection)
  6829. Me._訂單TableAdapter.Transaction = Nothing
  6830. End If
  6831. If (Not (Me._購物車TableAdapter) Is Nothing) Then
  6832. Me._購物車TableAdapter.Connection = CType(revertConnections(Me._購物車TableAdapter),Global.System.Data.SqlClient.SqlConnection)
  6833. Me._購物車TableAdapter.Transaction = Nothing
  6834. End If
  6835. If (Not (Me._紀錄TableAdapter) Is Nothing) Then
  6836. Me._紀錄TableAdapter.Connection = CType(revertConnections(Me._紀錄TableAdapter),Global.System.Data.SqlClient.SqlConnection)
  6837. Me._紀錄TableAdapter.Transaction = Nothing
  6838. End If
  6839. If (Not (Me._訂購TableAdapter) Is Nothing) Then
  6840. Me._訂購TableAdapter.Connection = CType(revertConnections(Me._訂購TableAdapter),Global.System.Data.SqlClient.SqlConnection)
  6841. Me._訂購TableAdapter.Transaction = Nothing
  6842. End If
  6843. If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then
  6844. Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter
  6845. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters)
  6846. Dim i As Integer = 0
  6847. Do While (i < adapters.Length)
  6848. Dim adapter As Global.System.Data.Common.DataAdapter = adapters(i)
  6849. adapter.AcceptChangesDuringUpdate = true
  6850. i = (i + 1)
  6851. Loop
  6852. End If
  6853. End Try
  6854. Return result
  6855. End Function
  6856. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6857. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6858. Protected Overridable Sub SortSelfReferenceRows(ByVal rows() As Global.System.Data.DataRow, ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
  6859. Global.System.Array.Sort(Of Global.System.Data.DataRow)(rows, New SelfReferenceComparer(relation, childFirst))
  6860. End Sub
  6861. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6862. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6863. Protected Overridable Function MatchTableAdapterConnection(ByVal inputConnection As Global.System.Data.IDbConnection) As Boolean
  6864. If (Not (Me._connection) Is Nothing) Then
  6865. Return true
  6866. End If
  6867. If ((Me.Connection Is Nothing) _
  6868. OrElse (inputConnection Is Nothing)) Then
  6869. Return true
  6870. End If
  6871. If String.Equals(Me.Connection.ConnectionString, inputConnection.ConnectionString, Global.System.StringComparison.Ordinal) Then
  6872. Return true
  6873. End If
  6874. Return false
  6875. End Function
  6876. '''<summary>
  6877. '''Update Order Option
  6878. '''</summary>
  6879. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6880. Public Enum UpdateOrderOption
  6881. InsertUpdateDelete = 0
  6882. UpdateInsertDelete = 1
  6883. End Enum
  6884. '''<summary>
  6885. '''Used to sort self-referenced table's rows
  6886. '''</summary>
  6887. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6888. Private Class SelfReferenceComparer
  6889. Inherits Object
  6890. Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow)
  6891. Private _relation As Global.System.Data.DataRelation
  6892. Private _childFirst As Integer
  6893. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6894. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6895. Friend Sub New(ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
  6896. MyBase.New
  6897. Me._relation = relation
  6898. If childFirst Then
  6899. Me._childFirst = -1
  6900. Else
  6901. Me._childFirst = 1
  6902. End If
  6903. End Sub
  6904. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6905. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6906. Private Function GetRoot(ByVal row As Global.System.Data.DataRow, ByRef distance As Integer) As Global.System.Data.DataRow
  6907. Global.System.Diagnostics.Debug.Assert((Not (row) Is Nothing))
  6908. Dim root As Global.System.Data.DataRow = row
  6909. distance = 0
  6910. Dim traversedRows As Global.System.Collections.Generic.IDictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow) = New Global.System.Collections.Generic.Dictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow)()
  6911. traversedRows(row) = row
  6912. Dim parent As Global.System.Data.DataRow = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
  6913. Do While ((Not (parent) Is Nothing) _
  6914. AndAlso (traversedRows.ContainsKey(parent) = false))
  6915. distance = (distance + 1)
  6916. root = parent
  6917. traversedRows(parent) = parent
  6918. parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
  6919. Loop
  6920. If (distance = 0) Then
  6921. traversedRows.Clear
  6922. traversedRows(row) = row
  6923. parent = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
  6924. Do While ((Not (parent) Is Nothing) _
  6925. AndAlso (traversedRows.ContainsKey(parent) = false))
  6926. distance = (distance + 1)
  6927. root = parent
  6928. traversedRows(parent) = parent
  6929. parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
  6930. Loop
  6931. End If
  6932. Return root
  6933. End Function
  6934. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6935. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")> _
  6936. Public Function Compare(ByVal row1 As Global.System.Data.DataRow, ByVal row2 As Global.System.Data.DataRow) As Integer Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow).Compare
  6937. If Object.ReferenceEquals(row1, row2) Then
  6938. Return 0
  6939. End If
  6940. If (row1 Is Nothing) Then
  6941. Return -1
  6942. End If
  6943. If (row2 Is Nothing) Then
  6944. Return 1
  6945. End If
  6946. Dim distance1 As Integer = 0
  6947. Dim root1 As Global.System.Data.DataRow = Me.GetRoot(row1, distance1)
  6948. Dim distance2 As Integer = 0
  6949. Dim root2 As Global.System.Data.DataRow = Me.GetRoot(row2, distance2)
  6950. If Object.ReferenceEquals(root1, root2) Then
  6951. Return (Me._childFirst * distance1.CompareTo(distance2))
  6952. Else
  6953. Global.System.Diagnostics.Debug.Assert(((Not (root1.Table) Is Nothing) _
  6954. AndAlso (Not (root2.Table) Is Nothing)))
  6955. If (root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2)) Then
  6956. Return -1
  6957. Else
  6958. Return 1
  6959. End If
  6960. End If
  6961. End Function
  6962. End Class
  6963. End Class
  6964. End Namespace