Девяток_ДЭDataSet.Designer.cs 102 KB

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