VINILDataSet_Pol.Designer.cs 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373
  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_Pol")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class VINILDataSet_Pol : global::System.Data.DataSet {
  22. private PolDataTable tablePol;
  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", "17.0.0.0")]
  26. public VINILDataSet_Pol() {
  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", "17.0.0.0")]
  36. protected VINILDataSet_Pol(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["Pol"] != null)) {
  50. base.Tables.Add(new PolDataTable(ds.Tables["Pol"]));
  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", "17.0.0.0")]
  71. [global::System.ComponentModel.Browsable(false)]
  72. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  73. public PolDataTable Pol {
  74. get {
  75. return this.tablePol;
  76. }
  77. }
  78. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  79. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "17.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", "17.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", "17.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", "17.0.0.0")]
  115. public override global::System.Data.DataSet Clone() {
  116. VINILDataSet_Pol cln = ((VINILDataSet_Pol)(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", "17.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", "17.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", "17.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["Pol"] != null)) {
  139. base.Tables.Add(new PolDataTable(ds.Tables["Pol"]));
  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", "17.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", "17.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", "17.0.0.0")]
  170. internal void InitVars(bool initTable) {
  171. this.tablePol = ((PolDataTable)(base.Tables["Pol"]));
  172. if ((initTable == true)) {
  173. if ((this.tablePol != null)) {
  174. this.tablePol.InitVars();
  175. }
  176. }
  177. }
  178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  179. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  180. private void InitClass() {
  181. this.DataSetName = "VINILDataSet_Pol";
  182. this.Prefix = "";
  183. this.Namespace = "http://tempuri.org/VINILDataSet_Pol.xsd";
  184. this.EnforceConstraints = true;
  185. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  186. this.tablePol = new PolDataTable();
  187. base.Tables.Add(this.tablePol);
  188. }
  189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  190. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  191. private bool ShouldSerializePol() {
  192. return false;
  193. }
  194. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  195. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "17.0.0.0")]
  203. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  204. VINILDataSet_Pol ds = new VINILDataSet_Pol();
  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", "17.0.0.0")]
  248. public delegate void PolRowChangeEventHandler(object sender, PolRowChangeEvent 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 PolDataTable : global::System.Data.TypedTableBase<PolRow> {
  255. private global::System.Data.DataColumn columnid_pol;
  256. private global::System.Data.DataColumn columnpol;
  257. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  258. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  259. public PolDataTable() {
  260. this.TableName = "Pol";
  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", "17.0.0.0")]
  267. internal PolDataTable(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", "17.0.0.0")]
  283. protected PolDataTable(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", "17.0.0.0")]
  289. public global::System.Data.DataColumn id_polColumn {
  290. get {
  291. return this.columnid_pol;
  292. }
  293. }
  294. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  295. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  296. public global::System.Data.DataColumn polColumn {
  297. get {
  298. return this.columnpol;
  299. }
  300. }
  301. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  302. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "17.0.0.0")]
  311. public PolRow this[int index] {
  312. get {
  313. return ((PolRow)(this.Rows[index]));
  314. }
  315. }
  316. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  317. public event PolRowChangeEventHandler PolRowChanging;
  318. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  319. public event PolRowChangeEventHandler PolRowChanged;
  320. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  321. public event PolRowChangeEventHandler PolRowDeleting;
  322. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  323. public event PolRowChangeEventHandler PolRowDeleted;
  324. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  325. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  326. public void AddPolRow(PolRow row) {
  327. this.Rows.Add(row);
  328. }
  329. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  330. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  331. public PolRow AddPolRow(string pol) {
  332. PolRow rowPolRow = ((PolRow)(this.NewRow()));
  333. object[] columnValuesArray = new object[] {
  334. null,
  335. pol};
  336. rowPolRow.ItemArray = columnValuesArray;
  337. this.Rows.Add(rowPolRow);
  338. return rowPolRow;
  339. }
  340. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  341. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  342. public PolRow FindByid_pol(int id_pol) {
  343. return ((PolRow)(this.Rows.Find(new object[] {
  344. id_pol})));
  345. }
  346. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  347. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  348. public override global::System.Data.DataTable Clone() {
  349. PolDataTable cln = ((PolDataTable)(base.Clone()));
  350. cln.InitVars();
  351. return cln;
  352. }
  353. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  354. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  355. protected override global::System.Data.DataTable CreateInstance() {
  356. return new PolDataTable();
  357. }
  358. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  359. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  360. internal void InitVars() {
  361. this.columnid_pol = base.Columns["id_pol"];
  362. this.columnpol = base.Columns["pol"];
  363. }
  364. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  365. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  366. private void InitClass() {
  367. this.columnid_pol = new global::System.Data.DataColumn("id_pol", typeof(int), null, global::System.Data.MappingType.Element);
  368. base.Columns.Add(this.columnid_pol);
  369. this.columnpol = new global::System.Data.DataColumn("pol", typeof(string), null, global::System.Data.MappingType.Element);
  370. base.Columns.Add(this.columnpol);
  371. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  372. this.columnid_pol}, true));
  373. this.columnid_pol.AutoIncrement = true;
  374. this.columnid_pol.AutoIncrementSeed = -1;
  375. this.columnid_pol.AutoIncrementStep = -1;
  376. this.columnid_pol.AllowDBNull = false;
  377. this.columnid_pol.ReadOnly = true;
  378. this.columnid_pol.Unique = true;
  379. this.columnpol.AllowDBNull = false;
  380. this.columnpol.MaxLength = 3;
  381. }
  382. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  383. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  384. public PolRow NewPolRow() {
  385. return ((PolRow)(this.NewRow()));
  386. }
  387. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  388. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  389. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  390. return new PolRow(builder);
  391. }
  392. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  393. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  394. protected override global::System.Type GetRowType() {
  395. return typeof(PolRow);
  396. }
  397. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  398. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  399. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  400. base.OnRowChanged(e);
  401. if ((this.PolRowChanged != null)) {
  402. this.PolRowChanged(this, new PolRowChangeEvent(((PolRow)(e.Row)), e.Action));
  403. }
  404. }
  405. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  406. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  407. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  408. base.OnRowChanging(e);
  409. if ((this.PolRowChanging != null)) {
  410. this.PolRowChanging(this, new PolRowChangeEvent(((PolRow)(e.Row)), e.Action));
  411. }
  412. }
  413. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  414. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  415. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  416. base.OnRowDeleted(e);
  417. if ((this.PolRowDeleted != null)) {
  418. this.PolRowDeleted(this, new PolRowChangeEvent(((PolRow)(e.Row)), e.Action));
  419. }
  420. }
  421. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  422. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  423. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  424. base.OnRowDeleting(e);
  425. if ((this.PolRowDeleting != null)) {
  426. this.PolRowDeleting(this, new PolRowChangeEvent(((PolRow)(e.Row)), e.Action));
  427. }
  428. }
  429. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  430. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  431. public void RemovePolRow(PolRow row) {
  432. this.Rows.Remove(row);
  433. }
  434. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  435. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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_Pol ds = new VINILDataSet_Pol();
  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 = "PolDataTable";
  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 PolRow : global::System.Data.DataRow {
  501. private PolDataTable tablePol;
  502. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  503. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  504. internal PolRow(global::System.Data.DataRowBuilder rb) :
  505. base(rb) {
  506. this.tablePol = ((PolDataTable)(this.Table));
  507. }
  508. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  509. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  510. public int id_pol {
  511. get {
  512. return ((int)(this[this.tablePol.id_polColumn]));
  513. }
  514. set {
  515. this[this.tablePol.id_polColumn] = value;
  516. }
  517. }
  518. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  519. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  520. public string pol {
  521. get {
  522. return ((string)(this[this.tablePol.polColumn]));
  523. }
  524. set {
  525. this[this.tablePol.polColumn] = value;
  526. }
  527. }
  528. }
  529. /// <summary>
  530. ///Row event argument class
  531. ///</summary>
  532. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  533. public class PolRowChangeEvent : global::System.EventArgs {
  534. private PolRow eventRow;
  535. private global::System.Data.DataRowAction eventAction;
  536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  537. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  538. public PolRowChangeEvent(PolRow 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", "17.0.0.0")]
  544. public PolRow Row {
  545. get {
  546. return this.eventRow;
  547. }
  548. }
  549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  550. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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_PolTableAdapters {
  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 PolTableAdapter : 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", "17.0.0.0")]
  577. public PolTableAdapter() {
  578. this.ClearBeforeFill = true;
  579. }
  580. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  581. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.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", "17.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", "17.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", "17.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", "17.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", "17.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 = "Pol";
  669. tableMapping.ColumnMappings.Add("id_pol", "id_pol");
  670. tableMapping.ColumnMappings.Add("pol", "pol");
  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].[Pol] WHERE (([id_pol] = @Original_id_pol) AND ([pol] = @Origin" +
  675. "al_pol))";
  676. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  677. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_pol", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_pol", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  678. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_pol", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pol", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  679. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  680. this._adapter.InsertCommand.Connection = this.Connection;
  681. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Pol] ([pol]) VALUES (@pol);\r\nSELECT id_pol, pol FROM Pol WHERE" +
  682. " (id_pol = SCOPE_IDENTITY())";
  683. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  684. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@pol", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pol", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  685. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  686. this._adapter.UpdateCommand.Connection = this.Connection;
  687. this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Pol] SET [pol] = @pol WHERE (([id_pol] = @Original_id_pol) AND ([po" +
  688. "l] = @Original_pol));\r\nSELECT id_pol, pol FROM Pol WHERE (id_pol = @id_pol)";
  689. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  690. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@pol", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pol", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  691. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_pol", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_pol", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  692. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_pol", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pol", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  693. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_pol", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "id_pol", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  694. }
  695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  696. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  697. private void InitConnection() {
  698. this._connection = new global::System.Data.SqlClient.SqlConnection();
  699. this._connection.ConnectionString = global::proba.Properties.Settings.Default.VINILConnectionString_Country;
  700. }
  701. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  702. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  703. private void InitCommandCollection() {
  704. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  705. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  706. this._commandCollection[0].Connection = this.Connection;
  707. this._commandCollection[0].CommandText = "SELECT id_pol, pol FROM dbo.Pol";
  708. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  709. }
  710. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  711. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  712. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  713. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  714. public virtual int Fill(VINILDataSet_Pol.PolDataTable dataTable) {
  715. this.Adapter.SelectCommand = this.CommandCollection[0];
  716. if ((this.ClearBeforeFill == true)) {
  717. dataTable.Clear();
  718. }
  719. int returnValue = this.Adapter.Fill(dataTable);
  720. return returnValue;
  721. }
  722. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  723. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  724. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  725. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  726. public virtual VINILDataSet_Pol.PolDataTable GetData() {
  727. this.Adapter.SelectCommand = this.CommandCollection[0];
  728. VINILDataSet_Pol.PolDataTable dataTable = new VINILDataSet_Pol.PolDataTable();
  729. this.Adapter.Fill(dataTable);
  730. return dataTable;
  731. }
  732. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  733. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  734. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  735. public virtual int Update(VINILDataSet_Pol.PolDataTable dataTable) {
  736. return this.Adapter.Update(dataTable);
  737. }
  738. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  739. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  740. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  741. public virtual int Update(VINILDataSet_Pol dataSet) {
  742. return this.Adapter.Update(dataSet, "Pol");
  743. }
  744. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  745. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  746. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  747. public virtual int Update(global::System.Data.DataRow dataRow) {
  748. return this.Adapter.Update(new global::System.Data.DataRow[] {
  749. dataRow});
  750. }
  751. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  752. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  753. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  754. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  755. return this.Adapter.Update(dataRows);
  756. }
  757. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  758. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  759. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  760. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  761. public virtual int Delete(int Original_id_pol, string Original_pol) {
  762. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id_pol));
  763. if ((Original_pol == null)) {
  764. throw new global::System.ArgumentNullException("Original_pol");
  765. }
  766. else {
  767. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_pol));
  768. }
  769. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  770. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  771. != global::System.Data.ConnectionState.Open)) {
  772. this.Adapter.DeleteCommand.Connection.Open();
  773. }
  774. try {
  775. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  776. return returnValue;
  777. }
  778. finally {
  779. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  780. this.Adapter.DeleteCommand.Connection.Close();
  781. }
  782. }
  783. }
  784. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  785. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  786. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  787. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  788. public virtual int Insert(string pol) {
  789. if ((pol == null)) {
  790. throw new global::System.ArgumentNullException("pol");
  791. }
  792. else {
  793. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(pol));
  794. }
  795. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  796. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  797. != global::System.Data.ConnectionState.Open)) {
  798. this.Adapter.InsertCommand.Connection.Open();
  799. }
  800. try {
  801. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  802. return returnValue;
  803. }
  804. finally {
  805. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  806. this.Adapter.InsertCommand.Connection.Close();
  807. }
  808. }
  809. }
  810. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  811. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  812. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  813. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  814. public virtual int Update(string pol, int Original_id_pol, string Original_pol, int id_pol) {
  815. if ((pol == null)) {
  816. throw new global::System.ArgumentNullException("pol");
  817. }
  818. else {
  819. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(pol));
  820. }
  821. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_id_pol));
  822. if ((Original_pol == null)) {
  823. throw new global::System.ArgumentNullException("Original_pol");
  824. }
  825. else {
  826. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_pol));
  827. }
  828. this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(id_pol));
  829. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  830. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  831. != global::System.Data.ConnectionState.Open)) {
  832. this.Adapter.UpdateCommand.Connection.Open();
  833. }
  834. try {
  835. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  836. return returnValue;
  837. }
  838. finally {
  839. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  840. this.Adapter.UpdateCommand.Connection.Close();
  841. }
  842. }
  843. }
  844. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  845. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  846. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  847. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  848. public virtual int Update(string pol, int Original_id_pol, string Original_pol) {
  849. return this.Update(pol, Original_id_pol, Original_pol, Original_id_pol);
  850. }
  851. }
  852. /// <summary>
  853. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  854. ///</summary>
  855. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  856. [global::System.ComponentModel.ToolboxItem(true)]
  857. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  858. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  859. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  860. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  861. private UpdateOrderOption _updateOrder;
  862. private PolTableAdapter _polTableAdapter;
  863. private bool _backupDataSetBeforeUpdate;
  864. private global::System.Data.IDbConnection _connection;
  865. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  866. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  867. public UpdateOrderOption UpdateOrder {
  868. get {
  869. return this._updateOrder;
  870. }
  871. set {
  872. this._updateOrder = value;
  873. }
  874. }
  875. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  876. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  877. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  878. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  879. "a", "System.Drawing.Design.UITypeEditor")]
  880. public PolTableAdapter PolTableAdapter {
  881. get {
  882. return this._polTableAdapter;
  883. }
  884. set {
  885. this._polTableAdapter = value;
  886. }
  887. }
  888. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  889. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  890. public bool BackupDataSetBeforeUpdate {
  891. get {
  892. return this._backupDataSetBeforeUpdate;
  893. }
  894. set {
  895. this._backupDataSetBeforeUpdate = value;
  896. }
  897. }
  898. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  899. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  900. [global::System.ComponentModel.Browsable(false)]
  901. public global::System.Data.IDbConnection Connection {
  902. get {
  903. if ((this._connection != null)) {
  904. return this._connection;
  905. }
  906. if (((this._polTableAdapter != null)
  907. && (this._polTableAdapter.Connection != null))) {
  908. return this._polTableAdapter.Connection;
  909. }
  910. return null;
  911. }
  912. set {
  913. this._connection = value;
  914. }
  915. }
  916. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  917. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  918. [global::System.ComponentModel.Browsable(false)]
  919. public int TableAdapterInstanceCount {
  920. get {
  921. int count = 0;
  922. if ((this._polTableAdapter != null)) {
  923. count = (count + 1);
  924. }
  925. return count;
  926. }
  927. }
  928. /// <summary>
  929. ///Update rows in top-down order.
  930. ///</summary>
  931. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  932. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  933. private int UpdateUpdatedRows(VINILDataSet_Pol dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  934. int result = 0;
  935. if ((this._polTableAdapter != null)) {
  936. global::System.Data.DataRow[] updatedRows = dataSet.Pol.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  937. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  938. if (((updatedRows != null)
  939. && (0 < updatedRows.Length))) {
  940. result = (result + this._polTableAdapter.Update(updatedRows));
  941. allChangedRows.AddRange(updatedRows);
  942. }
  943. }
  944. return result;
  945. }
  946. /// <summary>
  947. ///Insert rows in top-down order.
  948. ///</summary>
  949. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  950. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  951. private int UpdateInsertedRows(VINILDataSet_Pol dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  952. int result = 0;
  953. if ((this._polTableAdapter != null)) {
  954. global::System.Data.DataRow[] addedRows = dataSet.Pol.Select(null, null, global::System.Data.DataViewRowState.Added);
  955. if (((addedRows != null)
  956. && (0 < addedRows.Length))) {
  957. result = (result + this._polTableAdapter.Update(addedRows));
  958. allAddedRows.AddRange(addedRows);
  959. }
  960. }
  961. return result;
  962. }
  963. /// <summary>
  964. ///Delete rows in bottom-up order.
  965. ///</summary>
  966. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  967. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  968. private int UpdateDeletedRows(VINILDataSet_Pol dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  969. int result = 0;
  970. if ((this._polTableAdapter != null)) {
  971. global::System.Data.DataRow[] deletedRows = dataSet.Pol.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  972. if (((deletedRows != null)
  973. && (0 < deletedRows.Length))) {
  974. result = (result + this._polTableAdapter.Update(deletedRows));
  975. allChangedRows.AddRange(deletedRows);
  976. }
  977. }
  978. return result;
  979. }
  980. /// <summary>
  981. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  982. ///</summary>
  983. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  984. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  985. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  986. if (((updatedRows == null)
  987. || (updatedRows.Length < 1))) {
  988. return updatedRows;
  989. }
  990. if (((allAddedRows == null)
  991. || (allAddedRows.Count < 1))) {
  992. return updatedRows;
  993. }
  994. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  995. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  996. global::System.Data.DataRow row = updatedRows[i];
  997. if ((allAddedRows.Contains(row) == false)) {
  998. realUpdatedRows.Add(row);
  999. }
  1000. }
  1001. return realUpdatedRows.ToArray();
  1002. }
  1003. /// <summary>
  1004. ///Update all changes to the dataset.
  1005. ///</summary>
  1006. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1007. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1008. public virtual int UpdateAll(VINILDataSet_Pol dataSet) {
  1009. if ((dataSet == null)) {
  1010. throw new global::System.ArgumentNullException("dataSet");
  1011. }
  1012. if ((dataSet.HasChanges() == false)) {
  1013. return 0;
  1014. }
  1015. if (((this._polTableAdapter != null)
  1016. && (this.MatchTableAdapterConnection(this._polTableAdapter.Connection) == false))) {
  1017. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  1018. "r, должны использовать одинаковую строку подключения.");
  1019. }
  1020. global::System.Data.IDbConnection workConnection = this.Connection;
  1021. if ((workConnection == null)) {
  1022. throw new global::System.ApplicationException("TableAdapterManager не содержит сведений о подключении. Укажите для каждого адапт" +
  1023. "ера таблицы TableAdapterManager допустимый экземпляр адаптера таблицы.");
  1024. }
  1025. bool workConnOpened = false;
  1026. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  1027. == global::System.Data.ConnectionState.Broken)) {
  1028. workConnection.Close();
  1029. }
  1030. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  1031. workConnection.Open();
  1032. workConnOpened = true;
  1033. }
  1034. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  1035. if ((workTransaction == null)) {
  1036. throw new global::System.ApplicationException("Не удается начать транзакцию. Текущее соединение данных не поддерживает транзакци" +
  1037. "и или текущее состояние не позволяет начать транзакцию.");
  1038. }
  1039. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1040. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1041. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  1042. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  1043. int result = 0;
  1044. global::System.Data.DataSet backupDataSet = null;
  1045. if (this.BackupDataSetBeforeUpdate) {
  1046. backupDataSet = new global::System.Data.DataSet();
  1047. backupDataSet.Merge(dataSet);
  1048. }
  1049. try {
  1050. // ---- Prepare for update -----------
  1051. //
  1052. if ((this._polTableAdapter != null)) {
  1053. revertConnections.Add(this._polTableAdapter, this._polTableAdapter.Connection);
  1054. this._polTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  1055. this._polTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  1056. if (this._polTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  1057. this._polTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  1058. adaptersWithAcceptChangesDuringUpdate.Add(this._polTableAdapter.Adapter);
  1059. }
  1060. }
  1061. //
  1062. //---- Perform updates -----------
  1063. //
  1064. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  1065. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  1066. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  1067. }
  1068. else {
  1069. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  1070. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  1071. }
  1072. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  1073. //
  1074. //---- Commit updates -----------
  1075. //
  1076. workTransaction.Commit();
  1077. if ((0 < allAddedRows.Count)) {
  1078. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  1079. allAddedRows.CopyTo(rows);
  1080. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1081. global::System.Data.DataRow row = rows[i];
  1082. row.AcceptChanges();
  1083. }
  1084. }
  1085. if ((0 < allChangedRows.Count)) {
  1086. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  1087. allChangedRows.CopyTo(rows);
  1088. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1089. global::System.Data.DataRow row = rows[i];
  1090. row.AcceptChanges();
  1091. }
  1092. }
  1093. }
  1094. catch (global::System.Exception ex) {
  1095. workTransaction.Rollback();
  1096. // ---- Restore the dataset -----------
  1097. if (this.BackupDataSetBeforeUpdate) {
  1098. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  1099. dataSet.Clear();
  1100. dataSet.Merge(backupDataSet);
  1101. }
  1102. else {
  1103. if ((0 < allAddedRows.Count)) {
  1104. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  1105. allAddedRows.CopyTo(rows);
  1106. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1107. global::System.Data.DataRow row = rows[i];
  1108. row.AcceptChanges();
  1109. row.SetAdded();
  1110. }
  1111. }
  1112. }
  1113. throw ex;
  1114. }
  1115. finally {
  1116. if (workConnOpened) {
  1117. workConnection.Close();
  1118. }
  1119. if ((this._polTableAdapter != null)) {
  1120. this._polTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._polTableAdapter]));
  1121. this._polTableAdapter.Transaction = null;
  1122. }
  1123. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  1124. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  1125. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  1126. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  1127. global::System.Data.Common.DataAdapter adapter = adapters[i];
  1128. adapter.AcceptChangesDuringUpdate = true;
  1129. }
  1130. }
  1131. }
  1132. return result;
  1133. }
  1134. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1135. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1136. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  1137. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  1138. }
  1139. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1140. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1141. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  1142. if ((this._connection != null)) {
  1143. return true;
  1144. }
  1145. if (((this.Connection == null)
  1146. || (inputConnection == null))) {
  1147. return true;
  1148. }
  1149. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  1150. return true;
  1151. }
  1152. return false;
  1153. }
  1154. /// <summary>
  1155. ///Update Order Option
  1156. ///</summary>
  1157. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1158. public enum UpdateOrderOption {
  1159. InsertUpdateDelete = 0,
  1160. UpdateInsertDelete = 1,
  1161. }
  1162. /// <summary>
  1163. ///Used to sort self-referenced table's rows
  1164. ///</summary>
  1165. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1166. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  1167. private global::System.Data.DataRelation _relation;
  1168. private int _childFirst;
  1169. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1170. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1171. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  1172. this._relation = relation;
  1173. if (childFirst) {
  1174. this._childFirst = -1;
  1175. }
  1176. else {
  1177. this._childFirst = 1;
  1178. }
  1179. }
  1180. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1181. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1182. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  1183. global::System.Diagnostics.Debug.Assert((row != null));
  1184. global::System.Data.DataRow root = row;
  1185. distance = 0;
  1186. 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>();
  1187. traversedRows[row] = row;
  1188. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  1189. for (
  1190. ; ((parent != null)
  1191. && (traversedRows.ContainsKey(parent) == false));
  1192. ) {
  1193. distance = (distance + 1);
  1194. root = parent;
  1195. traversedRows[parent] = parent;
  1196. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  1197. }
  1198. if ((distance == 0)) {
  1199. traversedRows.Clear();
  1200. traversedRows[row] = row;
  1201. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  1202. for (
  1203. ; ((parent != null)
  1204. && (traversedRows.ContainsKey(parent) == false));
  1205. ) {
  1206. distance = (distance + 1);
  1207. root = parent;
  1208. traversedRows[parent] = parent;
  1209. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  1210. }
  1211. }
  1212. return root;
  1213. }
  1214. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1215. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1216. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  1217. if (object.ReferenceEquals(row1, row2)) {
  1218. return 0;
  1219. }
  1220. if ((row1 == null)) {
  1221. return -1;
  1222. }
  1223. if ((row2 == null)) {
  1224. return 1;
  1225. }
  1226. int distance1 = 0;
  1227. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  1228. int distance2 = 0;
  1229. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  1230. if (object.ReferenceEquals(root1, root2)) {
  1231. return (this._childFirst * distance1.CompareTo(distance2));
  1232. }
  1233. else {
  1234. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  1235. && (root2.Table != null)));
  1236. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  1237. return -1;
  1238. }
  1239. else {
  1240. return 1;
  1241. }
  1242. }
  1243. }
  1244. }
  1245. }
  1246. }
  1247. #pragma warning restore 1591