VINILDataSet_employee1.Designer.cs 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // Этот код создан программой.
  4. // Исполняемая версия:4.0.30319.42000
  5. //
  6. // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
  7. // повторной генерации кода.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. #pragma warning disable 1591
  11. namespace proba {
  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("VINILDataSet_employee1")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class VINILDataSet_employee1 : global::System.Data.DataSet {
  22. private EmployeeDataTable tableEmployee;
  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 VINILDataSet_employee1() {
  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 VINILDataSet_employee1(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["Employee"] != null)) {
  50. base.Tables.Add(new EmployeeDataTable(ds.Tables["Employee"]));
  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 EmployeeDataTable Employee {
  74. get {
  75. return this.tableEmployee;
  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. VINILDataSet_employee1 cln = ((VINILDataSet_employee1)(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["Employee"] != null)) {
  139. base.Tables.Add(new EmployeeDataTable(ds.Tables["Employee"]));
  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.tableEmployee = ((EmployeeDataTable)(base.Tables["Employee"]));
  172. if ((initTable == true)) {
  173. if ((this.tableEmployee != null)) {
  174. this.tableEmployee.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 = "VINILDataSet_employee1";
  182. this.Prefix = "";
  183. this.Namespace = "http://tempuri.org/VINILDataSet_employee1.xsd";
  184. this.EnforceConstraints = true;
  185. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  186. this.tableEmployee = new EmployeeDataTable();
  187. base.Tables.Add(this.tableEmployee);
  188. }
  189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  190. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  191. private bool ShouldSerializeEmployee() {
  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. VINILDataSet_employee1 ds = new VINILDataSet_employee1();
  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 EmployeeRowChangeEventHandler(object sender, EmployeeRowChangeEvent 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 EmployeeDataTable : global::System.Data.TypedTableBase<EmployeeRow> {
  255. private global::System.Data.DataColumn columnid_employee;
  256. private global::System.Data.DataColumn columnsurname;
  257. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  258. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  259. public EmployeeDataTable() {
  260. this.TableName = "Employee";
  261. this.BeginInit();
  262. this.InitClass();
  263. this.EndInit();
  264. }
  265. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  266. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  267. internal EmployeeDataTable(global::System.Data.DataTable table) {
  268. this.TableName = table.TableName;
  269. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  270. this.CaseSensitive = table.CaseSensitive;
  271. }
  272. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  273. this.Locale = table.Locale;
  274. }
  275. if ((table.Namespace != table.DataSet.Namespace)) {
  276. this.Namespace = table.Namespace;
  277. }
  278. this.Prefix = table.Prefix;
  279. this.MinimumCapacity = table.MinimumCapacity;
  280. }
  281. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  282. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  283. protected EmployeeDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  284. base(info, context) {
  285. this.InitVars();
  286. }
  287. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  288. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  289. public global::System.Data.DataColumn id_employeeColumn {
  290. get {
  291. return this.columnid_employee;
  292. }
  293. }
  294. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  295. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  296. public global::System.Data.DataColumn surnameColumn {
  297. get {
  298. return this.columnsurname;
  299. }
  300. }
  301. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  302. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  303. [global::System.ComponentModel.Browsable(false)]
  304. public int Count {
  305. get {
  306. return this.Rows.Count;
  307. }
  308. }
  309. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  310. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  311. public EmployeeRow this[int index] {
  312. get {
  313. return ((EmployeeRow)(this.Rows[index]));
  314. }
  315. }
  316. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  317. public event EmployeeRowChangeEventHandler EmployeeRowChanging;
  318. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  319. public event EmployeeRowChangeEventHandler EmployeeRowChanged;
  320. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  321. public event EmployeeRowChangeEventHandler EmployeeRowDeleting;
  322. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  323. public event EmployeeRowChangeEventHandler EmployeeRowDeleted;
  324. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  325. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  326. public void AddEmployeeRow(EmployeeRow row) {
  327. this.Rows.Add(row);
  328. }
  329. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  330. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  331. public EmployeeRow AddEmployeeRow(string surname) {
  332. EmployeeRow rowEmployeeRow = ((EmployeeRow)(this.NewRow()));
  333. object[] columnValuesArray = new object[] {
  334. null,
  335. surname};
  336. rowEmployeeRow.ItemArray = columnValuesArray;
  337. this.Rows.Add(rowEmployeeRow);
  338. return rowEmployeeRow;
  339. }
  340. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  341. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  342. public EmployeeRow FindByid_employee(int id_employee) {
  343. return ((EmployeeRow)(this.Rows.Find(new object[] {
  344. id_employee})));
  345. }
  346. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  347. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  348. public override global::System.Data.DataTable Clone() {
  349. EmployeeDataTable cln = ((EmployeeDataTable)(base.Clone()));
  350. cln.InitVars();
  351. return cln;
  352. }
  353. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  354. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  355. protected override global::System.Data.DataTable CreateInstance() {
  356. return new EmployeeDataTable();
  357. }
  358. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  359. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  360. internal void InitVars() {
  361. this.columnid_employee = base.Columns["id_employee"];
  362. this.columnsurname = base.Columns["surname"];
  363. }
  364. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  365. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  366. private void InitClass() {
  367. this.columnid_employee = new global::System.Data.DataColumn("id_employee", typeof(int), null, global::System.Data.MappingType.Element);
  368. base.Columns.Add(this.columnid_employee);
  369. this.columnsurname = new global::System.Data.DataColumn("surname", typeof(string), null, global::System.Data.MappingType.Element);
  370. base.Columns.Add(this.columnsurname);
  371. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  372. this.columnid_employee}, true));
  373. this.columnid_employee.AutoIncrement = true;
  374. this.columnid_employee.AutoIncrementSeed = -1;
  375. this.columnid_employee.AutoIncrementStep = -1;
  376. this.columnid_employee.AllowDBNull = false;
  377. this.columnid_employee.ReadOnly = true;
  378. this.columnid_employee.Unique = true;
  379. this.columnsurname.AllowDBNull = false;
  380. this.columnsurname.MaxLength = 25;
  381. }
  382. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  383. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  384. public EmployeeRow NewEmployeeRow() {
  385. return ((EmployeeRow)(this.NewRow()));
  386. }
  387. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  388. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  389. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  390. return new EmployeeRow(builder);
  391. }
  392. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  393. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  394. protected override global::System.Type GetRowType() {
  395. return typeof(EmployeeRow);
  396. }
  397. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  398. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  399. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  400. base.OnRowChanged(e);
  401. if ((this.EmployeeRowChanged != null)) {
  402. this.EmployeeRowChanged(this, new EmployeeRowChangeEvent(((EmployeeRow)(e.Row)), e.Action));
  403. }
  404. }
  405. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  406. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  407. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  408. base.OnRowChanging(e);
  409. if ((this.EmployeeRowChanging != null)) {
  410. this.EmployeeRowChanging(this, new EmployeeRowChangeEvent(((EmployeeRow)(e.Row)), e.Action));
  411. }
  412. }
  413. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  414. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  415. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  416. base.OnRowDeleted(e);
  417. if ((this.EmployeeRowDeleted != null)) {
  418. this.EmployeeRowDeleted(this, new EmployeeRowChangeEvent(((EmployeeRow)(e.Row)), e.Action));
  419. }
  420. }
  421. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  422. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  423. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  424. base.OnRowDeleting(e);
  425. if ((this.EmployeeRowDeleting != null)) {
  426. this.EmployeeRowDeleting(this, new EmployeeRowChangeEvent(((EmployeeRow)(e.Row)), e.Action));
  427. }
  428. }
  429. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  430. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  431. public void RemoveEmployeeRow(EmployeeRow row) {
  432. this.Rows.Remove(row);
  433. }
  434. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  435. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  436. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  437. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  438. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  439. VINILDataSet_employee1 ds = new VINILDataSet_employee1();
  440. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  441. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  442. any1.MinOccurs = new decimal(0);
  443. any1.MaxOccurs = decimal.MaxValue;
  444. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  445. sequence.Items.Add(any1);
  446. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  447. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  448. any2.MinOccurs = new decimal(1);
  449. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  450. sequence.Items.Add(any2);
  451. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  452. attribute1.Name = "namespace";
  453. attribute1.FixedValue = ds.Namespace;
  454. type.Attributes.Add(attribute1);
  455. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  456. attribute2.Name = "tableTypeName";
  457. attribute2.FixedValue = "EmployeeDataTable";
  458. type.Attributes.Add(attribute2);
  459. type.Particle = sequence;
  460. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  461. if (xs.Contains(dsSchema.TargetNamespace)) {
  462. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  463. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  464. try {
  465. global::System.Xml.Schema.XmlSchema schema = null;
  466. dsSchema.Write(s1);
  467. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  468. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  469. s2.SetLength(0);
  470. schema.Write(s2);
  471. if ((s1.Length == s2.Length)) {
  472. s1.Position = 0;
  473. s2.Position = 0;
  474. for (; ((s1.Position != s1.Length)
  475. && (s1.ReadByte() == s2.ReadByte())); ) {
  476. ;
  477. }
  478. if ((s1.Position == s1.Length)) {
  479. return type;
  480. }
  481. }
  482. }
  483. }
  484. finally {
  485. if ((s1 != null)) {
  486. s1.Close();
  487. }
  488. if ((s2 != null)) {
  489. s2.Close();
  490. }
  491. }
  492. }
  493. xs.Add(dsSchema);
  494. return type;
  495. }
  496. }
  497. /// <summary>
  498. ///Represents strongly named DataRow class.
  499. ///</summary>
  500. public partial class EmployeeRow : global::System.Data.DataRow {
  501. private EmployeeDataTable tableEmployee;
  502. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  503. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  504. internal EmployeeRow(global::System.Data.DataRowBuilder rb) :
  505. base(rb) {
  506. this.tableEmployee = ((EmployeeDataTable)(this.Table));
  507. }
  508. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  509. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  510. public int id_employee {
  511. get {
  512. return ((int)(this[this.tableEmployee.id_employeeColumn]));
  513. }
  514. set {
  515. this[this.tableEmployee.id_employeeColumn] = value;
  516. }
  517. }
  518. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  519. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  520. public string surname {
  521. get {
  522. return ((string)(this[this.tableEmployee.surnameColumn]));
  523. }
  524. set {
  525. this[this.tableEmployee.surnameColumn] = value;
  526. }
  527. }
  528. }
  529. /// <summary>
  530. ///Row event argument class
  531. ///</summary>
  532. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  533. public class EmployeeRowChangeEvent : global::System.EventArgs {
  534. private EmployeeRow eventRow;
  535. private global::System.Data.DataRowAction eventAction;
  536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  537. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  538. public EmployeeRowChangeEvent(EmployeeRow row, global::System.Data.DataRowAction action) {
  539. this.eventRow = row;
  540. this.eventAction = action;
  541. }
  542. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  543. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  544. public EmployeeRow Row {
  545. get {
  546. return this.eventRow;
  547. }
  548. }
  549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  550. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  551. public global::System.Data.DataRowAction Action {
  552. get {
  553. return this.eventAction;
  554. }
  555. }
  556. }
  557. }
  558. }
  559. namespace proba.VINILDataSet_employee1TableAdapters {
  560. /// <summary>
  561. ///Represents the connection and commands used to retrieve and save data.
  562. ///</summary>
  563. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  564. [global::System.ComponentModel.ToolboxItem(true)]
  565. [global::System.ComponentModel.DataObjectAttribute(true)]
  566. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  567. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  568. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  569. public partial class EmployeeTableAdapter : global::System.ComponentModel.Component {
  570. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  571. private global::System.Data.SqlClient.SqlConnection _connection;
  572. private global::System.Data.SqlClient.SqlTransaction _transaction;
  573. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  574. private bool _clearBeforeFill;
  575. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  576. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  577. public EmployeeTableAdapter() {
  578. this.ClearBeforeFill = true;
  579. }
  580. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  581. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  582. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  583. get {
  584. if ((this._adapter == null)) {
  585. this.InitAdapter();
  586. }
  587. return this._adapter;
  588. }
  589. }
  590. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  591. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  592. internal global::System.Data.SqlClient.SqlConnection Connection {
  593. get {
  594. if ((this._connection == null)) {
  595. this.InitConnection();
  596. }
  597. return this._connection;
  598. }
  599. set {
  600. this._connection = value;
  601. if ((this.Adapter.InsertCommand != null)) {
  602. this.Adapter.InsertCommand.Connection = value;
  603. }
  604. if ((this.Adapter.DeleteCommand != null)) {
  605. this.Adapter.DeleteCommand.Connection = value;
  606. }
  607. if ((this.Adapter.UpdateCommand != null)) {
  608. this.Adapter.UpdateCommand.Connection = value;
  609. }
  610. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  611. if ((this.CommandCollection[i] != null)) {
  612. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  613. }
  614. }
  615. }
  616. }
  617. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  618. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  619. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  620. get {
  621. return this._transaction;
  622. }
  623. set {
  624. this._transaction = value;
  625. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  626. this.CommandCollection[i].Transaction = this._transaction;
  627. }
  628. if (((this.Adapter != null)
  629. && (this.Adapter.DeleteCommand != null))) {
  630. this.Adapter.DeleteCommand.Transaction = this._transaction;
  631. }
  632. if (((this.Adapter != null)
  633. && (this.Adapter.InsertCommand != null))) {
  634. this.Adapter.InsertCommand.Transaction = this._transaction;
  635. }
  636. if (((this.Adapter != null)
  637. && (this.Adapter.UpdateCommand != null))) {
  638. this.Adapter.UpdateCommand.Transaction = this._transaction;
  639. }
  640. }
  641. }
  642. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  643. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  644. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  645. get {
  646. if ((this._commandCollection == null)) {
  647. this.InitCommandCollection();
  648. }
  649. return this._commandCollection;
  650. }
  651. }
  652. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  653. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  654. public bool ClearBeforeFill {
  655. get {
  656. return this._clearBeforeFill;
  657. }
  658. set {
  659. this._clearBeforeFill = value;
  660. }
  661. }
  662. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  663. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  664. private void InitAdapter() {
  665. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  666. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  667. tableMapping.SourceTable = "Table";
  668. tableMapping.DataSetTable = "Employee";
  669. tableMapping.ColumnMappings.Add("id_employee", "id_employee");
  670. tableMapping.ColumnMappings.Add("surname", "surname");
  671. this._adapter.TableMappings.Add(tableMapping);
  672. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  673. this._adapter.DeleteCommand.Connection = this.Connection;
  674. this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Employee] WHERE (([id_employee] = @Original_id_employee) AND (" +
  675. "[surname] = @Original_surname))";
  676. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  677. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_employee", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_employee", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  678. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_surname", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "surname", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  679. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  680. this._adapter.UpdateCommand.Connection = this.Connection;
  681. this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Employee] SET [surname] = @surname WHERE (([id_employee] = @Origina" +
  682. "l_id_employee) AND ([surname] = @Original_surname));\r\nSELECT id_employee, surnam" +
  683. "e FROM Employee WHERE (id_employee = @id_employee)";
  684. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  685. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@surname", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "surname", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  686. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_employee", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_employee", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  687. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_surname", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "surname", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  688. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_employee", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "id_employee", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  689. }
  690. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  691. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  692. private void InitConnection() {
  693. this._connection = new global::System.Data.SqlClient.SqlConnection();
  694. this._connection.ConnectionString = global::proba.Properties.Settings.Default.VINILConnectionString_Country;
  695. }
  696. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  697. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  698. private void InitCommandCollection() {
  699. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  700. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  701. this._commandCollection[0].Connection = this.Connection;
  702. this._commandCollection[0].CommandText = "SELECT id_employee, surname FROM dbo.Employee";
  703. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  704. }
  705. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  706. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  707. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  708. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  709. public virtual int Fill(VINILDataSet_employee1.EmployeeDataTable dataTable) {
  710. this.Adapter.SelectCommand = this.CommandCollection[0];
  711. if ((this.ClearBeforeFill == true)) {
  712. dataTable.Clear();
  713. }
  714. int returnValue = this.Adapter.Fill(dataTable);
  715. return returnValue;
  716. }
  717. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  718. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  719. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  720. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  721. public virtual VINILDataSet_employee1.EmployeeDataTable GetData() {
  722. this.Adapter.SelectCommand = this.CommandCollection[0];
  723. VINILDataSet_employee1.EmployeeDataTable dataTable = new VINILDataSet_employee1.EmployeeDataTable();
  724. this.Adapter.Fill(dataTable);
  725. return dataTable;
  726. }
  727. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  728. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  729. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  730. public virtual int Update(VINILDataSet_employee1.EmployeeDataTable dataTable) {
  731. return this.Adapter.Update(dataTable);
  732. }
  733. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  734. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  735. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  736. public virtual int Update(VINILDataSet_employee1 dataSet) {
  737. return this.Adapter.Update(dataSet, "Employee");
  738. }
  739. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  740. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  741. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  742. public virtual int Update(global::System.Data.DataRow dataRow) {
  743. return this.Adapter.Update(new global::System.Data.DataRow[] {
  744. dataRow});
  745. }
  746. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  747. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  748. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  749. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  750. return this.Adapter.Update(dataRows);
  751. }
  752. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  753. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  754. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  755. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  756. public virtual int Delete(int Original_id_employee, string Original_surname) {
  757. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id_employee));
  758. if ((Original_surname == null)) {
  759. throw new global::System.ArgumentNullException("Original_surname");
  760. }
  761. else {
  762. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_surname));
  763. }
  764. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  765. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  766. != global::System.Data.ConnectionState.Open)) {
  767. this.Adapter.DeleteCommand.Connection.Open();
  768. }
  769. try {
  770. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  771. return returnValue;
  772. }
  773. finally {
  774. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  775. this.Adapter.DeleteCommand.Connection.Close();
  776. }
  777. }
  778. }
  779. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  780. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  781. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  782. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  783. public virtual int Update(string surname, int Original_id_employee, string Original_surname, int id_employee) {
  784. if ((surname == null)) {
  785. throw new global::System.ArgumentNullException("surname");
  786. }
  787. else {
  788. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(surname));
  789. }
  790. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_id_employee));
  791. if ((Original_surname == null)) {
  792. throw new global::System.ArgumentNullException("Original_surname");
  793. }
  794. else {
  795. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_surname));
  796. }
  797. this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(id_employee));
  798. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  799. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  800. != global::System.Data.ConnectionState.Open)) {
  801. this.Adapter.UpdateCommand.Connection.Open();
  802. }
  803. try {
  804. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  805. return returnValue;
  806. }
  807. finally {
  808. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  809. this.Adapter.UpdateCommand.Connection.Close();
  810. }
  811. }
  812. }
  813. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  814. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  815. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  816. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  817. public virtual int Update(string surname, int Original_id_employee, string Original_surname) {
  818. return this.Update(surname, Original_id_employee, Original_surname, Original_id_employee);
  819. }
  820. }
  821. /// <summary>
  822. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  823. ///</summary>
  824. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  825. [global::System.ComponentModel.ToolboxItem(true)]
  826. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  827. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  828. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  829. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  830. private UpdateOrderOption _updateOrder;
  831. private EmployeeTableAdapter _employeeTableAdapter;
  832. private bool _backupDataSetBeforeUpdate;
  833. private global::System.Data.IDbConnection _connection;
  834. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  835. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  836. public UpdateOrderOption UpdateOrder {
  837. get {
  838. return this._updateOrder;
  839. }
  840. set {
  841. this._updateOrder = value;
  842. }
  843. }
  844. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  845. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  846. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  847. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  848. "a", "System.Drawing.Design.UITypeEditor")]
  849. public EmployeeTableAdapter EmployeeTableAdapter {
  850. get {
  851. return this._employeeTableAdapter;
  852. }
  853. set {
  854. this._employeeTableAdapter = value;
  855. }
  856. }
  857. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  858. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  859. public bool BackupDataSetBeforeUpdate {
  860. get {
  861. return this._backupDataSetBeforeUpdate;
  862. }
  863. set {
  864. this._backupDataSetBeforeUpdate = value;
  865. }
  866. }
  867. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  868. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  869. [global::System.ComponentModel.Browsable(false)]
  870. public global::System.Data.IDbConnection Connection {
  871. get {
  872. if ((this._connection != null)) {
  873. return this._connection;
  874. }
  875. if (((this._employeeTableAdapter != null)
  876. && (this._employeeTableAdapter.Connection != null))) {
  877. return this._employeeTableAdapter.Connection;
  878. }
  879. return null;
  880. }
  881. set {
  882. this._connection = value;
  883. }
  884. }
  885. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  886. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  887. [global::System.ComponentModel.Browsable(false)]
  888. public int TableAdapterInstanceCount {
  889. get {
  890. int count = 0;
  891. if ((this._employeeTableAdapter != null)) {
  892. count = (count + 1);
  893. }
  894. return count;
  895. }
  896. }
  897. /// <summary>
  898. ///Update rows in top-down order.
  899. ///</summary>
  900. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  901. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  902. private int UpdateUpdatedRows(VINILDataSet_employee1 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  903. int result = 0;
  904. if ((this._employeeTableAdapter != null)) {
  905. global::System.Data.DataRow[] updatedRows = dataSet.Employee.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  906. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  907. if (((updatedRows != null)
  908. && (0 < updatedRows.Length))) {
  909. result = (result + this._employeeTableAdapter.Update(updatedRows));
  910. allChangedRows.AddRange(updatedRows);
  911. }
  912. }
  913. return result;
  914. }
  915. /// <summary>
  916. ///Insert rows in top-down order.
  917. ///</summary>
  918. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  919. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  920. private int UpdateInsertedRows(VINILDataSet_employee1 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  921. int result = 0;
  922. if ((this._employeeTableAdapter != null)) {
  923. global::System.Data.DataRow[] addedRows = dataSet.Employee.Select(null, null, global::System.Data.DataViewRowState.Added);
  924. if (((addedRows != null)
  925. && (0 < addedRows.Length))) {
  926. result = (result + this._employeeTableAdapter.Update(addedRows));
  927. allAddedRows.AddRange(addedRows);
  928. }
  929. }
  930. return result;
  931. }
  932. /// <summary>
  933. ///Delete rows in bottom-up order.
  934. ///</summary>
  935. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  936. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  937. private int UpdateDeletedRows(VINILDataSet_employee1 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  938. int result = 0;
  939. if ((this._employeeTableAdapter != null)) {
  940. global::System.Data.DataRow[] deletedRows = dataSet.Employee.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  941. if (((deletedRows != null)
  942. && (0 < deletedRows.Length))) {
  943. result = (result + this._employeeTableAdapter.Update(deletedRows));
  944. allChangedRows.AddRange(deletedRows);
  945. }
  946. }
  947. return result;
  948. }
  949. /// <summary>
  950. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  951. ///</summary>
  952. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  953. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  954. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  955. if (((updatedRows == null)
  956. || (updatedRows.Length < 1))) {
  957. return updatedRows;
  958. }
  959. if (((allAddedRows == null)
  960. || (allAddedRows.Count < 1))) {
  961. return updatedRows;
  962. }
  963. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  964. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  965. global::System.Data.DataRow row = updatedRows[i];
  966. if ((allAddedRows.Contains(row) == false)) {
  967. realUpdatedRows.Add(row);
  968. }
  969. }
  970. return realUpdatedRows.ToArray();
  971. }
  972. /// <summary>
  973. ///Update all changes to the dataset.
  974. ///</summary>
  975. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  976. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  977. public virtual int UpdateAll(VINILDataSet_employee1 dataSet) {
  978. if ((dataSet == null)) {
  979. throw new global::System.ArgumentNullException("dataSet");
  980. }
  981. if ((dataSet.HasChanges() == false)) {
  982. return 0;
  983. }
  984. if (((this._employeeTableAdapter != null)
  985. && (this.MatchTableAdapterConnection(this._employeeTableAdapter.Connection) == false))) {
  986. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  987. "r, должны использовать одинаковую строку подключения.");
  988. }
  989. global::System.Data.IDbConnection workConnection = this.Connection;
  990. if ((workConnection == null)) {
  991. throw new global::System.ApplicationException("TableAdapterManager не содержит сведений о подключении. Укажите для каждого адапт" +
  992. "ера таблицы TableAdapterManager допустимый экземпляр адаптера таблицы.");
  993. }
  994. bool workConnOpened = false;
  995. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  996. == global::System.Data.ConnectionState.Broken)) {
  997. workConnection.Close();
  998. }
  999. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  1000. workConnection.Open();
  1001. workConnOpened = true;
  1002. }
  1003. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  1004. if ((workTransaction == null)) {
  1005. throw new global::System.ApplicationException("Не удается начать транзакцию. Текущее соединение данных не поддерживает транзакци" +
  1006. "и или текущее состояние не позволяет начать транзакцию.");
  1007. }
  1008. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1009. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1010. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  1011. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  1012. int result = 0;
  1013. global::System.Data.DataSet backupDataSet = null;
  1014. if (this.BackupDataSetBeforeUpdate) {
  1015. backupDataSet = new global::System.Data.DataSet();
  1016. backupDataSet.Merge(dataSet);
  1017. }
  1018. try {
  1019. // ---- Prepare for update -----------
  1020. //
  1021. if ((this._employeeTableAdapter != null)) {
  1022. revertConnections.Add(this._employeeTableAdapter, this._employeeTableAdapter.Connection);
  1023. this._employeeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  1024. this._employeeTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  1025. if (this._employeeTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  1026. this._employeeTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  1027. adaptersWithAcceptChangesDuringUpdate.Add(this._employeeTableAdapter.Adapter);
  1028. }
  1029. }
  1030. //
  1031. //---- Perform updates -----------
  1032. //
  1033. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  1034. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  1035. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  1036. }
  1037. else {
  1038. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  1039. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  1040. }
  1041. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  1042. //
  1043. //---- Commit updates -----------
  1044. //
  1045. workTransaction.Commit();
  1046. if ((0 < allAddedRows.Count)) {
  1047. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  1048. allAddedRows.CopyTo(rows);
  1049. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1050. global::System.Data.DataRow row = rows[i];
  1051. row.AcceptChanges();
  1052. }
  1053. }
  1054. if ((0 < allChangedRows.Count)) {
  1055. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  1056. allChangedRows.CopyTo(rows);
  1057. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1058. global::System.Data.DataRow row = rows[i];
  1059. row.AcceptChanges();
  1060. }
  1061. }
  1062. }
  1063. catch (global::System.Exception ex) {
  1064. workTransaction.Rollback();
  1065. // ---- Restore the dataset -----------
  1066. if (this.BackupDataSetBeforeUpdate) {
  1067. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  1068. dataSet.Clear();
  1069. dataSet.Merge(backupDataSet);
  1070. }
  1071. else {
  1072. if ((0 < allAddedRows.Count)) {
  1073. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  1074. allAddedRows.CopyTo(rows);
  1075. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1076. global::System.Data.DataRow row = rows[i];
  1077. row.AcceptChanges();
  1078. row.SetAdded();
  1079. }
  1080. }
  1081. }
  1082. throw ex;
  1083. }
  1084. finally {
  1085. if (workConnOpened) {
  1086. workConnection.Close();
  1087. }
  1088. if ((this._employeeTableAdapter != null)) {
  1089. this._employeeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._employeeTableAdapter]));
  1090. this._employeeTableAdapter.Transaction = null;
  1091. }
  1092. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  1093. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  1094. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  1095. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  1096. global::System.Data.Common.DataAdapter adapter = adapters[i];
  1097. adapter.AcceptChangesDuringUpdate = true;
  1098. }
  1099. }
  1100. }
  1101. return result;
  1102. }
  1103. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1104. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1105. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  1106. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  1107. }
  1108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1109. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1110. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  1111. if ((this._connection != null)) {
  1112. return true;
  1113. }
  1114. if (((this.Connection == null)
  1115. || (inputConnection == null))) {
  1116. return true;
  1117. }
  1118. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  1119. return true;
  1120. }
  1121. return false;
  1122. }
  1123. /// <summary>
  1124. ///Update Order Option
  1125. ///</summary>
  1126. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1127. public enum UpdateOrderOption {
  1128. InsertUpdateDelete = 0,
  1129. UpdateInsertDelete = 1,
  1130. }
  1131. /// <summary>
  1132. ///Used to sort self-referenced table's rows
  1133. ///</summary>
  1134. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1135. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  1136. private global::System.Data.DataRelation _relation;
  1137. private int _childFirst;
  1138. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1139. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1140. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  1141. this._relation = relation;
  1142. if (childFirst) {
  1143. this._childFirst = -1;
  1144. }
  1145. else {
  1146. this._childFirst = 1;
  1147. }
  1148. }
  1149. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1150. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1151. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  1152. global::System.Diagnostics.Debug.Assert((row != null));
  1153. global::System.Data.DataRow root = row;
  1154. distance = 0;
  1155. 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>();
  1156. traversedRows[row] = row;
  1157. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  1158. for (
  1159. ; ((parent != null)
  1160. && (traversedRows.ContainsKey(parent) == false));
  1161. ) {
  1162. distance = (distance + 1);
  1163. root = parent;
  1164. traversedRows[parent] = parent;
  1165. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  1166. }
  1167. if ((distance == 0)) {
  1168. traversedRows.Clear();
  1169. traversedRows[row] = row;
  1170. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  1171. for (
  1172. ; ((parent != null)
  1173. && (traversedRows.ContainsKey(parent) == false));
  1174. ) {
  1175. distance = (distance + 1);
  1176. root = parent;
  1177. traversedRows[parent] = parent;
  1178. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  1179. }
  1180. }
  1181. return root;
  1182. }
  1183. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1184. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1185. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  1186. if (object.ReferenceEquals(row1, row2)) {
  1187. return 0;
  1188. }
  1189. if ((row1 == null)) {
  1190. return -1;
  1191. }
  1192. if ((row2 == null)) {
  1193. return 1;
  1194. }
  1195. int distance1 = 0;
  1196. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  1197. int distance2 = 0;
  1198. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  1199. if (object.ReferenceEquals(root1, root2)) {
  1200. return (this._childFirst * distance1.CompareTo(distance2));
  1201. }
  1202. else {
  1203. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  1204. && (root2.Table != null)));
  1205. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  1206. return -1;
  1207. }
  1208. else {
  1209. return 1;
  1210. }
  1211. }
  1212. }
  1213. }
  1214. }
  1215. }
  1216. #pragma warning restore 1591