Session1_02DataSet.Designer.cs 255 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // Этот код создан программой.
  4. // Исполняемая версия:4.0.30319.42000
  5. //
  6. // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
  7. // повторной генерации кода.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. #pragma warning disable 1591
  11. namespace AMONIC_Airlines02 {
  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("Session1_02DataSet")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class Session1_02DataSet : global::System.Data.DataSet {
  22. private CountriesDataTable tableCountries;
  23. private OfficesDataTable tableOffices;
  24. private RolesDataTable tableRoles;
  25. private UsersDataTable tableUsers;
  26. private global::System.Data.DataRelation relationFK_Office_Country;
  27. private global::System.Data.DataRelation relationFK_Users_Offices;
  28. private global::System.Data.DataRelation relationFK_Users_Roles;
  29. private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  30. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  31. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  32. public Session1_02DataSet() {
  33. this.BeginInit();
  34. this.InitClass();
  35. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  36. base.Tables.CollectionChanged += schemaChangedHandler;
  37. base.Relations.CollectionChanged += schemaChangedHandler;
  38. this.EndInit();
  39. }
  40. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  41. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  42. protected Session1_02DataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  43. base(info, context, false) {
  44. if ((this.IsBinarySerialized(info, context) == true)) {
  45. this.InitVars(false);
  46. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  47. this.Tables.CollectionChanged += schemaChangedHandler1;
  48. this.Relations.CollectionChanged += schemaChangedHandler1;
  49. return;
  50. }
  51. string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
  52. if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  53. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  54. ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  55. if ((ds.Tables["Countries"] != null)) {
  56. base.Tables.Add(new CountriesDataTable(ds.Tables["Countries"]));
  57. }
  58. if ((ds.Tables["Offices"] != null)) {
  59. base.Tables.Add(new OfficesDataTable(ds.Tables["Offices"]));
  60. }
  61. if ((ds.Tables["Roles"] != null)) {
  62. base.Tables.Add(new RolesDataTable(ds.Tables["Roles"]));
  63. }
  64. if ((ds.Tables["Users"] != null)) {
  65. base.Tables.Add(new UsersDataTable(ds.Tables["Users"]));
  66. }
  67. this.DataSetName = ds.DataSetName;
  68. this.Prefix = ds.Prefix;
  69. this.Namespace = ds.Namespace;
  70. this.Locale = ds.Locale;
  71. this.CaseSensitive = ds.CaseSensitive;
  72. this.EnforceConstraints = ds.EnforceConstraints;
  73. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  74. this.InitVars();
  75. }
  76. else {
  77. this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  78. }
  79. this.GetSerializationData(info, context);
  80. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  81. base.Tables.CollectionChanged += schemaChangedHandler;
  82. this.Relations.CollectionChanged += schemaChangedHandler;
  83. }
  84. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  85. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  86. [global::System.ComponentModel.Browsable(false)]
  87. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  88. public CountriesDataTable Countries {
  89. get {
  90. return this.tableCountries;
  91. }
  92. }
  93. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  94. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  95. [global::System.ComponentModel.Browsable(false)]
  96. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  97. public OfficesDataTable Offices {
  98. get {
  99. return this.tableOffices;
  100. }
  101. }
  102. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  103. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  104. [global::System.ComponentModel.Browsable(false)]
  105. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  106. public RolesDataTable Roles {
  107. get {
  108. return this.tableRoles;
  109. }
  110. }
  111. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  112. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  113. [global::System.ComponentModel.Browsable(false)]
  114. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  115. public UsersDataTable Users {
  116. get {
  117. return this.tableUsers;
  118. }
  119. }
  120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  121. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  122. [global::System.ComponentModel.BrowsableAttribute(true)]
  123. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
  124. public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
  125. get {
  126. return this._schemaSerializationMode;
  127. }
  128. set {
  129. this._schemaSerializationMode = value;
  130. }
  131. }
  132. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  133. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  134. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  135. public new global::System.Data.DataTableCollection Tables {
  136. get {
  137. return base.Tables;
  138. }
  139. }
  140. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  141. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  142. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  143. public new global::System.Data.DataRelationCollection Relations {
  144. get {
  145. return base.Relations;
  146. }
  147. }
  148. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  149. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  150. protected override void InitializeDerivedDataSet() {
  151. this.BeginInit();
  152. this.InitClass();
  153. this.EndInit();
  154. }
  155. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  156. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  157. public override global::System.Data.DataSet Clone() {
  158. Session1_02DataSet cln = ((Session1_02DataSet)(base.Clone()));
  159. cln.InitVars();
  160. cln.SchemaSerializationMode = this.SchemaSerializationMode;
  161. return cln;
  162. }
  163. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  164. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  165. protected override bool ShouldSerializeTables() {
  166. return false;
  167. }
  168. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  169. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  170. protected override bool ShouldSerializeRelations() {
  171. return false;
  172. }
  173. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  174. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  175. protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
  176. if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  177. this.Reset();
  178. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  179. ds.ReadXml(reader);
  180. if ((ds.Tables["Countries"] != null)) {
  181. base.Tables.Add(new CountriesDataTable(ds.Tables["Countries"]));
  182. }
  183. if ((ds.Tables["Offices"] != null)) {
  184. base.Tables.Add(new OfficesDataTable(ds.Tables["Offices"]));
  185. }
  186. if ((ds.Tables["Roles"] != null)) {
  187. base.Tables.Add(new RolesDataTable(ds.Tables["Roles"]));
  188. }
  189. if ((ds.Tables["Users"] != null)) {
  190. base.Tables.Add(new UsersDataTable(ds.Tables["Users"]));
  191. }
  192. this.DataSetName = ds.DataSetName;
  193. this.Prefix = ds.Prefix;
  194. this.Namespace = ds.Namespace;
  195. this.Locale = ds.Locale;
  196. this.CaseSensitive = ds.CaseSensitive;
  197. this.EnforceConstraints = ds.EnforceConstraints;
  198. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  199. this.InitVars();
  200. }
  201. else {
  202. this.ReadXml(reader);
  203. this.InitVars();
  204. }
  205. }
  206. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  207. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  208. protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
  209. global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
  210. this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
  211. stream.Position = 0;
  212. return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
  213. }
  214. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  215. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  216. internal void InitVars() {
  217. this.InitVars(true);
  218. }
  219. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  220. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  221. internal void InitVars(bool initTable) {
  222. this.tableCountries = ((CountriesDataTable)(base.Tables["Countries"]));
  223. if ((initTable == true)) {
  224. if ((this.tableCountries != null)) {
  225. this.tableCountries.InitVars();
  226. }
  227. }
  228. this.tableOffices = ((OfficesDataTable)(base.Tables["Offices"]));
  229. if ((initTable == true)) {
  230. if ((this.tableOffices != null)) {
  231. this.tableOffices.InitVars();
  232. }
  233. }
  234. this.tableRoles = ((RolesDataTable)(base.Tables["Roles"]));
  235. if ((initTable == true)) {
  236. if ((this.tableRoles != null)) {
  237. this.tableRoles.InitVars();
  238. }
  239. }
  240. this.tableUsers = ((UsersDataTable)(base.Tables["Users"]));
  241. if ((initTable == true)) {
  242. if ((this.tableUsers != null)) {
  243. this.tableUsers.InitVars();
  244. }
  245. }
  246. this.relationFK_Office_Country = this.Relations["FK_Office_Country"];
  247. this.relationFK_Users_Offices = this.Relations["FK_Users_Offices"];
  248. this.relationFK_Users_Roles = this.Relations["FK_Users_Roles"];
  249. }
  250. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  251. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  252. private void InitClass() {
  253. this.DataSetName = "Session1_02DataSet";
  254. this.Prefix = "";
  255. this.Namespace = "http://tempuri.org/Session1_02DataSet.xsd";
  256. this.EnforceConstraints = true;
  257. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  258. this.tableCountries = new CountriesDataTable();
  259. base.Tables.Add(this.tableCountries);
  260. this.tableOffices = new OfficesDataTable();
  261. base.Tables.Add(this.tableOffices);
  262. this.tableRoles = new RolesDataTable();
  263. base.Tables.Add(this.tableRoles);
  264. this.tableUsers = new UsersDataTable();
  265. base.Tables.Add(this.tableUsers);
  266. this.relationFK_Office_Country = new global::System.Data.DataRelation("FK_Office_Country", new global::System.Data.DataColumn[] {
  267. this.tableCountries.IDColumn}, new global::System.Data.DataColumn[] {
  268. this.tableOffices.CountryIDColumn}, false);
  269. this.Relations.Add(this.relationFK_Office_Country);
  270. this.relationFK_Users_Offices = new global::System.Data.DataRelation("FK_Users_Offices", new global::System.Data.DataColumn[] {
  271. this.tableOffices.IDColumn}, new global::System.Data.DataColumn[] {
  272. this.tableUsers.OfficeIDColumn}, false);
  273. this.Relations.Add(this.relationFK_Users_Offices);
  274. this.relationFK_Users_Roles = new global::System.Data.DataRelation("FK_Users_Roles", new global::System.Data.DataColumn[] {
  275. this.tableRoles.IDColumn}, new global::System.Data.DataColumn[] {
  276. this.tableUsers.RoleIDColumn}, false);
  277. this.Relations.Add(this.relationFK_Users_Roles);
  278. }
  279. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  280. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  281. private bool ShouldSerializeCountries() {
  282. return false;
  283. }
  284. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  285. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  286. private bool ShouldSerializeOffices() {
  287. return false;
  288. }
  289. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  290. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  291. private bool ShouldSerializeRoles() {
  292. return false;
  293. }
  294. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  295. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  296. private bool ShouldSerializeUsers() {
  297. return false;
  298. }
  299. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  300. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  301. private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
  302. if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
  303. this.InitVars();
  304. }
  305. }
  306. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  307. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  308. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  309. Session1_02DataSet ds = new Session1_02DataSet();
  310. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  311. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  312. global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
  313. any.Namespace = ds.Namespace;
  314. sequence.Items.Add(any);
  315. type.Particle = sequence;
  316. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  317. if (xs.Contains(dsSchema.TargetNamespace)) {
  318. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  319. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  320. try {
  321. global::System.Xml.Schema.XmlSchema schema = null;
  322. dsSchema.Write(s1);
  323. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  324. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  325. s2.SetLength(0);
  326. schema.Write(s2);
  327. if ((s1.Length == s2.Length)) {
  328. s1.Position = 0;
  329. s2.Position = 0;
  330. for (; ((s1.Position != s1.Length)
  331. && (s1.ReadByte() == s2.ReadByte())); ) {
  332. ;
  333. }
  334. if ((s1.Position == s1.Length)) {
  335. return type;
  336. }
  337. }
  338. }
  339. }
  340. finally {
  341. if ((s1 != null)) {
  342. s1.Close();
  343. }
  344. if ((s2 != null)) {
  345. s2.Close();
  346. }
  347. }
  348. }
  349. xs.Add(dsSchema);
  350. return type;
  351. }
  352. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  353. public delegate void CountriesRowChangeEventHandler(object sender, CountriesRowChangeEvent e);
  354. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  355. public delegate void OfficesRowChangeEventHandler(object sender, OfficesRowChangeEvent e);
  356. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  357. public delegate void RolesRowChangeEventHandler(object sender, RolesRowChangeEvent e);
  358. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  359. public delegate void UsersRowChangeEventHandler(object sender, UsersRowChangeEvent e);
  360. /// <summary>
  361. ///Represents the strongly named DataTable class.
  362. ///</summary>
  363. [global::System.Serializable()]
  364. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  365. public partial class CountriesDataTable : global::System.Data.TypedTableBase<CountriesRow> {
  366. private global::System.Data.DataColumn columnID;
  367. private global::System.Data.DataColumn columnName;
  368. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  369. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  370. public CountriesDataTable() {
  371. this.TableName = "Countries";
  372. this.BeginInit();
  373. this.InitClass();
  374. this.EndInit();
  375. }
  376. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  377. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  378. internal CountriesDataTable(global::System.Data.DataTable table) {
  379. this.TableName = table.TableName;
  380. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  381. this.CaseSensitive = table.CaseSensitive;
  382. }
  383. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  384. this.Locale = table.Locale;
  385. }
  386. if ((table.Namespace != table.DataSet.Namespace)) {
  387. this.Namespace = table.Namespace;
  388. }
  389. this.Prefix = table.Prefix;
  390. this.MinimumCapacity = table.MinimumCapacity;
  391. }
  392. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  393. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  394. protected CountriesDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  395. base(info, context) {
  396. this.InitVars();
  397. }
  398. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  399. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  400. public global::System.Data.DataColumn IDColumn {
  401. get {
  402. return this.columnID;
  403. }
  404. }
  405. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  406. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  407. public global::System.Data.DataColumn NameColumn {
  408. get {
  409. return this.columnName;
  410. }
  411. }
  412. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  413. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  414. [global::System.ComponentModel.Browsable(false)]
  415. public int Count {
  416. get {
  417. return this.Rows.Count;
  418. }
  419. }
  420. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  421. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  422. public CountriesRow this[int index] {
  423. get {
  424. return ((CountriesRow)(this.Rows[index]));
  425. }
  426. }
  427. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  428. public event CountriesRowChangeEventHandler CountriesRowChanging;
  429. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  430. public event CountriesRowChangeEventHandler CountriesRowChanged;
  431. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  432. public event CountriesRowChangeEventHandler CountriesRowDeleting;
  433. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  434. public event CountriesRowChangeEventHandler CountriesRowDeleted;
  435. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  436. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  437. public void AddCountriesRow(CountriesRow row) {
  438. this.Rows.Add(row);
  439. }
  440. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  441. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  442. public CountriesRow AddCountriesRow(string Name) {
  443. CountriesRow rowCountriesRow = ((CountriesRow)(this.NewRow()));
  444. object[] columnValuesArray = new object[] {
  445. null,
  446. Name};
  447. rowCountriesRow.ItemArray = columnValuesArray;
  448. this.Rows.Add(rowCountriesRow);
  449. return rowCountriesRow;
  450. }
  451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  452. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  453. public CountriesRow FindByID(int ID) {
  454. return ((CountriesRow)(this.Rows.Find(new object[] {
  455. ID})));
  456. }
  457. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  458. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  459. public override global::System.Data.DataTable Clone() {
  460. CountriesDataTable cln = ((CountriesDataTable)(base.Clone()));
  461. cln.InitVars();
  462. return cln;
  463. }
  464. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  465. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  466. protected override global::System.Data.DataTable CreateInstance() {
  467. return new CountriesDataTable();
  468. }
  469. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  470. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  471. internal void InitVars() {
  472. this.columnID = base.Columns["ID"];
  473. this.columnName = base.Columns["Name"];
  474. }
  475. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  476. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  477. private void InitClass() {
  478. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  479. base.Columns.Add(this.columnID);
  480. this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element);
  481. base.Columns.Add(this.columnName);
  482. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  483. this.columnID}, true));
  484. this.columnID.AutoIncrement = true;
  485. this.columnID.AutoIncrementSeed = -1;
  486. this.columnID.AutoIncrementStep = -1;
  487. this.columnID.AllowDBNull = false;
  488. this.columnID.ReadOnly = true;
  489. this.columnID.Unique = true;
  490. this.columnName.AllowDBNull = false;
  491. this.columnName.MaxLength = 50;
  492. }
  493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  494. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  495. public CountriesRow NewCountriesRow() {
  496. return ((CountriesRow)(this.NewRow()));
  497. }
  498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  499. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  500. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  501. return new CountriesRow(builder);
  502. }
  503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  504. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  505. protected override global::System.Type GetRowType() {
  506. return typeof(CountriesRow);
  507. }
  508. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  509. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  510. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  511. base.OnRowChanged(e);
  512. if ((this.CountriesRowChanged != null)) {
  513. this.CountriesRowChanged(this, new CountriesRowChangeEvent(((CountriesRow)(e.Row)), e.Action));
  514. }
  515. }
  516. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  517. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  518. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  519. base.OnRowChanging(e);
  520. if ((this.CountriesRowChanging != null)) {
  521. this.CountriesRowChanging(this, new CountriesRowChangeEvent(((CountriesRow)(e.Row)), e.Action));
  522. }
  523. }
  524. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  525. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  526. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  527. base.OnRowDeleted(e);
  528. if ((this.CountriesRowDeleted != null)) {
  529. this.CountriesRowDeleted(this, new CountriesRowChangeEvent(((CountriesRow)(e.Row)), e.Action));
  530. }
  531. }
  532. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  533. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  534. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  535. base.OnRowDeleting(e);
  536. if ((this.CountriesRowDeleting != null)) {
  537. this.CountriesRowDeleting(this, new CountriesRowChangeEvent(((CountriesRow)(e.Row)), e.Action));
  538. }
  539. }
  540. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  541. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  542. public void RemoveCountriesRow(CountriesRow row) {
  543. this.Rows.Remove(row);
  544. }
  545. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  546. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  547. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  548. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  549. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  550. Session1_02DataSet ds = new Session1_02DataSet();
  551. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  552. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  553. any1.MinOccurs = new decimal(0);
  554. any1.MaxOccurs = decimal.MaxValue;
  555. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  556. sequence.Items.Add(any1);
  557. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  558. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  559. any2.MinOccurs = new decimal(1);
  560. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  561. sequence.Items.Add(any2);
  562. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  563. attribute1.Name = "namespace";
  564. attribute1.FixedValue = ds.Namespace;
  565. type.Attributes.Add(attribute1);
  566. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  567. attribute2.Name = "tableTypeName";
  568. attribute2.FixedValue = "CountriesDataTable";
  569. type.Attributes.Add(attribute2);
  570. type.Particle = sequence;
  571. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  572. if (xs.Contains(dsSchema.TargetNamespace)) {
  573. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  574. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  575. try {
  576. global::System.Xml.Schema.XmlSchema schema = null;
  577. dsSchema.Write(s1);
  578. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  579. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  580. s2.SetLength(0);
  581. schema.Write(s2);
  582. if ((s1.Length == s2.Length)) {
  583. s1.Position = 0;
  584. s2.Position = 0;
  585. for (; ((s1.Position != s1.Length)
  586. && (s1.ReadByte() == s2.ReadByte())); ) {
  587. ;
  588. }
  589. if ((s1.Position == s1.Length)) {
  590. return type;
  591. }
  592. }
  593. }
  594. }
  595. finally {
  596. if ((s1 != null)) {
  597. s1.Close();
  598. }
  599. if ((s2 != null)) {
  600. s2.Close();
  601. }
  602. }
  603. }
  604. xs.Add(dsSchema);
  605. return type;
  606. }
  607. }
  608. /// <summary>
  609. ///Represents the strongly named DataTable class.
  610. ///</summary>
  611. [global::System.Serializable()]
  612. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  613. public partial class OfficesDataTable : global::System.Data.TypedTableBase<OfficesRow> {
  614. private global::System.Data.DataColumn columnID;
  615. private global::System.Data.DataColumn columnCountryID;
  616. private global::System.Data.DataColumn columnTitle;
  617. private global::System.Data.DataColumn columnPhone;
  618. private global::System.Data.DataColumn columnContact;
  619. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  620. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  621. public OfficesDataTable() {
  622. this.TableName = "Offices";
  623. this.BeginInit();
  624. this.InitClass();
  625. this.EndInit();
  626. }
  627. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  628. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  629. internal OfficesDataTable(global::System.Data.DataTable table) {
  630. this.TableName = table.TableName;
  631. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  632. this.CaseSensitive = table.CaseSensitive;
  633. }
  634. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  635. this.Locale = table.Locale;
  636. }
  637. if ((table.Namespace != table.DataSet.Namespace)) {
  638. this.Namespace = table.Namespace;
  639. }
  640. this.Prefix = table.Prefix;
  641. this.MinimumCapacity = table.MinimumCapacity;
  642. }
  643. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  644. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  645. protected OfficesDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  646. base(info, context) {
  647. this.InitVars();
  648. }
  649. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  650. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  651. public global::System.Data.DataColumn IDColumn {
  652. get {
  653. return this.columnID;
  654. }
  655. }
  656. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  657. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  658. public global::System.Data.DataColumn CountryIDColumn {
  659. get {
  660. return this.columnCountryID;
  661. }
  662. }
  663. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  664. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  665. public global::System.Data.DataColumn TitleColumn {
  666. get {
  667. return this.columnTitle;
  668. }
  669. }
  670. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  671. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  672. public global::System.Data.DataColumn PhoneColumn {
  673. get {
  674. return this.columnPhone;
  675. }
  676. }
  677. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  678. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  679. public global::System.Data.DataColumn ContactColumn {
  680. get {
  681. return this.columnContact;
  682. }
  683. }
  684. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  685. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  686. [global::System.ComponentModel.Browsable(false)]
  687. public int Count {
  688. get {
  689. return this.Rows.Count;
  690. }
  691. }
  692. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  693. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  694. public OfficesRow this[int index] {
  695. get {
  696. return ((OfficesRow)(this.Rows[index]));
  697. }
  698. }
  699. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  700. public event OfficesRowChangeEventHandler OfficesRowChanging;
  701. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  702. public event OfficesRowChangeEventHandler OfficesRowChanged;
  703. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  704. public event OfficesRowChangeEventHandler OfficesRowDeleting;
  705. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  706. public event OfficesRowChangeEventHandler OfficesRowDeleted;
  707. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  708. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  709. public void AddOfficesRow(OfficesRow row) {
  710. this.Rows.Add(row);
  711. }
  712. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  713. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  714. public OfficesRow AddOfficesRow(CountriesRow parentCountriesRowByFK_Office_Country, string Title, string Phone, string Contact) {
  715. OfficesRow rowOfficesRow = ((OfficesRow)(this.NewRow()));
  716. object[] columnValuesArray = new object[] {
  717. null,
  718. null,
  719. Title,
  720. Phone,
  721. Contact};
  722. if ((parentCountriesRowByFK_Office_Country != null)) {
  723. columnValuesArray[1] = parentCountriesRowByFK_Office_Country[0];
  724. }
  725. rowOfficesRow.ItemArray = columnValuesArray;
  726. this.Rows.Add(rowOfficesRow);
  727. return rowOfficesRow;
  728. }
  729. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  730. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  731. public OfficesRow FindByID(int ID) {
  732. return ((OfficesRow)(this.Rows.Find(new object[] {
  733. ID})));
  734. }
  735. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  736. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  737. public override global::System.Data.DataTable Clone() {
  738. OfficesDataTable cln = ((OfficesDataTable)(base.Clone()));
  739. cln.InitVars();
  740. return cln;
  741. }
  742. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  743. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  744. protected override global::System.Data.DataTable CreateInstance() {
  745. return new OfficesDataTable();
  746. }
  747. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  748. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  749. internal void InitVars() {
  750. this.columnID = base.Columns["ID"];
  751. this.columnCountryID = base.Columns["CountryID"];
  752. this.columnTitle = base.Columns["Title"];
  753. this.columnPhone = base.Columns["Phone"];
  754. this.columnContact = base.Columns["Contact"];
  755. }
  756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  757. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  758. private void InitClass() {
  759. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  760. base.Columns.Add(this.columnID);
  761. this.columnCountryID = new global::System.Data.DataColumn("CountryID", typeof(int), null, global::System.Data.MappingType.Element);
  762. base.Columns.Add(this.columnCountryID);
  763. this.columnTitle = new global::System.Data.DataColumn("Title", typeof(string), null, global::System.Data.MappingType.Element);
  764. base.Columns.Add(this.columnTitle);
  765. this.columnPhone = new global::System.Data.DataColumn("Phone", typeof(string), null, global::System.Data.MappingType.Element);
  766. base.Columns.Add(this.columnPhone);
  767. this.columnContact = new global::System.Data.DataColumn("Contact", typeof(string), null, global::System.Data.MappingType.Element);
  768. base.Columns.Add(this.columnContact);
  769. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  770. this.columnID}, true));
  771. this.columnID.AutoIncrement = true;
  772. this.columnID.AutoIncrementSeed = -1;
  773. this.columnID.AutoIncrementStep = -1;
  774. this.columnID.AllowDBNull = false;
  775. this.columnID.ReadOnly = true;
  776. this.columnID.Unique = true;
  777. this.columnCountryID.AllowDBNull = false;
  778. this.columnTitle.AllowDBNull = false;
  779. this.columnTitle.MaxLength = 50;
  780. this.columnPhone.AllowDBNull = false;
  781. this.columnPhone.MaxLength = 50;
  782. this.columnContact.AllowDBNull = false;
  783. this.columnContact.MaxLength = 250;
  784. }
  785. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  786. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  787. public OfficesRow NewOfficesRow() {
  788. return ((OfficesRow)(this.NewRow()));
  789. }
  790. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  791. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  792. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  793. return new OfficesRow(builder);
  794. }
  795. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  796. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  797. protected override global::System.Type GetRowType() {
  798. return typeof(OfficesRow);
  799. }
  800. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  801. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  802. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  803. base.OnRowChanged(e);
  804. if ((this.OfficesRowChanged != null)) {
  805. this.OfficesRowChanged(this, new OfficesRowChangeEvent(((OfficesRow)(e.Row)), e.Action));
  806. }
  807. }
  808. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  809. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  810. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  811. base.OnRowChanging(e);
  812. if ((this.OfficesRowChanging != null)) {
  813. this.OfficesRowChanging(this, new OfficesRowChangeEvent(((OfficesRow)(e.Row)), e.Action));
  814. }
  815. }
  816. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  817. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  818. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  819. base.OnRowDeleted(e);
  820. if ((this.OfficesRowDeleted != null)) {
  821. this.OfficesRowDeleted(this, new OfficesRowChangeEvent(((OfficesRow)(e.Row)), e.Action));
  822. }
  823. }
  824. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  825. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  826. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  827. base.OnRowDeleting(e);
  828. if ((this.OfficesRowDeleting != null)) {
  829. this.OfficesRowDeleting(this, new OfficesRowChangeEvent(((OfficesRow)(e.Row)), e.Action));
  830. }
  831. }
  832. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  833. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  834. public void RemoveOfficesRow(OfficesRow row) {
  835. this.Rows.Remove(row);
  836. }
  837. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  838. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  839. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  840. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  841. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  842. Session1_02DataSet ds = new Session1_02DataSet();
  843. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  844. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  845. any1.MinOccurs = new decimal(0);
  846. any1.MaxOccurs = decimal.MaxValue;
  847. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  848. sequence.Items.Add(any1);
  849. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  850. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  851. any2.MinOccurs = new decimal(1);
  852. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  853. sequence.Items.Add(any2);
  854. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  855. attribute1.Name = "namespace";
  856. attribute1.FixedValue = ds.Namespace;
  857. type.Attributes.Add(attribute1);
  858. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  859. attribute2.Name = "tableTypeName";
  860. attribute2.FixedValue = "OfficesDataTable";
  861. type.Attributes.Add(attribute2);
  862. type.Particle = sequence;
  863. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  864. if (xs.Contains(dsSchema.TargetNamespace)) {
  865. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  866. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  867. try {
  868. global::System.Xml.Schema.XmlSchema schema = null;
  869. dsSchema.Write(s1);
  870. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  871. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  872. s2.SetLength(0);
  873. schema.Write(s2);
  874. if ((s1.Length == s2.Length)) {
  875. s1.Position = 0;
  876. s2.Position = 0;
  877. for (; ((s1.Position != s1.Length)
  878. && (s1.ReadByte() == s2.ReadByte())); ) {
  879. ;
  880. }
  881. if ((s1.Position == s1.Length)) {
  882. return type;
  883. }
  884. }
  885. }
  886. }
  887. finally {
  888. if ((s1 != null)) {
  889. s1.Close();
  890. }
  891. if ((s2 != null)) {
  892. s2.Close();
  893. }
  894. }
  895. }
  896. xs.Add(dsSchema);
  897. return type;
  898. }
  899. }
  900. /// <summary>
  901. ///Represents the strongly named DataTable class.
  902. ///</summary>
  903. [global::System.Serializable()]
  904. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  905. public partial class RolesDataTable : global::System.Data.TypedTableBase<RolesRow> {
  906. private global::System.Data.DataColumn columnID;
  907. private global::System.Data.DataColumn columnTitle;
  908. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  909. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  910. public RolesDataTable() {
  911. this.TableName = "Roles";
  912. this.BeginInit();
  913. this.InitClass();
  914. this.EndInit();
  915. }
  916. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  917. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  918. internal RolesDataTable(global::System.Data.DataTable table) {
  919. this.TableName = table.TableName;
  920. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  921. this.CaseSensitive = table.CaseSensitive;
  922. }
  923. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  924. this.Locale = table.Locale;
  925. }
  926. if ((table.Namespace != table.DataSet.Namespace)) {
  927. this.Namespace = table.Namespace;
  928. }
  929. this.Prefix = table.Prefix;
  930. this.MinimumCapacity = table.MinimumCapacity;
  931. }
  932. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  933. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  934. protected RolesDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  935. base(info, context) {
  936. this.InitVars();
  937. }
  938. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  939. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  940. public global::System.Data.DataColumn IDColumn {
  941. get {
  942. return this.columnID;
  943. }
  944. }
  945. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  946. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  947. public global::System.Data.DataColumn TitleColumn {
  948. get {
  949. return this.columnTitle;
  950. }
  951. }
  952. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  953. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  954. [global::System.ComponentModel.Browsable(false)]
  955. public int Count {
  956. get {
  957. return this.Rows.Count;
  958. }
  959. }
  960. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  961. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  962. public RolesRow this[int index] {
  963. get {
  964. return ((RolesRow)(this.Rows[index]));
  965. }
  966. }
  967. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  968. public event RolesRowChangeEventHandler RolesRowChanging;
  969. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  970. public event RolesRowChangeEventHandler RolesRowChanged;
  971. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  972. public event RolesRowChangeEventHandler RolesRowDeleting;
  973. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  974. public event RolesRowChangeEventHandler RolesRowDeleted;
  975. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  976. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  977. public void AddRolesRow(RolesRow row) {
  978. this.Rows.Add(row);
  979. }
  980. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  981. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  982. public RolesRow AddRolesRow(int ID, string Title) {
  983. RolesRow rowRolesRow = ((RolesRow)(this.NewRow()));
  984. object[] columnValuesArray = new object[] {
  985. ID,
  986. Title};
  987. rowRolesRow.ItemArray = columnValuesArray;
  988. this.Rows.Add(rowRolesRow);
  989. return rowRolesRow;
  990. }
  991. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  992. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  993. public RolesRow FindByID(int ID) {
  994. return ((RolesRow)(this.Rows.Find(new object[] {
  995. ID})));
  996. }
  997. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  998. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  999. public override global::System.Data.DataTable Clone() {
  1000. RolesDataTable cln = ((RolesDataTable)(base.Clone()));
  1001. cln.InitVars();
  1002. return cln;
  1003. }
  1004. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1005. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1006. protected override global::System.Data.DataTable CreateInstance() {
  1007. return new RolesDataTable();
  1008. }
  1009. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1010. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1011. internal void InitVars() {
  1012. this.columnID = base.Columns["ID"];
  1013. this.columnTitle = base.Columns["Title"];
  1014. }
  1015. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1016. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1017. private void InitClass() {
  1018. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  1019. base.Columns.Add(this.columnID);
  1020. this.columnTitle = new global::System.Data.DataColumn("Title", typeof(string), null, global::System.Data.MappingType.Element);
  1021. base.Columns.Add(this.columnTitle);
  1022. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  1023. this.columnID}, true));
  1024. this.columnID.AllowDBNull = false;
  1025. this.columnID.Unique = true;
  1026. this.columnTitle.AllowDBNull = false;
  1027. this.columnTitle.MaxLength = 50;
  1028. }
  1029. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1030. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1031. public RolesRow NewRolesRow() {
  1032. return ((RolesRow)(this.NewRow()));
  1033. }
  1034. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1035. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1036. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  1037. return new RolesRow(builder);
  1038. }
  1039. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1040. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1041. protected override global::System.Type GetRowType() {
  1042. return typeof(RolesRow);
  1043. }
  1044. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1045. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1046. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  1047. base.OnRowChanged(e);
  1048. if ((this.RolesRowChanged != null)) {
  1049. this.RolesRowChanged(this, new RolesRowChangeEvent(((RolesRow)(e.Row)), e.Action));
  1050. }
  1051. }
  1052. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1053. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1054. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  1055. base.OnRowChanging(e);
  1056. if ((this.RolesRowChanging != null)) {
  1057. this.RolesRowChanging(this, new RolesRowChangeEvent(((RolesRow)(e.Row)), e.Action));
  1058. }
  1059. }
  1060. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1061. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1062. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  1063. base.OnRowDeleted(e);
  1064. if ((this.RolesRowDeleted != null)) {
  1065. this.RolesRowDeleted(this, new RolesRowChangeEvent(((RolesRow)(e.Row)), e.Action));
  1066. }
  1067. }
  1068. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1069. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1070. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  1071. base.OnRowDeleting(e);
  1072. if ((this.RolesRowDeleting != null)) {
  1073. this.RolesRowDeleting(this, new RolesRowChangeEvent(((RolesRow)(e.Row)), e.Action));
  1074. }
  1075. }
  1076. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1077. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1078. public void RemoveRolesRow(RolesRow row) {
  1079. this.Rows.Remove(row);
  1080. }
  1081. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1082. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1083. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1084. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1085. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1086. Session1_02DataSet ds = new Session1_02DataSet();
  1087. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1088. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1089. any1.MinOccurs = new decimal(0);
  1090. any1.MaxOccurs = decimal.MaxValue;
  1091. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1092. sequence.Items.Add(any1);
  1093. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1094. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1095. any2.MinOccurs = new decimal(1);
  1096. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1097. sequence.Items.Add(any2);
  1098. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1099. attribute1.Name = "namespace";
  1100. attribute1.FixedValue = ds.Namespace;
  1101. type.Attributes.Add(attribute1);
  1102. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1103. attribute2.Name = "tableTypeName";
  1104. attribute2.FixedValue = "RolesDataTable";
  1105. type.Attributes.Add(attribute2);
  1106. type.Particle = sequence;
  1107. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1108. if (xs.Contains(dsSchema.TargetNamespace)) {
  1109. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1110. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1111. try {
  1112. global::System.Xml.Schema.XmlSchema schema = null;
  1113. dsSchema.Write(s1);
  1114. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1115. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1116. s2.SetLength(0);
  1117. schema.Write(s2);
  1118. if ((s1.Length == s2.Length)) {
  1119. s1.Position = 0;
  1120. s2.Position = 0;
  1121. for (; ((s1.Position != s1.Length)
  1122. && (s1.ReadByte() == s2.ReadByte())); ) {
  1123. ;
  1124. }
  1125. if ((s1.Position == s1.Length)) {
  1126. return type;
  1127. }
  1128. }
  1129. }
  1130. }
  1131. finally {
  1132. if ((s1 != null)) {
  1133. s1.Close();
  1134. }
  1135. if ((s2 != null)) {
  1136. s2.Close();
  1137. }
  1138. }
  1139. }
  1140. xs.Add(dsSchema);
  1141. return type;
  1142. }
  1143. }
  1144. /// <summary>
  1145. ///Represents the strongly named DataTable class.
  1146. ///</summary>
  1147. [global::System.Serializable()]
  1148. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  1149. public partial class UsersDataTable : global::System.Data.TypedTableBase<UsersRow> {
  1150. private global::System.Data.DataColumn columnID;
  1151. private global::System.Data.DataColumn columnRoleID;
  1152. private global::System.Data.DataColumn columnEmail;
  1153. private global::System.Data.DataColumn columnPassword;
  1154. private global::System.Data.DataColumn columnFirstName;
  1155. private global::System.Data.DataColumn columnLastName;
  1156. private global::System.Data.DataColumn columnOfficeID;
  1157. private global::System.Data.DataColumn columnBirthdate;
  1158. private global::System.Data.DataColumn columnActive;
  1159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1160. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1161. public UsersDataTable() {
  1162. this.TableName = "Users";
  1163. this.BeginInit();
  1164. this.InitClass();
  1165. this.EndInit();
  1166. }
  1167. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1168. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1169. internal UsersDataTable(global::System.Data.DataTable table) {
  1170. this.TableName = table.TableName;
  1171. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  1172. this.CaseSensitive = table.CaseSensitive;
  1173. }
  1174. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  1175. this.Locale = table.Locale;
  1176. }
  1177. if ((table.Namespace != table.DataSet.Namespace)) {
  1178. this.Namespace = table.Namespace;
  1179. }
  1180. this.Prefix = table.Prefix;
  1181. this.MinimumCapacity = table.MinimumCapacity;
  1182. }
  1183. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1184. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1185. protected UsersDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  1186. base(info, context) {
  1187. this.InitVars();
  1188. }
  1189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1190. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1191. public global::System.Data.DataColumn IDColumn {
  1192. get {
  1193. return this.columnID;
  1194. }
  1195. }
  1196. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1197. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1198. public global::System.Data.DataColumn RoleIDColumn {
  1199. get {
  1200. return this.columnRoleID;
  1201. }
  1202. }
  1203. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1204. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1205. public global::System.Data.DataColumn EmailColumn {
  1206. get {
  1207. return this.columnEmail;
  1208. }
  1209. }
  1210. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1211. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1212. public global::System.Data.DataColumn PasswordColumn {
  1213. get {
  1214. return this.columnPassword;
  1215. }
  1216. }
  1217. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1218. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1219. public global::System.Data.DataColumn FirstNameColumn {
  1220. get {
  1221. return this.columnFirstName;
  1222. }
  1223. }
  1224. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1225. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1226. public global::System.Data.DataColumn LastNameColumn {
  1227. get {
  1228. return this.columnLastName;
  1229. }
  1230. }
  1231. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1232. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1233. public global::System.Data.DataColumn OfficeIDColumn {
  1234. get {
  1235. return this.columnOfficeID;
  1236. }
  1237. }
  1238. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1239. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1240. public global::System.Data.DataColumn BirthdateColumn {
  1241. get {
  1242. return this.columnBirthdate;
  1243. }
  1244. }
  1245. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1246. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1247. public global::System.Data.DataColumn ActiveColumn {
  1248. get {
  1249. return this.columnActive;
  1250. }
  1251. }
  1252. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1253. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1254. [global::System.ComponentModel.Browsable(false)]
  1255. public int Count {
  1256. get {
  1257. return this.Rows.Count;
  1258. }
  1259. }
  1260. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1261. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1262. public UsersRow this[int index] {
  1263. get {
  1264. return ((UsersRow)(this.Rows[index]));
  1265. }
  1266. }
  1267. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1268. public event UsersRowChangeEventHandler UsersRowChanging;
  1269. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1270. public event UsersRowChangeEventHandler UsersRowChanged;
  1271. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1272. public event UsersRowChangeEventHandler UsersRowDeleting;
  1273. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1274. public event UsersRowChangeEventHandler UsersRowDeleted;
  1275. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1276. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1277. public void AddUsersRow(UsersRow row) {
  1278. this.Rows.Add(row);
  1279. }
  1280. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1281. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1282. public UsersRow AddUsersRow(RolesRow parentRolesRowByFK_Users_Roles, string Email, string Password, string FirstName, string LastName, OfficesRow parentOfficesRowByFK_Users_Offices, System.DateTime Birthdate, bool Active) {
  1283. UsersRow rowUsersRow = ((UsersRow)(this.NewRow()));
  1284. object[] columnValuesArray = new object[] {
  1285. null,
  1286. null,
  1287. Email,
  1288. Password,
  1289. FirstName,
  1290. LastName,
  1291. null,
  1292. Birthdate,
  1293. Active};
  1294. if ((parentRolesRowByFK_Users_Roles != null)) {
  1295. columnValuesArray[1] = parentRolesRowByFK_Users_Roles[0];
  1296. }
  1297. if ((parentOfficesRowByFK_Users_Offices != null)) {
  1298. columnValuesArray[6] = parentOfficesRowByFK_Users_Offices[0];
  1299. }
  1300. rowUsersRow.ItemArray = columnValuesArray;
  1301. this.Rows.Add(rowUsersRow);
  1302. return rowUsersRow;
  1303. }
  1304. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1305. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1306. public UsersRow FindByID(int ID) {
  1307. return ((UsersRow)(this.Rows.Find(new object[] {
  1308. ID})));
  1309. }
  1310. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1311. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1312. public override global::System.Data.DataTable Clone() {
  1313. UsersDataTable cln = ((UsersDataTable)(base.Clone()));
  1314. cln.InitVars();
  1315. return cln;
  1316. }
  1317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1318. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1319. protected override global::System.Data.DataTable CreateInstance() {
  1320. return new UsersDataTable();
  1321. }
  1322. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1323. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1324. internal void InitVars() {
  1325. this.columnID = base.Columns["ID"];
  1326. this.columnRoleID = base.Columns["RoleID"];
  1327. this.columnEmail = base.Columns["Email"];
  1328. this.columnPassword = base.Columns["Password"];
  1329. this.columnFirstName = base.Columns["FirstName"];
  1330. this.columnLastName = base.Columns["LastName"];
  1331. this.columnOfficeID = base.Columns["OfficeID"];
  1332. this.columnBirthdate = base.Columns["Birthdate"];
  1333. this.columnActive = base.Columns["Active"];
  1334. }
  1335. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1336. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1337. private void InitClass() {
  1338. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  1339. base.Columns.Add(this.columnID);
  1340. this.columnRoleID = new global::System.Data.DataColumn("RoleID", typeof(int), null, global::System.Data.MappingType.Element);
  1341. base.Columns.Add(this.columnRoleID);
  1342. this.columnEmail = new global::System.Data.DataColumn("Email", typeof(string), null, global::System.Data.MappingType.Element);
  1343. base.Columns.Add(this.columnEmail);
  1344. this.columnPassword = new global::System.Data.DataColumn("Password", typeof(string), null, global::System.Data.MappingType.Element);
  1345. base.Columns.Add(this.columnPassword);
  1346. this.columnFirstName = new global::System.Data.DataColumn("FirstName", typeof(string), null, global::System.Data.MappingType.Element);
  1347. base.Columns.Add(this.columnFirstName);
  1348. this.columnLastName = new global::System.Data.DataColumn("LastName", typeof(string), null, global::System.Data.MappingType.Element);
  1349. base.Columns.Add(this.columnLastName);
  1350. this.columnOfficeID = new global::System.Data.DataColumn("OfficeID", typeof(int), null, global::System.Data.MappingType.Element);
  1351. base.Columns.Add(this.columnOfficeID);
  1352. this.columnBirthdate = new global::System.Data.DataColumn("Birthdate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
  1353. base.Columns.Add(this.columnBirthdate);
  1354. this.columnActive = new global::System.Data.DataColumn("Active", typeof(bool), null, global::System.Data.MappingType.Element);
  1355. base.Columns.Add(this.columnActive);
  1356. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  1357. this.columnID}, true));
  1358. this.columnID.AutoIncrement = true;
  1359. this.columnID.AutoIncrementSeed = -1;
  1360. this.columnID.AutoIncrementStep = -1;
  1361. this.columnID.AllowDBNull = false;
  1362. this.columnID.ReadOnly = true;
  1363. this.columnID.Unique = true;
  1364. this.columnRoleID.AllowDBNull = false;
  1365. this.columnEmail.AllowDBNull = false;
  1366. this.columnEmail.MaxLength = 150;
  1367. this.columnPassword.AllowDBNull = false;
  1368. this.columnPassword.MaxLength = 50;
  1369. this.columnFirstName.MaxLength = 50;
  1370. this.columnLastName.AllowDBNull = false;
  1371. this.columnLastName.MaxLength = 50;
  1372. }
  1373. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1374. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1375. public UsersRow NewUsersRow() {
  1376. return ((UsersRow)(this.NewRow()));
  1377. }
  1378. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1379. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1380. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  1381. return new UsersRow(builder);
  1382. }
  1383. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1384. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1385. protected override global::System.Type GetRowType() {
  1386. return typeof(UsersRow);
  1387. }
  1388. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1389. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1390. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  1391. base.OnRowChanged(e);
  1392. if ((this.UsersRowChanged != null)) {
  1393. this.UsersRowChanged(this, new UsersRowChangeEvent(((UsersRow)(e.Row)), e.Action));
  1394. }
  1395. }
  1396. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1397. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1398. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  1399. base.OnRowChanging(e);
  1400. if ((this.UsersRowChanging != null)) {
  1401. this.UsersRowChanging(this, new UsersRowChangeEvent(((UsersRow)(e.Row)), e.Action));
  1402. }
  1403. }
  1404. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1405. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1406. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  1407. base.OnRowDeleted(e);
  1408. if ((this.UsersRowDeleted != null)) {
  1409. this.UsersRowDeleted(this, new UsersRowChangeEvent(((UsersRow)(e.Row)), e.Action));
  1410. }
  1411. }
  1412. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1413. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1414. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  1415. base.OnRowDeleting(e);
  1416. if ((this.UsersRowDeleting != null)) {
  1417. this.UsersRowDeleting(this, new UsersRowChangeEvent(((UsersRow)(e.Row)), e.Action));
  1418. }
  1419. }
  1420. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1421. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1422. public void RemoveUsersRow(UsersRow row) {
  1423. this.Rows.Remove(row);
  1424. }
  1425. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1426. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1427. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1428. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1429. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1430. Session1_02DataSet ds = new Session1_02DataSet();
  1431. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1432. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1433. any1.MinOccurs = new decimal(0);
  1434. any1.MaxOccurs = decimal.MaxValue;
  1435. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1436. sequence.Items.Add(any1);
  1437. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1438. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1439. any2.MinOccurs = new decimal(1);
  1440. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1441. sequence.Items.Add(any2);
  1442. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1443. attribute1.Name = "namespace";
  1444. attribute1.FixedValue = ds.Namespace;
  1445. type.Attributes.Add(attribute1);
  1446. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1447. attribute2.Name = "tableTypeName";
  1448. attribute2.FixedValue = "UsersDataTable";
  1449. type.Attributes.Add(attribute2);
  1450. type.Particle = sequence;
  1451. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1452. if (xs.Contains(dsSchema.TargetNamespace)) {
  1453. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1454. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1455. try {
  1456. global::System.Xml.Schema.XmlSchema schema = null;
  1457. dsSchema.Write(s1);
  1458. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1459. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1460. s2.SetLength(0);
  1461. schema.Write(s2);
  1462. if ((s1.Length == s2.Length)) {
  1463. s1.Position = 0;
  1464. s2.Position = 0;
  1465. for (; ((s1.Position != s1.Length)
  1466. && (s1.ReadByte() == s2.ReadByte())); ) {
  1467. ;
  1468. }
  1469. if ((s1.Position == s1.Length)) {
  1470. return type;
  1471. }
  1472. }
  1473. }
  1474. }
  1475. finally {
  1476. if ((s1 != null)) {
  1477. s1.Close();
  1478. }
  1479. if ((s2 != null)) {
  1480. s2.Close();
  1481. }
  1482. }
  1483. }
  1484. xs.Add(dsSchema);
  1485. return type;
  1486. }
  1487. }
  1488. /// <summary>
  1489. ///Represents strongly named DataRow class.
  1490. ///</summary>
  1491. public partial class CountriesRow : global::System.Data.DataRow {
  1492. private CountriesDataTable tableCountries;
  1493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1494. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1495. internal CountriesRow(global::System.Data.DataRowBuilder rb) :
  1496. base(rb) {
  1497. this.tableCountries = ((CountriesDataTable)(this.Table));
  1498. }
  1499. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1500. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1501. public int ID {
  1502. get {
  1503. return ((int)(this[this.tableCountries.IDColumn]));
  1504. }
  1505. set {
  1506. this[this.tableCountries.IDColumn] = value;
  1507. }
  1508. }
  1509. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1510. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1511. public string Name {
  1512. get {
  1513. return ((string)(this[this.tableCountries.NameColumn]));
  1514. }
  1515. set {
  1516. this[this.tableCountries.NameColumn] = value;
  1517. }
  1518. }
  1519. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1520. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1521. public OfficesRow[] GetOfficesRows() {
  1522. if ((this.Table.ChildRelations["FK_Office_Country"] == null)) {
  1523. return new OfficesRow[0];
  1524. }
  1525. else {
  1526. return ((OfficesRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Office_Country"])));
  1527. }
  1528. }
  1529. }
  1530. /// <summary>
  1531. ///Represents strongly named DataRow class.
  1532. ///</summary>
  1533. public partial class OfficesRow : global::System.Data.DataRow {
  1534. private OfficesDataTable tableOffices;
  1535. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1536. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1537. internal OfficesRow(global::System.Data.DataRowBuilder rb) :
  1538. base(rb) {
  1539. this.tableOffices = ((OfficesDataTable)(this.Table));
  1540. }
  1541. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1542. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1543. public int ID {
  1544. get {
  1545. return ((int)(this[this.tableOffices.IDColumn]));
  1546. }
  1547. set {
  1548. this[this.tableOffices.IDColumn] = value;
  1549. }
  1550. }
  1551. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1552. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1553. public int CountryID {
  1554. get {
  1555. return ((int)(this[this.tableOffices.CountryIDColumn]));
  1556. }
  1557. set {
  1558. this[this.tableOffices.CountryIDColumn] = value;
  1559. }
  1560. }
  1561. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1562. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1563. public string Title {
  1564. get {
  1565. return ((string)(this[this.tableOffices.TitleColumn]));
  1566. }
  1567. set {
  1568. this[this.tableOffices.TitleColumn] = value;
  1569. }
  1570. }
  1571. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1572. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1573. public string Phone {
  1574. get {
  1575. return ((string)(this[this.tableOffices.PhoneColumn]));
  1576. }
  1577. set {
  1578. this[this.tableOffices.PhoneColumn] = value;
  1579. }
  1580. }
  1581. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1582. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1583. public string Contact {
  1584. get {
  1585. return ((string)(this[this.tableOffices.ContactColumn]));
  1586. }
  1587. set {
  1588. this[this.tableOffices.ContactColumn] = value;
  1589. }
  1590. }
  1591. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1592. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1593. public CountriesRow CountriesRow {
  1594. get {
  1595. return ((CountriesRow)(this.GetParentRow(this.Table.ParentRelations["FK_Office_Country"])));
  1596. }
  1597. set {
  1598. this.SetParentRow(value, this.Table.ParentRelations["FK_Office_Country"]);
  1599. }
  1600. }
  1601. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1602. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1603. public UsersRow[] GetUsersRows() {
  1604. if ((this.Table.ChildRelations["FK_Users_Offices"] == null)) {
  1605. return new UsersRow[0];
  1606. }
  1607. else {
  1608. return ((UsersRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Users_Offices"])));
  1609. }
  1610. }
  1611. }
  1612. /// <summary>
  1613. ///Represents strongly named DataRow class.
  1614. ///</summary>
  1615. public partial class RolesRow : global::System.Data.DataRow {
  1616. private RolesDataTable tableRoles;
  1617. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1618. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1619. internal RolesRow(global::System.Data.DataRowBuilder rb) :
  1620. base(rb) {
  1621. this.tableRoles = ((RolesDataTable)(this.Table));
  1622. }
  1623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1624. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1625. public int ID {
  1626. get {
  1627. return ((int)(this[this.tableRoles.IDColumn]));
  1628. }
  1629. set {
  1630. this[this.tableRoles.IDColumn] = value;
  1631. }
  1632. }
  1633. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1634. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1635. public string Title {
  1636. get {
  1637. return ((string)(this[this.tableRoles.TitleColumn]));
  1638. }
  1639. set {
  1640. this[this.tableRoles.TitleColumn] = value;
  1641. }
  1642. }
  1643. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1644. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1645. public UsersRow[] GetUsersRows() {
  1646. if ((this.Table.ChildRelations["FK_Users_Roles"] == null)) {
  1647. return new UsersRow[0];
  1648. }
  1649. else {
  1650. return ((UsersRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Users_Roles"])));
  1651. }
  1652. }
  1653. }
  1654. /// <summary>
  1655. ///Represents strongly named DataRow class.
  1656. ///</summary>
  1657. public partial class UsersRow : global::System.Data.DataRow {
  1658. private UsersDataTable tableUsers;
  1659. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1660. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1661. internal UsersRow(global::System.Data.DataRowBuilder rb) :
  1662. base(rb) {
  1663. this.tableUsers = ((UsersDataTable)(this.Table));
  1664. }
  1665. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1666. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1667. public int ID {
  1668. get {
  1669. return ((int)(this[this.tableUsers.IDColumn]));
  1670. }
  1671. set {
  1672. this[this.tableUsers.IDColumn] = value;
  1673. }
  1674. }
  1675. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1676. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1677. public int RoleID {
  1678. get {
  1679. return ((int)(this[this.tableUsers.RoleIDColumn]));
  1680. }
  1681. set {
  1682. this[this.tableUsers.RoleIDColumn] = value;
  1683. }
  1684. }
  1685. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1686. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1687. public string Email {
  1688. get {
  1689. return ((string)(this[this.tableUsers.EmailColumn]));
  1690. }
  1691. set {
  1692. this[this.tableUsers.EmailColumn] = value;
  1693. }
  1694. }
  1695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1696. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1697. public string Password {
  1698. get {
  1699. return ((string)(this[this.tableUsers.PasswordColumn]));
  1700. }
  1701. set {
  1702. this[this.tableUsers.PasswordColumn] = value;
  1703. }
  1704. }
  1705. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1706. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1707. public string FirstName {
  1708. get {
  1709. try {
  1710. return ((string)(this[this.tableUsers.FirstNameColumn]));
  1711. }
  1712. catch (global::System.InvalidCastException e) {
  1713. throw new global::System.Data.StrongTypingException("Значение для столбца \'FirstName\' в таблице \'Users\' равно DBNull.", e);
  1714. }
  1715. }
  1716. set {
  1717. this[this.tableUsers.FirstNameColumn] = value;
  1718. }
  1719. }
  1720. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1721. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1722. public string LastName {
  1723. get {
  1724. return ((string)(this[this.tableUsers.LastNameColumn]));
  1725. }
  1726. set {
  1727. this[this.tableUsers.LastNameColumn] = value;
  1728. }
  1729. }
  1730. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1731. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1732. public int OfficeID {
  1733. get {
  1734. try {
  1735. return ((int)(this[this.tableUsers.OfficeIDColumn]));
  1736. }
  1737. catch (global::System.InvalidCastException e) {
  1738. throw new global::System.Data.StrongTypingException("Значение для столбца \'OfficeID\' в таблице \'Users\' равно DBNull.", e);
  1739. }
  1740. }
  1741. set {
  1742. this[this.tableUsers.OfficeIDColumn] = value;
  1743. }
  1744. }
  1745. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1746. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1747. public System.DateTime Birthdate {
  1748. get {
  1749. try {
  1750. return ((global::System.DateTime)(this[this.tableUsers.BirthdateColumn]));
  1751. }
  1752. catch (global::System.InvalidCastException e) {
  1753. throw new global::System.Data.StrongTypingException("Значение для столбца \'Birthdate\' в таблице \'Users\' равно DBNull.", e);
  1754. }
  1755. }
  1756. set {
  1757. this[this.tableUsers.BirthdateColumn] = value;
  1758. }
  1759. }
  1760. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1761. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1762. public bool Active {
  1763. get {
  1764. try {
  1765. return ((bool)(this[this.tableUsers.ActiveColumn]));
  1766. }
  1767. catch (global::System.InvalidCastException e) {
  1768. throw new global::System.Data.StrongTypingException("Значение для столбца \'Active\' в таблице \'Users\' равно DBNull.", e);
  1769. }
  1770. }
  1771. set {
  1772. this[this.tableUsers.ActiveColumn] = value;
  1773. }
  1774. }
  1775. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1776. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1777. public OfficesRow OfficesRow {
  1778. get {
  1779. return ((OfficesRow)(this.GetParentRow(this.Table.ParentRelations["FK_Users_Offices"])));
  1780. }
  1781. set {
  1782. this.SetParentRow(value, this.Table.ParentRelations["FK_Users_Offices"]);
  1783. }
  1784. }
  1785. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1786. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1787. public RolesRow RolesRow {
  1788. get {
  1789. return ((RolesRow)(this.GetParentRow(this.Table.ParentRelations["FK_Users_Roles"])));
  1790. }
  1791. set {
  1792. this.SetParentRow(value, this.Table.ParentRelations["FK_Users_Roles"]);
  1793. }
  1794. }
  1795. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1796. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1797. public bool IsFirstNameNull() {
  1798. return this.IsNull(this.tableUsers.FirstNameColumn);
  1799. }
  1800. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1801. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1802. public void SetFirstNameNull() {
  1803. this[this.tableUsers.FirstNameColumn] = global::System.Convert.DBNull;
  1804. }
  1805. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1806. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1807. public bool IsOfficeIDNull() {
  1808. return this.IsNull(this.tableUsers.OfficeIDColumn);
  1809. }
  1810. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1811. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1812. public void SetOfficeIDNull() {
  1813. this[this.tableUsers.OfficeIDColumn] = global::System.Convert.DBNull;
  1814. }
  1815. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1816. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1817. public bool IsBirthdateNull() {
  1818. return this.IsNull(this.tableUsers.BirthdateColumn);
  1819. }
  1820. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1821. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1822. public void SetBirthdateNull() {
  1823. this[this.tableUsers.BirthdateColumn] = global::System.Convert.DBNull;
  1824. }
  1825. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1826. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1827. public bool IsActiveNull() {
  1828. return this.IsNull(this.tableUsers.ActiveColumn);
  1829. }
  1830. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1831. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1832. public void SetActiveNull() {
  1833. this[this.tableUsers.ActiveColumn] = global::System.Convert.DBNull;
  1834. }
  1835. }
  1836. /// <summary>
  1837. ///Row event argument class
  1838. ///</summary>
  1839. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1840. public class CountriesRowChangeEvent : global::System.EventArgs {
  1841. private CountriesRow eventRow;
  1842. private global::System.Data.DataRowAction eventAction;
  1843. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1844. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1845. public CountriesRowChangeEvent(CountriesRow row, global::System.Data.DataRowAction action) {
  1846. this.eventRow = row;
  1847. this.eventAction = action;
  1848. }
  1849. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1850. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1851. public CountriesRow Row {
  1852. get {
  1853. return this.eventRow;
  1854. }
  1855. }
  1856. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1857. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1858. public global::System.Data.DataRowAction Action {
  1859. get {
  1860. return this.eventAction;
  1861. }
  1862. }
  1863. }
  1864. /// <summary>
  1865. ///Row event argument class
  1866. ///</summary>
  1867. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1868. public class OfficesRowChangeEvent : global::System.EventArgs {
  1869. private OfficesRow eventRow;
  1870. private global::System.Data.DataRowAction eventAction;
  1871. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1872. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1873. public OfficesRowChangeEvent(OfficesRow row, global::System.Data.DataRowAction action) {
  1874. this.eventRow = row;
  1875. this.eventAction = action;
  1876. }
  1877. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1878. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1879. public OfficesRow Row {
  1880. get {
  1881. return this.eventRow;
  1882. }
  1883. }
  1884. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1885. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1886. public global::System.Data.DataRowAction Action {
  1887. get {
  1888. return this.eventAction;
  1889. }
  1890. }
  1891. }
  1892. /// <summary>
  1893. ///Row event argument class
  1894. ///</summary>
  1895. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1896. public class RolesRowChangeEvent : global::System.EventArgs {
  1897. private RolesRow eventRow;
  1898. private global::System.Data.DataRowAction eventAction;
  1899. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1900. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1901. public RolesRowChangeEvent(RolesRow row, global::System.Data.DataRowAction action) {
  1902. this.eventRow = row;
  1903. this.eventAction = action;
  1904. }
  1905. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1906. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1907. public RolesRow Row {
  1908. get {
  1909. return this.eventRow;
  1910. }
  1911. }
  1912. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1913. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1914. public global::System.Data.DataRowAction Action {
  1915. get {
  1916. return this.eventAction;
  1917. }
  1918. }
  1919. }
  1920. /// <summary>
  1921. ///Row event argument class
  1922. ///</summary>
  1923. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1924. public class UsersRowChangeEvent : global::System.EventArgs {
  1925. private UsersRow eventRow;
  1926. private global::System.Data.DataRowAction eventAction;
  1927. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1928. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1929. public UsersRowChangeEvent(UsersRow row, global::System.Data.DataRowAction action) {
  1930. this.eventRow = row;
  1931. this.eventAction = action;
  1932. }
  1933. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1934. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1935. public UsersRow Row {
  1936. get {
  1937. return this.eventRow;
  1938. }
  1939. }
  1940. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1941. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1942. public global::System.Data.DataRowAction Action {
  1943. get {
  1944. return this.eventAction;
  1945. }
  1946. }
  1947. }
  1948. }
  1949. }
  1950. namespace AMONIC_Airlines02.Session1_02DataSetTableAdapters {
  1951. /// <summary>
  1952. ///Represents the connection and commands used to retrieve and save data.
  1953. ///</summary>
  1954. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1955. [global::System.ComponentModel.ToolboxItem(true)]
  1956. [global::System.ComponentModel.DataObjectAttribute(true)]
  1957. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  1958. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1959. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1960. public partial class CountriesTableAdapter : global::System.ComponentModel.Component {
  1961. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  1962. private global::System.Data.SqlClient.SqlConnection _connection;
  1963. private global::System.Data.SqlClient.SqlTransaction _transaction;
  1964. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  1965. private bool _clearBeforeFill;
  1966. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1967. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1968. public CountriesTableAdapter() {
  1969. this.ClearBeforeFill = true;
  1970. }
  1971. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1972. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1973. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  1974. get {
  1975. if ((this._adapter == null)) {
  1976. this.InitAdapter();
  1977. }
  1978. return this._adapter;
  1979. }
  1980. }
  1981. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1982. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1983. internal global::System.Data.SqlClient.SqlConnection Connection {
  1984. get {
  1985. if ((this._connection == null)) {
  1986. this.InitConnection();
  1987. }
  1988. return this._connection;
  1989. }
  1990. set {
  1991. this._connection = value;
  1992. if ((this.Adapter.InsertCommand != null)) {
  1993. this.Adapter.InsertCommand.Connection = value;
  1994. }
  1995. if ((this.Adapter.DeleteCommand != null)) {
  1996. this.Adapter.DeleteCommand.Connection = value;
  1997. }
  1998. if ((this.Adapter.UpdateCommand != null)) {
  1999. this.Adapter.UpdateCommand.Connection = value;
  2000. }
  2001. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2002. if ((this.CommandCollection[i] != null)) {
  2003. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  2004. }
  2005. }
  2006. }
  2007. }
  2008. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2009. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2010. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  2011. get {
  2012. return this._transaction;
  2013. }
  2014. set {
  2015. this._transaction = value;
  2016. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2017. this.CommandCollection[i].Transaction = this._transaction;
  2018. }
  2019. if (((this.Adapter != null)
  2020. && (this.Adapter.DeleteCommand != null))) {
  2021. this.Adapter.DeleteCommand.Transaction = this._transaction;
  2022. }
  2023. if (((this.Adapter != null)
  2024. && (this.Adapter.InsertCommand != null))) {
  2025. this.Adapter.InsertCommand.Transaction = this._transaction;
  2026. }
  2027. if (((this.Adapter != null)
  2028. && (this.Adapter.UpdateCommand != null))) {
  2029. this.Adapter.UpdateCommand.Transaction = this._transaction;
  2030. }
  2031. }
  2032. }
  2033. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2034. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2035. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  2036. get {
  2037. if ((this._commandCollection == null)) {
  2038. this.InitCommandCollection();
  2039. }
  2040. return this._commandCollection;
  2041. }
  2042. }
  2043. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2044. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2045. public bool ClearBeforeFill {
  2046. get {
  2047. return this._clearBeforeFill;
  2048. }
  2049. set {
  2050. this._clearBeforeFill = value;
  2051. }
  2052. }
  2053. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2054. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2055. private void InitAdapter() {
  2056. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  2057. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  2058. tableMapping.SourceTable = "Table";
  2059. tableMapping.DataSetTable = "Countries";
  2060. tableMapping.ColumnMappings.Add("ID", "ID");
  2061. tableMapping.ColumnMappings.Add("Name", "Name");
  2062. this._adapter.TableMappings.Add(tableMapping);
  2063. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  2064. this._adapter.DeleteCommand.Connection = this.Connection;
  2065. this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Countries] WHERE (([ID] = @Original_ID) AND ([Name] = @Origina" +
  2066. "l_Name))";
  2067. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  2068. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2069. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2070. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  2071. this._adapter.InsertCommand.Connection = this.Connection;
  2072. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Countries] ([Name]) VALUES (@Name);\r\nSELECT ID, Name FROM Coun" +
  2073. "tries WHERE (ID = SCOPE_IDENTITY())";
  2074. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  2075. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2076. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  2077. this._adapter.UpdateCommand.Connection = this.Connection;
  2078. this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Countries] SET [Name] = @Name WHERE (([ID] = @Original_ID) AND ([Na" +
  2079. "me] = @Original_Name));\r\nSELECT ID, Name FROM Countries WHERE (ID = @ID)";
  2080. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  2081. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2082. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2083. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2084. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2085. }
  2086. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2087. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2088. private void InitConnection() {
  2089. this._connection = new global::System.Data.SqlClient.SqlConnection();
  2090. this._connection.ConnectionString = global::AMONIC_Airlines02.Properties.Settings.Default.Session1_02ConnectionString;
  2091. }
  2092. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2093. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2094. private void InitCommandCollection() {
  2095. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  2096. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  2097. this._commandCollection[0].Connection = this.Connection;
  2098. this._commandCollection[0].CommandText = "SELECT ID, Name FROM dbo.Countries";
  2099. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  2100. }
  2101. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2102. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2103. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2104. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  2105. public virtual int Fill(Session1_02DataSet.CountriesDataTable dataTable) {
  2106. this.Adapter.SelectCommand = this.CommandCollection[0];
  2107. if ((this.ClearBeforeFill == true)) {
  2108. dataTable.Clear();
  2109. }
  2110. int returnValue = this.Adapter.Fill(dataTable);
  2111. return returnValue;
  2112. }
  2113. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2114. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2115. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2116. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  2117. public virtual Session1_02DataSet.CountriesDataTable GetData() {
  2118. this.Adapter.SelectCommand = this.CommandCollection[0];
  2119. Session1_02DataSet.CountriesDataTable dataTable = new Session1_02DataSet.CountriesDataTable();
  2120. this.Adapter.Fill(dataTable);
  2121. return dataTable;
  2122. }
  2123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2124. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2125. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2126. public virtual int Update(Session1_02DataSet.CountriesDataTable dataTable) {
  2127. return this.Adapter.Update(dataTable);
  2128. }
  2129. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2130. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2131. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2132. public virtual int Update(Session1_02DataSet dataSet) {
  2133. return this.Adapter.Update(dataSet, "Countries");
  2134. }
  2135. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2136. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2137. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2138. public virtual int Update(global::System.Data.DataRow dataRow) {
  2139. return this.Adapter.Update(new global::System.Data.DataRow[] {
  2140. dataRow});
  2141. }
  2142. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2143. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2144. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2145. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  2146. return this.Adapter.Update(dataRows);
  2147. }
  2148. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2149. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2150. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2151. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  2152. public virtual int Delete(int Original_ID, string Original_Name) {
  2153. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  2154. if ((Original_Name == null)) {
  2155. throw new global::System.ArgumentNullException("Original_Name");
  2156. }
  2157. else {
  2158. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
  2159. }
  2160. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  2161. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2162. != global::System.Data.ConnectionState.Open)) {
  2163. this.Adapter.DeleteCommand.Connection.Open();
  2164. }
  2165. try {
  2166. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  2167. return returnValue;
  2168. }
  2169. finally {
  2170. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  2171. this.Adapter.DeleteCommand.Connection.Close();
  2172. }
  2173. }
  2174. }
  2175. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2176. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2177. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2178. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  2179. public virtual int Insert(string Name) {
  2180. if ((Name == null)) {
  2181. throw new global::System.ArgumentNullException("Name");
  2182. }
  2183. else {
  2184. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
  2185. }
  2186. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  2187. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2188. != global::System.Data.ConnectionState.Open)) {
  2189. this.Adapter.InsertCommand.Connection.Open();
  2190. }
  2191. try {
  2192. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  2193. return returnValue;
  2194. }
  2195. finally {
  2196. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  2197. this.Adapter.InsertCommand.Connection.Close();
  2198. }
  2199. }
  2200. }
  2201. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2202. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2203. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2204. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  2205. public virtual int Update(string Name, int Original_ID, string Original_Name, int ID) {
  2206. if ((Name == null)) {
  2207. throw new global::System.ArgumentNullException("Name");
  2208. }
  2209. else {
  2210. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
  2211. }
  2212. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_ID));
  2213. if ((Original_Name == null)) {
  2214. throw new global::System.ArgumentNullException("Original_Name");
  2215. }
  2216. else {
  2217. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_Name));
  2218. }
  2219. this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ID));
  2220. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  2221. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2222. != global::System.Data.ConnectionState.Open)) {
  2223. this.Adapter.UpdateCommand.Connection.Open();
  2224. }
  2225. try {
  2226. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  2227. return returnValue;
  2228. }
  2229. finally {
  2230. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  2231. this.Adapter.UpdateCommand.Connection.Close();
  2232. }
  2233. }
  2234. }
  2235. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2236. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2237. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2238. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  2239. public virtual int Update(string Name, int Original_ID, string Original_Name) {
  2240. return this.Update(Name, Original_ID, Original_Name, Original_ID);
  2241. }
  2242. }
  2243. /// <summary>
  2244. ///Represents the connection and commands used to retrieve and save data.
  2245. ///</summary>
  2246. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  2247. [global::System.ComponentModel.ToolboxItem(true)]
  2248. [global::System.ComponentModel.DataObjectAttribute(true)]
  2249. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  2250. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  2251. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2252. public partial class OfficesTableAdapter : global::System.ComponentModel.Component {
  2253. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  2254. private global::System.Data.SqlClient.SqlConnection _connection;
  2255. private global::System.Data.SqlClient.SqlTransaction _transaction;
  2256. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  2257. private bool _clearBeforeFill;
  2258. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2259. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2260. public OfficesTableAdapter() {
  2261. this.ClearBeforeFill = true;
  2262. }
  2263. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2264. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2265. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  2266. get {
  2267. if ((this._adapter == null)) {
  2268. this.InitAdapter();
  2269. }
  2270. return this._adapter;
  2271. }
  2272. }
  2273. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2274. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2275. internal global::System.Data.SqlClient.SqlConnection Connection {
  2276. get {
  2277. if ((this._connection == null)) {
  2278. this.InitConnection();
  2279. }
  2280. return this._connection;
  2281. }
  2282. set {
  2283. this._connection = value;
  2284. if ((this.Adapter.InsertCommand != null)) {
  2285. this.Adapter.InsertCommand.Connection = value;
  2286. }
  2287. if ((this.Adapter.DeleteCommand != null)) {
  2288. this.Adapter.DeleteCommand.Connection = value;
  2289. }
  2290. if ((this.Adapter.UpdateCommand != null)) {
  2291. this.Adapter.UpdateCommand.Connection = value;
  2292. }
  2293. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2294. if ((this.CommandCollection[i] != null)) {
  2295. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  2296. }
  2297. }
  2298. }
  2299. }
  2300. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2301. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2302. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  2303. get {
  2304. return this._transaction;
  2305. }
  2306. set {
  2307. this._transaction = value;
  2308. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2309. this.CommandCollection[i].Transaction = this._transaction;
  2310. }
  2311. if (((this.Adapter != null)
  2312. && (this.Adapter.DeleteCommand != null))) {
  2313. this.Adapter.DeleteCommand.Transaction = this._transaction;
  2314. }
  2315. if (((this.Adapter != null)
  2316. && (this.Adapter.InsertCommand != null))) {
  2317. this.Adapter.InsertCommand.Transaction = this._transaction;
  2318. }
  2319. if (((this.Adapter != null)
  2320. && (this.Adapter.UpdateCommand != null))) {
  2321. this.Adapter.UpdateCommand.Transaction = this._transaction;
  2322. }
  2323. }
  2324. }
  2325. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2326. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2327. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  2328. get {
  2329. if ((this._commandCollection == null)) {
  2330. this.InitCommandCollection();
  2331. }
  2332. return this._commandCollection;
  2333. }
  2334. }
  2335. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2336. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2337. public bool ClearBeforeFill {
  2338. get {
  2339. return this._clearBeforeFill;
  2340. }
  2341. set {
  2342. this._clearBeforeFill = value;
  2343. }
  2344. }
  2345. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2346. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2347. private void InitAdapter() {
  2348. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  2349. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  2350. tableMapping.SourceTable = "Table";
  2351. tableMapping.DataSetTable = "Offices";
  2352. tableMapping.ColumnMappings.Add("ID", "ID");
  2353. tableMapping.ColumnMappings.Add("CountryID", "CountryID");
  2354. tableMapping.ColumnMappings.Add("Title", "Title");
  2355. tableMapping.ColumnMappings.Add("Phone", "Phone");
  2356. tableMapping.ColumnMappings.Add("Contact", "Contact");
  2357. this._adapter.TableMappings.Add(tableMapping);
  2358. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  2359. this._adapter.DeleteCommand.Connection = this.Connection;
  2360. this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Offices] WHERE (([ID] = @Original_ID) AND ([CountryID] = @Orig" +
  2361. "inal_CountryID) AND ([Title] = @Original_Title) AND ([Phone] = @Original_Phone) " +
  2362. "AND ([Contact] = @Original_Contact))";
  2363. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  2364. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2365. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CountryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountryID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2366. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2367. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2368. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Contact", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Contact", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2369. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  2370. this._adapter.InsertCommand.Connection = this.Connection;
  2371. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Offices] ([CountryID], [Title], [Phone], [Contact]) VALUES (@C" +
  2372. "ountryID, @Title, @Phone, @Contact);\r\nSELECT ID, CountryID, Title, Phone, Contac" +
  2373. "t FROM Offices WHERE (ID = SCOPE_IDENTITY())";
  2374. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  2375. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CountryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountryID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2376. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2377. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2378. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Contact", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Contact", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2379. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  2380. this._adapter.UpdateCommand.Connection = this.Connection;
  2381. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Offices] SET [CountryID] = @CountryID, [Title] = @Title, [Phone] = @Phone, [Contact] = @Contact WHERE (([ID] = @Original_ID) AND ([CountryID] = @Original_CountryID) AND ([Title] = @Original_Title) AND ([Phone] = @Original_Phone) AND ([Contact] = @Original_Contact));
  2382. SELECT ID, CountryID, Title, Phone, Contact FROM Offices WHERE (ID = @ID)";
  2383. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  2384. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CountryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountryID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2385. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2386. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2387. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Contact", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Contact", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2388. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2389. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CountryID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CountryID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2390. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2391. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Phone", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Phone", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2392. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Contact", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Contact", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2393. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2394. }
  2395. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2396. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2397. private void InitConnection() {
  2398. this._connection = new global::System.Data.SqlClient.SqlConnection();
  2399. this._connection.ConnectionString = global::AMONIC_Airlines02.Properties.Settings.Default.Session1_02ConnectionString;
  2400. }
  2401. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2402. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2403. private void InitCommandCollection() {
  2404. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  2405. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  2406. this._commandCollection[0].Connection = this.Connection;
  2407. this._commandCollection[0].CommandText = "SELECT ID, CountryID, Title, Phone, Contact FROM dbo.Offices";
  2408. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  2409. }
  2410. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2411. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2412. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2413. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  2414. public virtual int Fill(Session1_02DataSet.OfficesDataTable dataTable) {
  2415. this.Adapter.SelectCommand = this.CommandCollection[0];
  2416. if ((this.ClearBeforeFill == true)) {
  2417. dataTable.Clear();
  2418. }
  2419. int returnValue = this.Adapter.Fill(dataTable);
  2420. return returnValue;
  2421. }
  2422. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2423. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2424. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2425. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  2426. public virtual Session1_02DataSet.OfficesDataTable GetData() {
  2427. this.Adapter.SelectCommand = this.CommandCollection[0];
  2428. Session1_02DataSet.OfficesDataTable dataTable = new Session1_02DataSet.OfficesDataTable();
  2429. this.Adapter.Fill(dataTable);
  2430. return dataTable;
  2431. }
  2432. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2433. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2434. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2435. public virtual int Update(Session1_02DataSet.OfficesDataTable dataTable) {
  2436. return this.Adapter.Update(dataTable);
  2437. }
  2438. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2439. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2440. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2441. public virtual int Update(Session1_02DataSet dataSet) {
  2442. return this.Adapter.Update(dataSet, "Offices");
  2443. }
  2444. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2445. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2446. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2447. public virtual int Update(global::System.Data.DataRow dataRow) {
  2448. return this.Adapter.Update(new global::System.Data.DataRow[] {
  2449. dataRow});
  2450. }
  2451. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2452. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2453. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2454. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  2455. return this.Adapter.Update(dataRows);
  2456. }
  2457. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2458. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2459. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2460. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  2461. public virtual int Delete(int Original_ID, int Original_CountryID, string Original_Title, string Original_Phone, string Original_Contact) {
  2462. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  2463. this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_CountryID));
  2464. if ((Original_Title == null)) {
  2465. throw new global::System.ArgumentNullException("Original_Title");
  2466. }
  2467. else {
  2468. this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Title));
  2469. }
  2470. if ((Original_Phone == null)) {
  2471. throw new global::System.ArgumentNullException("Original_Phone");
  2472. }
  2473. else {
  2474. this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Phone));
  2475. }
  2476. if ((Original_Contact == null)) {
  2477. throw new global::System.ArgumentNullException("Original_Contact");
  2478. }
  2479. else {
  2480. this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Contact));
  2481. }
  2482. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  2483. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2484. != global::System.Data.ConnectionState.Open)) {
  2485. this.Adapter.DeleteCommand.Connection.Open();
  2486. }
  2487. try {
  2488. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  2489. return returnValue;
  2490. }
  2491. finally {
  2492. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  2493. this.Adapter.DeleteCommand.Connection.Close();
  2494. }
  2495. }
  2496. }
  2497. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2498. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2499. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2500. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  2501. public virtual int Insert(int CountryID, string Title, string Phone, string Contact) {
  2502. this.Adapter.InsertCommand.Parameters[0].Value = ((int)(CountryID));
  2503. if ((Title == null)) {
  2504. throw new global::System.ArgumentNullException("Title");
  2505. }
  2506. else {
  2507. this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Title));
  2508. }
  2509. if ((Phone == null)) {
  2510. throw new global::System.ArgumentNullException("Phone");
  2511. }
  2512. else {
  2513. this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Phone));
  2514. }
  2515. if ((Contact == null)) {
  2516. throw new global::System.ArgumentNullException("Contact");
  2517. }
  2518. else {
  2519. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Contact));
  2520. }
  2521. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  2522. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2523. != global::System.Data.ConnectionState.Open)) {
  2524. this.Adapter.InsertCommand.Connection.Open();
  2525. }
  2526. try {
  2527. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  2528. return returnValue;
  2529. }
  2530. finally {
  2531. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  2532. this.Adapter.InsertCommand.Connection.Close();
  2533. }
  2534. }
  2535. }
  2536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2537. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2538. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2539. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  2540. public virtual int Update(int CountryID, string Title, string Phone, string Contact, int Original_ID, int Original_CountryID, string Original_Title, string Original_Phone, string Original_Contact, int ID) {
  2541. this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(CountryID));
  2542. if ((Title == null)) {
  2543. throw new global::System.ArgumentNullException("Title");
  2544. }
  2545. else {
  2546. this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Title));
  2547. }
  2548. if ((Phone == null)) {
  2549. throw new global::System.ArgumentNullException("Phone");
  2550. }
  2551. else {
  2552. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Phone));
  2553. }
  2554. if ((Contact == null)) {
  2555. throw new global::System.ArgumentNullException("Contact");
  2556. }
  2557. else {
  2558. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Contact));
  2559. }
  2560. this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_ID));
  2561. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_CountryID));
  2562. if ((Original_Title == null)) {
  2563. throw new global::System.ArgumentNullException("Original_Title");
  2564. }
  2565. else {
  2566. this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Title));
  2567. }
  2568. if ((Original_Phone == null)) {
  2569. throw new global::System.ArgumentNullException("Original_Phone");
  2570. }
  2571. else {
  2572. this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_Phone));
  2573. }
  2574. if ((Original_Contact == null)) {
  2575. throw new global::System.ArgumentNullException("Original_Contact");
  2576. }
  2577. else {
  2578. this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_Contact));
  2579. }
  2580. this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(ID));
  2581. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  2582. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2583. != global::System.Data.ConnectionState.Open)) {
  2584. this.Adapter.UpdateCommand.Connection.Open();
  2585. }
  2586. try {
  2587. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  2588. return returnValue;
  2589. }
  2590. finally {
  2591. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  2592. this.Adapter.UpdateCommand.Connection.Close();
  2593. }
  2594. }
  2595. }
  2596. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2597. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2598. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2599. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  2600. public virtual int Update(int CountryID, string Title, string Phone, string Contact, int Original_ID, int Original_CountryID, string Original_Title, string Original_Phone, string Original_Contact) {
  2601. return this.Update(CountryID, Title, Phone, Contact, Original_ID, Original_CountryID, Original_Title, Original_Phone, Original_Contact, Original_ID);
  2602. }
  2603. }
  2604. /// <summary>
  2605. ///Represents the connection and commands used to retrieve and save data.
  2606. ///</summary>
  2607. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  2608. [global::System.ComponentModel.ToolboxItem(true)]
  2609. [global::System.ComponentModel.DataObjectAttribute(true)]
  2610. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  2611. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  2612. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2613. public partial class RolesTableAdapter : global::System.ComponentModel.Component {
  2614. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  2615. private global::System.Data.SqlClient.SqlConnection _connection;
  2616. private global::System.Data.SqlClient.SqlTransaction _transaction;
  2617. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  2618. private bool _clearBeforeFill;
  2619. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2620. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2621. public RolesTableAdapter() {
  2622. this.ClearBeforeFill = true;
  2623. }
  2624. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2625. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2626. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  2627. get {
  2628. if ((this._adapter == null)) {
  2629. this.InitAdapter();
  2630. }
  2631. return this._adapter;
  2632. }
  2633. }
  2634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2635. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2636. internal global::System.Data.SqlClient.SqlConnection Connection {
  2637. get {
  2638. if ((this._connection == null)) {
  2639. this.InitConnection();
  2640. }
  2641. return this._connection;
  2642. }
  2643. set {
  2644. this._connection = value;
  2645. if ((this.Adapter.InsertCommand != null)) {
  2646. this.Adapter.InsertCommand.Connection = value;
  2647. }
  2648. if ((this.Adapter.DeleteCommand != null)) {
  2649. this.Adapter.DeleteCommand.Connection = value;
  2650. }
  2651. if ((this.Adapter.UpdateCommand != null)) {
  2652. this.Adapter.UpdateCommand.Connection = value;
  2653. }
  2654. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2655. if ((this.CommandCollection[i] != null)) {
  2656. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  2657. }
  2658. }
  2659. }
  2660. }
  2661. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2662. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2663. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  2664. get {
  2665. return this._transaction;
  2666. }
  2667. set {
  2668. this._transaction = value;
  2669. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2670. this.CommandCollection[i].Transaction = this._transaction;
  2671. }
  2672. if (((this.Adapter != null)
  2673. && (this.Adapter.DeleteCommand != null))) {
  2674. this.Adapter.DeleteCommand.Transaction = this._transaction;
  2675. }
  2676. if (((this.Adapter != null)
  2677. && (this.Adapter.InsertCommand != null))) {
  2678. this.Adapter.InsertCommand.Transaction = this._transaction;
  2679. }
  2680. if (((this.Adapter != null)
  2681. && (this.Adapter.UpdateCommand != null))) {
  2682. this.Adapter.UpdateCommand.Transaction = this._transaction;
  2683. }
  2684. }
  2685. }
  2686. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2687. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2688. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  2689. get {
  2690. if ((this._commandCollection == null)) {
  2691. this.InitCommandCollection();
  2692. }
  2693. return this._commandCollection;
  2694. }
  2695. }
  2696. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2697. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2698. public bool ClearBeforeFill {
  2699. get {
  2700. return this._clearBeforeFill;
  2701. }
  2702. set {
  2703. this._clearBeforeFill = value;
  2704. }
  2705. }
  2706. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2707. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2708. private void InitAdapter() {
  2709. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  2710. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  2711. tableMapping.SourceTable = "Table";
  2712. tableMapping.DataSetTable = "Roles";
  2713. tableMapping.ColumnMappings.Add("ID", "ID");
  2714. tableMapping.ColumnMappings.Add("Title", "Title");
  2715. this._adapter.TableMappings.Add(tableMapping);
  2716. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  2717. this._adapter.DeleteCommand.Connection = this.Connection;
  2718. this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Roles] WHERE (([ID] = @Original_ID) AND ([Title] = @Original_T" +
  2719. "itle))";
  2720. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  2721. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2722. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2723. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  2724. this._adapter.InsertCommand.Connection = this.Connection;
  2725. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Roles] ([ID], [Title]) VALUES (@ID, @Title);\r\nSELECT ID, Title" +
  2726. " FROM Roles WHERE (ID = @ID)";
  2727. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  2728. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2729. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2730. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  2731. this._adapter.UpdateCommand.Connection = this.Connection;
  2732. this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Roles] SET [ID] = @ID, [Title] = @Title WHERE (([ID] = @Original_ID" +
  2733. ") AND ([Title] = @Original_Title));\r\nSELECT ID, Title FROM Roles WHERE (ID = @ID" +
  2734. ")";
  2735. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  2736. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2737. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  2738. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2739. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Title", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Title", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  2740. }
  2741. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2742. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2743. private void InitConnection() {
  2744. this._connection = new global::System.Data.SqlClient.SqlConnection();
  2745. this._connection.ConnectionString = global::AMONIC_Airlines02.Properties.Settings.Default.Session1_02ConnectionString;
  2746. }
  2747. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2748. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2749. private void InitCommandCollection() {
  2750. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  2751. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  2752. this._commandCollection[0].Connection = this.Connection;
  2753. this._commandCollection[0].CommandText = "SELECT ID, Title FROM dbo.Roles";
  2754. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  2755. }
  2756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2757. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2758. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2759. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  2760. public virtual int Fill(Session1_02DataSet.RolesDataTable dataTable) {
  2761. this.Adapter.SelectCommand = this.CommandCollection[0];
  2762. if ((this.ClearBeforeFill == true)) {
  2763. dataTable.Clear();
  2764. }
  2765. int returnValue = this.Adapter.Fill(dataTable);
  2766. return returnValue;
  2767. }
  2768. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2769. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2770. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2771. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  2772. public virtual Session1_02DataSet.RolesDataTable GetData() {
  2773. this.Adapter.SelectCommand = this.CommandCollection[0];
  2774. Session1_02DataSet.RolesDataTable dataTable = new Session1_02DataSet.RolesDataTable();
  2775. this.Adapter.Fill(dataTable);
  2776. return dataTable;
  2777. }
  2778. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2779. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2780. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2781. public virtual int Update(Session1_02DataSet.RolesDataTable dataTable) {
  2782. return this.Adapter.Update(dataTable);
  2783. }
  2784. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2785. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2786. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2787. public virtual int Update(Session1_02DataSet dataSet) {
  2788. return this.Adapter.Update(dataSet, "Roles");
  2789. }
  2790. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2791. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2792. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2793. public virtual int Update(global::System.Data.DataRow dataRow) {
  2794. return this.Adapter.Update(new global::System.Data.DataRow[] {
  2795. dataRow});
  2796. }
  2797. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2798. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2799. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2800. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  2801. return this.Adapter.Update(dataRows);
  2802. }
  2803. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2804. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2805. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2806. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  2807. public virtual int Delete(int Original_ID, string Original_Title) {
  2808. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  2809. if ((Original_Title == null)) {
  2810. throw new global::System.ArgumentNullException("Original_Title");
  2811. }
  2812. else {
  2813. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Title));
  2814. }
  2815. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  2816. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2817. != global::System.Data.ConnectionState.Open)) {
  2818. this.Adapter.DeleteCommand.Connection.Open();
  2819. }
  2820. try {
  2821. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  2822. return returnValue;
  2823. }
  2824. finally {
  2825. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  2826. this.Adapter.DeleteCommand.Connection.Close();
  2827. }
  2828. }
  2829. }
  2830. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2831. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2832. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2833. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  2834. public virtual int Insert(int ID, string Title) {
  2835. this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ID));
  2836. if ((Title == null)) {
  2837. throw new global::System.ArgumentNullException("Title");
  2838. }
  2839. else {
  2840. this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Title));
  2841. }
  2842. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  2843. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2844. != global::System.Data.ConnectionState.Open)) {
  2845. this.Adapter.InsertCommand.Connection.Open();
  2846. }
  2847. try {
  2848. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  2849. return returnValue;
  2850. }
  2851. finally {
  2852. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  2853. this.Adapter.InsertCommand.Connection.Close();
  2854. }
  2855. }
  2856. }
  2857. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2858. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2859. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2860. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  2861. public virtual int Update(int ID, string Title, int Original_ID, string Original_Title) {
  2862. this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ID));
  2863. if ((Title == null)) {
  2864. throw new global::System.ArgumentNullException("Title");
  2865. }
  2866. else {
  2867. this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Title));
  2868. }
  2869. this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_ID));
  2870. if ((Original_Title == null)) {
  2871. throw new global::System.ArgumentNullException("Original_Title");
  2872. }
  2873. else {
  2874. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Title));
  2875. }
  2876. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  2877. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  2878. != global::System.Data.ConnectionState.Open)) {
  2879. this.Adapter.UpdateCommand.Connection.Open();
  2880. }
  2881. try {
  2882. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  2883. return returnValue;
  2884. }
  2885. finally {
  2886. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  2887. this.Adapter.UpdateCommand.Connection.Close();
  2888. }
  2889. }
  2890. }
  2891. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2892. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2893. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2894. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  2895. public virtual int Update(string Title, int Original_ID, string Original_Title) {
  2896. return this.Update(Original_ID, Title, Original_ID, Original_Title);
  2897. }
  2898. }
  2899. /// <summary>
  2900. ///Represents the connection and commands used to retrieve and save data.
  2901. ///</summary>
  2902. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  2903. [global::System.ComponentModel.ToolboxItem(true)]
  2904. [global::System.ComponentModel.DataObjectAttribute(true)]
  2905. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  2906. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  2907. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  2908. public partial class UsersTableAdapter : global::System.ComponentModel.Component {
  2909. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  2910. private global::System.Data.SqlClient.SqlConnection _connection;
  2911. private global::System.Data.SqlClient.SqlTransaction _transaction;
  2912. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  2913. private bool _clearBeforeFill;
  2914. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2915. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2916. public UsersTableAdapter() {
  2917. this.ClearBeforeFill = true;
  2918. }
  2919. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2920. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2921. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  2922. get {
  2923. if ((this._adapter == null)) {
  2924. this.InitAdapter();
  2925. }
  2926. return this._adapter;
  2927. }
  2928. }
  2929. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2930. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2931. internal global::System.Data.SqlClient.SqlConnection Connection {
  2932. get {
  2933. if ((this._connection == null)) {
  2934. this.InitConnection();
  2935. }
  2936. return this._connection;
  2937. }
  2938. set {
  2939. this._connection = value;
  2940. if ((this.Adapter.InsertCommand != null)) {
  2941. this.Adapter.InsertCommand.Connection = value;
  2942. }
  2943. if ((this.Adapter.DeleteCommand != null)) {
  2944. this.Adapter.DeleteCommand.Connection = value;
  2945. }
  2946. if ((this.Adapter.UpdateCommand != null)) {
  2947. this.Adapter.UpdateCommand.Connection = value;
  2948. }
  2949. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2950. if ((this.CommandCollection[i] != null)) {
  2951. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  2952. }
  2953. }
  2954. }
  2955. }
  2956. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2957. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2958. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  2959. get {
  2960. return this._transaction;
  2961. }
  2962. set {
  2963. this._transaction = value;
  2964. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  2965. this.CommandCollection[i].Transaction = this._transaction;
  2966. }
  2967. if (((this.Adapter != null)
  2968. && (this.Adapter.DeleteCommand != null))) {
  2969. this.Adapter.DeleteCommand.Transaction = this._transaction;
  2970. }
  2971. if (((this.Adapter != null)
  2972. && (this.Adapter.InsertCommand != null))) {
  2973. this.Adapter.InsertCommand.Transaction = this._transaction;
  2974. }
  2975. if (((this.Adapter != null)
  2976. && (this.Adapter.UpdateCommand != null))) {
  2977. this.Adapter.UpdateCommand.Transaction = this._transaction;
  2978. }
  2979. }
  2980. }
  2981. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2982. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2983. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  2984. get {
  2985. if ((this._commandCollection == null)) {
  2986. this.InitCommandCollection();
  2987. }
  2988. return this._commandCollection;
  2989. }
  2990. }
  2991. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2992. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2993. public bool ClearBeforeFill {
  2994. get {
  2995. return this._clearBeforeFill;
  2996. }
  2997. set {
  2998. this._clearBeforeFill = value;
  2999. }
  3000. }
  3001. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3002. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3003. private void InitAdapter() {
  3004. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  3005. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  3006. tableMapping.SourceTable = "Table";
  3007. tableMapping.DataSetTable = "Users";
  3008. tableMapping.ColumnMappings.Add("ID", "ID");
  3009. tableMapping.ColumnMappings.Add("RoleID", "RoleID");
  3010. tableMapping.ColumnMappings.Add("Email", "Email");
  3011. tableMapping.ColumnMappings.Add("Password", "Password");
  3012. tableMapping.ColumnMappings.Add("FirstName", "FirstName");
  3013. tableMapping.ColumnMappings.Add("LastName", "LastName");
  3014. tableMapping.ColumnMappings.Add("OfficeID", "OfficeID");
  3015. tableMapping.ColumnMappings.Add("Birthdate", "Birthdate");
  3016. tableMapping.ColumnMappings.Add("Active", "Active");
  3017. this._adapter.TableMappings.Add(tableMapping);
  3018. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  3019. this._adapter.DeleteCommand.Connection = this.Connection;
  3020. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Users] WHERE (([ID] = @Original_ID) AND ([RoleID] = @Original_RoleID) AND ([Email] = @Original_Email) AND ([Password] = @Original_Password) AND ((@IsNull_FirstName = 1 AND [FirstName] IS NULL) OR ([FirstName] = @Original_FirstName)) AND ([LastName] = @Original_LastName) AND ((@IsNull_OfficeID = 1 AND [OfficeID] IS NULL) OR ([OfficeID] = @Original_OfficeID)) AND ((@IsNull_Birthdate = 1 AND [Birthdate] IS NULL) OR ([Birthdate] = @Original_Birthdate)) AND ((@IsNull_Active = 1 AND [Active] IS NULL) OR ([Active] = @Original_Active)))";
  3021. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  3022. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3023. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RoleID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RoleID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3024. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3025. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3026. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_FirstName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3027. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_FirstName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3028. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LastName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LastName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3029. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_OfficeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OfficeID", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3030. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OfficeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OfficeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3031. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Birthdate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Birthdate", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3032. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Birthdate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Birthdate", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3033. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Active", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Active", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3034. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Active", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Active", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3035. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  3036. this._adapter.InsertCommand.Connection = this.Connection;
  3037. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Users] ([RoleID], [Email], [Password], [FirstName], [LastName], [OfficeID], [Birthdate], [Active]) VALUES (@RoleID, @Email, @Password, @FirstName, @LastName, @OfficeID, @Birthdate, @Active);
  3038. SELECT ID, RoleID, Email, Password, FirstName, LastName, OfficeID, Birthdate, Active FROM Users WHERE (ID = SCOPE_IDENTITY())";
  3039. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  3040. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RoleID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RoleID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3041. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3042. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3043. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FirstName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3044. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LastName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LastName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3045. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OfficeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OfficeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3046. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Birthdate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Birthdate", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3047. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Active", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Active", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3048. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  3049. this._adapter.UpdateCommand.Connection = this.Connection;
  3050. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Users] SET [RoleID] = @RoleID, [Email] = @Email, [Password] = @Password, [FirstName] = @FirstName, [LastName] = @LastName, [OfficeID] = @OfficeID, [Birthdate] = @Birthdate, [Active] = @Active WHERE (([ID] = @Original_ID) AND ([RoleID] = @Original_RoleID) AND ([Email] = @Original_Email) AND ([Password] = @Original_Password) AND ((@IsNull_FirstName = 1 AND [FirstName] IS NULL) OR ([FirstName] = @Original_FirstName)) AND ([LastName] = @Original_LastName) AND ((@IsNull_OfficeID = 1 AND [OfficeID] IS NULL) OR ([OfficeID] = @Original_OfficeID)) AND ((@IsNull_Birthdate = 1 AND [Birthdate] IS NULL) OR ([Birthdate] = @Original_Birthdate)) AND ((@IsNull_Active = 1 AND [Active] IS NULL) OR ([Active] = @Original_Active)));
  3051. SELECT ID, RoleID, Email, Password, FirstName, LastName, OfficeID, Birthdate, Active FROM Users WHERE (ID = @ID)";
  3052. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  3053. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RoleID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RoleID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3054. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3055. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3056. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@FirstName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3057. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LastName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LastName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3058. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OfficeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OfficeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3059. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Birthdate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Birthdate", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3060. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Active", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Active", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3061. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3062. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RoleID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RoleID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3063. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Email", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3064. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3065. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_FirstName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3066. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_FirstName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "FirstName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3067. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LastName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LastName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3068. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_OfficeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OfficeID", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3069. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OfficeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OfficeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3070. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Birthdate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Birthdate", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3071. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Birthdate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Birthdate", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3072. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Active", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Active", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  3073. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Active", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Active", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  3074. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  3075. }
  3076. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3077. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3078. private void InitConnection() {
  3079. this._connection = new global::System.Data.SqlClient.SqlConnection();
  3080. this._connection.ConnectionString = global::AMONIC_Airlines02.Properties.Settings.Default.Session1_02ConnectionString;
  3081. }
  3082. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3083. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3084. private void InitCommandCollection() {
  3085. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  3086. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  3087. this._commandCollection[0].Connection = this.Connection;
  3088. this._commandCollection[0].CommandText = "SELECT ID, RoleID, Email, Password, FirstName, LastName, OfficeID, Birthdate, Act" +
  3089. "ive FROM dbo.Users";
  3090. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  3091. }
  3092. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3093. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3094. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3095. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  3096. public virtual int Fill(Session1_02DataSet.UsersDataTable dataTable) {
  3097. this.Adapter.SelectCommand = this.CommandCollection[0];
  3098. if ((this.ClearBeforeFill == true)) {
  3099. dataTable.Clear();
  3100. }
  3101. int returnValue = this.Adapter.Fill(dataTable);
  3102. return returnValue;
  3103. }
  3104. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3105. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3106. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3107. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  3108. public virtual Session1_02DataSet.UsersDataTable GetData() {
  3109. this.Adapter.SelectCommand = this.CommandCollection[0];
  3110. Session1_02DataSet.UsersDataTable dataTable = new Session1_02DataSet.UsersDataTable();
  3111. this.Adapter.Fill(dataTable);
  3112. return dataTable;
  3113. }
  3114. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3115. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3116. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3117. public virtual int Update(Session1_02DataSet.UsersDataTable dataTable) {
  3118. return this.Adapter.Update(dataTable);
  3119. }
  3120. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3121. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3122. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3123. public virtual int Update(Session1_02DataSet dataSet) {
  3124. return this.Adapter.Update(dataSet, "Users");
  3125. }
  3126. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3127. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3128. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3129. public virtual int Update(global::System.Data.DataRow dataRow) {
  3130. return this.Adapter.Update(new global::System.Data.DataRow[] {
  3131. dataRow});
  3132. }
  3133. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3134. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3135. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3136. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  3137. return this.Adapter.Update(dataRows);
  3138. }
  3139. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3140. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3141. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3142. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  3143. public virtual int Delete(int Original_ID, int Original_RoleID, string Original_Email, string Original_Password, string Original_FirstName, string Original_LastName, global::System.Nullable<int> Original_OfficeID, global::System.Nullable<global::System.DateTime> Original_Birthdate, global::System.Nullable<bool> Original_Active) {
  3144. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  3145. this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_RoleID));
  3146. if ((Original_Email == null)) {
  3147. throw new global::System.ArgumentNullException("Original_Email");
  3148. }
  3149. else {
  3150. this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Email));
  3151. }
  3152. if ((Original_Password == null)) {
  3153. throw new global::System.ArgumentNullException("Original_Password");
  3154. }
  3155. else {
  3156. this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Password));
  3157. }
  3158. if ((Original_FirstName == null)) {
  3159. this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1));
  3160. this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value;
  3161. }
  3162. else {
  3163. this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0));
  3164. this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_FirstName));
  3165. }
  3166. if ((Original_LastName == null)) {
  3167. throw new global::System.ArgumentNullException("Original_LastName");
  3168. }
  3169. else {
  3170. this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_LastName));
  3171. }
  3172. if ((Original_OfficeID.HasValue == true)) {
  3173. this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
  3174. this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_OfficeID.Value));
  3175. }
  3176. else {
  3177. this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
  3178. this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
  3179. }
  3180. if ((Original_Birthdate.HasValue == true)) {
  3181. this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0));
  3182. this.Adapter.DeleteCommand.Parameters[10].Value = ((System.DateTime)(Original_Birthdate.Value));
  3183. }
  3184. else {
  3185. this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1));
  3186. this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value;
  3187. }
  3188. if ((Original_Active.HasValue == true)) {
  3189. this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0));
  3190. this.Adapter.DeleteCommand.Parameters[12].Value = ((bool)(Original_Active.Value));
  3191. }
  3192. else {
  3193. this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1));
  3194. this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value;
  3195. }
  3196. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  3197. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3198. != global::System.Data.ConnectionState.Open)) {
  3199. this.Adapter.DeleteCommand.Connection.Open();
  3200. }
  3201. try {
  3202. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  3203. return returnValue;
  3204. }
  3205. finally {
  3206. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3207. this.Adapter.DeleteCommand.Connection.Close();
  3208. }
  3209. }
  3210. }
  3211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3212. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3213. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3214. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  3215. public virtual int Insert(int RoleID, string Email, string Password, string FirstName, string LastName, global::System.Nullable<int> OfficeID, global::System.Nullable<global::System.DateTime> Birthdate, global::System.Nullable<bool> Active) {
  3216. this.Adapter.InsertCommand.Parameters[0].Value = ((int)(RoleID));
  3217. if ((Email == null)) {
  3218. throw new global::System.ArgumentNullException("Email");
  3219. }
  3220. else {
  3221. this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Email));
  3222. }
  3223. if ((Password == null)) {
  3224. throw new global::System.ArgumentNullException("Password");
  3225. }
  3226. else {
  3227. this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Password));
  3228. }
  3229. if ((FirstName == null)) {
  3230. this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
  3231. }
  3232. else {
  3233. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(FirstName));
  3234. }
  3235. if ((LastName == null)) {
  3236. throw new global::System.ArgumentNullException("LastName");
  3237. }
  3238. else {
  3239. this.Adapter.InsertCommand.Parameters[4].Value = ((string)(LastName));
  3240. }
  3241. if ((OfficeID.HasValue == true)) {
  3242. this.Adapter.InsertCommand.Parameters[5].Value = ((int)(OfficeID.Value));
  3243. }
  3244. else {
  3245. this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
  3246. }
  3247. if ((Birthdate.HasValue == true)) {
  3248. this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(Birthdate.Value));
  3249. }
  3250. else {
  3251. this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value;
  3252. }
  3253. if ((Active.HasValue == true)) {
  3254. this.Adapter.InsertCommand.Parameters[7].Value = ((bool)(Active.Value));
  3255. }
  3256. else {
  3257. this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value;
  3258. }
  3259. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  3260. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3261. != global::System.Data.ConnectionState.Open)) {
  3262. this.Adapter.InsertCommand.Connection.Open();
  3263. }
  3264. try {
  3265. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  3266. return returnValue;
  3267. }
  3268. finally {
  3269. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3270. this.Adapter.InsertCommand.Connection.Close();
  3271. }
  3272. }
  3273. }
  3274. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3275. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3276. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3277. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3278. public virtual int Update(
  3279. int RoleID,
  3280. string Email,
  3281. string Password,
  3282. string FirstName,
  3283. string LastName,
  3284. global::System.Nullable<int> OfficeID,
  3285. global::System.Nullable<global::System.DateTime> Birthdate,
  3286. global::System.Nullable<bool> Active,
  3287. int Original_ID,
  3288. int Original_RoleID,
  3289. string Original_Email,
  3290. string Original_Password,
  3291. string Original_FirstName,
  3292. string Original_LastName,
  3293. global::System.Nullable<int> Original_OfficeID,
  3294. global::System.Nullable<global::System.DateTime> Original_Birthdate,
  3295. global::System.Nullable<bool> Original_Active,
  3296. int ID) {
  3297. this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(RoleID));
  3298. if ((Email == null)) {
  3299. throw new global::System.ArgumentNullException("Email");
  3300. }
  3301. else {
  3302. this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Email));
  3303. }
  3304. if ((Password == null)) {
  3305. throw new global::System.ArgumentNullException("Password");
  3306. }
  3307. else {
  3308. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Password));
  3309. }
  3310. if ((FirstName == null)) {
  3311. this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
  3312. }
  3313. else {
  3314. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(FirstName));
  3315. }
  3316. if ((LastName == null)) {
  3317. throw new global::System.ArgumentNullException("LastName");
  3318. }
  3319. else {
  3320. this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(LastName));
  3321. }
  3322. if ((OfficeID.HasValue == true)) {
  3323. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(OfficeID.Value));
  3324. }
  3325. else {
  3326. this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
  3327. }
  3328. if ((Birthdate.HasValue == true)) {
  3329. this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Birthdate.Value));
  3330. }
  3331. else {
  3332. this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
  3333. }
  3334. if ((Active.HasValue == true)) {
  3335. this.Adapter.UpdateCommand.Parameters[7].Value = ((bool)(Active.Value));
  3336. }
  3337. else {
  3338. this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value;
  3339. }
  3340. this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ID));
  3341. this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_RoleID));
  3342. if ((Original_Email == null)) {
  3343. throw new global::System.ArgumentNullException("Original_Email");
  3344. }
  3345. else {
  3346. this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Email));
  3347. }
  3348. if ((Original_Password == null)) {
  3349. throw new global::System.ArgumentNullException("Original_Password");
  3350. }
  3351. else {
  3352. this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Password));
  3353. }
  3354. if ((Original_FirstName == null)) {
  3355. this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1));
  3356. this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value;
  3357. }
  3358. else {
  3359. this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0));
  3360. this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_FirstName));
  3361. }
  3362. if ((Original_LastName == null)) {
  3363. throw new global::System.ArgumentNullException("Original_LastName");
  3364. }
  3365. else {
  3366. this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_LastName));
  3367. }
  3368. if ((Original_OfficeID.HasValue == true)) {
  3369. this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
  3370. this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(Original_OfficeID.Value));
  3371. }
  3372. else {
  3373. this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
  3374. this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value;
  3375. }
  3376. if ((Original_Birthdate.HasValue == true)) {
  3377. this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0));
  3378. this.Adapter.UpdateCommand.Parameters[18].Value = ((System.DateTime)(Original_Birthdate.Value));
  3379. }
  3380. else {
  3381. this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1));
  3382. this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value;
  3383. }
  3384. if ((Original_Active.HasValue == true)) {
  3385. this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0));
  3386. this.Adapter.UpdateCommand.Parameters[20].Value = ((bool)(Original_Active.Value));
  3387. }
  3388. else {
  3389. this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1));
  3390. this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value;
  3391. }
  3392. this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(ID));
  3393. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  3394. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  3395. != global::System.Data.ConnectionState.Open)) {
  3396. this.Adapter.UpdateCommand.Connection.Open();
  3397. }
  3398. try {
  3399. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  3400. return returnValue;
  3401. }
  3402. finally {
  3403. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  3404. this.Adapter.UpdateCommand.Connection.Close();
  3405. }
  3406. }
  3407. }
  3408. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3409. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3410. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  3411. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  3412. public virtual int Update(
  3413. int RoleID,
  3414. string Email,
  3415. string Password,
  3416. string FirstName,
  3417. string LastName,
  3418. global::System.Nullable<int> OfficeID,
  3419. global::System.Nullable<global::System.DateTime> Birthdate,
  3420. global::System.Nullable<bool> Active,
  3421. int Original_ID,
  3422. int Original_RoleID,
  3423. string Original_Email,
  3424. string Original_Password,
  3425. string Original_FirstName,
  3426. string Original_LastName,
  3427. global::System.Nullable<int> Original_OfficeID,
  3428. global::System.Nullable<global::System.DateTime> Original_Birthdate,
  3429. global::System.Nullable<bool> Original_Active) {
  3430. return this.Update(RoleID, Email, Password, FirstName, LastName, OfficeID, Birthdate, Active, Original_ID, Original_RoleID, Original_Email, Original_Password, Original_FirstName, Original_LastName, Original_OfficeID, Original_Birthdate, Original_Active, Original_ID);
  3431. }
  3432. }
  3433. /// <summary>
  3434. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  3435. ///</summary>
  3436. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  3437. [global::System.ComponentModel.ToolboxItem(true)]
  3438. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  3439. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  3440. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  3441. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  3442. private UpdateOrderOption _updateOrder;
  3443. private CountriesTableAdapter _countriesTableAdapter;
  3444. private OfficesTableAdapter _officesTableAdapter;
  3445. private RolesTableAdapter _rolesTableAdapter;
  3446. private UsersTableAdapter _usersTableAdapter;
  3447. private bool _backupDataSetBeforeUpdate;
  3448. private global::System.Data.IDbConnection _connection;
  3449. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3450. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3451. public UpdateOrderOption UpdateOrder {
  3452. get {
  3453. return this._updateOrder;
  3454. }
  3455. set {
  3456. this._updateOrder = value;
  3457. }
  3458. }
  3459. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3460. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3461. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  3462. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  3463. "a", "System.Drawing.Design.UITypeEditor")]
  3464. public CountriesTableAdapter CountriesTableAdapter {
  3465. get {
  3466. return this._countriesTableAdapter;
  3467. }
  3468. set {
  3469. this._countriesTableAdapter = value;
  3470. }
  3471. }
  3472. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3473. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3474. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  3475. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  3476. "a", "System.Drawing.Design.UITypeEditor")]
  3477. public OfficesTableAdapter OfficesTableAdapter {
  3478. get {
  3479. return this._officesTableAdapter;
  3480. }
  3481. set {
  3482. this._officesTableAdapter = value;
  3483. }
  3484. }
  3485. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3486. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3487. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  3488. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  3489. "a", "System.Drawing.Design.UITypeEditor")]
  3490. public RolesTableAdapter RolesTableAdapter {
  3491. get {
  3492. return this._rolesTableAdapter;
  3493. }
  3494. set {
  3495. this._rolesTableAdapter = value;
  3496. }
  3497. }
  3498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3499. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3500. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  3501. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  3502. "a", "System.Drawing.Design.UITypeEditor")]
  3503. public UsersTableAdapter UsersTableAdapter {
  3504. get {
  3505. return this._usersTableAdapter;
  3506. }
  3507. set {
  3508. this._usersTableAdapter = value;
  3509. }
  3510. }
  3511. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3512. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3513. public bool BackupDataSetBeforeUpdate {
  3514. get {
  3515. return this._backupDataSetBeforeUpdate;
  3516. }
  3517. set {
  3518. this._backupDataSetBeforeUpdate = value;
  3519. }
  3520. }
  3521. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3522. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3523. [global::System.ComponentModel.Browsable(false)]
  3524. public global::System.Data.IDbConnection Connection {
  3525. get {
  3526. if ((this._connection != null)) {
  3527. return this._connection;
  3528. }
  3529. if (((this._countriesTableAdapter != null)
  3530. && (this._countriesTableAdapter.Connection != null))) {
  3531. return this._countriesTableAdapter.Connection;
  3532. }
  3533. if (((this._officesTableAdapter != null)
  3534. && (this._officesTableAdapter.Connection != null))) {
  3535. return this._officesTableAdapter.Connection;
  3536. }
  3537. if (((this._rolesTableAdapter != null)
  3538. && (this._rolesTableAdapter.Connection != null))) {
  3539. return this._rolesTableAdapter.Connection;
  3540. }
  3541. if (((this._usersTableAdapter != null)
  3542. && (this._usersTableAdapter.Connection != null))) {
  3543. return this._usersTableAdapter.Connection;
  3544. }
  3545. return null;
  3546. }
  3547. set {
  3548. this._connection = value;
  3549. }
  3550. }
  3551. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3552. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3553. [global::System.ComponentModel.Browsable(false)]
  3554. public int TableAdapterInstanceCount {
  3555. get {
  3556. int count = 0;
  3557. if ((this._countriesTableAdapter != null)) {
  3558. count = (count + 1);
  3559. }
  3560. if ((this._officesTableAdapter != null)) {
  3561. count = (count + 1);
  3562. }
  3563. if ((this._rolesTableAdapter != null)) {
  3564. count = (count + 1);
  3565. }
  3566. if ((this._usersTableAdapter != null)) {
  3567. count = (count + 1);
  3568. }
  3569. return count;
  3570. }
  3571. }
  3572. /// <summary>
  3573. ///Update rows in top-down order.
  3574. ///</summary>
  3575. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3576. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3577. private int UpdateUpdatedRows(Session1_02DataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  3578. int result = 0;
  3579. if ((this._countriesTableAdapter != null)) {
  3580. global::System.Data.DataRow[] updatedRows = dataSet.Countries.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  3581. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  3582. if (((updatedRows != null)
  3583. && (0 < updatedRows.Length))) {
  3584. result = (result + this._countriesTableAdapter.Update(updatedRows));
  3585. allChangedRows.AddRange(updatedRows);
  3586. }
  3587. }
  3588. if ((this._officesTableAdapter != null)) {
  3589. global::System.Data.DataRow[] updatedRows = dataSet.Offices.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  3590. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  3591. if (((updatedRows != null)
  3592. && (0 < updatedRows.Length))) {
  3593. result = (result + this._officesTableAdapter.Update(updatedRows));
  3594. allChangedRows.AddRange(updatedRows);
  3595. }
  3596. }
  3597. if ((this._rolesTableAdapter != null)) {
  3598. global::System.Data.DataRow[] updatedRows = dataSet.Roles.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  3599. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  3600. if (((updatedRows != null)
  3601. && (0 < updatedRows.Length))) {
  3602. result = (result + this._rolesTableAdapter.Update(updatedRows));
  3603. allChangedRows.AddRange(updatedRows);
  3604. }
  3605. }
  3606. if ((this._usersTableAdapter != null)) {
  3607. global::System.Data.DataRow[] updatedRows = dataSet.Users.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  3608. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  3609. if (((updatedRows != null)
  3610. && (0 < updatedRows.Length))) {
  3611. result = (result + this._usersTableAdapter.Update(updatedRows));
  3612. allChangedRows.AddRange(updatedRows);
  3613. }
  3614. }
  3615. return result;
  3616. }
  3617. /// <summary>
  3618. ///Insert rows in top-down order.
  3619. ///</summary>
  3620. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3621. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3622. private int UpdateInsertedRows(Session1_02DataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  3623. int result = 0;
  3624. if ((this._countriesTableAdapter != null)) {
  3625. global::System.Data.DataRow[] addedRows = dataSet.Countries.Select(null, null, global::System.Data.DataViewRowState.Added);
  3626. if (((addedRows != null)
  3627. && (0 < addedRows.Length))) {
  3628. result = (result + this._countriesTableAdapter.Update(addedRows));
  3629. allAddedRows.AddRange(addedRows);
  3630. }
  3631. }
  3632. if ((this._officesTableAdapter != null)) {
  3633. global::System.Data.DataRow[] addedRows = dataSet.Offices.Select(null, null, global::System.Data.DataViewRowState.Added);
  3634. if (((addedRows != null)
  3635. && (0 < addedRows.Length))) {
  3636. result = (result + this._officesTableAdapter.Update(addedRows));
  3637. allAddedRows.AddRange(addedRows);
  3638. }
  3639. }
  3640. if ((this._rolesTableAdapter != null)) {
  3641. global::System.Data.DataRow[] addedRows = dataSet.Roles.Select(null, null, global::System.Data.DataViewRowState.Added);
  3642. if (((addedRows != null)
  3643. && (0 < addedRows.Length))) {
  3644. result = (result + this._rolesTableAdapter.Update(addedRows));
  3645. allAddedRows.AddRange(addedRows);
  3646. }
  3647. }
  3648. if ((this._usersTableAdapter != null)) {
  3649. global::System.Data.DataRow[] addedRows = dataSet.Users.Select(null, null, global::System.Data.DataViewRowState.Added);
  3650. if (((addedRows != null)
  3651. && (0 < addedRows.Length))) {
  3652. result = (result + this._usersTableAdapter.Update(addedRows));
  3653. allAddedRows.AddRange(addedRows);
  3654. }
  3655. }
  3656. return result;
  3657. }
  3658. /// <summary>
  3659. ///Delete rows in bottom-up order.
  3660. ///</summary>
  3661. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3662. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3663. private int UpdateDeletedRows(Session1_02DataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  3664. int result = 0;
  3665. if ((this._usersTableAdapter != null)) {
  3666. global::System.Data.DataRow[] deletedRows = dataSet.Users.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  3667. if (((deletedRows != null)
  3668. && (0 < deletedRows.Length))) {
  3669. result = (result + this._usersTableAdapter.Update(deletedRows));
  3670. allChangedRows.AddRange(deletedRows);
  3671. }
  3672. }
  3673. if ((this._rolesTableAdapter != null)) {
  3674. global::System.Data.DataRow[] deletedRows = dataSet.Roles.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  3675. if (((deletedRows != null)
  3676. && (0 < deletedRows.Length))) {
  3677. result = (result + this._rolesTableAdapter.Update(deletedRows));
  3678. allChangedRows.AddRange(deletedRows);
  3679. }
  3680. }
  3681. if ((this._officesTableAdapter != null)) {
  3682. global::System.Data.DataRow[] deletedRows = dataSet.Offices.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  3683. if (((deletedRows != null)
  3684. && (0 < deletedRows.Length))) {
  3685. result = (result + this._officesTableAdapter.Update(deletedRows));
  3686. allChangedRows.AddRange(deletedRows);
  3687. }
  3688. }
  3689. if ((this._countriesTableAdapter != null)) {
  3690. global::System.Data.DataRow[] deletedRows = dataSet.Countries.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  3691. if (((deletedRows != null)
  3692. && (0 < deletedRows.Length))) {
  3693. result = (result + this._countriesTableAdapter.Update(deletedRows));
  3694. allChangedRows.AddRange(deletedRows);
  3695. }
  3696. }
  3697. return result;
  3698. }
  3699. /// <summary>
  3700. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  3701. ///</summary>
  3702. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3703. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3704. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  3705. if (((updatedRows == null)
  3706. || (updatedRows.Length < 1))) {
  3707. return updatedRows;
  3708. }
  3709. if (((allAddedRows == null)
  3710. || (allAddedRows.Count < 1))) {
  3711. return updatedRows;
  3712. }
  3713. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  3714. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  3715. global::System.Data.DataRow row = updatedRows[i];
  3716. if ((allAddedRows.Contains(row) == false)) {
  3717. realUpdatedRows.Add(row);
  3718. }
  3719. }
  3720. return realUpdatedRows.ToArray();
  3721. }
  3722. /// <summary>
  3723. ///Update all changes to the dataset.
  3724. ///</summary>
  3725. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3726. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3727. public virtual int UpdateAll(Session1_02DataSet dataSet) {
  3728. if ((dataSet == null)) {
  3729. throw new global::System.ArgumentNullException("dataSet");
  3730. }
  3731. if ((dataSet.HasChanges() == false)) {
  3732. return 0;
  3733. }
  3734. if (((this._countriesTableAdapter != null)
  3735. && (this.MatchTableAdapterConnection(this._countriesTableAdapter.Connection) == false))) {
  3736. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  3737. "r, должны использовать одинаковую строку подключения.");
  3738. }
  3739. if (((this._officesTableAdapter != null)
  3740. && (this.MatchTableAdapterConnection(this._officesTableAdapter.Connection) == false))) {
  3741. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  3742. "r, должны использовать одинаковую строку подключения.");
  3743. }
  3744. if (((this._rolesTableAdapter != null)
  3745. && (this.MatchTableAdapterConnection(this._rolesTableAdapter.Connection) == false))) {
  3746. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  3747. "r, должны использовать одинаковую строку подключения.");
  3748. }
  3749. if (((this._usersTableAdapter != null)
  3750. && (this.MatchTableAdapterConnection(this._usersTableAdapter.Connection) == false))) {
  3751. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  3752. "r, должны использовать одинаковую строку подключения.");
  3753. }
  3754. global::System.Data.IDbConnection workConnection = this.Connection;
  3755. if ((workConnection == null)) {
  3756. throw new global::System.ApplicationException("TableAdapterManager не содержит сведений о подключении. Укажите для каждого адапт" +
  3757. "ера таблицы TableAdapterManager допустимый экземпляр адаптера таблицы.");
  3758. }
  3759. bool workConnOpened = false;
  3760. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  3761. == global::System.Data.ConnectionState.Broken)) {
  3762. workConnection.Close();
  3763. }
  3764. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  3765. workConnection.Open();
  3766. workConnOpened = true;
  3767. }
  3768. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  3769. if ((workTransaction == null)) {
  3770. throw new global::System.ApplicationException("Не удается начать транзакцию. Текущее соединение данных не поддерживает транзакци" +
  3771. "и или текущее состояние не позволяет начать транзакцию.");
  3772. }
  3773. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  3774. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  3775. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  3776. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  3777. int result = 0;
  3778. global::System.Data.DataSet backupDataSet = null;
  3779. if (this.BackupDataSetBeforeUpdate) {
  3780. backupDataSet = new global::System.Data.DataSet();
  3781. backupDataSet.Merge(dataSet);
  3782. }
  3783. try {
  3784. // ---- Prepare for update -----------
  3785. //
  3786. if ((this._countriesTableAdapter != null)) {
  3787. revertConnections.Add(this._countriesTableAdapter, this._countriesTableAdapter.Connection);
  3788. this._countriesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  3789. this._countriesTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  3790. if (this._countriesTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  3791. this._countriesTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  3792. adaptersWithAcceptChangesDuringUpdate.Add(this._countriesTableAdapter.Adapter);
  3793. }
  3794. }
  3795. if ((this._officesTableAdapter != null)) {
  3796. revertConnections.Add(this._officesTableAdapter, this._officesTableAdapter.Connection);
  3797. this._officesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  3798. this._officesTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  3799. if (this._officesTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  3800. this._officesTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  3801. adaptersWithAcceptChangesDuringUpdate.Add(this._officesTableAdapter.Adapter);
  3802. }
  3803. }
  3804. if ((this._rolesTableAdapter != null)) {
  3805. revertConnections.Add(this._rolesTableAdapter, this._rolesTableAdapter.Connection);
  3806. this._rolesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  3807. this._rolesTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  3808. if (this._rolesTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  3809. this._rolesTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  3810. adaptersWithAcceptChangesDuringUpdate.Add(this._rolesTableAdapter.Adapter);
  3811. }
  3812. }
  3813. if ((this._usersTableAdapter != null)) {
  3814. revertConnections.Add(this._usersTableAdapter, this._usersTableAdapter.Connection);
  3815. this._usersTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  3816. this._usersTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  3817. if (this._usersTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  3818. this._usersTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  3819. adaptersWithAcceptChangesDuringUpdate.Add(this._usersTableAdapter.Adapter);
  3820. }
  3821. }
  3822. //
  3823. //---- Perform updates -----------
  3824. //
  3825. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  3826. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  3827. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  3828. }
  3829. else {
  3830. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  3831. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  3832. }
  3833. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  3834. //
  3835. //---- Commit updates -----------
  3836. //
  3837. workTransaction.Commit();
  3838. if ((0 < allAddedRows.Count)) {
  3839. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  3840. allAddedRows.CopyTo(rows);
  3841. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  3842. global::System.Data.DataRow row = rows[i];
  3843. row.AcceptChanges();
  3844. }
  3845. }
  3846. if ((0 < allChangedRows.Count)) {
  3847. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  3848. allChangedRows.CopyTo(rows);
  3849. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  3850. global::System.Data.DataRow row = rows[i];
  3851. row.AcceptChanges();
  3852. }
  3853. }
  3854. }
  3855. catch (global::System.Exception ex) {
  3856. workTransaction.Rollback();
  3857. // ---- Restore the dataset -----------
  3858. if (this.BackupDataSetBeforeUpdate) {
  3859. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  3860. dataSet.Clear();
  3861. dataSet.Merge(backupDataSet);
  3862. }
  3863. else {
  3864. if ((0 < allAddedRows.Count)) {
  3865. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  3866. allAddedRows.CopyTo(rows);
  3867. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  3868. global::System.Data.DataRow row = rows[i];
  3869. row.AcceptChanges();
  3870. row.SetAdded();
  3871. }
  3872. }
  3873. }
  3874. throw ex;
  3875. }
  3876. finally {
  3877. if (workConnOpened) {
  3878. workConnection.Close();
  3879. }
  3880. if ((this._countriesTableAdapter != null)) {
  3881. this._countriesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._countriesTableAdapter]));
  3882. this._countriesTableAdapter.Transaction = null;
  3883. }
  3884. if ((this._officesTableAdapter != null)) {
  3885. this._officesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._officesTableAdapter]));
  3886. this._officesTableAdapter.Transaction = null;
  3887. }
  3888. if ((this._rolesTableAdapter != null)) {
  3889. this._rolesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._rolesTableAdapter]));
  3890. this._rolesTableAdapter.Transaction = null;
  3891. }
  3892. if ((this._usersTableAdapter != null)) {
  3893. this._usersTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._usersTableAdapter]));
  3894. this._usersTableAdapter.Transaction = null;
  3895. }
  3896. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  3897. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  3898. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  3899. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  3900. global::System.Data.Common.DataAdapter adapter = adapters[i];
  3901. adapter.AcceptChangesDuringUpdate = true;
  3902. }
  3903. }
  3904. }
  3905. return result;
  3906. }
  3907. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3908. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3909. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  3910. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  3911. }
  3912. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3913. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3914. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  3915. if ((this._connection != null)) {
  3916. return true;
  3917. }
  3918. if (((this.Connection == null)
  3919. || (inputConnection == null))) {
  3920. return true;
  3921. }
  3922. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  3923. return true;
  3924. }
  3925. return false;
  3926. }
  3927. /// <summary>
  3928. ///Update Order Option
  3929. ///</summary>
  3930. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3931. public enum UpdateOrderOption {
  3932. InsertUpdateDelete = 0,
  3933. UpdateInsertDelete = 1,
  3934. }
  3935. /// <summary>
  3936. ///Used to sort self-referenced table's rows
  3937. ///</summary>
  3938. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3939. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  3940. private global::System.Data.DataRelation _relation;
  3941. private int _childFirst;
  3942. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3943. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3944. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  3945. this._relation = relation;
  3946. if (childFirst) {
  3947. this._childFirst = -1;
  3948. }
  3949. else {
  3950. this._childFirst = 1;
  3951. }
  3952. }
  3953. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3954. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3955. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  3956. global::System.Diagnostics.Debug.Assert((row != null));
  3957. global::System.Data.DataRow root = row;
  3958. distance = 0;
  3959. global::System.Collections.Generic.IDictionary<global::System.Data.DataRow, global::System.Data.DataRow> traversedRows = new global::System.Collections.Generic.Dictionary<global::System.Data.DataRow, global::System.Data.DataRow>();
  3960. traversedRows[row] = row;
  3961. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  3962. for (
  3963. ; ((parent != null)
  3964. && (traversedRows.ContainsKey(parent) == false));
  3965. ) {
  3966. distance = (distance + 1);
  3967. root = parent;
  3968. traversedRows[parent] = parent;
  3969. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  3970. }
  3971. if ((distance == 0)) {
  3972. traversedRows.Clear();
  3973. traversedRows[row] = row;
  3974. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  3975. for (
  3976. ; ((parent != null)
  3977. && (traversedRows.ContainsKey(parent) == false));
  3978. ) {
  3979. distance = (distance + 1);
  3980. root = parent;
  3981. traversedRows[parent] = parent;
  3982. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  3983. }
  3984. }
  3985. return root;
  3986. }
  3987. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3988. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  3989. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  3990. if (object.ReferenceEquals(row1, row2)) {
  3991. return 0;
  3992. }
  3993. if ((row1 == null)) {
  3994. return -1;
  3995. }
  3996. if ((row2 == null)) {
  3997. return 1;
  3998. }
  3999. int distance1 = 0;
  4000. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  4001. int distance2 = 0;
  4002. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  4003. if (object.ReferenceEquals(root1, root2)) {
  4004. return (this._childFirst * distance1.CompareTo(distance2));
  4005. }
  4006. else {
  4007. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  4008. && (root2.Table != null)));
  4009. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  4010. return -1;
  4011. }
  4012. else {
  4013. return 1;
  4014. }
  4015. }
  4016. }
  4017. }
  4018. }
  4019. }
  4020. #pragma warning restore 1591