agent1DataSet.Designer.cs 116 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. // Runtime Version:4.0.30319.42000
  5. //
  6. // Changes to this file may cause incorrect behavior and will be lost if
  7. // the code is regenerated.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. #pragma warning disable 1591
  11. namespace Агенты {
  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("agent1DataSet")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class agent1DataSet : global::System.Data.DataSet {
  22. private AgentDataTable tableAgent;
  23. private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  24. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  25. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  26. public agent1DataSet() {
  27. this.BeginInit();
  28. this.InitClass();
  29. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  30. base.Tables.CollectionChanged += schemaChangedHandler;
  31. base.Relations.CollectionChanged += schemaChangedHandler;
  32. this.EndInit();
  33. }
  34. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  35. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  36. protected agent1DataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  37. base(info, context, false) {
  38. if ((this.IsBinarySerialized(info, context) == true)) {
  39. this.InitVars(false);
  40. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  41. this.Tables.CollectionChanged += schemaChangedHandler1;
  42. this.Relations.CollectionChanged += schemaChangedHandler1;
  43. return;
  44. }
  45. string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
  46. if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  47. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  48. ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  49. if ((ds.Tables["Agent"] != null)) {
  50. base.Tables.Add(new AgentDataTable(ds.Tables["Agent"]));
  51. }
  52. this.DataSetName = ds.DataSetName;
  53. this.Prefix = ds.Prefix;
  54. this.Namespace = ds.Namespace;
  55. this.Locale = ds.Locale;
  56. this.CaseSensitive = ds.CaseSensitive;
  57. this.EnforceConstraints = ds.EnforceConstraints;
  58. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  59. this.InitVars();
  60. }
  61. else {
  62. this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  63. }
  64. this.GetSerializationData(info, context);
  65. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  66. base.Tables.CollectionChanged += schemaChangedHandler;
  67. this.Relations.CollectionChanged += schemaChangedHandler;
  68. }
  69. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  70. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  71. [global::System.ComponentModel.Browsable(false)]
  72. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  73. public AgentDataTable Agent {
  74. get {
  75. return this.tableAgent;
  76. }
  77. }
  78. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  79. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  80. [global::System.ComponentModel.BrowsableAttribute(true)]
  81. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
  82. public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
  83. get {
  84. return this._schemaSerializationMode;
  85. }
  86. set {
  87. this._schemaSerializationMode = value;
  88. }
  89. }
  90. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  91. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  92. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  93. public new global::System.Data.DataTableCollection Tables {
  94. get {
  95. return base.Tables;
  96. }
  97. }
  98. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  99. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  100. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  101. public new global::System.Data.DataRelationCollection Relations {
  102. get {
  103. return base.Relations;
  104. }
  105. }
  106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  107. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  108. protected override void InitializeDerivedDataSet() {
  109. this.BeginInit();
  110. this.InitClass();
  111. this.EndInit();
  112. }
  113. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  114. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  115. public override global::System.Data.DataSet Clone() {
  116. agent1DataSet cln = ((agent1DataSet)(base.Clone()));
  117. cln.InitVars();
  118. cln.SchemaSerializationMode = this.SchemaSerializationMode;
  119. return cln;
  120. }
  121. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  122. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  123. protected override bool ShouldSerializeTables() {
  124. return false;
  125. }
  126. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  127. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  128. protected override bool ShouldSerializeRelations() {
  129. return false;
  130. }
  131. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  132. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  133. protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
  134. if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  135. this.Reset();
  136. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  137. ds.ReadXml(reader);
  138. if ((ds.Tables["Agent"] != null)) {
  139. base.Tables.Add(new AgentDataTable(ds.Tables["Agent"]));
  140. }
  141. this.DataSetName = ds.DataSetName;
  142. this.Prefix = ds.Prefix;
  143. this.Namespace = ds.Namespace;
  144. this.Locale = ds.Locale;
  145. this.CaseSensitive = ds.CaseSensitive;
  146. this.EnforceConstraints = ds.EnforceConstraints;
  147. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  148. this.InitVars();
  149. }
  150. else {
  151. this.ReadXml(reader);
  152. this.InitVars();
  153. }
  154. }
  155. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  156. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  157. protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
  158. global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
  159. this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
  160. stream.Position = 0;
  161. return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
  162. }
  163. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  164. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  165. internal void InitVars() {
  166. this.InitVars(true);
  167. }
  168. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  169. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  170. internal void InitVars(bool initTable) {
  171. this.tableAgent = ((AgentDataTable)(base.Tables["Agent"]));
  172. if ((initTable == true)) {
  173. if ((this.tableAgent != null)) {
  174. this.tableAgent.InitVars();
  175. }
  176. }
  177. }
  178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  179. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  180. private void InitClass() {
  181. this.DataSetName = "agent1DataSet";
  182. this.Prefix = "";
  183. this.Namespace = "http://tempuri.org/agent1DataSet.xsd";
  184. this.EnforceConstraints = true;
  185. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  186. this.tableAgent = new AgentDataTable();
  187. base.Tables.Add(this.tableAgent);
  188. }
  189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  190. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  191. private bool ShouldSerializeAgent() {
  192. return false;
  193. }
  194. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  195. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  196. private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
  197. if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
  198. this.InitVars();
  199. }
  200. }
  201. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  202. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  203. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  204. agent1DataSet ds = new agent1DataSet();
  205. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  206. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  207. global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
  208. any.Namespace = ds.Namespace;
  209. sequence.Items.Add(any);
  210. type.Particle = sequence;
  211. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  212. if (xs.Contains(dsSchema.TargetNamespace)) {
  213. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  214. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  215. try {
  216. global::System.Xml.Schema.XmlSchema schema = null;
  217. dsSchema.Write(s1);
  218. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  219. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  220. s2.SetLength(0);
  221. schema.Write(s2);
  222. if ((s1.Length == s2.Length)) {
  223. s1.Position = 0;
  224. s2.Position = 0;
  225. for (; ((s1.Position != s1.Length)
  226. && (s1.ReadByte() == s2.ReadByte())); ) {
  227. ;
  228. }
  229. if ((s1.Position == s1.Length)) {
  230. return type;
  231. }
  232. }
  233. }
  234. }
  235. finally {
  236. if ((s1 != null)) {
  237. s1.Close();
  238. }
  239. if ((s2 != null)) {
  240. s2.Close();
  241. }
  242. }
  243. }
  244. xs.Add(dsSchema);
  245. return type;
  246. }
  247. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  248. public delegate void AgentRowChangeEventHandler(object sender, AgentRowChangeEvent e);
  249. /// <summary>
  250. ///Represents the strongly named DataTable class.
  251. ///</summary>
  252. [global::System.Serializable()]
  253. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  254. public partial class AgentDataTable : global::System.Data.TypedTableBase<AgentRow> {
  255. private global::System.Data.DataColumn columnID;
  256. private global::System.Data.DataColumn columnTitle;
  257. private global::System.Data.DataColumn columnAgentTypeID;
  258. private global::System.Data.DataColumn columnAddress;
  259. private global::System.Data.DataColumn columnINN;
  260. private global::System.Data.DataColumn columnKPP;
  261. private global::System.Data.DataColumn columnDirectorName;
  262. private global::System.Data.DataColumn columnPhone;
  263. private global::System.Data.DataColumn columnEmail;
  264. private global::System.Data.DataColumn columnLogo;
  265. private global::System.Data.DataColumn columnPriority;
  266. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  267. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  268. public AgentDataTable() {
  269. this.TableName = "Agent";
  270. this.BeginInit();
  271. this.InitClass();
  272. this.EndInit();
  273. }
  274. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  275. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  276. internal AgentDataTable(global::System.Data.DataTable table) {
  277. this.TableName = table.TableName;
  278. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  279. this.CaseSensitive = table.CaseSensitive;
  280. }
  281. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  282. this.Locale = table.Locale;
  283. }
  284. if ((table.Namespace != table.DataSet.Namespace)) {
  285. this.Namespace = table.Namespace;
  286. }
  287. this.Prefix = table.Prefix;
  288. this.MinimumCapacity = table.MinimumCapacity;
  289. }
  290. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  291. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  292. protected AgentDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  293. base(info, context) {
  294. this.InitVars();
  295. }
  296. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  297. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  298. public global::System.Data.DataColumn IDColumn {
  299. get {
  300. return this.columnID;
  301. }
  302. }
  303. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  304. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  305. public global::System.Data.DataColumn TitleColumn {
  306. get {
  307. return this.columnTitle;
  308. }
  309. }
  310. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  311. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  312. public global::System.Data.DataColumn AgentTypeIDColumn {
  313. get {
  314. return this.columnAgentTypeID;
  315. }
  316. }
  317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  318. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  319. public global::System.Data.DataColumn AddressColumn {
  320. get {
  321. return this.columnAddress;
  322. }
  323. }
  324. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  325. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  326. public global::System.Data.DataColumn INNColumn {
  327. get {
  328. return this.columnINN;
  329. }
  330. }
  331. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  332. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  333. public global::System.Data.DataColumn KPPColumn {
  334. get {
  335. return this.columnKPP;
  336. }
  337. }
  338. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  339. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  340. public global::System.Data.DataColumn DirectorNameColumn {
  341. get {
  342. return this.columnDirectorName;
  343. }
  344. }
  345. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  346. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  347. public global::System.Data.DataColumn PhoneColumn {
  348. get {
  349. return this.columnPhone;
  350. }
  351. }
  352. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  353. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  354. public global::System.Data.DataColumn EmailColumn {
  355. get {
  356. return this.columnEmail;
  357. }
  358. }
  359. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  360. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  361. public global::System.Data.DataColumn LogoColumn {
  362. get {
  363. return this.columnLogo;
  364. }
  365. }
  366. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  367. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  368. public global::System.Data.DataColumn PriorityColumn {
  369. get {
  370. return this.columnPriority;
  371. }
  372. }
  373. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  374. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  375. [global::System.ComponentModel.Browsable(false)]
  376. public int Count {
  377. get {
  378. return this.Rows.Count;
  379. }
  380. }
  381. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  382. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  383. public AgentRow this[int index] {
  384. get {
  385. return ((AgentRow)(this.Rows[index]));
  386. }
  387. }
  388. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  389. public event AgentRowChangeEventHandler AgentRowChanging;
  390. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  391. public event AgentRowChangeEventHandler AgentRowChanged;
  392. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  393. public event AgentRowChangeEventHandler AgentRowDeleting;
  394. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  395. public event AgentRowChangeEventHandler AgentRowDeleted;
  396. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  397. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  398. public void AddAgentRow(AgentRow row) {
  399. this.Rows.Add(row);
  400. }
  401. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  402. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  403. public AgentRow AddAgentRow(string Title, int AgentTypeID, string Address, string INN, string KPP, string DirectorName, string Phone, string Email, string Logo, int Priority) {
  404. AgentRow rowAgentRow = ((AgentRow)(this.NewRow()));
  405. object[] columnValuesArray = new object[] {
  406. null,
  407. Title,
  408. AgentTypeID,
  409. Address,
  410. INN,
  411. KPP,
  412. DirectorName,
  413. Phone,
  414. Email,
  415. Logo,
  416. Priority};
  417. rowAgentRow.ItemArray = columnValuesArray;
  418. this.Rows.Add(rowAgentRow);
  419. return rowAgentRow;
  420. }
  421. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  422. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  423. public AgentRow FindByID(int ID) {
  424. return ((AgentRow)(this.Rows.Find(new object[] {
  425. ID})));
  426. }
  427. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  428. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  429. public override global::System.Data.DataTable Clone() {
  430. AgentDataTable cln = ((AgentDataTable)(base.Clone()));
  431. cln.InitVars();
  432. return cln;
  433. }
  434. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  435. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  436. protected override global::System.Data.DataTable CreateInstance() {
  437. return new AgentDataTable();
  438. }
  439. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  440. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  441. internal void InitVars() {
  442. this.columnID = base.Columns["ID"];
  443. this.columnTitle = base.Columns["Title"];
  444. this.columnAgentTypeID = base.Columns["AgentTypeID"];
  445. this.columnAddress = base.Columns["Address"];
  446. this.columnINN = base.Columns["INN"];
  447. this.columnKPP = base.Columns["KPP"];
  448. this.columnDirectorName = base.Columns["DirectorName"];
  449. this.columnPhone = base.Columns["Phone"];
  450. this.columnEmail = base.Columns["Email"];
  451. this.columnLogo = base.Columns["Logo"];
  452. this.columnPriority = base.Columns["Priority"];
  453. }
  454. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  455. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  456. private void InitClass() {
  457. this.columnID = new global::System.Data.DataColumn("ID", typeof(int), null, global::System.Data.MappingType.Element);
  458. base.Columns.Add(this.columnID);
  459. this.columnTitle = new global::System.Data.DataColumn("Title", typeof(string), null, global::System.Data.MappingType.Element);
  460. base.Columns.Add(this.columnTitle);
  461. this.columnAgentTypeID = new global::System.Data.DataColumn("AgentTypeID", typeof(int), null, global::System.Data.MappingType.Element);
  462. base.Columns.Add(this.columnAgentTypeID);
  463. this.columnAddress = new global::System.Data.DataColumn("Address", typeof(string), null, global::System.Data.MappingType.Element);
  464. base.Columns.Add(this.columnAddress);
  465. this.columnINN = new global::System.Data.DataColumn("INN", typeof(string), null, global::System.Data.MappingType.Element);
  466. base.Columns.Add(this.columnINN);
  467. this.columnKPP = new global::System.Data.DataColumn("KPP", typeof(string), null, global::System.Data.MappingType.Element);
  468. base.Columns.Add(this.columnKPP);
  469. this.columnDirectorName = new global::System.Data.DataColumn("DirectorName", typeof(string), null, global::System.Data.MappingType.Element);
  470. base.Columns.Add(this.columnDirectorName);
  471. this.columnPhone = new global::System.Data.DataColumn("Phone", typeof(string), null, global::System.Data.MappingType.Element);
  472. base.Columns.Add(this.columnPhone);
  473. this.columnEmail = new global::System.Data.DataColumn("Email", typeof(string), null, global::System.Data.MappingType.Element);
  474. base.Columns.Add(this.columnEmail);
  475. this.columnLogo = new global::System.Data.DataColumn("Logo", typeof(string), null, global::System.Data.MappingType.Element);
  476. base.Columns.Add(this.columnLogo);
  477. this.columnPriority = new global::System.Data.DataColumn("Priority", typeof(int), null, global::System.Data.MappingType.Element);
  478. base.Columns.Add(this.columnPriority);
  479. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  480. this.columnID}, true));
  481. this.columnID.AutoIncrement = true;
  482. this.columnID.AutoIncrementSeed = -1;
  483. this.columnID.AutoIncrementStep = -1;
  484. this.columnID.AllowDBNull = false;
  485. this.columnID.ReadOnly = true;
  486. this.columnID.Unique = true;
  487. this.columnTitle.AllowDBNull = false;
  488. this.columnTitle.MaxLength = 150;
  489. this.columnAgentTypeID.AllowDBNull = false;
  490. this.columnAddress.MaxLength = 300;
  491. this.columnINN.AllowDBNull = false;
  492. this.columnINN.MaxLength = 12;
  493. this.columnKPP.MaxLength = 9;
  494. this.columnDirectorName.MaxLength = 100;
  495. this.columnPhone.AllowDBNull = false;
  496. this.columnPhone.MaxLength = 20;
  497. this.columnEmail.MaxLength = 255;
  498. this.columnLogo.MaxLength = 100;
  499. this.columnPriority.AllowDBNull = false;
  500. }
  501. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  502. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  503. public AgentRow NewAgentRow() {
  504. return ((AgentRow)(this.NewRow()));
  505. }
  506. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  507. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  508. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  509. return new AgentRow(builder);
  510. }
  511. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  512. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  513. protected override global::System.Type GetRowType() {
  514. return typeof(AgentRow);
  515. }
  516. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  517. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  518. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  519. base.OnRowChanged(e);
  520. if ((this.AgentRowChanged != null)) {
  521. this.AgentRowChanged(this, new AgentRowChangeEvent(((AgentRow)(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 OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  527. base.OnRowChanging(e);
  528. if ((this.AgentRowChanging != null)) {
  529. this.AgentRowChanging(this, new AgentRowChangeEvent(((AgentRow)(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 OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  535. base.OnRowDeleted(e);
  536. if ((this.AgentRowDeleted != null)) {
  537. this.AgentRowDeleted(this, new AgentRowChangeEvent(((AgentRow)(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. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  543. base.OnRowDeleting(e);
  544. if ((this.AgentRowDeleting != null)) {
  545. this.AgentRowDeleting(this, new AgentRowChangeEvent(((AgentRow)(e.Row)), e.Action));
  546. }
  547. }
  548. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  549. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  550. public void RemoveAgentRow(AgentRow row) {
  551. this.Rows.Remove(row);
  552. }
  553. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  554. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  555. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  556. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  557. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  558. agent1DataSet ds = new agent1DataSet();
  559. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  560. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  561. any1.MinOccurs = new decimal(0);
  562. any1.MaxOccurs = decimal.MaxValue;
  563. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  564. sequence.Items.Add(any1);
  565. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  566. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  567. any2.MinOccurs = new decimal(1);
  568. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  569. sequence.Items.Add(any2);
  570. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  571. attribute1.Name = "namespace";
  572. attribute1.FixedValue = ds.Namespace;
  573. type.Attributes.Add(attribute1);
  574. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  575. attribute2.Name = "tableTypeName";
  576. attribute2.FixedValue = "AgentDataTable";
  577. type.Attributes.Add(attribute2);
  578. type.Particle = sequence;
  579. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  580. if (xs.Contains(dsSchema.TargetNamespace)) {
  581. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  582. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  583. try {
  584. global::System.Xml.Schema.XmlSchema schema = null;
  585. dsSchema.Write(s1);
  586. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  587. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  588. s2.SetLength(0);
  589. schema.Write(s2);
  590. if ((s1.Length == s2.Length)) {
  591. s1.Position = 0;
  592. s2.Position = 0;
  593. for (; ((s1.Position != s1.Length)
  594. && (s1.ReadByte() == s2.ReadByte())); ) {
  595. ;
  596. }
  597. if ((s1.Position == s1.Length)) {
  598. return type;
  599. }
  600. }
  601. }
  602. }
  603. finally {
  604. if ((s1 != null)) {
  605. s1.Close();
  606. }
  607. if ((s2 != null)) {
  608. s2.Close();
  609. }
  610. }
  611. }
  612. xs.Add(dsSchema);
  613. return type;
  614. }
  615. }
  616. /// <summary>
  617. ///Represents strongly named DataRow class.
  618. ///</summary>
  619. public partial class AgentRow : global::System.Data.DataRow {
  620. private AgentDataTable tableAgent;
  621. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  622. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  623. internal AgentRow(global::System.Data.DataRowBuilder rb) :
  624. base(rb) {
  625. this.tableAgent = ((AgentDataTable)(this.Table));
  626. }
  627. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  628. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  629. public int ID {
  630. get {
  631. return ((int)(this[this.tableAgent.IDColumn]));
  632. }
  633. set {
  634. this[this.tableAgent.IDColumn] = value;
  635. }
  636. }
  637. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  638. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  639. public string Title {
  640. get {
  641. return ((string)(this[this.tableAgent.TitleColumn]));
  642. }
  643. set {
  644. this[this.tableAgent.TitleColumn] = value;
  645. }
  646. }
  647. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  648. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  649. public int AgentTypeID {
  650. get {
  651. return ((int)(this[this.tableAgent.AgentTypeIDColumn]));
  652. }
  653. set {
  654. this[this.tableAgent.AgentTypeIDColumn] = value;
  655. }
  656. }
  657. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  658. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  659. public string Address {
  660. get {
  661. try {
  662. return ((string)(this[this.tableAgent.AddressColumn]));
  663. }
  664. catch (global::System.InvalidCastException e) {
  665. throw new global::System.Data.StrongTypingException("The value for column \'Address\' in table \'Agent\' is DBNull.", e);
  666. }
  667. }
  668. set {
  669. this[this.tableAgent.AddressColumn] = value;
  670. }
  671. }
  672. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  673. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  674. public string INN {
  675. get {
  676. return ((string)(this[this.tableAgent.INNColumn]));
  677. }
  678. set {
  679. this[this.tableAgent.INNColumn] = value;
  680. }
  681. }
  682. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  683. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  684. public string KPP {
  685. get {
  686. try {
  687. return ((string)(this[this.tableAgent.KPPColumn]));
  688. }
  689. catch (global::System.InvalidCastException e) {
  690. throw new global::System.Data.StrongTypingException("The value for column \'KPP\' in table \'Agent\' is DBNull.", e);
  691. }
  692. }
  693. set {
  694. this[this.tableAgent.KPPColumn] = value;
  695. }
  696. }
  697. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  698. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  699. public string DirectorName {
  700. get {
  701. try {
  702. return ((string)(this[this.tableAgent.DirectorNameColumn]));
  703. }
  704. catch (global::System.InvalidCastException e) {
  705. throw new global::System.Data.StrongTypingException("The value for column \'DirectorName\' in table \'Agent\' is DBNull.", e);
  706. }
  707. }
  708. set {
  709. this[this.tableAgent.DirectorNameColumn] = value;
  710. }
  711. }
  712. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  713. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  714. public string Phone {
  715. get {
  716. return ((string)(this[this.tableAgent.PhoneColumn]));
  717. }
  718. set {
  719. this[this.tableAgent.PhoneColumn] = value;
  720. }
  721. }
  722. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  723. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  724. public string Email {
  725. get {
  726. try {
  727. return ((string)(this[this.tableAgent.EmailColumn]));
  728. }
  729. catch (global::System.InvalidCastException e) {
  730. throw new global::System.Data.StrongTypingException("The value for column \'Email\' in table \'Agent\' is DBNull.", e);
  731. }
  732. }
  733. set {
  734. this[this.tableAgent.EmailColumn] = value;
  735. }
  736. }
  737. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  738. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  739. public string Logo {
  740. get {
  741. try {
  742. return ((string)(this[this.tableAgent.LogoColumn]));
  743. }
  744. catch (global::System.InvalidCastException e) {
  745. throw new global::System.Data.StrongTypingException("The value for column \'Logo\' in table \'Agent\' is DBNull.", e);
  746. }
  747. }
  748. set {
  749. this[this.tableAgent.LogoColumn] = value;
  750. }
  751. }
  752. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  753. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  754. public int Priority {
  755. get {
  756. return ((int)(this[this.tableAgent.PriorityColumn]));
  757. }
  758. set {
  759. this[this.tableAgent.PriorityColumn] = value;
  760. }
  761. }
  762. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  763. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  764. public bool IsAddressNull() {
  765. return this.IsNull(this.tableAgent.AddressColumn);
  766. }
  767. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  768. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  769. public void SetAddressNull() {
  770. this[this.tableAgent.AddressColumn] = global::System.Convert.DBNull;
  771. }
  772. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  773. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  774. public bool IsKPPNull() {
  775. return this.IsNull(this.tableAgent.KPPColumn);
  776. }
  777. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  778. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  779. public void SetKPPNull() {
  780. this[this.tableAgent.KPPColumn] = global::System.Convert.DBNull;
  781. }
  782. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  783. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  784. public bool IsDirectorNameNull() {
  785. return this.IsNull(this.tableAgent.DirectorNameColumn);
  786. }
  787. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  788. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  789. public void SetDirectorNameNull() {
  790. this[this.tableAgent.DirectorNameColumn] = global::System.Convert.DBNull;
  791. }
  792. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  793. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  794. public bool IsEmailNull() {
  795. return this.IsNull(this.tableAgent.EmailColumn);
  796. }
  797. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  798. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  799. public void SetEmailNull() {
  800. this[this.tableAgent.EmailColumn] = global::System.Convert.DBNull;
  801. }
  802. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  803. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  804. public bool IsLogoNull() {
  805. return this.IsNull(this.tableAgent.LogoColumn);
  806. }
  807. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  808. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  809. public void SetLogoNull() {
  810. this[this.tableAgent.LogoColumn] = global::System.Convert.DBNull;
  811. }
  812. }
  813. /// <summary>
  814. ///Row event argument class
  815. ///</summary>
  816. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  817. public class AgentRowChangeEvent : global::System.EventArgs {
  818. private AgentRow eventRow;
  819. private global::System.Data.DataRowAction eventAction;
  820. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  821. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  822. public AgentRowChangeEvent(AgentRow row, global::System.Data.DataRowAction action) {
  823. this.eventRow = row;
  824. this.eventAction = action;
  825. }
  826. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  827. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  828. public AgentRow Row {
  829. get {
  830. return this.eventRow;
  831. }
  832. }
  833. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  834. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  835. public global::System.Data.DataRowAction Action {
  836. get {
  837. return this.eventAction;
  838. }
  839. }
  840. }
  841. }
  842. }
  843. namespace Агенты.agent1DataSetTableAdapters {
  844. /// <summary>
  845. ///Represents the connection and commands used to retrieve and save data.
  846. ///</summary>
  847. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  848. [global::System.ComponentModel.ToolboxItem(true)]
  849. [global::System.ComponentModel.DataObjectAttribute(true)]
  850. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  851. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  852. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  853. public partial class AgentTableAdapter : global::System.ComponentModel.Component {
  854. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  855. private global::System.Data.SqlClient.SqlConnection _connection;
  856. private global::System.Data.SqlClient.SqlTransaction _transaction;
  857. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  858. private bool _clearBeforeFill;
  859. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  860. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  861. public AgentTableAdapter() {
  862. this.ClearBeforeFill = true;
  863. }
  864. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  865. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  866. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  867. get {
  868. if ((this._adapter == null)) {
  869. this.InitAdapter();
  870. }
  871. return this._adapter;
  872. }
  873. }
  874. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  875. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  876. internal global::System.Data.SqlClient.SqlConnection Connection {
  877. get {
  878. if ((this._connection == null)) {
  879. this.InitConnection();
  880. }
  881. return this._connection;
  882. }
  883. set {
  884. this._connection = value;
  885. if ((this.Adapter.InsertCommand != null)) {
  886. this.Adapter.InsertCommand.Connection = value;
  887. }
  888. if ((this.Adapter.DeleteCommand != null)) {
  889. this.Adapter.DeleteCommand.Connection = value;
  890. }
  891. if ((this.Adapter.UpdateCommand != null)) {
  892. this.Adapter.UpdateCommand.Connection = value;
  893. }
  894. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  895. if ((this.CommandCollection[i] != null)) {
  896. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  897. }
  898. }
  899. }
  900. }
  901. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  902. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  903. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  904. get {
  905. return this._transaction;
  906. }
  907. set {
  908. this._transaction = value;
  909. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  910. this.CommandCollection[i].Transaction = this._transaction;
  911. }
  912. if (((this.Adapter != null)
  913. && (this.Adapter.DeleteCommand != null))) {
  914. this.Adapter.DeleteCommand.Transaction = this._transaction;
  915. }
  916. if (((this.Adapter != null)
  917. && (this.Adapter.InsertCommand != null))) {
  918. this.Adapter.InsertCommand.Transaction = this._transaction;
  919. }
  920. if (((this.Adapter != null)
  921. && (this.Adapter.UpdateCommand != null))) {
  922. this.Adapter.UpdateCommand.Transaction = this._transaction;
  923. }
  924. }
  925. }
  926. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  927. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  928. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  929. get {
  930. if ((this._commandCollection == null)) {
  931. this.InitCommandCollection();
  932. }
  933. return this._commandCollection;
  934. }
  935. }
  936. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  937. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  938. public bool ClearBeforeFill {
  939. get {
  940. return this._clearBeforeFill;
  941. }
  942. set {
  943. this._clearBeforeFill = value;
  944. }
  945. }
  946. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  947. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  948. private void InitAdapter() {
  949. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  950. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  951. tableMapping.SourceTable = "Table";
  952. tableMapping.DataSetTable = "Agent";
  953. tableMapping.ColumnMappings.Add("ID", "ID");
  954. tableMapping.ColumnMappings.Add("Title", "Title");
  955. tableMapping.ColumnMappings.Add("AgentTypeID", "AgentTypeID");
  956. tableMapping.ColumnMappings.Add("Address", "Address");
  957. tableMapping.ColumnMappings.Add("INN", "INN");
  958. tableMapping.ColumnMappings.Add("KPP", "KPP");
  959. tableMapping.ColumnMappings.Add("DirectorName", "DirectorName");
  960. tableMapping.ColumnMappings.Add("Phone", "Phone");
  961. tableMapping.ColumnMappings.Add("Email", "Email");
  962. tableMapping.ColumnMappings.Add("Logo", "Logo");
  963. tableMapping.ColumnMappings.Add("Priority", "Priority");
  964. this._adapter.TableMappings.Add(tableMapping);
  965. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  966. this._adapter.DeleteCommand.Connection = this.Connection;
  967. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Agent] WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([AgentTypeID] = @Original_AgentTypeID) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ([INN] = @Original_INN) AND ((@IsNull_KPP = 1 AND [KPP] IS NULL) OR ([KPP] = @Original_KPP)) AND ((@IsNull_DirectorName = 1 AND [DirectorName] IS NULL) OR ([DirectorName] = @Original_DirectorName)) AND ([Phone] = @Original_Phone) AND ((@IsNull_Email = 1 AND [Email] IS NULL) OR ([Email] = @Original_Email)) AND ((@IsNull_Logo = 1 AND [Logo] IS NULL) OR ([Logo] = @Original_Logo)) AND ([Priority] = @Original_Priority))";
  968. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  969. 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, "", "", ""));
  970. 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, "", "", ""));
  971. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  972. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  973. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  974. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  975. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_KPP", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  976. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  977. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DirectorName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  978. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  979. 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, "", "", ""));
  980. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Email", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  981. 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, "", "", ""));
  982. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Logo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  983. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  984. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  985. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  986. this._adapter.InsertCommand.Connection = this.Connection;
  987. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Agent] ([Title], [AgentTypeID], [Address], [INN], [KPP], [DirectorName], [Phone], [Email], [Logo], [Priority]) VALUES (@Title, @AgentTypeID, @Address, @INN, @KPP, @DirectorName, @Phone, @Email, @Logo, @Priority);
  988. SELECT ID, Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority FROM Agent WHERE (ID = SCOPE_IDENTITY())";
  989. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  990. 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, "", "", ""));
  991. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  992. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  993. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  994. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  995. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  996. 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, "", "", ""));
  997. 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, "", "", ""));
  998. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  999. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1000. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  1001. this._adapter.UpdateCommand.Connection = this.Connection;
  1002. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Agent] SET [Title] = @Title, [AgentTypeID] = @AgentTypeID, [Address] = @Address, [INN] = @INN, [KPP] = @KPP, [DirectorName] = @DirectorName, [Phone] = @Phone, [Email] = @Email, [Logo] = @Logo, [Priority] = @Priority WHERE (([ID] = @Original_ID) AND ([Title] = @Original_Title) AND ([AgentTypeID] = @Original_AgentTypeID) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ([INN] = @Original_INN) AND ((@IsNull_KPP = 1 AND [KPP] IS NULL) OR ([KPP] = @Original_KPP)) AND ((@IsNull_DirectorName = 1 AND [DirectorName] IS NULL) OR ([DirectorName] = @Original_DirectorName)) AND ([Phone] = @Original_Phone) AND ((@IsNull_Email = 1 AND [Email] IS NULL) OR ([Email] = @Original_Email)) AND ((@IsNull_Logo = 1 AND [Logo] IS NULL) OR ([Logo] = @Original_Logo)) AND ([Priority] = @Original_Priority));
  1003. SELECT ID, Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority FROM Agent WHERE (ID = @ID)";
  1004. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  1005. 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, "", "", ""));
  1006. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1007. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1008. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1009. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1010. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1011. 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, "", "", ""));
  1012. 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, "", "", ""));
  1013. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1014. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1015. 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, "", "", ""));
  1016. 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, "", "", ""));
  1017. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AgentTypeID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AgentTypeID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1018. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Address", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1019. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Address", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Address", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1020. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_INN", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "INN", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1021. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_KPP", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1022. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_KPP", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "KPP", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1023. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DirectorName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1024. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DirectorName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DirectorName", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1025. 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, "", "", ""));
  1026. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Email", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Email", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1027. 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, "", "", ""));
  1028. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Logo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1029. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Logo", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Logo", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1030. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Priority", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Priority", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1031. 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, "", "", ""));
  1032. }
  1033. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1034. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1035. private void InitConnection() {
  1036. this._connection = new global::System.Data.SqlClient.SqlConnection();
  1037. this._connection.ConnectionString = global::Агенты.Properties.Settings.Default.agent1ConnectionString;
  1038. }
  1039. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1040. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1041. private void InitCommandCollection() {
  1042. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  1043. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  1044. this._commandCollection[0].Connection = this.Connection;
  1045. this._commandCollection[0].CommandText = "SELECT ID, Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Log" +
  1046. "o, Priority FROM dbo.Agent";
  1047. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  1048. }
  1049. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1050. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1051. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1052. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  1053. public virtual int Fill(agent1DataSet.AgentDataTable dataTable) {
  1054. this.Adapter.SelectCommand = this.CommandCollection[0];
  1055. if ((this.ClearBeforeFill == true)) {
  1056. dataTable.Clear();
  1057. }
  1058. int returnValue = this.Adapter.Fill(dataTable);
  1059. return returnValue;
  1060. }
  1061. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1062. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1063. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1064. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  1065. public virtual agent1DataSet.AgentDataTable GetData() {
  1066. this.Adapter.SelectCommand = this.CommandCollection[0];
  1067. agent1DataSet.AgentDataTable dataTable = new agent1DataSet.AgentDataTable();
  1068. this.Adapter.Fill(dataTable);
  1069. return dataTable;
  1070. }
  1071. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1072. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1073. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1074. public virtual int Update(agent1DataSet.AgentDataTable dataTable) {
  1075. return this.Adapter.Update(dataTable);
  1076. }
  1077. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1078. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1079. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1080. public virtual int Update(agent1DataSet dataSet) {
  1081. return this.Adapter.Update(dataSet, "Agent");
  1082. }
  1083. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1084. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1085. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1086. public virtual int Update(global::System.Data.DataRow dataRow) {
  1087. return this.Adapter.Update(new global::System.Data.DataRow[] {
  1088. dataRow});
  1089. }
  1090. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1091. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1092. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1093. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  1094. return this.Adapter.Update(dataRows);
  1095. }
  1096. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1097. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1098. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1099. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  1100. public virtual int Delete(int Original_ID, string Original_Title, int Original_AgentTypeID, string Original_Address, string Original_INN, string Original_KPP, string Original_DirectorName, string Original_Phone, string Original_Email, string Original_Logo, int Original_Priority) {
  1101. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  1102. if ((Original_Title == null)) {
  1103. throw new global::System.ArgumentNullException("Original_Title");
  1104. }
  1105. else {
  1106. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Title));
  1107. }
  1108. this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AgentTypeID));
  1109. if ((Original_Address == null)) {
  1110. this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
  1111. this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
  1112. }
  1113. else {
  1114. this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
  1115. this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Address));
  1116. }
  1117. if ((Original_INN == null)) {
  1118. throw new global::System.ArgumentNullException("Original_INN");
  1119. }
  1120. else {
  1121. this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_INN));
  1122. }
  1123. if ((Original_KPP == null)) {
  1124. this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1));
  1125. this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value;
  1126. }
  1127. else {
  1128. this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0));
  1129. this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_KPP));
  1130. }
  1131. if ((Original_DirectorName == null)) {
  1132. this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1));
  1133. this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value;
  1134. }
  1135. else {
  1136. this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0));
  1137. this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_DirectorName));
  1138. }
  1139. if ((Original_Phone == null)) {
  1140. throw new global::System.ArgumentNullException("Original_Phone");
  1141. }
  1142. else {
  1143. this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_Phone));
  1144. }
  1145. if ((Original_Email == null)) {
  1146. this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1));
  1147. this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value;
  1148. }
  1149. else {
  1150. this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0));
  1151. this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Email));
  1152. }
  1153. if ((Original_Logo == null)) {
  1154. this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1));
  1155. this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value;
  1156. }
  1157. else {
  1158. this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0));
  1159. this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_Logo));
  1160. }
  1161. this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(Original_Priority));
  1162. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  1163. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1164. != global::System.Data.ConnectionState.Open)) {
  1165. this.Adapter.DeleteCommand.Connection.Open();
  1166. }
  1167. try {
  1168. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  1169. return returnValue;
  1170. }
  1171. finally {
  1172. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1173. this.Adapter.DeleteCommand.Connection.Close();
  1174. }
  1175. }
  1176. }
  1177. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1178. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1179. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1180. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  1181. public virtual int Insert(string Title, int AgentTypeID, string Address, string INN, string KPP, string DirectorName, string Phone, string Email, string Logo, int Priority) {
  1182. if ((Title == null)) {
  1183. throw new global::System.ArgumentNullException("Title");
  1184. }
  1185. else {
  1186. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Title));
  1187. }
  1188. this.Adapter.InsertCommand.Parameters[1].Value = ((int)(AgentTypeID));
  1189. if ((Address == null)) {
  1190. this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
  1191. }
  1192. else {
  1193. this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Address));
  1194. }
  1195. if ((INN == null)) {
  1196. throw new global::System.ArgumentNullException("INN");
  1197. }
  1198. else {
  1199. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(INN));
  1200. }
  1201. if ((KPP == null)) {
  1202. this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
  1203. }
  1204. else {
  1205. this.Adapter.InsertCommand.Parameters[4].Value = ((string)(KPP));
  1206. }
  1207. if ((DirectorName == null)) {
  1208. this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
  1209. }
  1210. else {
  1211. this.Adapter.InsertCommand.Parameters[5].Value = ((string)(DirectorName));
  1212. }
  1213. if ((Phone == null)) {
  1214. throw new global::System.ArgumentNullException("Phone");
  1215. }
  1216. else {
  1217. this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Phone));
  1218. }
  1219. if ((Email == null)) {
  1220. this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value;
  1221. }
  1222. else {
  1223. this.Adapter.InsertCommand.Parameters[7].Value = ((string)(Email));
  1224. }
  1225. if ((Logo == null)) {
  1226. this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value;
  1227. }
  1228. else {
  1229. this.Adapter.InsertCommand.Parameters[8].Value = ((string)(Logo));
  1230. }
  1231. this.Adapter.InsertCommand.Parameters[9].Value = ((int)(Priority));
  1232. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  1233. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1234. != global::System.Data.ConnectionState.Open)) {
  1235. this.Adapter.InsertCommand.Connection.Open();
  1236. }
  1237. try {
  1238. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  1239. return returnValue;
  1240. }
  1241. finally {
  1242. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1243. this.Adapter.InsertCommand.Connection.Close();
  1244. }
  1245. }
  1246. }
  1247. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1248. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1249. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1250. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  1251. public virtual int Update(
  1252. string Title,
  1253. int AgentTypeID,
  1254. string Address,
  1255. string INN,
  1256. string KPP,
  1257. string DirectorName,
  1258. string Phone,
  1259. string Email,
  1260. string Logo,
  1261. int Priority,
  1262. int Original_ID,
  1263. string Original_Title,
  1264. int Original_AgentTypeID,
  1265. string Original_Address,
  1266. string Original_INN,
  1267. string Original_KPP,
  1268. string Original_DirectorName,
  1269. string Original_Phone,
  1270. string Original_Email,
  1271. string Original_Logo,
  1272. int Original_Priority,
  1273. int ID) {
  1274. if ((Title == null)) {
  1275. throw new global::System.ArgumentNullException("Title");
  1276. }
  1277. else {
  1278. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Title));
  1279. }
  1280. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(AgentTypeID));
  1281. if ((Address == null)) {
  1282. this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
  1283. }
  1284. else {
  1285. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Address));
  1286. }
  1287. if ((INN == null)) {
  1288. throw new global::System.ArgumentNullException("INN");
  1289. }
  1290. else {
  1291. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(INN));
  1292. }
  1293. if ((KPP == null)) {
  1294. this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
  1295. }
  1296. else {
  1297. this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(KPP));
  1298. }
  1299. if ((DirectorName == null)) {
  1300. this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
  1301. }
  1302. else {
  1303. this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(DirectorName));
  1304. }
  1305. if ((Phone == null)) {
  1306. throw new global::System.ArgumentNullException("Phone");
  1307. }
  1308. else {
  1309. this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Phone));
  1310. }
  1311. if ((Email == null)) {
  1312. this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value;
  1313. }
  1314. else {
  1315. this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Email));
  1316. }
  1317. if ((Logo == null)) {
  1318. this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value;
  1319. }
  1320. else {
  1321. this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Logo));
  1322. }
  1323. this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Priority));
  1324. this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_ID));
  1325. if ((Original_Title == null)) {
  1326. throw new global::System.ArgumentNullException("Original_Title");
  1327. }
  1328. else {
  1329. this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Title));
  1330. }
  1331. this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_AgentTypeID));
  1332. if ((Original_Address == null)) {
  1333. this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
  1334. this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
  1335. }
  1336. else {
  1337. this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
  1338. this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Address));
  1339. }
  1340. if ((Original_INN == null)) {
  1341. throw new global::System.ArgumentNullException("Original_INN");
  1342. }
  1343. else {
  1344. this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_INN));
  1345. }
  1346. if ((Original_KPP == null)) {
  1347. this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1));
  1348. this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value;
  1349. }
  1350. else {
  1351. this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0));
  1352. this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_KPP));
  1353. }
  1354. if ((Original_DirectorName == null)) {
  1355. this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1));
  1356. this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value;
  1357. }
  1358. else {
  1359. this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0));
  1360. this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_DirectorName));
  1361. }
  1362. if ((Original_Phone == null)) {
  1363. throw new global::System.ArgumentNullException("Original_Phone");
  1364. }
  1365. else {
  1366. this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_Phone));
  1367. }
  1368. if ((Original_Email == null)) {
  1369. this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1));
  1370. this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value;
  1371. }
  1372. else {
  1373. this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0));
  1374. this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_Email));
  1375. }
  1376. if ((Original_Logo == null)) {
  1377. this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1));
  1378. this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value;
  1379. }
  1380. else {
  1381. this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0));
  1382. this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_Logo));
  1383. }
  1384. this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Original_Priority));
  1385. this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(ID));
  1386. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  1387. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1388. != global::System.Data.ConnectionState.Open)) {
  1389. this.Adapter.UpdateCommand.Connection.Open();
  1390. }
  1391. try {
  1392. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  1393. return returnValue;
  1394. }
  1395. finally {
  1396. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1397. this.Adapter.UpdateCommand.Connection.Close();
  1398. }
  1399. }
  1400. }
  1401. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1402. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1403. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1404. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  1405. public virtual int Update(
  1406. string Title,
  1407. int AgentTypeID,
  1408. string Address,
  1409. string INN,
  1410. string KPP,
  1411. string DirectorName,
  1412. string Phone,
  1413. string Email,
  1414. string Logo,
  1415. int Priority,
  1416. int Original_ID,
  1417. string Original_Title,
  1418. int Original_AgentTypeID,
  1419. string Original_Address,
  1420. string Original_INN,
  1421. string Original_KPP,
  1422. string Original_DirectorName,
  1423. string Original_Phone,
  1424. string Original_Email,
  1425. string Original_Logo,
  1426. int Original_Priority) {
  1427. return this.Update(Title, AgentTypeID, Address, INN, KPP, DirectorName, Phone, Email, Logo, Priority, Original_ID, Original_Title, Original_AgentTypeID, Original_Address, Original_INN, Original_KPP, Original_DirectorName, Original_Phone, Original_Email, Original_Logo, Original_Priority, Original_ID);
  1428. }
  1429. }
  1430. /// <summary>
  1431. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  1432. ///</summary>
  1433. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1434. [global::System.ComponentModel.ToolboxItem(true)]
  1435. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  1436. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1437. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  1438. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  1439. private UpdateOrderOption _updateOrder;
  1440. private AgentTableAdapter _agentTableAdapter;
  1441. private bool _backupDataSetBeforeUpdate;
  1442. private global::System.Data.IDbConnection _connection;
  1443. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1444. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1445. public UpdateOrderOption UpdateOrder {
  1446. get {
  1447. return this._updateOrder;
  1448. }
  1449. set {
  1450. this._updateOrder = value;
  1451. }
  1452. }
  1453. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1454. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1455. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  1456. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  1457. "a", "System.Drawing.Design.UITypeEditor")]
  1458. public AgentTableAdapter AgentTableAdapter {
  1459. get {
  1460. return this._agentTableAdapter;
  1461. }
  1462. set {
  1463. this._agentTableAdapter = value;
  1464. }
  1465. }
  1466. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1467. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1468. public bool BackupDataSetBeforeUpdate {
  1469. get {
  1470. return this._backupDataSetBeforeUpdate;
  1471. }
  1472. set {
  1473. this._backupDataSetBeforeUpdate = value;
  1474. }
  1475. }
  1476. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1477. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1478. [global::System.ComponentModel.Browsable(false)]
  1479. public global::System.Data.IDbConnection Connection {
  1480. get {
  1481. if ((this._connection != null)) {
  1482. return this._connection;
  1483. }
  1484. if (((this._agentTableAdapter != null)
  1485. && (this._agentTableAdapter.Connection != null))) {
  1486. return this._agentTableAdapter.Connection;
  1487. }
  1488. return null;
  1489. }
  1490. set {
  1491. this._connection = value;
  1492. }
  1493. }
  1494. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1495. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1496. [global::System.ComponentModel.Browsable(false)]
  1497. public int TableAdapterInstanceCount {
  1498. get {
  1499. int count = 0;
  1500. if ((this._agentTableAdapter != null)) {
  1501. count = (count + 1);
  1502. }
  1503. return count;
  1504. }
  1505. }
  1506. /// <summary>
  1507. ///Update rows in top-down order.
  1508. ///</summary>
  1509. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1510. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1511. private int UpdateUpdatedRows(agent1DataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  1512. int result = 0;
  1513. if ((this._agentTableAdapter != null)) {
  1514. global::System.Data.DataRow[] updatedRows = dataSet.Agent.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  1515. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  1516. if (((updatedRows != null)
  1517. && (0 < updatedRows.Length))) {
  1518. result = (result + this._agentTableAdapter.Update(updatedRows));
  1519. allChangedRows.AddRange(updatedRows);
  1520. }
  1521. }
  1522. return result;
  1523. }
  1524. /// <summary>
  1525. ///Insert rows in top-down order.
  1526. ///</summary>
  1527. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1528. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1529. private int UpdateInsertedRows(agent1DataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  1530. int result = 0;
  1531. if ((this._agentTableAdapter != null)) {
  1532. global::System.Data.DataRow[] addedRows = dataSet.Agent.Select(null, null, global::System.Data.DataViewRowState.Added);
  1533. if (((addedRows != null)
  1534. && (0 < addedRows.Length))) {
  1535. result = (result + this._agentTableAdapter.Update(addedRows));
  1536. allAddedRows.AddRange(addedRows);
  1537. }
  1538. }
  1539. return result;
  1540. }
  1541. /// <summary>
  1542. ///Delete rows in bottom-up order.
  1543. ///</summary>
  1544. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1545. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1546. private int UpdateDeletedRows(agent1DataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  1547. int result = 0;
  1548. if ((this._agentTableAdapter != null)) {
  1549. global::System.Data.DataRow[] deletedRows = dataSet.Agent.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  1550. if (((deletedRows != null)
  1551. && (0 < deletedRows.Length))) {
  1552. result = (result + this._agentTableAdapter.Update(deletedRows));
  1553. allChangedRows.AddRange(deletedRows);
  1554. }
  1555. }
  1556. return result;
  1557. }
  1558. /// <summary>
  1559. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  1560. ///</summary>
  1561. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1562. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1563. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  1564. if (((updatedRows == null)
  1565. || (updatedRows.Length < 1))) {
  1566. return updatedRows;
  1567. }
  1568. if (((allAddedRows == null)
  1569. || (allAddedRows.Count < 1))) {
  1570. return updatedRows;
  1571. }
  1572. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1573. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  1574. global::System.Data.DataRow row = updatedRows[i];
  1575. if ((allAddedRows.Contains(row) == false)) {
  1576. realUpdatedRows.Add(row);
  1577. }
  1578. }
  1579. return realUpdatedRows.ToArray();
  1580. }
  1581. /// <summary>
  1582. ///Update all changes to the dataset.
  1583. ///</summary>
  1584. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1585. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1586. public virtual int UpdateAll(agent1DataSet dataSet) {
  1587. if ((dataSet == null)) {
  1588. throw new global::System.ArgumentNullException("dataSet");
  1589. }
  1590. if ((dataSet.HasChanges() == false)) {
  1591. return 0;
  1592. }
  1593. if (((this._agentTableAdapter != null)
  1594. && (this.MatchTableAdapterConnection(this._agentTableAdapter.Connection) == false))) {
  1595. throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
  1596. "tring.");
  1597. }
  1598. global::System.Data.IDbConnection workConnection = this.Connection;
  1599. if ((workConnection == null)) {
  1600. throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
  1601. "ger TableAdapter property to a valid TableAdapter instance.");
  1602. }
  1603. bool workConnOpened = false;
  1604. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  1605. == global::System.Data.ConnectionState.Broken)) {
  1606. workConnection.Close();
  1607. }
  1608. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  1609. workConnection.Open();
  1610. workConnOpened = true;
  1611. }
  1612. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  1613. if ((workTransaction == null)) {
  1614. throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
  1615. "ctions or the current state is not allowing the transaction to begin.");
  1616. }
  1617. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1618. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1619. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  1620. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  1621. int result = 0;
  1622. global::System.Data.DataSet backupDataSet = null;
  1623. if (this.BackupDataSetBeforeUpdate) {
  1624. backupDataSet = new global::System.Data.DataSet();
  1625. backupDataSet.Merge(dataSet);
  1626. }
  1627. try {
  1628. // ---- Prepare for update -----------
  1629. //
  1630. if ((this._agentTableAdapter != null)) {
  1631. revertConnections.Add(this._agentTableAdapter, this._agentTableAdapter.Connection);
  1632. this._agentTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  1633. this._agentTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  1634. if (this._agentTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  1635. this._agentTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  1636. adaptersWithAcceptChangesDuringUpdate.Add(this._agentTableAdapter.Adapter);
  1637. }
  1638. }
  1639. //
  1640. //---- Perform updates -----------
  1641. //
  1642. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  1643. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  1644. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  1645. }
  1646. else {
  1647. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  1648. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  1649. }
  1650. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  1651. //
  1652. //---- Commit updates -----------
  1653. //
  1654. workTransaction.Commit();
  1655. if ((0 < allAddedRows.Count)) {
  1656. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  1657. allAddedRows.CopyTo(rows);
  1658. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1659. global::System.Data.DataRow row = rows[i];
  1660. row.AcceptChanges();
  1661. }
  1662. }
  1663. if ((0 < allChangedRows.Count)) {
  1664. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  1665. allChangedRows.CopyTo(rows);
  1666. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1667. global::System.Data.DataRow row = rows[i];
  1668. row.AcceptChanges();
  1669. }
  1670. }
  1671. }
  1672. catch (global::System.Exception ex) {
  1673. workTransaction.Rollback();
  1674. // ---- Restore the dataset -----------
  1675. if (this.BackupDataSetBeforeUpdate) {
  1676. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  1677. dataSet.Clear();
  1678. dataSet.Merge(backupDataSet);
  1679. }
  1680. else {
  1681. if ((0 < allAddedRows.Count)) {
  1682. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  1683. allAddedRows.CopyTo(rows);
  1684. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1685. global::System.Data.DataRow row = rows[i];
  1686. row.AcceptChanges();
  1687. row.SetAdded();
  1688. }
  1689. }
  1690. }
  1691. throw ex;
  1692. }
  1693. finally {
  1694. if (workConnOpened) {
  1695. workConnection.Close();
  1696. }
  1697. if ((this._agentTableAdapter != null)) {
  1698. this._agentTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._agentTableAdapter]));
  1699. this._agentTableAdapter.Transaction = null;
  1700. }
  1701. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  1702. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  1703. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  1704. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  1705. global::System.Data.Common.DataAdapter adapter = adapters[i];
  1706. adapter.AcceptChangesDuringUpdate = true;
  1707. }
  1708. }
  1709. }
  1710. return result;
  1711. }
  1712. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1713. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1714. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  1715. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  1716. }
  1717. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1718. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1719. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  1720. if ((this._connection != null)) {
  1721. return true;
  1722. }
  1723. if (((this.Connection == null)
  1724. || (inputConnection == null))) {
  1725. return true;
  1726. }
  1727. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  1728. return true;
  1729. }
  1730. return false;
  1731. }
  1732. /// <summary>
  1733. ///Update Order Option
  1734. ///</summary>
  1735. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1736. public enum UpdateOrderOption {
  1737. InsertUpdateDelete = 0,
  1738. UpdateInsertDelete = 1,
  1739. }
  1740. /// <summary>
  1741. ///Used to sort self-referenced table's rows
  1742. ///</summary>
  1743. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1744. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  1745. private global::System.Data.DataRelation _relation;
  1746. private int _childFirst;
  1747. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1748. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1749. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  1750. this._relation = relation;
  1751. if (childFirst) {
  1752. this._childFirst = -1;
  1753. }
  1754. else {
  1755. this._childFirst = 1;
  1756. }
  1757. }
  1758. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1759. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1760. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  1761. global::System.Diagnostics.Debug.Assert((row != null));
  1762. global::System.Data.DataRow root = row;
  1763. distance = 0;
  1764. 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>();
  1765. traversedRows[row] = row;
  1766. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  1767. for (
  1768. ; ((parent != null)
  1769. && (traversedRows.ContainsKey(parent) == false));
  1770. ) {
  1771. distance = (distance + 1);
  1772. root = parent;
  1773. traversedRows[parent] = parent;
  1774. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  1775. }
  1776. if ((distance == 0)) {
  1777. traversedRows.Clear();
  1778. traversedRows[row] = row;
  1779. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  1780. for (
  1781. ; ((parent != null)
  1782. && (traversedRows.ContainsKey(parent) == false));
  1783. ) {
  1784. distance = (distance + 1);
  1785. root = parent;
  1786. traversedRows[parent] = parent;
  1787. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  1788. }
  1789. }
  1790. return root;
  1791. }
  1792. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1793. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1794. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  1795. if (object.ReferenceEquals(row1, row2)) {
  1796. return 0;
  1797. }
  1798. if ((row1 == null)) {
  1799. return -1;
  1800. }
  1801. if ((row2 == null)) {
  1802. return 1;
  1803. }
  1804. int distance1 = 0;
  1805. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  1806. int distance2 = 0;
  1807. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  1808. if (object.ReferenceEquals(root1, root2)) {
  1809. return (this._childFirst * distance1.CompareTo(distance2));
  1810. }
  1811. else {
  1812. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  1813. && (root2.Table != null)));
  1814. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  1815. return -1;
  1816. }
  1817. else {
  1818. return 1;
  1819. }
  1820. }
  1821. }
  1822. }
  1823. }
  1824. }
  1825. #pragma warning restore 1591