VINILDataSet_Products.Designer.cs 103 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734
  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_Products")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class VINILDataSet_Products : global::System.Data.DataSet {
  22. private ProductsDataTable tableProducts;
  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_Products() {
  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_Products(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["Products"] != null)) {
  50. base.Tables.Add(new ProductsDataTable(ds.Tables["Products"]));
  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 ProductsDataTable Products {
  74. get {
  75. return this.tableProducts;
  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_Products cln = ((VINILDataSet_Products)(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["Products"] != null)) {
  139. base.Tables.Add(new ProductsDataTable(ds.Tables["Products"]));
  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.tableProducts = ((ProductsDataTable)(base.Tables["Products"]));
  172. if ((initTable == true)) {
  173. if ((this.tableProducts != null)) {
  174. this.tableProducts.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_Products";
  182. this.Prefix = "";
  183. this.Namespace = "http://tempuri.org/VINILDataSet_Products.xsd";
  184. this.EnforceConstraints = true;
  185. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  186. this.tableProducts = new ProductsDataTable();
  187. base.Tables.Add(this.tableProducts);
  188. }
  189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  190. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  191. private bool ShouldSerializeProducts() {
  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_Products ds = new VINILDataSet_Products();
  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 ProductsRowChangeEventHandler(object sender, ProductsRowChangeEvent 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 ProductsDataTable : global::System.Data.TypedTableBase<ProductsRow> {
  255. private global::System.Data.DataColumn columnid_product;
  256. private global::System.Data.DataColumn columnproduct;
  257. private global::System.Data.DataColumn columndescription;
  258. private global::System.Data.DataColumn columnprice;
  259. private global::System.Data.DataColumn columnyear_publishing;
  260. private global::System.Data.DataColumn columnid_country;
  261. private global::System.Data.DataColumn columnid_edition;
  262. private global::System.Data.DataColumn columnid_genre;
  263. private global::System.Data.DataColumn columnid_performer;
  264. private global::System.Data.DataColumn columnid_supplier;
  265. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  266. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  267. public ProductsDataTable() {
  268. this.TableName = "Products";
  269. this.BeginInit();
  270. this.InitClass();
  271. this.EndInit();
  272. }
  273. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  274. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  275. internal ProductsDataTable(global::System.Data.DataTable table) {
  276. this.TableName = table.TableName;
  277. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  278. this.CaseSensitive = table.CaseSensitive;
  279. }
  280. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  281. this.Locale = table.Locale;
  282. }
  283. if ((table.Namespace != table.DataSet.Namespace)) {
  284. this.Namespace = table.Namespace;
  285. }
  286. this.Prefix = table.Prefix;
  287. this.MinimumCapacity = table.MinimumCapacity;
  288. }
  289. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  290. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  291. protected ProductsDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  292. base(info, context) {
  293. this.InitVars();
  294. }
  295. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  296. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  297. public global::System.Data.DataColumn id_productColumn {
  298. get {
  299. return this.columnid_product;
  300. }
  301. }
  302. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  303. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  304. public global::System.Data.DataColumn productColumn {
  305. get {
  306. return this.columnproduct;
  307. }
  308. }
  309. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  310. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  311. public global::System.Data.DataColumn descriptionColumn {
  312. get {
  313. return this.columndescription;
  314. }
  315. }
  316. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  317. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  318. public global::System.Data.DataColumn priceColumn {
  319. get {
  320. return this.columnprice;
  321. }
  322. }
  323. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  324. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  325. public global::System.Data.DataColumn year_publishingColumn {
  326. get {
  327. return this.columnyear_publishing;
  328. }
  329. }
  330. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  331. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  332. public global::System.Data.DataColumn id_countryColumn {
  333. get {
  334. return this.columnid_country;
  335. }
  336. }
  337. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  338. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  339. public global::System.Data.DataColumn id_editionColumn {
  340. get {
  341. return this.columnid_edition;
  342. }
  343. }
  344. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  345. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  346. public global::System.Data.DataColumn id_genreColumn {
  347. get {
  348. return this.columnid_genre;
  349. }
  350. }
  351. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  352. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  353. public global::System.Data.DataColumn id_performerColumn {
  354. get {
  355. return this.columnid_performer;
  356. }
  357. }
  358. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  359. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  360. public global::System.Data.DataColumn id_supplierColumn {
  361. get {
  362. return this.columnid_supplier;
  363. }
  364. }
  365. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  366. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  367. [global::System.ComponentModel.Browsable(false)]
  368. public int Count {
  369. get {
  370. return this.Rows.Count;
  371. }
  372. }
  373. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  374. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  375. public ProductsRow this[int index] {
  376. get {
  377. return ((ProductsRow)(this.Rows[index]));
  378. }
  379. }
  380. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  381. public event ProductsRowChangeEventHandler ProductsRowChanging;
  382. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  383. public event ProductsRowChangeEventHandler ProductsRowChanged;
  384. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  385. public event ProductsRowChangeEventHandler ProductsRowDeleting;
  386. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  387. public event ProductsRowChangeEventHandler ProductsRowDeleted;
  388. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  389. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  390. public void AddProductsRow(ProductsRow row) {
  391. this.Rows.Add(row);
  392. }
  393. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  394. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  395. public ProductsRow AddProductsRow(string product, string description, double price, string year_publishing, int id_country, int id_edition, int id_genre, int id_performer, int id_supplier) {
  396. ProductsRow rowProductsRow = ((ProductsRow)(this.NewRow()));
  397. object[] columnValuesArray = new object[] {
  398. null,
  399. product,
  400. description,
  401. price,
  402. year_publishing,
  403. id_country,
  404. id_edition,
  405. id_genre,
  406. id_performer,
  407. id_supplier};
  408. rowProductsRow.ItemArray = columnValuesArray;
  409. this.Rows.Add(rowProductsRow);
  410. return rowProductsRow;
  411. }
  412. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  413. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  414. public ProductsRow FindByid_product(int id_product) {
  415. return ((ProductsRow)(this.Rows.Find(new object[] {
  416. id_product})));
  417. }
  418. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  419. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  420. public override global::System.Data.DataTable Clone() {
  421. ProductsDataTable cln = ((ProductsDataTable)(base.Clone()));
  422. cln.InitVars();
  423. return cln;
  424. }
  425. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  426. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  427. protected override global::System.Data.DataTable CreateInstance() {
  428. return new ProductsDataTable();
  429. }
  430. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  431. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  432. internal void InitVars() {
  433. this.columnid_product = base.Columns["id_product"];
  434. this.columnproduct = base.Columns["product"];
  435. this.columndescription = base.Columns["description"];
  436. this.columnprice = base.Columns["price"];
  437. this.columnyear_publishing = base.Columns["year_publishing"];
  438. this.columnid_country = base.Columns["id_country"];
  439. this.columnid_edition = base.Columns["id_edition"];
  440. this.columnid_genre = base.Columns["id_genre"];
  441. this.columnid_performer = base.Columns["id_performer"];
  442. this.columnid_supplier = base.Columns["id_supplier"];
  443. }
  444. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  445. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  446. private void InitClass() {
  447. this.columnid_product = new global::System.Data.DataColumn("id_product", typeof(int), null, global::System.Data.MappingType.Element);
  448. base.Columns.Add(this.columnid_product);
  449. this.columnproduct = new global::System.Data.DataColumn("product", typeof(string), null, global::System.Data.MappingType.Element);
  450. base.Columns.Add(this.columnproduct);
  451. this.columndescription = new global::System.Data.DataColumn("description", typeof(string), null, global::System.Data.MappingType.Element);
  452. base.Columns.Add(this.columndescription);
  453. this.columnprice = new global::System.Data.DataColumn("price", typeof(double), null, global::System.Data.MappingType.Element);
  454. base.Columns.Add(this.columnprice);
  455. this.columnyear_publishing = new global::System.Data.DataColumn("year_publishing", typeof(string), null, global::System.Data.MappingType.Element);
  456. base.Columns.Add(this.columnyear_publishing);
  457. this.columnid_country = new global::System.Data.DataColumn("id_country", typeof(int), null, global::System.Data.MappingType.Element);
  458. base.Columns.Add(this.columnid_country);
  459. this.columnid_edition = new global::System.Data.DataColumn("id_edition", typeof(int), null, global::System.Data.MappingType.Element);
  460. base.Columns.Add(this.columnid_edition);
  461. this.columnid_genre = new global::System.Data.DataColumn("id_genre", typeof(int), null, global::System.Data.MappingType.Element);
  462. base.Columns.Add(this.columnid_genre);
  463. this.columnid_performer = new global::System.Data.DataColumn("id_performer", typeof(int), null, global::System.Data.MappingType.Element);
  464. base.Columns.Add(this.columnid_performer);
  465. this.columnid_supplier = new global::System.Data.DataColumn("id_supplier", typeof(int), null, global::System.Data.MappingType.Element);
  466. base.Columns.Add(this.columnid_supplier);
  467. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  468. this.columnid_product}, true));
  469. this.columnid_product.AutoIncrement = true;
  470. this.columnid_product.AutoIncrementSeed = -1;
  471. this.columnid_product.AutoIncrementStep = -1;
  472. this.columnid_product.AllowDBNull = false;
  473. this.columnid_product.ReadOnly = true;
  474. this.columnid_product.Unique = true;
  475. this.columnproduct.AllowDBNull = false;
  476. this.columnproduct.MaxLength = 30;
  477. this.columndescription.AllowDBNull = false;
  478. this.columndescription.MaxLength = 30;
  479. this.columnprice.AllowDBNull = false;
  480. this.columnyear_publishing.AllowDBNull = false;
  481. this.columnyear_publishing.MaxLength = 30;
  482. this.columnid_country.AllowDBNull = false;
  483. this.columnid_edition.AllowDBNull = false;
  484. this.columnid_genre.AllowDBNull = false;
  485. this.columnid_performer.AllowDBNull = false;
  486. this.columnid_supplier.AllowDBNull = false;
  487. }
  488. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  489. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  490. public ProductsRow NewProductsRow() {
  491. return ((ProductsRow)(this.NewRow()));
  492. }
  493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  494. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  495. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  496. return new ProductsRow(builder);
  497. }
  498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  499. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  500. protected override global::System.Type GetRowType() {
  501. return typeof(ProductsRow);
  502. }
  503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  504. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  505. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  506. base.OnRowChanged(e);
  507. if ((this.ProductsRowChanged != null)) {
  508. this.ProductsRowChanged(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action));
  509. }
  510. }
  511. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  512. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  513. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  514. base.OnRowChanging(e);
  515. if ((this.ProductsRowChanging != null)) {
  516. this.ProductsRowChanging(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action));
  517. }
  518. }
  519. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  520. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  521. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  522. base.OnRowDeleted(e);
  523. if ((this.ProductsRowDeleted != null)) {
  524. this.ProductsRowDeleted(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action));
  525. }
  526. }
  527. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  528. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  529. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  530. base.OnRowDeleting(e);
  531. if ((this.ProductsRowDeleting != null)) {
  532. this.ProductsRowDeleting(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action));
  533. }
  534. }
  535. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  536. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  537. public void RemoveProductsRow(ProductsRow row) {
  538. this.Rows.Remove(row);
  539. }
  540. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  541. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  542. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  543. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  544. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  545. VINILDataSet_Products ds = new VINILDataSet_Products();
  546. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  547. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  548. any1.MinOccurs = new decimal(0);
  549. any1.MaxOccurs = decimal.MaxValue;
  550. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  551. sequence.Items.Add(any1);
  552. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  553. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  554. any2.MinOccurs = new decimal(1);
  555. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  556. sequence.Items.Add(any2);
  557. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  558. attribute1.Name = "namespace";
  559. attribute1.FixedValue = ds.Namespace;
  560. type.Attributes.Add(attribute1);
  561. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  562. attribute2.Name = "tableTypeName";
  563. attribute2.FixedValue = "ProductsDataTable";
  564. type.Attributes.Add(attribute2);
  565. type.Particle = sequence;
  566. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  567. if (xs.Contains(dsSchema.TargetNamespace)) {
  568. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  569. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  570. try {
  571. global::System.Xml.Schema.XmlSchema schema = null;
  572. dsSchema.Write(s1);
  573. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  574. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  575. s2.SetLength(0);
  576. schema.Write(s2);
  577. if ((s1.Length == s2.Length)) {
  578. s1.Position = 0;
  579. s2.Position = 0;
  580. for (; ((s1.Position != s1.Length)
  581. && (s1.ReadByte() == s2.ReadByte())); ) {
  582. ;
  583. }
  584. if ((s1.Position == s1.Length)) {
  585. return type;
  586. }
  587. }
  588. }
  589. }
  590. finally {
  591. if ((s1 != null)) {
  592. s1.Close();
  593. }
  594. if ((s2 != null)) {
  595. s2.Close();
  596. }
  597. }
  598. }
  599. xs.Add(dsSchema);
  600. return type;
  601. }
  602. }
  603. /// <summary>
  604. ///Represents strongly named DataRow class.
  605. ///</summary>
  606. public partial class ProductsRow : global::System.Data.DataRow {
  607. private ProductsDataTable tableProducts;
  608. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  609. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  610. internal ProductsRow(global::System.Data.DataRowBuilder rb) :
  611. base(rb) {
  612. this.tableProducts = ((ProductsDataTable)(this.Table));
  613. }
  614. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  615. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  616. public int id_product {
  617. get {
  618. return ((int)(this[this.tableProducts.id_productColumn]));
  619. }
  620. set {
  621. this[this.tableProducts.id_productColumn] = value;
  622. }
  623. }
  624. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  625. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  626. public string product {
  627. get {
  628. return ((string)(this[this.tableProducts.productColumn]));
  629. }
  630. set {
  631. this[this.tableProducts.productColumn] = value;
  632. }
  633. }
  634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  635. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  636. public string description {
  637. get {
  638. return ((string)(this[this.tableProducts.descriptionColumn]));
  639. }
  640. set {
  641. this[this.tableProducts.descriptionColumn] = value;
  642. }
  643. }
  644. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  645. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  646. public double price {
  647. get {
  648. return ((double)(this[this.tableProducts.priceColumn]));
  649. }
  650. set {
  651. this[this.tableProducts.priceColumn] = value;
  652. }
  653. }
  654. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  655. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  656. public string year_publishing {
  657. get {
  658. return ((string)(this[this.tableProducts.year_publishingColumn]));
  659. }
  660. set {
  661. this[this.tableProducts.year_publishingColumn] = value;
  662. }
  663. }
  664. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  665. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  666. public int id_country {
  667. get {
  668. return ((int)(this[this.tableProducts.id_countryColumn]));
  669. }
  670. set {
  671. this[this.tableProducts.id_countryColumn] = value;
  672. }
  673. }
  674. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  675. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  676. public int id_edition {
  677. get {
  678. return ((int)(this[this.tableProducts.id_editionColumn]));
  679. }
  680. set {
  681. this[this.tableProducts.id_editionColumn] = value;
  682. }
  683. }
  684. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  685. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  686. public int id_genre {
  687. get {
  688. return ((int)(this[this.tableProducts.id_genreColumn]));
  689. }
  690. set {
  691. this[this.tableProducts.id_genreColumn] = value;
  692. }
  693. }
  694. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  695. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  696. public int id_performer {
  697. get {
  698. return ((int)(this[this.tableProducts.id_performerColumn]));
  699. }
  700. set {
  701. this[this.tableProducts.id_performerColumn] = value;
  702. }
  703. }
  704. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  705. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  706. public int id_supplier {
  707. get {
  708. return ((int)(this[this.tableProducts.id_supplierColumn]));
  709. }
  710. set {
  711. this[this.tableProducts.id_supplierColumn] = value;
  712. }
  713. }
  714. }
  715. /// <summary>
  716. ///Row event argument class
  717. ///</summary>
  718. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  719. public class ProductsRowChangeEvent : global::System.EventArgs {
  720. private ProductsRow eventRow;
  721. private global::System.Data.DataRowAction eventAction;
  722. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  723. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  724. public ProductsRowChangeEvent(ProductsRow row, global::System.Data.DataRowAction action) {
  725. this.eventRow = row;
  726. this.eventAction = action;
  727. }
  728. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  729. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  730. public ProductsRow Row {
  731. get {
  732. return this.eventRow;
  733. }
  734. }
  735. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  736. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  737. public global::System.Data.DataRowAction Action {
  738. get {
  739. return this.eventAction;
  740. }
  741. }
  742. }
  743. }
  744. }
  745. namespace proba.VINILDataSet_ProductsTableAdapters {
  746. /// <summary>
  747. ///Represents the connection and commands used to retrieve and save data.
  748. ///</summary>
  749. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  750. [global::System.ComponentModel.ToolboxItem(true)]
  751. [global::System.ComponentModel.DataObjectAttribute(true)]
  752. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  753. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  754. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  755. public partial class ProductsTableAdapter : global::System.ComponentModel.Component {
  756. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  757. private global::System.Data.SqlClient.SqlConnection _connection;
  758. private global::System.Data.SqlClient.SqlTransaction _transaction;
  759. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  760. private bool _clearBeforeFill;
  761. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  762. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  763. public ProductsTableAdapter() {
  764. this.ClearBeforeFill = true;
  765. }
  766. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  767. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  768. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  769. get {
  770. if ((this._adapter == null)) {
  771. this.InitAdapter();
  772. }
  773. return this._adapter;
  774. }
  775. }
  776. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  777. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  778. internal global::System.Data.SqlClient.SqlConnection Connection {
  779. get {
  780. if ((this._connection == null)) {
  781. this.InitConnection();
  782. }
  783. return this._connection;
  784. }
  785. set {
  786. this._connection = value;
  787. if ((this.Adapter.InsertCommand != null)) {
  788. this.Adapter.InsertCommand.Connection = value;
  789. }
  790. if ((this.Adapter.DeleteCommand != null)) {
  791. this.Adapter.DeleteCommand.Connection = value;
  792. }
  793. if ((this.Adapter.UpdateCommand != null)) {
  794. this.Adapter.UpdateCommand.Connection = value;
  795. }
  796. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  797. if ((this.CommandCollection[i] != null)) {
  798. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  799. }
  800. }
  801. }
  802. }
  803. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  804. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  805. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  806. get {
  807. return this._transaction;
  808. }
  809. set {
  810. this._transaction = value;
  811. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  812. this.CommandCollection[i].Transaction = this._transaction;
  813. }
  814. if (((this.Adapter != null)
  815. && (this.Adapter.DeleteCommand != null))) {
  816. this.Adapter.DeleteCommand.Transaction = this._transaction;
  817. }
  818. if (((this.Adapter != null)
  819. && (this.Adapter.InsertCommand != null))) {
  820. this.Adapter.InsertCommand.Transaction = this._transaction;
  821. }
  822. if (((this.Adapter != null)
  823. && (this.Adapter.UpdateCommand != null))) {
  824. this.Adapter.UpdateCommand.Transaction = this._transaction;
  825. }
  826. }
  827. }
  828. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  829. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  830. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  831. get {
  832. if ((this._commandCollection == null)) {
  833. this.InitCommandCollection();
  834. }
  835. return this._commandCollection;
  836. }
  837. }
  838. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  839. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  840. public bool ClearBeforeFill {
  841. get {
  842. return this._clearBeforeFill;
  843. }
  844. set {
  845. this._clearBeforeFill = value;
  846. }
  847. }
  848. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  849. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  850. private void InitAdapter() {
  851. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  852. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  853. tableMapping.SourceTable = "Table";
  854. tableMapping.DataSetTable = "Products";
  855. tableMapping.ColumnMappings.Add("id_product", "id_product");
  856. tableMapping.ColumnMappings.Add("product", "product");
  857. tableMapping.ColumnMappings.Add("description", "description");
  858. tableMapping.ColumnMappings.Add("price", "price");
  859. tableMapping.ColumnMappings.Add("year_publishing", "year_publishing");
  860. tableMapping.ColumnMappings.Add("id_country", "id_country");
  861. tableMapping.ColumnMappings.Add("id_edition", "id_edition");
  862. tableMapping.ColumnMappings.Add("id_genre", "id_genre");
  863. tableMapping.ColumnMappings.Add("id_performer", "id_performer");
  864. tableMapping.ColumnMappings.Add("id_supplier", "id_supplier");
  865. this._adapter.TableMappings.Add(tableMapping);
  866. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  867. this._adapter.DeleteCommand.Connection = this.Connection;
  868. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Products] WHERE (([id_product] = @Original_id_product) AND ([product] = @Original_product) AND ([description] = @Original_description) AND ([price] = @Original_price) AND ([year_publishing] = @Original_year_publishing) AND ([id_country] = @Original_id_country) AND ([id_edition] = @Original_id_edition) AND ([id_genre] = @Original_id_genre) AND ([id_performer] = @Original_id_performer) AND ([id_supplier] = @Original_id_supplier))";
  869. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  870. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_product", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_product", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  871. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_product", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "product", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  872. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_description", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "description", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  873. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_price", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "price", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  874. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_year_publishing", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "year_publishing", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  875. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_country", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_country", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  876. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_edition", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_edition", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  877. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_genre", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_genre", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  878. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_performer", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_performer", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  879. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_supplier", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_supplier", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  880. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  881. this._adapter.InsertCommand.Connection = this.Connection;
  882. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Products] ([product], [description], [price], [year_publishing], [id_country], [id_edition], [id_genre], [id_performer], [id_supplier]) VALUES (@product, @description, @price, @year_publishing, @id_country, @id_edition, @id_genre, @id_performer, @id_supplier);
  883. SELECT id_product, product, description, price, year_publishing, id_country, id_edition, id_genre, id_performer, id_supplier FROM Products WHERE (id_product = SCOPE_IDENTITY())";
  884. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  885. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@product", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "product", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  886. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@description", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "description", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  887. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@price", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "price", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  888. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@year_publishing", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "year_publishing", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  889. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_country", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_country", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  890. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_edition", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_edition", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  891. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_genre", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_genre", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  892. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_performer", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_performer", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  893. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_supplier", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_supplier", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  894. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  895. this._adapter.UpdateCommand.Connection = this.Connection;
  896. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Products] SET [product] = @product, [description] = @description, [price] = @price, [year_publishing] = @year_publishing, [id_country] = @id_country, [id_edition] = @id_edition, [id_genre] = @id_genre, [id_performer] = @id_performer, [id_supplier] = @id_supplier WHERE (([id_product] = @Original_id_product) AND ([product] = @Original_product) AND ([description] = @Original_description) AND ([price] = @Original_price) AND ([year_publishing] = @Original_year_publishing) AND ([id_country] = @Original_id_country) AND ([id_edition] = @Original_id_edition) AND ([id_genre] = @Original_id_genre) AND ([id_performer] = @Original_id_performer) AND ([id_supplier] = @Original_id_supplier));
  897. SELECT id_product, product, description, price, year_publishing, id_country, id_edition, id_genre, id_performer, id_supplier FROM Products WHERE (id_product = @id_product)";
  898. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  899. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@product", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "product", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  900. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@description", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "description", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  901. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@price", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "price", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  902. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@year_publishing", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "year_publishing", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  903. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_country", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_country", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  904. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_edition", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_edition", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  905. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_genre", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_genre", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  906. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_performer", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_performer", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  907. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_supplier", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_supplier", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  908. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_product", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_product", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  909. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_product", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "product", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  910. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_description", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "description", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  911. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_price", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "price", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  912. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_year_publishing", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "year_publishing", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  913. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_country", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_country", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  914. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_edition", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_edition", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  915. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_genre", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_genre", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  916. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_performer", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_performer", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  917. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_id_supplier", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "id_supplier", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  918. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_product", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "id_product", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  919. }
  920. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  921. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  922. private void InitConnection() {
  923. this._connection = new global::System.Data.SqlClient.SqlConnection();
  924. this._connection.ConnectionString = global::proba.Properties.Settings.Default.VINILConnectionString_Country;
  925. }
  926. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  927. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  928. private void InitCommandCollection() {
  929. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  930. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  931. this._commandCollection[0].Connection = this.Connection;
  932. this._commandCollection[0].CommandText = "SELECT id_product, product, description, price, year_publishing, id_country, id_e" +
  933. "dition, id_genre, id_performer, id_supplier FROM dbo.Products";
  934. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  935. }
  936. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  937. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  938. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  939. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  940. public virtual int Fill(VINILDataSet_Products.ProductsDataTable dataTable) {
  941. this.Adapter.SelectCommand = this.CommandCollection[0];
  942. if ((this.ClearBeforeFill == true)) {
  943. dataTable.Clear();
  944. }
  945. int returnValue = this.Adapter.Fill(dataTable);
  946. return returnValue;
  947. }
  948. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  949. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  950. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  951. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  952. public virtual VINILDataSet_Products.ProductsDataTable GetData() {
  953. this.Adapter.SelectCommand = this.CommandCollection[0];
  954. VINILDataSet_Products.ProductsDataTable dataTable = new VINILDataSet_Products.ProductsDataTable();
  955. this.Adapter.Fill(dataTable);
  956. return dataTable;
  957. }
  958. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  959. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  960. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  961. public virtual int Update(VINILDataSet_Products.ProductsDataTable dataTable) {
  962. return this.Adapter.Update(dataTable);
  963. }
  964. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  965. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  966. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  967. public virtual int Update(VINILDataSet_Products dataSet) {
  968. return this.Adapter.Update(dataSet, "Products");
  969. }
  970. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  971. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  972. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  973. public virtual int Update(global::System.Data.DataRow dataRow) {
  974. return this.Adapter.Update(new global::System.Data.DataRow[] {
  975. dataRow});
  976. }
  977. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  978. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  979. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  980. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  981. return this.Adapter.Update(dataRows);
  982. }
  983. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  984. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  985. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  986. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  987. public virtual int Delete(int Original_id_product, string Original_product, string Original_description, double Original_price, string Original_year_publishing, int Original_id_country, int Original_id_edition, int Original_id_genre, int Original_id_performer, int Original_id_supplier) {
  988. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id_product));
  989. if ((Original_product == null)) {
  990. throw new global::System.ArgumentNullException("Original_product");
  991. }
  992. else {
  993. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_product));
  994. }
  995. if ((Original_description == null)) {
  996. throw new global::System.ArgumentNullException("Original_description");
  997. }
  998. else {
  999. this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_description));
  1000. }
  1001. this.Adapter.DeleteCommand.Parameters[3].Value = ((double)(Original_price));
  1002. if ((Original_year_publishing == null)) {
  1003. throw new global::System.ArgumentNullException("Original_year_publishing");
  1004. }
  1005. else {
  1006. this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_year_publishing));
  1007. }
  1008. this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_id_country));
  1009. this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_id_edition));
  1010. this.Adapter.DeleteCommand.Parameters[7].Value = ((int)(Original_id_genre));
  1011. this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_id_performer));
  1012. this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(Original_id_supplier));
  1013. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  1014. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1015. != global::System.Data.ConnectionState.Open)) {
  1016. this.Adapter.DeleteCommand.Connection.Open();
  1017. }
  1018. try {
  1019. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  1020. return returnValue;
  1021. }
  1022. finally {
  1023. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1024. this.Adapter.DeleteCommand.Connection.Close();
  1025. }
  1026. }
  1027. }
  1028. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1029. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1030. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1031. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  1032. public virtual int Insert(string product, string description, double price, string year_publishing, int id_country, int id_edition, int id_genre, int id_performer, int id_supplier) {
  1033. if ((product == null)) {
  1034. throw new global::System.ArgumentNullException("product");
  1035. }
  1036. else {
  1037. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(product));
  1038. }
  1039. if ((description == null)) {
  1040. throw new global::System.ArgumentNullException("description");
  1041. }
  1042. else {
  1043. this.Adapter.InsertCommand.Parameters[1].Value = ((string)(description));
  1044. }
  1045. this.Adapter.InsertCommand.Parameters[2].Value = ((double)(price));
  1046. if ((year_publishing == null)) {
  1047. throw new global::System.ArgumentNullException("year_publishing");
  1048. }
  1049. else {
  1050. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(year_publishing));
  1051. }
  1052. this.Adapter.InsertCommand.Parameters[4].Value = ((int)(id_country));
  1053. this.Adapter.InsertCommand.Parameters[5].Value = ((int)(id_edition));
  1054. this.Adapter.InsertCommand.Parameters[6].Value = ((int)(id_genre));
  1055. this.Adapter.InsertCommand.Parameters[7].Value = ((int)(id_performer));
  1056. this.Adapter.InsertCommand.Parameters[8].Value = ((int)(id_supplier));
  1057. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  1058. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1059. != global::System.Data.ConnectionState.Open)) {
  1060. this.Adapter.InsertCommand.Connection.Open();
  1061. }
  1062. try {
  1063. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  1064. return returnValue;
  1065. }
  1066. finally {
  1067. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1068. this.Adapter.InsertCommand.Connection.Close();
  1069. }
  1070. }
  1071. }
  1072. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1073. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1074. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1075. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  1076. public virtual int Update(
  1077. string product,
  1078. string description,
  1079. double price,
  1080. string year_publishing,
  1081. int id_country,
  1082. int id_edition,
  1083. int id_genre,
  1084. int id_performer,
  1085. int id_supplier,
  1086. int Original_id_product,
  1087. string Original_product,
  1088. string Original_description,
  1089. double Original_price,
  1090. string Original_year_publishing,
  1091. int Original_id_country,
  1092. int Original_id_edition,
  1093. int Original_id_genre,
  1094. int Original_id_performer,
  1095. int Original_id_supplier,
  1096. int id_product) {
  1097. if ((product == null)) {
  1098. throw new global::System.ArgumentNullException("product");
  1099. }
  1100. else {
  1101. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(product));
  1102. }
  1103. if ((description == null)) {
  1104. throw new global::System.ArgumentNullException("description");
  1105. }
  1106. else {
  1107. this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(description));
  1108. }
  1109. this.Adapter.UpdateCommand.Parameters[2].Value = ((double)(price));
  1110. if ((year_publishing == null)) {
  1111. throw new global::System.ArgumentNullException("year_publishing");
  1112. }
  1113. else {
  1114. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(year_publishing));
  1115. }
  1116. this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(id_country));
  1117. this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(id_edition));
  1118. this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(id_genre));
  1119. this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(id_performer));
  1120. this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(id_supplier));
  1121. this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_id_product));
  1122. if ((Original_product == null)) {
  1123. throw new global::System.ArgumentNullException("Original_product");
  1124. }
  1125. else {
  1126. this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_product));
  1127. }
  1128. if ((Original_description == null)) {
  1129. throw new global::System.ArgumentNullException("Original_description");
  1130. }
  1131. else {
  1132. this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_description));
  1133. }
  1134. this.Adapter.UpdateCommand.Parameters[12].Value = ((double)(Original_price));
  1135. if ((Original_year_publishing == null)) {
  1136. throw new global::System.ArgumentNullException("Original_year_publishing");
  1137. }
  1138. else {
  1139. this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_year_publishing));
  1140. }
  1141. this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_id_country));
  1142. this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_id_edition));
  1143. this.Adapter.UpdateCommand.Parameters[16].Value = ((int)(Original_id_genre));
  1144. this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_id_performer));
  1145. this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(Original_id_supplier));
  1146. this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(id_product));
  1147. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  1148. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1149. != global::System.Data.ConnectionState.Open)) {
  1150. this.Adapter.UpdateCommand.Connection.Open();
  1151. }
  1152. try {
  1153. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  1154. return returnValue;
  1155. }
  1156. finally {
  1157. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1158. this.Adapter.UpdateCommand.Connection.Close();
  1159. }
  1160. }
  1161. }
  1162. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1163. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1164. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1165. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  1166. public virtual int Update(
  1167. string product,
  1168. string description,
  1169. double price,
  1170. string year_publishing,
  1171. int id_country,
  1172. int id_edition,
  1173. int id_genre,
  1174. int id_performer,
  1175. int id_supplier,
  1176. int Original_id_product,
  1177. string Original_product,
  1178. string Original_description,
  1179. double Original_price,
  1180. string Original_year_publishing,
  1181. int Original_id_country,
  1182. int Original_id_edition,
  1183. int Original_id_genre,
  1184. int Original_id_performer,
  1185. int Original_id_supplier) {
  1186. return this.Update(product, description, price, year_publishing, id_country, id_edition, id_genre, id_performer, id_supplier, Original_id_product, Original_product, Original_description, Original_price, Original_year_publishing, Original_id_country, Original_id_edition, Original_id_genre, Original_id_performer, Original_id_supplier, Original_id_product);
  1187. }
  1188. }
  1189. /// <summary>
  1190. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  1191. ///</summary>
  1192. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1193. [global::System.ComponentModel.ToolboxItem(true)]
  1194. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  1195. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1196. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  1197. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  1198. private UpdateOrderOption _updateOrder;
  1199. private ProductsTableAdapter _productsTableAdapter;
  1200. private bool _backupDataSetBeforeUpdate;
  1201. private global::System.Data.IDbConnection _connection;
  1202. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1203. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1204. public UpdateOrderOption UpdateOrder {
  1205. get {
  1206. return this._updateOrder;
  1207. }
  1208. set {
  1209. this._updateOrder = value;
  1210. }
  1211. }
  1212. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1213. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1214. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  1215. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  1216. "a", "System.Drawing.Design.UITypeEditor")]
  1217. public ProductsTableAdapter ProductsTableAdapter {
  1218. get {
  1219. return this._productsTableAdapter;
  1220. }
  1221. set {
  1222. this._productsTableAdapter = value;
  1223. }
  1224. }
  1225. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1226. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1227. public bool BackupDataSetBeforeUpdate {
  1228. get {
  1229. return this._backupDataSetBeforeUpdate;
  1230. }
  1231. set {
  1232. this._backupDataSetBeforeUpdate = value;
  1233. }
  1234. }
  1235. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1236. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1237. [global::System.ComponentModel.Browsable(false)]
  1238. public global::System.Data.IDbConnection Connection {
  1239. get {
  1240. if ((this._connection != null)) {
  1241. return this._connection;
  1242. }
  1243. if (((this._productsTableAdapter != null)
  1244. && (this._productsTableAdapter.Connection != null))) {
  1245. return this._productsTableAdapter.Connection;
  1246. }
  1247. return null;
  1248. }
  1249. set {
  1250. this._connection = value;
  1251. }
  1252. }
  1253. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1254. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1255. [global::System.ComponentModel.Browsable(false)]
  1256. public int TableAdapterInstanceCount {
  1257. get {
  1258. int count = 0;
  1259. if ((this._productsTableAdapter != null)) {
  1260. count = (count + 1);
  1261. }
  1262. return count;
  1263. }
  1264. }
  1265. /// <summary>
  1266. ///Update rows in top-down order.
  1267. ///</summary>
  1268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1269. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1270. private int UpdateUpdatedRows(VINILDataSet_Products dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  1271. int result = 0;
  1272. if ((this._productsTableAdapter != null)) {
  1273. global::System.Data.DataRow[] updatedRows = dataSet.Products.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  1274. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  1275. if (((updatedRows != null)
  1276. && (0 < updatedRows.Length))) {
  1277. result = (result + this._productsTableAdapter.Update(updatedRows));
  1278. allChangedRows.AddRange(updatedRows);
  1279. }
  1280. }
  1281. return result;
  1282. }
  1283. /// <summary>
  1284. ///Insert rows in top-down order.
  1285. ///</summary>
  1286. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1287. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1288. private int UpdateInsertedRows(VINILDataSet_Products dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  1289. int result = 0;
  1290. if ((this._productsTableAdapter != null)) {
  1291. global::System.Data.DataRow[] addedRows = dataSet.Products.Select(null, null, global::System.Data.DataViewRowState.Added);
  1292. if (((addedRows != null)
  1293. && (0 < addedRows.Length))) {
  1294. result = (result + this._productsTableAdapter.Update(addedRows));
  1295. allAddedRows.AddRange(addedRows);
  1296. }
  1297. }
  1298. return result;
  1299. }
  1300. /// <summary>
  1301. ///Delete rows in bottom-up order.
  1302. ///</summary>
  1303. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1304. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1305. private int UpdateDeletedRows(VINILDataSet_Products dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  1306. int result = 0;
  1307. if ((this._productsTableAdapter != null)) {
  1308. global::System.Data.DataRow[] deletedRows = dataSet.Products.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  1309. if (((deletedRows != null)
  1310. && (0 < deletedRows.Length))) {
  1311. result = (result + this._productsTableAdapter.Update(deletedRows));
  1312. allChangedRows.AddRange(deletedRows);
  1313. }
  1314. }
  1315. return result;
  1316. }
  1317. /// <summary>
  1318. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  1319. ///</summary>
  1320. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1321. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1322. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  1323. if (((updatedRows == null)
  1324. || (updatedRows.Length < 1))) {
  1325. return updatedRows;
  1326. }
  1327. if (((allAddedRows == null)
  1328. || (allAddedRows.Count < 1))) {
  1329. return updatedRows;
  1330. }
  1331. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1332. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  1333. global::System.Data.DataRow row = updatedRows[i];
  1334. if ((allAddedRows.Contains(row) == false)) {
  1335. realUpdatedRows.Add(row);
  1336. }
  1337. }
  1338. return realUpdatedRows.ToArray();
  1339. }
  1340. /// <summary>
  1341. ///Update all changes to the dataset.
  1342. ///</summary>
  1343. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1344. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1345. public virtual int UpdateAll(VINILDataSet_Products dataSet) {
  1346. if ((dataSet == null)) {
  1347. throw new global::System.ArgumentNullException("dataSet");
  1348. }
  1349. if ((dataSet.HasChanges() == false)) {
  1350. return 0;
  1351. }
  1352. if (((this._productsTableAdapter != null)
  1353. && (this.MatchTableAdapterConnection(this._productsTableAdapter.Connection) == false))) {
  1354. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  1355. "r, должны использовать одинаковую строку подключения.");
  1356. }
  1357. global::System.Data.IDbConnection workConnection = this.Connection;
  1358. if ((workConnection == null)) {
  1359. throw new global::System.ApplicationException("TableAdapterManager не содержит сведений о подключении. Укажите для каждого адапт" +
  1360. "ера таблицы TableAdapterManager допустимый экземпляр адаптера таблицы.");
  1361. }
  1362. bool workConnOpened = false;
  1363. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  1364. == global::System.Data.ConnectionState.Broken)) {
  1365. workConnection.Close();
  1366. }
  1367. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  1368. workConnection.Open();
  1369. workConnOpened = true;
  1370. }
  1371. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  1372. if ((workTransaction == null)) {
  1373. throw new global::System.ApplicationException("Не удается начать транзакцию. Текущее соединение данных не поддерживает транзакци" +
  1374. "и или текущее состояние не позволяет начать транзакцию.");
  1375. }
  1376. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1377. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  1378. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  1379. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  1380. int result = 0;
  1381. global::System.Data.DataSet backupDataSet = null;
  1382. if (this.BackupDataSetBeforeUpdate) {
  1383. backupDataSet = new global::System.Data.DataSet();
  1384. backupDataSet.Merge(dataSet);
  1385. }
  1386. try {
  1387. // ---- Prepare for update -----------
  1388. //
  1389. if ((this._productsTableAdapter != null)) {
  1390. revertConnections.Add(this._productsTableAdapter, this._productsTableAdapter.Connection);
  1391. this._productsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  1392. this._productsTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  1393. if (this._productsTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  1394. this._productsTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  1395. adaptersWithAcceptChangesDuringUpdate.Add(this._productsTableAdapter.Adapter);
  1396. }
  1397. }
  1398. //
  1399. //---- Perform updates -----------
  1400. //
  1401. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  1402. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  1403. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  1404. }
  1405. else {
  1406. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  1407. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  1408. }
  1409. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  1410. //
  1411. //---- Commit updates -----------
  1412. //
  1413. workTransaction.Commit();
  1414. if ((0 < allAddedRows.Count)) {
  1415. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  1416. allAddedRows.CopyTo(rows);
  1417. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1418. global::System.Data.DataRow row = rows[i];
  1419. row.AcceptChanges();
  1420. }
  1421. }
  1422. if ((0 < allChangedRows.Count)) {
  1423. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  1424. allChangedRows.CopyTo(rows);
  1425. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1426. global::System.Data.DataRow row = rows[i];
  1427. row.AcceptChanges();
  1428. }
  1429. }
  1430. }
  1431. catch (global::System.Exception ex) {
  1432. workTransaction.Rollback();
  1433. // ---- Restore the dataset -----------
  1434. if (this.BackupDataSetBeforeUpdate) {
  1435. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  1436. dataSet.Clear();
  1437. dataSet.Merge(backupDataSet);
  1438. }
  1439. else {
  1440. if ((0 < allAddedRows.Count)) {
  1441. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  1442. allAddedRows.CopyTo(rows);
  1443. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  1444. global::System.Data.DataRow row = rows[i];
  1445. row.AcceptChanges();
  1446. row.SetAdded();
  1447. }
  1448. }
  1449. }
  1450. throw ex;
  1451. }
  1452. finally {
  1453. if (workConnOpened) {
  1454. workConnection.Close();
  1455. }
  1456. if ((this._productsTableAdapter != null)) {
  1457. this._productsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productsTableAdapter]));
  1458. this._productsTableAdapter.Transaction = null;
  1459. }
  1460. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  1461. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  1462. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  1463. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  1464. global::System.Data.Common.DataAdapter adapter = adapters[i];
  1465. adapter.AcceptChangesDuringUpdate = true;
  1466. }
  1467. }
  1468. }
  1469. return result;
  1470. }
  1471. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1472. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1473. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  1474. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  1475. }
  1476. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1477. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1478. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  1479. if ((this._connection != null)) {
  1480. return true;
  1481. }
  1482. if (((this.Connection == null)
  1483. || (inputConnection == null))) {
  1484. return true;
  1485. }
  1486. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  1487. return true;
  1488. }
  1489. return false;
  1490. }
  1491. /// <summary>
  1492. ///Update Order Option
  1493. ///</summary>
  1494. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1495. public enum UpdateOrderOption {
  1496. InsertUpdateDelete = 0,
  1497. UpdateInsertDelete = 1,
  1498. }
  1499. /// <summary>
  1500. ///Used to sort self-referenced table's rows
  1501. ///</summary>
  1502. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1503. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  1504. private global::System.Data.DataRelation _relation;
  1505. private int _childFirst;
  1506. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1507. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1508. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  1509. this._relation = relation;
  1510. if (childFirst) {
  1511. this._childFirst = -1;
  1512. }
  1513. else {
  1514. this._childFirst = 1;
  1515. }
  1516. }
  1517. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1518. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1519. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  1520. global::System.Diagnostics.Debug.Assert((row != null));
  1521. global::System.Data.DataRow root = row;
  1522. distance = 0;
  1523. 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>();
  1524. traversedRows[row] = row;
  1525. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  1526. for (
  1527. ; ((parent != null)
  1528. && (traversedRows.ContainsKey(parent) == false));
  1529. ) {
  1530. distance = (distance + 1);
  1531. root = parent;
  1532. traversedRows[parent] = parent;
  1533. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  1534. }
  1535. if ((distance == 0)) {
  1536. traversedRows.Clear();
  1537. traversedRows[row] = row;
  1538. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  1539. for (
  1540. ; ((parent != null)
  1541. && (traversedRows.ContainsKey(parent) == false));
  1542. ) {
  1543. distance = (distance + 1);
  1544. root = parent;
  1545. traversedRows[parent] = parent;
  1546. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  1547. }
  1548. }
  1549. return root;
  1550. }
  1551. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1552. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1553. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  1554. if (object.ReferenceEquals(row1, row2)) {
  1555. return 0;
  1556. }
  1557. if ((row1 == null)) {
  1558. return -1;
  1559. }
  1560. if ((row2 == null)) {
  1561. return 1;
  1562. }
  1563. int distance1 = 0;
  1564. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  1565. int distance2 = 0;
  1566. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  1567. if (object.ReferenceEquals(root1, root2)) {
  1568. return (this._childFirst * distance1.CompareTo(distance2));
  1569. }
  1570. else {
  1571. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  1572. && (root2.Table != null)));
  1573. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  1574. return -1;
  1575. }
  1576. else {
  1577. return 1;
  1578. }
  1579. }
  1580. }
  1581. }
  1582. }
  1583. }
  1584. #pragma warning restore 1591