Rp42IvanovaDataSet.Designer.cs 154 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // Этот код создан программой.
  4. // Исполняемая версия:4.0.30319.42000
  5. //
  6. // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
  7. // повторной генерации кода.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. #pragma warning disable 1591
  11. namespace Rp42Ivanova {
  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("Rp42IvanovaDataSet")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class Rp42IvanovaDataSet : global::System.Data.DataSet {
  22. private manufacturerDataTable tablemanufacturer;
  23. private productDataTable tableproduct;
  24. private productsaleDataTable tableproductsale;
  25. private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  26. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  27. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  28. public Rp42IvanovaDataSet() {
  29. this.BeginInit();
  30. this.InitClass();
  31. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  32. base.Tables.CollectionChanged += schemaChangedHandler;
  33. base.Relations.CollectionChanged += schemaChangedHandler;
  34. this.EndInit();
  35. }
  36. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  37. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  38. protected Rp42IvanovaDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  39. base(info, context, false) {
  40. if ((this.IsBinarySerialized(info, context) == true)) {
  41. this.InitVars(false);
  42. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  43. this.Tables.CollectionChanged += schemaChangedHandler1;
  44. this.Relations.CollectionChanged += schemaChangedHandler1;
  45. return;
  46. }
  47. string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
  48. if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  49. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  50. ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  51. if ((ds.Tables["manufacturer"] != null)) {
  52. base.Tables.Add(new manufacturerDataTable(ds.Tables["manufacturer"]));
  53. }
  54. if ((ds.Tables["product"] != null)) {
  55. base.Tables.Add(new productDataTable(ds.Tables["product"]));
  56. }
  57. if ((ds.Tables["productsale"] != null)) {
  58. base.Tables.Add(new productsaleDataTable(ds.Tables["productsale"]));
  59. }
  60. this.DataSetName = ds.DataSetName;
  61. this.Prefix = ds.Prefix;
  62. this.Namespace = ds.Namespace;
  63. this.Locale = ds.Locale;
  64. this.CaseSensitive = ds.CaseSensitive;
  65. this.EnforceConstraints = ds.EnforceConstraints;
  66. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  67. this.InitVars();
  68. }
  69. else {
  70. this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  71. }
  72. this.GetSerializationData(info, context);
  73. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  74. base.Tables.CollectionChanged += schemaChangedHandler;
  75. this.Relations.CollectionChanged += schemaChangedHandler;
  76. }
  77. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  78. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  79. [global::System.ComponentModel.Browsable(false)]
  80. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  81. public manufacturerDataTable manufacturer {
  82. get {
  83. return this.tablemanufacturer;
  84. }
  85. }
  86. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  87. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  88. [global::System.ComponentModel.Browsable(false)]
  89. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  90. public productDataTable product {
  91. get {
  92. return this.tableproduct;
  93. }
  94. }
  95. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  96. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  97. [global::System.ComponentModel.Browsable(false)]
  98. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  99. public productsaleDataTable productsale {
  100. get {
  101. return this.tableproductsale;
  102. }
  103. }
  104. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  105. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  106. [global::System.ComponentModel.BrowsableAttribute(true)]
  107. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
  108. public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
  109. get {
  110. return this._schemaSerializationMode;
  111. }
  112. set {
  113. this._schemaSerializationMode = value;
  114. }
  115. }
  116. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  117. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  118. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  119. public new global::System.Data.DataTableCollection Tables {
  120. get {
  121. return base.Tables;
  122. }
  123. }
  124. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  125. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  126. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  127. public new global::System.Data.DataRelationCollection Relations {
  128. get {
  129. return base.Relations;
  130. }
  131. }
  132. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  133. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  134. protected override void InitializeDerivedDataSet() {
  135. this.BeginInit();
  136. this.InitClass();
  137. this.EndInit();
  138. }
  139. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  140. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  141. public override global::System.Data.DataSet Clone() {
  142. Rp42IvanovaDataSet cln = ((Rp42IvanovaDataSet)(base.Clone()));
  143. cln.InitVars();
  144. cln.SchemaSerializationMode = this.SchemaSerializationMode;
  145. return cln;
  146. }
  147. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  148. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  149. protected override bool ShouldSerializeTables() {
  150. return false;
  151. }
  152. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  153. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  154. protected override bool ShouldSerializeRelations() {
  155. return false;
  156. }
  157. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  158. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  159. protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
  160. if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  161. this.Reset();
  162. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  163. ds.ReadXml(reader);
  164. if ((ds.Tables["manufacturer"] != null)) {
  165. base.Tables.Add(new manufacturerDataTable(ds.Tables["manufacturer"]));
  166. }
  167. if ((ds.Tables["product"] != null)) {
  168. base.Tables.Add(new productDataTable(ds.Tables["product"]));
  169. }
  170. if ((ds.Tables["productsale"] != null)) {
  171. base.Tables.Add(new productsaleDataTable(ds.Tables["productsale"]));
  172. }
  173. this.DataSetName = ds.DataSetName;
  174. this.Prefix = ds.Prefix;
  175. this.Namespace = ds.Namespace;
  176. this.Locale = ds.Locale;
  177. this.CaseSensitive = ds.CaseSensitive;
  178. this.EnforceConstraints = ds.EnforceConstraints;
  179. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  180. this.InitVars();
  181. }
  182. else {
  183. this.ReadXml(reader);
  184. this.InitVars();
  185. }
  186. }
  187. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  188. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  189. protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
  190. global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
  191. this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
  192. stream.Position = 0;
  193. return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
  194. }
  195. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  196. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  197. internal void InitVars() {
  198. this.InitVars(true);
  199. }
  200. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  201. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  202. internal void InitVars(bool initTable) {
  203. this.tablemanufacturer = ((manufacturerDataTable)(base.Tables["manufacturer"]));
  204. if ((initTable == true)) {
  205. if ((this.tablemanufacturer != null)) {
  206. this.tablemanufacturer.InitVars();
  207. }
  208. }
  209. this.tableproduct = ((productDataTable)(base.Tables["product"]));
  210. if ((initTable == true)) {
  211. if ((this.tableproduct != null)) {
  212. this.tableproduct.InitVars();
  213. }
  214. }
  215. this.tableproductsale = ((productsaleDataTable)(base.Tables["productsale"]));
  216. if ((initTable == true)) {
  217. if ((this.tableproductsale != null)) {
  218. this.tableproductsale.InitVars();
  219. }
  220. }
  221. }
  222. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  223. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  224. private void InitClass() {
  225. this.DataSetName = "Rp42IvanovaDataSet";
  226. this.Prefix = "";
  227. this.Namespace = "http://tempuri.org/Rp42IvanovaDataSet.xsd";
  228. this.EnforceConstraints = true;
  229. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  230. this.tablemanufacturer = new manufacturerDataTable();
  231. base.Tables.Add(this.tablemanufacturer);
  232. this.tableproduct = new productDataTable();
  233. base.Tables.Add(this.tableproduct);
  234. this.tableproductsale = new productsaleDataTable();
  235. base.Tables.Add(this.tableproductsale);
  236. }
  237. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  238. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  239. private bool ShouldSerializemanufacturer() {
  240. return false;
  241. }
  242. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  243. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  244. private bool ShouldSerializeproduct() {
  245. return false;
  246. }
  247. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  248. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  249. private bool ShouldSerializeproductsale() {
  250. return false;
  251. }
  252. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  253. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  254. private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
  255. if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
  256. this.InitVars();
  257. }
  258. }
  259. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  260. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  261. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  262. Rp42IvanovaDataSet ds = new Rp42IvanovaDataSet();
  263. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  264. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  265. global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
  266. any.Namespace = ds.Namespace;
  267. sequence.Items.Add(any);
  268. type.Particle = sequence;
  269. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  270. if (xs.Contains(dsSchema.TargetNamespace)) {
  271. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  272. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  273. try {
  274. global::System.Xml.Schema.XmlSchema schema = null;
  275. dsSchema.Write(s1);
  276. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  277. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  278. s2.SetLength(0);
  279. schema.Write(s2);
  280. if ((s1.Length == s2.Length)) {
  281. s1.Position = 0;
  282. s2.Position = 0;
  283. for (; ((s1.Position != s1.Length)
  284. && (s1.ReadByte() == s2.ReadByte())); ) {
  285. ;
  286. }
  287. if ((s1.Position == s1.Length)) {
  288. return type;
  289. }
  290. }
  291. }
  292. }
  293. finally {
  294. if ((s1 != null)) {
  295. s1.Close();
  296. }
  297. if ((s2 != null)) {
  298. s2.Close();
  299. }
  300. }
  301. }
  302. xs.Add(dsSchema);
  303. return type;
  304. }
  305. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  306. public delegate void manufacturerRowChangeEventHandler(object sender, manufacturerRowChangeEvent e);
  307. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  308. public delegate void productRowChangeEventHandler(object sender, productRowChangeEvent e);
  309. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  310. public delegate void productsaleRowChangeEventHandler(object sender, productsaleRowChangeEvent e);
  311. /// <summary>
  312. ///Represents the strongly named DataTable class.
  313. ///</summary>
  314. [global::System.Serializable()]
  315. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  316. public partial class manufacturerDataTable : global::System.Data.TypedTableBase<manufacturerRow> {
  317. private global::System.Data.DataColumn columnНазвание_производителя;
  318. private global::System.Data.DataColumn columnДата_начала_работы;
  319. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  320. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  321. public manufacturerDataTable() {
  322. this.TableName = "manufacturer";
  323. this.BeginInit();
  324. this.InitClass();
  325. this.EndInit();
  326. }
  327. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  328. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  329. internal manufacturerDataTable(global::System.Data.DataTable table) {
  330. this.TableName = table.TableName;
  331. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  332. this.CaseSensitive = table.CaseSensitive;
  333. }
  334. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  335. this.Locale = table.Locale;
  336. }
  337. if ((table.Namespace != table.DataSet.Namespace)) {
  338. this.Namespace = table.Namespace;
  339. }
  340. this.Prefix = table.Prefix;
  341. this.MinimumCapacity = table.MinimumCapacity;
  342. }
  343. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  344. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  345. protected manufacturerDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  346. base(info, context) {
  347. this.InitVars();
  348. }
  349. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  350. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  351. public global::System.Data.DataColumn Название_производителяColumn {
  352. get {
  353. return this.columnНазвание_производителя;
  354. }
  355. }
  356. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  357. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  358. public global::System.Data.DataColumn Дата_начала_работыColumn {
  359. get {
  360. return this.columnДата_начала_работы;
  361. }
  362. }
  363. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  364. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  365. [global::System.ComponentModel.Browsable(false)]
  366. public int Count {
  367. get {
  368. return this.Rows.Count;
  369. }
  370. }
  371. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  372. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  373. public manufacturerRow this[int index] {
  374. get {
  375. return ((manufacturerRow)(this.Rows[index]));
  376. }
  377. }
  378. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  379. public event manufacturerRowChangeEventHandler manufacturerRowChanging;
  380. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  381. public event manufacturerRowChangeEventHandler manufacturerRowChanged;
  382. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  383. public event manufacturerRowChangeEventHandler manufacturerRowDeleting;
  384. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  385. public event manufacturerRowChangeEventHandler manufacturerRowDeleted;
  386. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  387. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  388. public void AddmanufacturerRow(manufacturerRow row) {
  389. this.Rows.Add(row);
  390. }
  391. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  392. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  393. public manufacturerRow AddmanufacturerRow(string Название_производителя, System.DateTime Дата_начала_работы) {
  394. manufacturerRow rowmanufacturerRow = ((manufacturerRow)(this.NewRow()));
  395. object[] columnValuesArray = new object[] {
  396. Название_производителя,
  397. Дата_начала_работы};
  398. rowmanufacturerRow.ItemArray = columnValuesArray;
  399. this.Rows.Add(rowmanufacturerRow);
  400. return rowmanufacturerRow;
  401. }
  402. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  403. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  404. public override global::System.Data.DataTable Clone() {
  405. manufacturerDataTable cln = ((manufacturerDataTable)(base.Clone()));
  406. cln.InitVars();
  407. return cln;
  408. }
  409. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  410. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  411. protected override global::System.Data.DataTable CreateInstance() {
  412. return new manufacturerDataTable();
  413. }
  414. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  415. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  416. internal void InitVars() {
  417. this.columnНазвание_производителя = base.Columns["Название_производителя"];
  418. this.columnДата_начала_работы = base.Columns["Дата_начала_работы"];
  419. }
  420. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  421. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  422. private void InitClass() {
  423. this.columnНазвание_производителя = new global::System.Data.DataColumn("Название_производителя", typeof(string), null, global::System.Data.MappingType.Element);
  424. base.Columns.Add(this.columnНазвание_производителя);
  425. this.columnДата_начала_работы = new global::System.Data.DataColumn("Дата_начала_работы", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
  426. base.Columns.Add(this.columnДата_начала_работы);
  427. this.columnНазвание_производителя.AllowDBNull = false;
  428. this.columnНазвание_производителя.MaxLength = 100;
  429. this.columnДата_начала_работы.AllowDBNull = false;
  430. }
  431. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  432. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  433. public manufacturerRow NewmanufacturerRow() {
  434. return ((manufacturerRow)(this.NewRow()));
  435. }
  436. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  437. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  438. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  439. return new manufacturerRow(builder);
  440. }
  441. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  442. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  443. protected override global::System.Type GetRowType() {
  444. return typeof(manufacturerRow);
  445. }
  446. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  447. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  448. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  449. base.OnRowChanged(e);
  450. if ((this.manufacturerRowChanged != null)) {
  451. this.manufacturerRowChanged(this, new manufacturerRowChangeEvent(((manufacturerRow)(e.Row)), e.Action));
  452. }
  453. }
  454. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  455. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  456. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  457. base.OnRowChanging(e);
  458. if ((this.manufacturerRowChanging != null)) {
  459. this.manufacturerRowChanging(this, new manufacturerRowChangeEvent(((manufacturerRow)(e.Row)), e.Action));
  460. }
  461. }
  462. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  463. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  464. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  465. base.OnRowDeleted(e);
  466. if ((this.manufacturerRowDeleted != null)) {
  467. this.manufacturerRowDeleted(this, new manufacturerRowChangeEvent(((manufacturerRow)(e.Row)), e.Action));
  468. }
  469. }
  470. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  471. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  472. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  473. base.OnRowDeleting(e);
  474. if ((this.manufacturerRowDeleting != null)) {
  475. this.manufacturerRowDeleting(this, new manufacturerRowChangeEvent(((manufacturerRow)(e.Row)), e.Action));
  476. }
  477. }
  478. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  479. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  480. public void RemovemanufacturerRow(manufacturerRow row) {
  481. this.Rows.Remove(row);
  482. }
  483. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  484. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  485. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  486. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  487. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  488. Rp42IvanovaDataSet ds = new Rp42IvanovaDataSet();
  489. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  490. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  491. any1.MinOccurs = new decimal(0);
  492. any1.MaxOccurs = decimal.MaxValue;
  493. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  494. sequence.Items.Add(any1);
  495. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  496. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  497. any2.MinOccurs = new decimal(1);
  498. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  499. sequence.Items.Add(any2);
  500. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  501. attribute1.Name = "namespace";
  502. attribute1.FixedValue = ds.Namespace;
  503. type.Attributes.Add(attribute1);
  504. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  505. attribute2.Name = "tableTypeName";
  506. attribute2.FixedValue = "manufacturerDataTable";
  507. type.Attributes.Add(attribute2);
  508. type.Particle = sequence;
  509. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  510. if (xs.Contains(dsSchema.TargetNamespace)) {
  511. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  512. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  513. try {
  514. global::System.Xml.Schema.XmlSchema schema = null;
  515. dsSchema.Write(s1);
  516. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  517. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  518. s2.SetLength(0);
  519. schema.Write(s2);
  520. if ((s1.Length == s2.Length)) {
  521. s1.Position = 0;
  522. s2.Position = 0;
  523. for (; ((s1.Position != s1.Length)
  524. && (s1.ReadByte() == s2.ReadByte())); ) {
  525. ;
  526. }
  527. if ((s1.Position == s1.Length)) {
  528. return type;
  529. }
  530. }
  531. }
  532. }
  533. finally {
  534. if ((s1 != null)) {
  535. s1.Close();
  536. }
  537. if ((s2 != null)) {
  538. s2.Close();
  539. }
  540. }
  541. }
  542. xs.Add(dsSchema);
  543. return type;
  544. }
  545. }
  546. /// <summary>
  547. ///Represents the strongly named DataTable class.
  548. ///</summary>
  549. [global::System.Serializable()]
  550. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  551. public partial class productDataTable : global::System.Data.TypedTableBase<productRow> {
  552. private global::System.Data.DataColumn columnНаименование_товара;
  553. private global::System.Data.DataColumn columnГлавное_изображение;
  554. private global::System.Data.DataColumn columnПроизводитель;
  555. private global::System.Data.DataColumn columnАктивен;
  556. private global::System.Data.DataColumn columnЦена;
  557. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  558. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  559. public productDataTable() {
  560. this.TableName = "product";
  561. this.BeginInit();
  562. this.InitClass();
  563. this.EndInit();
  564. }
  565. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  566. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  567. internal productDataTable(global::System.Data.DataTable table) {
  568. this.TableName = table.TableName;
  569. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  570. this.CaseSensitive = table.CaseSensitive;
  571. }
  572. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  573. this.Locale = table.Locale;
  574. }
  575. if ((table.Namespace != table.DataSet.Namespace)) {
  576. this.Namespace = table.Namespace;
  577. }
  578. this.Prefix = table.Prefix;
  579. this.MinimumCapacity = table.MinimumCapacity;
  580. }
  581. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  582. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  583. protected productDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  584. base(info, context) {
  585. this.InitVars();
  586. }
  587. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  588. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  589. public global::System.Data.DataColumn Наименование_товараColumn {
  590. get {
  591. return this.columnНаименование_товара;
  592. }
  593. }
  594. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  595. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  596. public global::System.Data.DataColumn Главное_изображениеColumn {
  597. get {
  598. return this.columnГлавное_изображение;
  599. }
  600. }
  601. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  602. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  603. public global::System.Data.DataColumn ПроизводительColumn {
  604. get {
  605. return this.columnПроизводитель;
  606. }
  607. }
  608. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  609. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  610. public global::System.Data.DataColumn АктивенColumn {
  611. get {
  612. return this.columnАктивен;
  613. }
  614. }
  615. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  616. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  617. public global::System.Data.DataColumn ЦенаColumn {
  618. get {
  619. return this.columnЦена;
  620. }
  621. }
  622. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  623. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  624. [global::System.ComponentModel.Browsable(false)]
  625. public int Count {
  626. get {
  627. return this.Rows.Count;
  628. }
  629. }
  630. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  631. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  632. public productRow this[int index] {
  633. get {
  634. return ((productRow)(this.Rows[index]));
  635. }
  636. }
  637. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  638. public event productRowChangeEventHandler productRowChanging;
  639. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  640. public event productRowChangeEventHandler productRowChanged;
  641. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  642. public event productRowChangeEventHandler productRowDeleting;
  643. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  644. public event productRowChangeEventHandler productRowDeleted;
  645. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  646. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  647. public void AddproductRow(productRow row) {
  648. this.Rows.Add(row);
  649. }
  650. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  651. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  652. public productRow AddproductRow(string Наименование_товара, string Главное_изображение, string Производитель, string Активен, string Цена) {
  653. productRow rowproductRow = ((productRow)(this.NewRow()));
  654. object[] columnValuesArray = new object[] {
  655. Наименование_товара,
  656. Главное_изображение,
  657. Производитель,
  658. Активен,
  659. Цена};
  660. rowproductRow.ItemArray = columnValuesArray;
  661. this.Rows.Add(rowproductRow);
  662. return rowproductRow;
  663. }
  664. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  665. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  666. public override global::System.Data.DataTable Clone() {
  667. productDataTable cln = ((productDataTable)(base.Clone()));
  668. cln.InitVars();
  669. return cln;
  670. }
  671. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  672. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  673. protected override global::System.Data.DataTable CreateInstance() {
  674. return new productDataTable();
  675. }
  676. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  677. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  678. internal void InitVars() {
  679. this.columnНаименование_товара = base.Columns["Наименование_товара"];
  680. this.columnГлавное_изображение = base.Columns["Главное_изображение"];
  681. this.columnПроизводитель = base.Columns["Производитель"];
  682. this.columnАктивен = base.Columns["Активен"];
  683. this.columnЦена = base.Columns["Цена"];
  684. }
  685. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  686. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  687. private void InitClass() {
  688. this.columnНаименование_товара = new global::System.Data.DataColumn("Наименование_товара", typeof(string), null, global::System.Data.MappingType.Element);
  689. base.Columns.Add(this.columnНаименование_товара);
  690. this.columnГлавное_изображение = new global::System.Data.DataColumn("Главное_изображение", typeof(string), null, global::System.Data.MappingType.Element);
  691. base.Columns.Add(this.columnГлавное_изображение);
  692. this.columnПроизводитель = new global::System.Data.DataColumn("Производитель", typeof(string), null, global::System.Data.MappingType.Element);
  693. base.Columns.Add(this.columnПроизводитель);
  694. this.columnАктивен = new global::System.Data.DataColumn("Активен", typeof(string), null, global::System.Data.MappingType.Element);
  695. base.Columns.Add(this.columnАктивен);
  696. this.columnЦена = new global::System.Data.DataColumn("Цена", typeof(string), null, global::System.Data.MappingType.Element);
  697. base.Columns.Add(this.columnЦена);
  698. this.columnНаименование_товара.AllowDBNull = false;
  699. this.columnНаименование_товара.MaxLength = 100;
  700. this.columnГлавное_изображение.AllowDBNull = false;
  701. this.columnГлавное_изображение.MaxLength = 50;
  702. this.columnПроизводитель.AllowDBNull = false;
  703. this.columnПроизводитель.MaxLength = 50;
  704. this.columnАктивен.AllowDBNull = false;
  705. this.columnАктивен.MaxLength = 50;
  706. this.columnЦена.AllowDBNull = false;
  707. this.columnЦена.MaxLength = 50;
  708. }
  709. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  710. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  711. public productRow NewproductRow() {
  712. return ((productRow)(this.NewRow()));
  713. }
  714. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  715. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  716. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  717. return new productRow(builder);
  718. }
  719. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  720. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  721. protected override global::System.Type GetRowType() {
  722. return typeof(productRow);
  723. }
  724. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  725. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  726. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  727. base.OnRowChanged(e);
  728. if ((this.productRowChanged != null)) {
  729. this.productRowChanged(this, new productRowChangeEvent(((productRow)(e.Row)), e.Action));
  730. }
  731. }
  732. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  733. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  734. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  735. base.OnRowChanging(e);
  736. if ((this.productRowChanging != null)) {
  737. this.productRowChanging(this, new productRowChangeEvent(((productRow)(e.Row)), e.Action));
  738. }
  739. }
  740. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  741. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  742. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  743. base.OnRowDeleted(e);
  744. if ((this.productRowDeleted != null)) {
  745. this.productRowDeleted(this, new productRowChangeEvent(((productRow)(e.Row)), e.Action));
  746. }
  747. }
  748. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  749. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  750. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  751. base.OnRowDeleting(e);
  752. if ((this.productRowDeleting != null)) {
  753. this.productRowDeleting(this, new productRowChangeEvent(((productRow)(e.Row)), e.Action));
  754. }
  755. }
  756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  757. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  758. public void RemoveproductRow(productRow row) {
  759. this.Rows.Remove(row);
  760. }
  761. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  762. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  763. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  764. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  765. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  766. Rp42IvanovaDataSet ds = new Rp42IvanovaDataSet();
  767. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  768. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  769. any1.MinOccurs = new decimal(0);
  770. any1.MaxOccurs = decimal.MaxValue;
  771. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  772. sequence.Items.Add(any1);
  773. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  774. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  775. any2.MinOccurs = new decimal(1);
  776. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  777. sequence.Items.Add(any2);
  778. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  779. attribute1.Name = "namespace";
  780. attribute1.FixedValue = ds.Namespace;
  781. type.Attributes.Add(attribute1);
  782. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  783. attribute2.Name = "tableTypeName";
  784. attribute2.FixedValue = "productDataTable";
  785. type.Attributes.Add(attribute2);
  786. type.Particle = sequence;
  787. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  788. if (xs.Contains(dsSchema.TargetNamespace)) {
  789. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  790. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  791. try {
  792. global::System.Xml.Schema.XmlSchema schema = null;
  793. dsSchema.Write(s1);
  794. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  795. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  796. s2.SetLength(0);
  797. schema.Write(s2);
  798. if ((s1.Length == s2.Length)) {
  799. s1.Position = 0;
  800. s2.Position = 0;
  801. for (; ((s1.Position != s1.Length)
  802. && (s1.ReadByte() == s2.ReadByte())); ) {
  803. ;
  804. }
  805. if ((s1.Position == s1.Length)) {
  806. return type;
  807. }
  808. }
  809. }
  810. }
  811. finally {
  812. if ((s1 != null)) {
  813. s1.Close();
  814. }
  815. if ((s2 != null)) {
  816. s2.Close();
  817. }
  818. }
  819. }
  820. xs.Add(dsSchema);
  821. return type;
  822. }
  823. }
  824. /// <summary>
  825. ///Represents the strongly named DataTable class.
  826. ///</summary>
  827. [global::System.Serializable()]
  828. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  829. public partial class productsaleDataTable : global::System.Data.TypedTableBase<productsaleRow> {
  830. private global::System.Data.DataColumn columnТовар;
  831. private global::System.Data.DataColumn columnКоличество;
  832. private global::System.Data.DataColumn columnДата_и_время_продажи;
  833. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  834. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  835. public productsaleDataTable() {
  836. this.TableName = "productsale";
  837. this.BeginInit();
  838. this.InitClass();
  839. this.EndInit();
  840. }
  841. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  842. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  843. internal productsaleDataTable(global::System.Data.DataTable table) {
  844. this.TableName = table.TableName;
  845. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  846. this.CaseSensitive = table.CaseSensitive;
  847. }
  848. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  849. this.Locale = table.Locale;
  850. }
  851. if ((table.Namespace != table.DataSet.Namespace)) {
  852. this.Namespace = table.Namespace;
  853. }
  854. this.Prefix = table.Prefix;
  855. this.MinimumCapacity = table.MinimumCapacity;
  856. }
  857. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  858. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  859. protected productsaleDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  860. base(info, context) {
  861. this.InitVars();
  862. }
  863. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  864. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  865. public global::System.Data.DataColumn ТоварColumn {
  866. get {
  867. return this.columnТовар;
  868. }
  869. }
  870. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  871. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  872. public global::System.Data.DataColumn КоличествоColumn {
  873. get {
  874. return this.columnКоличество;
  875. }
  876. }
  877. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  878. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  879. public global::System.Data.DataColumn Дата_и_время_продажиColumn {
  880. get {
  881. return this.columnДата_и_время_продажи;
  882. }
  883. }
  884. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  885. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  886. [global::System.ComponentModel.Browsable(false)]
  887. public int Count {
  888. get {
  889. return this.Rows.Count;
  890. }
  891. }
  892. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  893. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  894. public productsaleRow this[int index] {
  895. get {
  896. return ((productsaleRow)(this.Rows[index]));
  897. }
  898. }
  899. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  900. public event productsaleRowChangeEventHandler productsaleRowChanging;
  901. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  902. public event productsaleRowChangeEventHandler productsaleRowChanged;
  903. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  904. public event productsaleRowChangeEventHandler productsaleRowDeleting;
  905. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  906. public event productsaleRowChangeEventHandler productsaleRowDeleted;
  907. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  908. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  909. public void AddproductsaleRow(productsaleRow row) {
  910. this.Rows.Add(row);
  911. }
  912. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  913. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  914. public productsaleRow AddproductsaleRow(string Товар, byte Количество, System.DateTime Дата_и_время_продажи) {
  915. productsaleRow rowproductsaleRow = ((productsaleRow)(this.NewRow()));
  916. object[] columnValuesArray = new object[] {
  917. Товар,
  918. Количество,
  919. Дата_и_время_продажи};
  920. rowproductsaleRow.ItemArray = columnValuesArray;
  921. this.Rows.Add(rowproductsaleRow);
  922. return rowproductsaleRow;
  923. }
  924. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  925. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  926. public override global::System.Data.DataTable Clone() {
  927. productsaleDataTable cln = ((productsaleDataTable)(base.Clone()));
  928. cln.InitVars();
  929. return cln;
  930. }
  931. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  932. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  933. protected override global::System.Data.DataTable CreateInstance() {
  934. return new productsaleDataTable();
  935. }
  936. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  937. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  938. internal void InitVars() {
  939. this.columnТовар = base.Columns["Товар"];
  940. this.columnКоличество = base.Columns["Количество"];
  941. this.columnДата_и_время_продажи = base.Columns["Дата_и_время_продажи"];
  942. }
  943. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  944. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  945. private void InitClass() {
  946. this.columnТовар = new global::System.Data.DataColumn("Товар", typeof(string), null, global::System.Data.MappingType.Element);
  947. base.Columns.Add(this.columnТовар);
  948. this.columnКоличество = new global::System.Data.DataColumn("Количество", typeof(byte), null, global::System.Data.MappingType.Element);
  949. base.Columns.Add(this.columnКоличество);
  950. this.columnДата_и_время_продажи = new global::System.Data.DataColumn("Дата_и_время_продажи", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
  951. base.Columns.Add(this.columnДата_и_время_продажи);
  952. this.columnТовар.AllowDBNull = false;
  953. this.columnТовар.MaxLength = 100;
  954. this.columnКоличество.AllowDBNull = false;
  955. this.columnДата_и_время_продажи.AllowDBNull = false;
  956. }
  957. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  958. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  959. public productsaleRow NewproductsaleRow() {
  960. return ((productsaleRow)(this.NewRow()));
  961. }
  962. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  963. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  964. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  965. return new productsaleRow(builder);
  966. }
  967. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  968. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  969. protected override global::System.Type GetRowType() {
  970. return typeof(productsaleRow);
  971. }
  972. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  973. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  974. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  975. base.OnRowChanged(e);
  976. if ((this.productsaleRowChanged != null)) {
  977. this.productsaleRowChanged(this, new productsaleRowChangeEvent(((productsaleRow)(e.Row)), e.Action));
  978. }
  979. }
  980. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  981. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  982. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  983. base.OnRowChanging(e);
  984. if ((this.productsaleRowChanging != null)) {
  985. this.productsaleRowChanging(this, new productsaleRowChangeEvent(((productsaleRow)(e.Row)), e.Action));
  986. }
  987. }
  988. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  989. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  990. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  991. base.OnRowDeleted(e);
  992. if ((this.productsaleRowDeleted != null)) {
  993. this.productsaleRowDeleted(this, new productsaleRowChangeEvent(((productsaleRow)(e.Row)), e.Action));
  994. }
  995. }
  996. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  997. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  998. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  999. base.OnRowDeleting(e);
  1000. if ((this.productsaleRowDeleting != null)) {
  1001. this.productsaleRowDeleting(this, new productsaleRowChangeEvent(((productsaleRow)(e.Row)), e.Action));
  1002. }
  1003. }
  1004. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1005. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1006. public void RemoveproductsaleRow(productsaleRow row) {
  1007. this.Rows.Remove(row);
  1008. }
  1009. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1010. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1011. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  1012. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  1013. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  1014. Rp42IvanovaDataSet ds = new Rp42IvanovaDataSet();
  1015. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  1016. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  1017. any1.MinOccurs = new decimal(0);
  1018. any1.MaxOccurs = decimal.MaxValue;
  1019. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1020. sequence.Items.Add(any1);
  1021. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  1022. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  1023. any2.MinOccurs = new decimal(1);
  1024. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  1025. sequence.Items.Add(any2);
  1026. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1027. attribute1.Name = "namespace";
  1028. attribute1.FixedValue = ds.Namespace;
  1029. type.Attributes.Add(attribute1);
  1030. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  1031. attribute2.Name = "tableTypeName";
  1032. attribute2.FixedValue = "productsaleDataTable";
  1033. type.Attributes.Add(attribute2);
  1034. type.Particle = sequence;
  1035. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  1036. if (xs.Contains(dsSchema.TargetNamespace)) {
  1037. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  1038. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  1039. try {
  1040. global::System.Xml.Schema.XmlSchema schema = null;
  1041. dsSchema.Write(s1);
  1042. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  1043. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  1044. s2.SetLength(0);
  1045. schema.Write(s2);
  1046. if ((s1.Length == s2.Length)) {
  1047. s1.Position = 0;
  1048. s2.Position = 0;
  1049. for (; ((s1.Position != s1.Length)
  1050. && (s1.ReadByte() == s2.ReadByte())); ) {
  1051. ;
  1052. }
  1053. if ((s1.Position == s1.Length)) {
  1054. return type;
  1055. }
  1056. }
  1057. }
  1058. }
  1059. finally {
  1060. if ((s1 != null)) {
  1061. s1.Close();
  1062. }
  1063. if ((s2 != null)) {
  1064. s2.Close();
  1065. }
  1066. }
  1067. }
  1068. xs.Add(dsSchema);
  1069. return type;
  1070. }
  1071. }
  1072. /// <summary>
  1073. ///Represents strongly named DataRow class.
  1074. ///</summary>
  1075. public partial class manufacturerRow : global::System.Data.DataRow {
  1076. private manufacturerDataTable tablemanufacturer;
  1077. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1078. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1079. internal manufacturerRow(global::System.Data.DataRowBuilder rb) :
  1080. base(rb) {
  1081. this.tablemanufacturer = ((manufacturerDataTable)(this.Table));
  1082. }
  1083. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1084. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1085. public string Название_производителя {
  1086. get {
  1087. return ((string)(this[this.tablemanufacturer.Название_производителяColumn]));
  1088. }
  1089. set {
  1090. this[this.tablemanufacturer.Название_производителяColumn] = value;
  1091. }
  1092. }
  1093. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1094. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1095. public System.DateTime Дата_начала_работы {
  1096. get {
  1097. return ((global::System.DateTime)(this[this.tablemanufacturer.Дата_начала_работыColumn]));
  1098. }
  1099. set {
  1100. this[this.tablemanufacturer.Дата_начала_работыColumn] = value;
  1101. }
  1102. }
  1103. }
  1104. /// <summary>
  1105. ///Represents strongly named DataRow class.
  1106. ///</summary>
  1107. public partial class productRow : global::System.Data.DataRow {
  1108. private productDataTable tableproduct;
  1109. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1110. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1111. internal productRow(global::System.Data.DataRowBuilder rb) :
  1112. base(rb) {
  1113. this.tableproduct = ((productDataTable)(this.Table));
  1114. }
  1115. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1116. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1117. public string Наименование_товара {
  1118. get {
  1119. return ((string)(this[this.tableproduct.Наименование_товараColumn]));
  1120. }
  1121. set {
  1122. this[this.tableproduct.Наименование_товараColumn] = value;
  1123. }
  1124. }
  1125. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1126. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1127. public string Главное_изображение {
  1128. get {
  1129. return ((string)(this[this.tableproduct.Главное_изображениеColumn]));
  1130. }
  1131. set {
  1132. this[this.tableproduct.Главное_изображениеColumn] = value;
  1133. }
  1134. }
  1135. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1136. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1137. public string Производитель {
  1138. get {
  1139. return ((string)(this[this.tableproduct.ПроизводительColumn]));
  1140. }
  1141. set {
  1142. this[this.tableproduct.ПроизводительColumn] = value;
  1143. }
  1144. }
  1145. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1146. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1147. public string Активен {
  1148. get {
  1149. return ((string)(this[this.tableproduct.АктивенColumn]));
  1150. }
  1151. set {
  1152. this[this.tableproduct.АктивенColumn] = value;
  1153. }
  1154. }
  1155. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1156. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1157. public string Цена {
  1158. get {
  1159. return ((string)(this[this.tableproduct.ЦенаColumn]));
  1160. }
  1161. set {
  1162. this[this.tableproduct.ЦенаColumn] = value;
  1163. }
  1164. }
  1165. }
  1166. /// <summary>
  1167. ///Represents strongly named DataRow class.
  1168. ///</summary>
  1169. public partial class productsaleRow : global::System.Data.DataRow {
  1170. private productsaleDataTable tableproductsale;
  1171. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1172. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1173. internal productsaleRow(global::System.Data.DataRowBuilder rb) :
  1174. base(rb) {
  1175. this.tableproductsale = ((productsaleDataTable)(this.Table));
  1176. }
  1177. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1178. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1179. public string Товар {
  1180. get {
  1181. return ((string)(this[this.tableproductsale.ТоварColumn]));
  1182. }
  1183. set {
  1184. this[this.tableproductsale.ТоварColumn] = value;
  1185. }
  1186. }
  1187. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1188. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1189. public byte Количество {
  1190. get {
  1191. return ((byte)(this[this.tableproductsale.КоличествоColumn]));
  1192. }
  1193. set {
  1194. this[this.tableproductsale.КоличествоColumn] = value;
  1195. }
  1196. }
  1197. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1198. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1199. public System.DateTime Дата_и_время_продажи {
  1200. get {
  1201. return ((global::System.DateTime)(this[this.tableproductsale.Дата_и_время_продажиColumn]));
  1202. }
  1203. set {
  1204. this[this.tableproductsale.Дата_и_время_продажиColumn] = value;
  1205. }
  1206. }
  1207. }
  1208. /// <summary>
  1209. ///Row event argument class
  1210. ///</summary>
  1211. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1212. public class manufacturerRowChangeEvent : global::System.EventArgs {
  1213. private manufacturerRow eventRow;
  1214. private global::System.Data.DataRowAction eventAction;
  1215. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1216. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1217. public manufacturerRowChangeEvent(manufacturerRow row, global::System.Data.DataRowAction action) {
  1218. this.eventRow = row;
  1219. this.eventAction = action;
  1220. }
  1221. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1222. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1223. public manufacturerRow Row {
  1224. get {
  1225. return this.eventRow;
  1226. }
  1227. }
  1228. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1229. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1230. public global::System.Data.DataRowAction Action {
  1231. get {
  1232. return this.eventAction;
  1233. }
  1234. }
  1235. }
  1236. /// <summary>
  1237. ///Row event argument class
  1238. ///</summary>
  1239. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1240. public class productRowChangeEvent : global::System.EventArgs {
  1241. private productRow eventRow;
  1242. private global::System.Data.DataRowAction eventAction;
  1243. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1244. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1245. public productRowChangeEvent(productRow row, global::System.Data.DataRowAction action) {
  1246. this.eventRow = row;
  1247. this.eventAction = action;
  1248. }
  1249. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1250. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1251. public productRow Row {
  1252. get {
  1253. return this.eventRow;
  1254. }
  1255. }
  1256. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1257. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1258. public global::System.Data.DataRowAction Action {
  1259. get {
  1260. return this.eventAction;
  1261. }
  1262. }
  1263. }
  1264. /// <summary>
  1265. ///Row event argument class
  1266. ///</summary>
  1267. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1268. public class productsaleRowChangeEvent : global::System.EventArgs {
  1269. private productsaleRow eventRow;
  1270. private global::System.Data.DataRowAction eventAction;
  1271. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1272. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1273. public productsaleRowChangeEvent(productsaleRow row, global::System.Data.DataRowAction action) {
  1274. this.eventRow = row;
  1275. this.eventAction = action;
  1276. }
  1277. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1278. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1279. public productsaleRow Row {
  1280. get {
  1281. return this.eventRow;
  1282. }
  1283. }
  1284. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1285. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1286. public global::System.Data.DataRowAction Action {
  1287. get {
  1288. return this.eventAction;
  1289. }
  1290. }
  1291. }
  1292. }
  1293. }
  1294. namespace Rp42Ivanova.Rp42IvanovaDataSetTableAdapters {
  1295. /// <summary>
  1296. ///Represents the connection and commands used to retrieve and save data.
  1297. ///</summary>
  1298. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1299. [global::System.ComponentModel.ToolboxItem(true)]
  1300. [global::System.ComponentModel.DataObjectAttribute(true)]
  1301. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  1302. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1303. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1304. public partial class manufacturerTableAdapter : global::System.ComponentModel.Component {
  1305. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  1306. private global::System.Data.SqlClient.SqlConnection _connection;
  1307. private global::System.Data.SqlClient.SqlTransaction _transaction;
  1308. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  1309. private bool _clearBeforeFill;
  1310. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1311. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1312. public manufacturerTableAdapter() {
  1313. this.ClearBeforeFill = true;
  1314. }
  1315. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1316. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1317. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  1318. get {
  1319. if ((this._adapter == null)) {
  1320. this.InitAdapter();
  1321. }
  1322. return this._adapter;
  1323. }
  1324. }
  1325. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1326. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1327. internal global::System.Data.SqlClient.SqlConnection Connection {
  1328. get {
  1329. if ((this._connection == null)) {
  1330. this.InitConnection();
  1331. }
  1332. return this._connection;
  1333. }
  1334. set {
  1335. this._connection = value;
  1336. if ((this.Adapter.InsertCommand != null)) {
  1337. this.Adapter.InsertCommand.Connection = value;
  1338. }
  1339. if ((this.Adapter.DeleteCommand != null)) {
  1340. this.Adapter.DeleteCommand.Connection = value;
  1341. }
  1342. if ((this.Adapter.UpdateCommand != null)) {
  1343. this.Adapter.UpdateCommand.Connection = value;
  1344. }
  1345. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1346. if ((this.CommandCollection[i] != null)) {
  1347. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  1348. }
  1349. }
  1350. }
  1351. }
  1352. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1353. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1354. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  1355. get {
  1356. return this._transaction;
  1357. }
  1358. set {
  1359. this._transaction = value;
  1360. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1361. this.CommandCollection[i].Transaction = this._transaction;
  1362. }
  1363. if (((this.Adapter != null)
  1364. && (this.Adapter.DeleteCommand != null))) {
  1365. this.Adapter.DeleteCommand.Transaction = this._transaction;
  1366. }
  1367. if (((this.Adapter != null)
  1368. && (this.Adapter.InsertCommand != null))) {
  1369. this.Adapter.InsertCommand.Transaction = this._transaction;
  1370. }
  1371. if (((this.Adapter != null)
  1372. && (this.Adapter.UpdateCommand != null))) {
  1373. this.Adapter.UpdateCommand.Transaction = this._transaction;
  1374. }
  1375. }
  1376. }
  1377. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1378. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1379. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  1380. get {
  1381. if ((this._commandCollection == null)) {
  1382. this.InitCommandCollection();
  1383. }
  1384. return this._commandCollection;
  1385. }
  1386. }
  1387. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1388. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1389. public bool ClearBeforeFill {
  1390. get {
  1391. return this._clearBeforeFill;
  1392. }
  1393. set {
  1394. this._clearBeforeFill = value;
  1395. }
  1396. }
  1397. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1398. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1399. private void InitAdapter() {
  1400. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  1401. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  1402. tableMapping.SourceTable = "Table";
  1403. tableMapping.DataSetTable = "manufacturer";
  1404. tableMapping.ColumnMappings.Add("Название_производителя", "Название_производителя");
  1405. tableMapping.ColumnMappings.Add("Дата_начала_работы", "Дата_начала_работы");
  1406. this._adapter.TableMappings.Add(tableMapping);
  1407. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  1408. this._adapter.InsertCommand.Connection = this.Connection;
  1409. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[manufacturer] ([Название_производителя], [Дата_начала_работы])" +
  1410. " VALUES (@Название_производителя, @Дата_начала_работы)";
  1411. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  1412. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Название_производителя", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Название_производителя", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1413. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_начала_работы", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_начала_работы", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1414. }
  1415. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1416. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1417. private void InitConnection() {
  1418. this._connection = new global::System.Data.SqlClient.SqlConnection();
  1419. this._connection.ConnectionString = global::Rp42Ivanova.Properties.Settings.Default.Rp42IvanovaConnectionString;
  1420. }
  1421. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1422. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1423. private void InitCommandCollection() {
  1424. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  1425. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  1426. this._commandCollection[0].Connection = this.Connection;
  1427. this._commandCollection[0].CommandText = "SELECT Название_производителя, Дата_начала_работы FROM dbo.manufacturer";
  1428. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  1429. }
  1430. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1431. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1432. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1433. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  1434. public virtual int Fill(Rp42IvanovaDataSet.manufacturerDataTable dataTable) {
  1435. this.Adapter.SelectCommand = this.CommandCollection[0];
  1436. if ((this.ClearBeforeFill == true)) {
  1437. dataTable.Clear();
  1438. }
  1439. int returnValue = this.Adapter.Fill(dataTable);
  1440. return returnValue;
  1441. }
  1442. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1443. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1444. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1445. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  1446. public virtual Rp42IvanovaDataSet.manufacturerDataTable GetData() {
  1447. this.Adapter.SelectCommand = this.CommandCollection[0];
  1448. Rp42IvanovaDataSet.manufacturerDataTable dataTable = new Rp42IvanovaDataSet.manufacturerDataTable();
  1449. this.Adapter.Fill(dataTable);
  1450. return dataTable;
  1451. }
  1452. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1453. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1454. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1455. public virtual int Update(Rp42IvanovaDataSet.manufacturerDataTable dataTable) {
  1456. return this.Adapter.Update(dataTable);
  1457. }
  1458. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1459. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1460. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1461. public virtual int Update(Rp42IvanovaDataSet dataSet) {
  1462. return this.Adapter.Update(dataSet, "manufacturer");
  1463. }
  1464. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1465. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1466. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1467. public virtual int Update(global::System.Data.DataRow dataRow) {
  1468. return this.Adapter.Update(new global::System.Data.DataRow[] {
  1469. dataRow});
  1470. }
  1471. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1472. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1473. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1474. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  1475. return this.Adapter.Update(dataRows);
  1476. }
  1477. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1478. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1479. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1480. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  1481. public virtual int Insert(string Название_производителя, System.DateTime Дата_начала_работы) {
  1482. if ((Название_производителя == null)) {
  1483. throw new global::System.ArgumentNullException("Название_производителя");
  1484. }
  1485. else {
  1486. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Название_производителя));
  1487. }
  1488. this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(Дата_начала_работы));
  1489. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  1490. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1491. != global::System.Data.ConnectionState.Open)) {
  1492. this.Adapter.InsertCommand.Connection.Open();
  1493. }
  1494. try {
  1495. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  1496. return returnValue;
  1497. }
  1498. finally {
  1499. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1500. this.Adapter.InsertCommand.Connection.Close();
  1501. }
  1502. }
  1503. }
  1504. }
  1505. /// <summary>
  1506. ///Represents the connection and commands used to retrieve and save data.
  1507. ///</summary>
  1508. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1509. [global::System.ComponentModel.ToolboxItem(true)]
  1510. [global::System.ComponentModel.DataObjectAttribute(true)]
  1511. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  1512. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1513. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1514. public partial class productTableAdapter : global::System.ComponentModel.Component {
  1515. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  1516. private global::System.Data.SqlClient.SqlConnection _connection;
  1517. private global::System.Data.SqlClient.SqlTransaction _transaction;
  1518. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  1519. private bool _clearBeforeFill;
  1520. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1521. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1522. public productTableAdapter() {
  1523. this.ClearBeforeFill = true;
  1524. }
  1525. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1526. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1527. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  1528. get {
  1529. if ((this._adapter == null)) {
  1530. this.InitAdapter();
  1531. }
  1532. return this._adapter;
  1533. }
  1534. }
  1535. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1536. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1537. internal global::System.Data.SqlClient.SqlConnection Connection {
  1538. get {
  1539. if ((this._connection == null)) {
  1540. this.InitConnection();
  1541. }
  1542. return this._connection;
  1543. }
  1544. set {
  1545. this._connection = value;
  1546. if ((this.Adapter.InsertCommand != null)) {
  1547. this.Adapter.InsertCommand.Connection = value;
  1548. }
  1549. if ((this.Adapter.DeleteCommand != null)) {
  1550. this.Adapter.DeleteCommand.Connection = value;
  1551. }
  1552. if ((this.Adapter.UpdateCommand != null)) {
  1553. this.Adapter.UpdateCommand.Connection = value;
  1554. }
  1555. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1556. if ((this.CommandCollection[i] != null)) {
  1557. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  1558. }
  1559. }
  1560. }
  1561. }
  1562. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1563. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1564. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  1565. get {
  1566. return this._transaction;
  1567. }
  1568. set {
  1569. this._transaction = value;
  1570. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1571. this.CommandCollection[i].Transaction = this._transaction;
  1572. }
  1573. if (((this.Adapter != null)
  1574. && (this.Adapter.DeleteCommand != null))) {
  1575. this.Adapter.DeleteCommand.Transaction = this._transaction;
  1576. }
  1577. if (((this.Adapter != null)
  1578. && (this.Adapter.InsertCommand != null))) {
  1579. this.Adapter.InsertCommand.Transaction = this._transaction;
  1580. }
  1581. if (((this.Adapter != null)
  1582. && (this.Adapter.UpdateCommand != null))) {
  1583. this.Adapter.UpdateCommand.Transaction = this._transaction;
  1584. }
  1585. }
  1586. }
  1587. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1588. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1589. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  1590. get {
  1591. if ((this._commandCollection == null)) {
  1592. this.InitCommandCollection();
  1593. }
  1594. return this._commandCollection;
  1595. }
  1596. }
  1597. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1598. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1599. public bool ClearBeforeFill {
  1600. get {
  1601. return this._clearBeforeFill;
  1602. }
  1603. set {
  1604. this._clearBeforeFill = value;
  1605. }
  1606. }
  1607. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1608. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1609. private void InitAdapter() {
  1610. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  1611. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  1612. tableMapping.SourceTable = "Table";
  1613. tableMapping.DataSetTable = "product";
  1614. tableMapping.ColumnMappings.Add("Наименование_товара", "Наименование_товара");
  1615. tableMapping.ColumnMappings.Add("Главное_изображение", "Главное_изображение");
  1616. tableMapping.ColumnMappings.Add("Производитель", "Производитель");
  1617. tableMapping.ColumnMappings.Add("Активен", "Активен");
  1618. tableMapping.ColumnMappings.Add("Цена", "Цена");
  1619. this._adapter.TableMappings.Add(tableMapping);
  1620. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  1621. this._adapter.InsertCommand.Connection = this.Connection;
  1622. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[product] ([Наименование_товара], [Главное_изображение], [Произ" +
  1623. "водитель], [Активен], [Цена]) VALUES (@Наименование_товара, @Главное_изображение" +
  1624. ", @Производитель, @Активен, @Цена)";
  1625. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  1626. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Наименование_товара", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Наименование_товара", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1627. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Главное_изображение", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Главное_изображение", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1628. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Производитель", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Производитель", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1629. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Активен", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Активен", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1630. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Цена", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Цена", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1631. }
  1632. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1633. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1634. private void InitConnection() {
  1635. this._connection = new global::System.Data.SqlClient.SqlConnection();
  1636. this._connection.ConnectionString = global::Rp42Ivanova.Properties.Settings.Default.Rp42IvanovaConnectionString;
  1637. }
  1638. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1639. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1640. private void InitCommandCollection() {
  1641. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  1642. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  1643. this._commandCollection[0].Connection = this.Connection;
  1644. this._commandCollection[0].CommandText = "SELECT Наименование_товара, Главное_изображение, Производитель, Активен, Цена FRO" +
  1645. "M dbo.product";
  1646. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  1647. }
  1648. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1649. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1650. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1651. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  1652. public virtual int Fill(Rp42IvanovaDataSet.productDataTable dataTable) {
  1653. this.Adapter.SelectCommand = this.CommandCollection[0];
  1654. if ((this.ClearBeforeFill == true)) {
  1655. dataTable.Clear();
  1656. }
  1657. int returnValue = this.Adapter.Fill(dataTable);
  1658. return returnValue;
  1659. }
  1660. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1661. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1662. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1663. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  1664. public virtual Rp42IvanovaDataSet.productDataTable GetData() {
  1665. this.Adapter.SelectCommand = this.CommandCollection[0];
  1666. Rp42IvanovaDataSet.productDataTable dataTable = new Rp42IvanovaDataSet.productDataTable();
  1667. this.Adapter.Fill(dataTable);
  1668. return dataTable;
  1669. }
  1670. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1671. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1672. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1673. public virtual int Update(Rp42IvanovaDataSet.productDataTable dataTable) {
  1674. return this.Adapter.Update(dataTable);
  1675. }
  1676. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1677. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1678. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1679. public virtual int Update(Rp42IvanovaDataSet dataSet) {
  1680. return this.Adapter.Update(dataSet, "product");
  1681. }
  1682. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1683. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1684. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1685. public virtual int Update(global::System.Data.DataRow dataRow) {
  1686. return this.Adapter.Update(new global::System.Data.DataRow[] {
  1687. dataRow});
  1688. }
  1689. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1690. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1691. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1692. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  1693. return this.Adapter.Update(dataRows);
  1694. }
  1695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1696. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1697. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1698. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  1699. public virtual int Insert(string Наименование_товара, string Главное_изображение, string Производитель, string Активен, string Цена) {
  1700. if ((Наименование_товара == null)) {
  1701. throw new global::System.ArgumentNullException("Наименование_товара");
  1702. }
  1703. else {
  1704. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Наименование_товара));
  1705. }
  1706. if ((Главное_изображение == null)) {
  1707. throw new global::System.ArgumentNullException("Главное_изображение");
  1708. }
  1709. else {
  1710. this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Главное_изображение));
  1711. }
  1712. if ((Производитель == null)) {
  1713. throw new global::System.ArgumentNullException("Производитель");
  1714. }
  1715. else {
  1716. this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Производитель));
  1717. }
  1718. if ((Активен == null)) {
  1719. throw new global::System.ArgumentNullException("Активен");
  1720. }
  1721. else {
  1722. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Активен));
  1723. }
  1724. if ((Цена == null)) {
  1725. throw new global::System.ArgumentNullException("Цена");
  1726. }
  1727. else {
  1728. this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Цена));
  1729. }
  1730. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  1731. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1732. != global::System.Data.ConnectionState.Open)) {
  1733. this.Adapter.InsertCommand.Connection.Open();
  1734. }
  1735. try {
  1736. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  1737. return returnValue;
  1738. }
  1739. finally {
  1740. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1741. this.Adapter.InsertCommand.Connection.Close();
  1742. }
  1743. }
  1744. }
  1745. }
  1746. /// <summary>
  1747. ///Represents the connection and commands used to retrieve and save data.
  1748. ///</summary>
  1749. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1750. [global::System.ComponentModel.ToolboxItem(true)]
  1751. [global::System.ComponentModel.DataObjectAttribute(true)]
  1752. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  1753. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1754. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1755. public partial class productsaleTableAdapter : global::System.ComponentModel.Component {
  1756. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  1757. private global::System.Data.SqlClient.SqlConnection _connection;
  1758. private global::System.Data.SqlClient.SqlTransaction _transaction;
  1759. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  1760. private bool _clearBeforeFill;
  1761. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1762. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1763. public productsaleTableAdapter() {
  1764. this.ClearBeforeFill = true;
  1765. }
  1766. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1767. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1768. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  1769. get {
  1770. if ((this._adapter == null)) {
  1771. this.InitAdapter();
  1772. }
  1773. return this._adapter;
  1774. }
  1775. }
  1776. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1777. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1778. internal global::System.Data.SqlClient.SqlConnection Connection {
  1779. get {
  1780. if ((this._connection == null)) {
  1781. this.InitConnection();
  1782. }
  1783. return this._connection;
  1784. }
  1785. set {
  1786. this._connection = value;
  1787. if ((this.Adapter.InsertCommand != null)) {
  1788. this.Adapter.InsertCommand.Connection = value;
  1789. }
  1790. if ((this.Adapter.DeleteCommand != null)) {
  1791. this.Adapter.DeleteCommand.Connection = value;
  1792. }
  1793. if ((this.Adapter.UpdateCommand != null)) {
  1794. this.Adapter.UpdateCommand.Connection = value;
  1795. }
  1796. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1797. if ((this.CommandCollection[i] != null)) {
  1798. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  1799. }
  1800. }
  1801. }
  1802. }
  1803. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1804. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1805. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  1806. get {
  1807. return this._transaction;
  1808. }
  1809. set {
  1810. this._transaction = value;
  1811. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1812. this.CommandCollection[i].Transaction = this._transaction;
  1813. }
  1814. if (((this.Adapter != null)
  1815. && (this.Adapter.DeleteCommand != null))) {
  1816. this.Adapter.DeleteCommand.Transaction = this._transaction;
  1817. }
  1818. if (((this.Adapter != null)
  1819. && (this.Adapter.InsertCommand != null))) {
  1820. this.Adapter.InsertCommand.Transaction = this._transaction;
  1821. }
  1822. if (((this.Adapter != null)
  1823. && (this.Adapter.UpdateCommand != null))) {
  1824. this.Adapter.UpdateCommand.Transaction = this._transaction;
  1825. }
  1826. }
  1827. }
  1828. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1829. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1830. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  1831. get {
  1832. if ((this._commandCollection == null)) {
  1833. this.InitCommandCollection();
  1834. }
  1835. return this._commandCollection;
  1836. }
  1837. }
  1838. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1839. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1840. public bool ClearBeforeFill {
  1841. get {
  1842. return this._clearBeforeFill;
  1843. }
  1844. set {
  1845. this._clearBeforeFill = value;
  1846. }
  1847. }
  1848. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1849. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1850. private void InitAdapter() {
  1851. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  1852. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  1853. tableMapping.SourceTable = "Table";
  1854. tableMapping.DataSetTable = "productsale";
  1855. tableMapping.ColumnMappings.Add("Товар", "Товар");
  1856. tableMapping.ColumnMappings.Add("Количество", "Количество");
  1857. tableMapping.ColumnMappings.Add("Дата_и_время_продажи", "Дата_и_время_продажи");
  1858. this._adapter.TableMappings.Add(tableMapping);
  1859. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  1860. this._adapter.InsertCommand.Connection = this.Connection;
  1861. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[productsale] ([Товар], [Количество], [Дата_и_время_продажи]) V" +
  1862. "ALUES (@Товар, @Количество, @Дата_и_время_продажи)";
  1863. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  1864. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Товар", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Товар", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1865. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Количество", global::System.Data.SqlDbType.TinyInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Количество", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1866. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Дата_и_время_продажи", global::System.Data.SqlDbType.DateTime2, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Дата_и_время_продажи", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1867. }
  1868. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1869. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1870. private void InitConnection() {
  1871. this._connection = new global::System.Data.SqlClient.SqlConnection();
  1872. this._connection.ConnectionString = global::Rp42Ivanova.Properties.Settings.Default.Rp42IvanovaConnectionString;
  1873. }
  1874. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1875. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1876. private void InitCommandCollection() {
  1877. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  1878. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  1879. this._commandCollection[0].Connection = this.Connection;
  1880. this._commandCollection[0].CommandText = "SELECT Товар, Количество, Дата_и_время_продажи FROM dbo.productsale";
  1881. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  1882. }
  1883. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1884. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1885. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1886. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  1887. public virtual int Fill(Rp42IvanovaDataSet.productsaleDataTable dataTable) {
  1888. this.Adapter.SelectCommand = this.CommandCollection[0];
  1889. if ((this.ClearBeforeFill == true)) {
  1890. dataTable.Clear();
  1891. }
  1892. int returnValue = this.Adapter.Fill(dataTable);
  1893. return returnValue;
  1894. }
  1895. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1896. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1897. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1898. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  1899. public virtual Rp42IvanovaDataSet.productsaleDataTable GetData() {
  1900. this.Adapter.SelectCommand = this.CommandCollection[0];
  1901. Rp42IvanovaDataSet.productsaleDataTable dataTable = new Rp42IvanovaDataSet.productsaleDataTable();
  1902. this.Adapter.Fill(dataTable);
  1903. return dataTable;
  1904. }
  1905. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1906. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1907. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1908. public virtual int Update(Rp42IvanovaDataSet.productsaleDataTable dataTable) {
  1909. return this.Adapter.Update(dataTable);
  1910. }
  1911. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1912. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1913. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1914. public virtual int Update(Rp42IvanovaDataSet dataSet) {
  1915. return this.Adapter.Update(dataSet, "productsale");
  1916. }
  1917. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1918. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1919. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1920. public virtual int Update(global::System.Data.DataRow dataRow) {
  1921. return this.Adapter.Update(new global::System.Data.DataRow[] {
  1922. dataRow});
  1923. }
  1924. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1925. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1926. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1927. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  1928. return this.Adapter.Update(dataRows);
  1929. }
  1930. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1931. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1932. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1933. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  1934. public virtual int Insert(string Товар, byte Количество, System.DateTime Дата_и_время_продажи) {
  1935. if ((Товар == null)) {
  1936. throw new global::System.ArgumentNullException("Товар");
  1937. }
  1938. else {
  1939. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Товар));
  1940. }
  1941. this.Adapter.InsertCommand.Parameters[1].Value = ((byte)(Количество));
  1942. this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(Дата_и_время_продажи));
  1943. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  1944. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1945. != global::System.Data.ConnectionState.Open)) {
  1946. this.Adapter.InsertCommand.Connection.Open();
  1947. }
  1948. try {
  1949. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  1950. return returnValue;
  1951. }
  1952. finally {
  1953. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1954. this.Adapter.InsertCommand.Connection.Close();
  1955. }
  1956. }
  1957. }
  1958. }
  1959. /// <summary>
  1960. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  1961. ///</summary>
  1962. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1963. [global::System.ComponentModel.ToolboxItem(true)]
  1964. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  1965. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1966. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  1967. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  1968. private UpdateOrderOption _updateOrder;
  1969. private manufacturerTableAdapter _manufacturerTableAdapter;
  1970. private productTableAdapter _productTableAdapter;
  1971. private productsaleTableAdapter _productsaleTableAdapter;
  1972. private bool _backupDataSetBeforeUpdate;
  1973. private global::System.Data.IDbConnection _connection;
  1974. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1975. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1976. public UpdateOrderOption UpdateOrder {
  1977. get {
  1978. return this._updateOrder;
  1979. }
  1980. set {
  1981. this._updateOrder = value;
  1982. }
  1983. }
  1984. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1985. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1986. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  1987. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  1988. "a", "System.Drawing.Design.UITypeEditor")]
  1989. public manufacturerTableAdapter manufacturerTableAdapter {
  1990. get {
  1991. return this._manufacturerTableAdapter;
  1992. }
  1993. set {
  1994. this._manufacturerTableAdapter = value;
  1995. }
  1996. }
  1997. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1998. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  1999. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  2000. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  2001. "a", "System.Drawing.Design.UITypeEditor")]
  2002. public productTableAdapter productTableAdapter {
  2003. get {
  2004. return this._productTableAdapter;
  2005. }
  2006. set {
  2007. this._productTableAdapter = value;
  2008. }
  2009. }
  2010. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2011. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2012. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  2013. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  2014. "a", "System.Drawing.Design.UITypeEditor")]
  2015. public productsaleTableAdapter productsaleTableAdapter {
  2016. get {
  2017. return this._productsaleTableAdapter;
  2018. }
  2019. set {
  2020. this._productsaleTableAdapter = value;
  2021. }
  2022. }
  2023. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2024. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2025. public bool BackupDataSetBeforeUpdate {
  2026. get {
  2027. return this._backupDataSetBeforeUpdate;
  2028. }
  2029. set {
  2030. this._backupDataSetBeforeUpdate = value;
  2031. }
  2032. }
  2033. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2034. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2035. [global::System.ComponentModel.Browsable(false)]
  2036. public global::System.Data.IDbConnection Connection {
  2037. get {
  2038. if ((this._connection != null)) {
  2039. return this._connection;
  2040. }
  2041. if (((this._manufacturerTableAdapter != null)
  2042. && (this._manufacturerTableAdapter.Connection != null))) {
  2043. return this._manufacturerTableAdapter.Connection;
  2044. }
  2045. if (((this._productTableAdapter != null)
  2046. && (this._productTableAdapter.Connection != null))) {
  2047. return this._productTableAdapter.Connection;
  2048. }
  2049. if (((this._productsaleTableAdapter != null)
  2050. && (this._productsaleTableAdapter.Connection != null))) {
  2051. return this._productsaleTableAdapter.Connection;
  2052. }
  2053. return null;
  2054. }
  2055. set {
  2056. this._connection = value;
  2057. }
  2058. }
  2059. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2060. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2061. [global::System.ComponentModel.Browsable(false)]
  2062. public int TableAdapterInstanceCount {
  2063. get {
  2064. int count = 0;
  2065. if ((this._manufacturerTableAdapter != null)) {
  2066. count = (count + 1);
  2067. }
  2068. if ((this._productTableAdapter != null)) {
  2069. count = (count + 1);
  2070. }
  2071. if ((this._productsaleTableAdapter != null)) {
  2072. count = (count + 1);
  2073. }
  2074. return count;
  2075. }
  2076. }
  2077. /// <summary>
  2078. ///Update rows in top-down order.
  2079. ///</summary>
  2080. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2081. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2082. private int UpdateUpdatedRows(Rp42IvanovaDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  2083. int result = 0;
  2084. if ((this._manufacturerTableAdapter != null)) {
  2085. global::System.Data.DataRow[] updatedRows = dataSet.manufacturer.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  2086. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  2087. if (((updatedRows != null)
  2088. && (0 < updatedRows.Length))) {
  2089. result = (result + this._manufacturerTableAdapter.Update(updatedRows));
  2090. allChangedRows.AddRange(updatedRows);
  2091. }
  2092. }
  2093. if ((this._productTableAdapter != null)) {
  2094. global::System.Data.DataRow[] updatedRows = dataSet.product.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  2095. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  2096. if (((updatedRows != null)
  2097. && (0 < updatedRows.Length))) {
  2098. result = (result + this._productTableAdapter.Update(updatedRows));
  2099. allChangedRows.AddRange(updatedRows);
  2100. }
  2101. }
  2102. if ((this._productsaleTableAdapter != null)) {
  2103. global::System.Data.DataRow[] updatedRows = dataSet.productsale.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  2104. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  2105. if (((updatedRows != null)
  2106. && (0 < updatedRows.Length))) {
  2107. result = (result + this._productsaleTableAdapter.Update(updatedRows));
  2108. allChangedRows.AddRange(updatedRows);
  2109. }
  2110. }
  2111. return result;
  2112. }
  2113. /// <summary>
  2114. ///Insert rows in top-down order.
  2115. ///</summary>
  2116. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2117. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2118. private int UpdateInsertedRows(Rp42IvanovaDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  2119. int result = 0;
  2120. if ((this._manufacturerTableAdapter != null)) {
  2121. global::System.Data.DataRow[] addedRows = dataSet.manufacturer.Select(null, null, global::System.Data.DataViewRowState.Added);
  2122. if (((addedRows != null)
  2123. && (0 < addedRows.Length))) {
  2124. result = (result + this._manufacturerTableAdapter.Update(addedRows));
  2125. allAddedRows.AddRange(addedRows);
  2126. }
  2127. }
  2128. if ((this._productTableAdapter != null)) {
  2129. global::System.Data.DataRow[] addedRows = dataSet.product.Select(null, null, global::System.Data.DataViewRowState.Added);
  2130. if (((addedRows != null)
  2131. && (0 < addedRows.Length))) {
  2132. result = (result + this._productTableAdapter.Update(addedRows));
  2133. allAddedRows.AddRange(addedRows);
  2134. }
  2135. }
  2136. if ((this._productsaleTableAdapter != null)) {
  2137. global::System.Data.DataRow[] addedRows = dataSet.productsale.Select(null, null, global::System.Data.DataViewRowState.Added);
  2138. if (((addedRows != null)
  2139. && (0 < addedRows.Length))) {
  2140. result = (result + this._productsaleTableAdapter.Update(addedRows));
  2141. allAddedRows.AddRange(addedRows);
  2142. }
  2143. }
  2144. return result;
  2145. }
  2146. /// <summary>
  2147. ///Delete rows in bottom-up order.
  2148. ///</summary>
  2149. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2150. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2151. private int UpdateDeletedRows(Rp42IvanovaDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  2152. int result = 0;
  2153. if ((this._productsaleTableAdapter != null)) {
  2154. global::System.Data.DataRow[] deletedRows = dataSet.productsale.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  2155. if (((deletedRows != null)
  2156. && (0 < deletedRows.Length))) {
  2157. result = (result + this._productsaleTableAdapter.Update(deletedRows));
  2158. allChangedRows.AddRange(deletedRows);
  2159. }
  2160. }
  2161. if ((this._productTableAdapter != null)) {
  2162. global::System.Data.DataRow[] deletedRows = dataSet.product.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  2163. if (((deletedRows != null)
  2164. && (0 < deletedRows.Length))) {
  2165. result = (result + this._productTableAdapter.Update(deletedRows));
  2166. allChangedRows.AddRange(deletedRows);
  2167. }
  2168. }
  2169. if ((this._manufacturerTableAdapter != null)) {
  2170. global::System.Data.DataRow[] deletedRows = dataSet.manufacturer.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  2171. if (((deletedRows != null)
  2172. && (0 < deletedRows.Length))) {
  2173. result = (result + this._manufacturerTableAdapter.Update(deletedRows));
  2174. allChangedRows.AddRange(deletedRows);
  2175. }
  2176. }
  2177. return result;
  2178. }
  2179. /// <summary>
  2180. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  2181. ///</summary>
  2182. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2183. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2184. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  2185. if (((updatedRows == null)
  2186. || (updatedRows.Length < 1))) {
  2187. return updatedRows;
  2188. }
  2189. if (((allAddedRows == null)
  2190. || (allAddedRows.Count < 1))) {
  2191. return updatedRows;
  2192. }
  2193. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  2194. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  2195. global::System.Data.DataRow row = updatedRows[i];
  2196. if ((allAddedRows.Contains(row) == false)) {
  2197. realUpdatedRows.Add(row);
  2198. }
  2199. }
  2200. return realUpdatedRows.ToArray();
  2201. }
  2202. /// <summary>
  2203. ///Update all changes to the dataset.
  2204. ///</summary>
  2205. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2206. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2207. public virtual int UpdateAll(Rp42IvanovaDataSet dataSet) {
  2208. if ((dataSet == null)) {
  2209. throw new global::System.ArgumentNullException("dataSet");
  2210. }
  2211. if ((dataSet.HasChanges() == false)) {
  2212. return 0;
  2213. }
  2214. if (((this._manufacturerTableAdapter != null)
  2215. && (this.MatchTableAdapterConnection(this._manufacturerTableAdapter.Connection) == false))) {
  2216. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  2217. "r, должны использовать одинаковую строку подключения.");
  2218. }
  2219. if (((this._productTableAdapter != null)
  2220. && (this.MatchTableAdapterConnection(this._productTableAdapter.Connection) == false))) {
  2221. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  2222. "r, должны использовать одинаковую строку подключения.");
  2223. }
  2224. if (((this._productsaleTableAdapter != null)
  2225. && (this.MatchTableAdapterConnection(this._productsaleTableAdapter.Connection) == false))) {
  2226. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  2227. "r, должны использовать одинаковую строку подключения.");
  2228. }
  2229. global::System.Data.IDbConnection workConnection = this.Connection;
  2230. if ((workConnection == null)) {
  2231. throw new global::System.ApplicationException("TableAdapterManager не содержит сведений о подключении. Укажите для каждого адапт" +
  2232. "ера таблицы TableAdapterManager допустимый экземпляр адаптера таблицы.");
  2233. }
  2234. bool workConnOpened = false;
  2235. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  2236. == global::System.Data.ConnectionState.Broken)) {
  2237. workConnection.Close();
  2238. }
  2239. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  2240. workConnection.Open();
  2241. workConnOpened = true;
  2242. }
  2243. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  2244. if ((workTransaction == null)) {
  2245. throw new global::System.ApplicationException("Не удается начать транзакцию. Текущее соединение данных не поддерживает транзакци" +
  2246. "и или текущее состояние не позволяет начать транзакцию.");
  2247. }
  2248. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  2249. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  2250. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  2251. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  2252. int result = 0;
  2253. global::System.Data.DataSet backupDataSet = null;
  2254. if (this.BackupDataSetBeforeUpdate) {
  2255. backupDataSet = new global::System.Data.DataSet();
  2256. backupDataSet.Merge(dataSet);
  2257. }
  2258. try {
  2259. // ---- Prepare for update -----------
  2260. //
  2261. if ((this._manufacturerTableAdapter != null)) {
  2262. revertConnections.Add(this._manufacturerTableAdapter, this._manufacturerTableAdapter.Connection);
  2263. this._manufacturerTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  2264. this._manufacturerTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  2265. if (this._manufacturerTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  2266. this._manufacturerTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  2267. adaptersWithAcceptChangesDuringUpdate.Add(this._manufacturerTableAdapter.Adapter);
  2268. }
  2269. }
  2270. if ((this._productTableAdapter != null)) {
  2271. revertConnections.Add(this._productTableAdapter, this._productTableAdapter.Connection);
  2272. this._productTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  2273. this._productTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  2274. if (this._productTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  2275. this._productTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  2276. adaptersWithAcceptChangesDuringUpdate.Add(this._productTableAdapter.Adapter);
  2277. }
  2278. }
  2279. if ((this._productsaleTableAdapter != null)) {
  2280. revertConnections.Add(this._productsaleTableAdapter, this._productsaleTableAdapter.Connection);
  2281. this._productsaleTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  2282. this._productsaleTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  2283. if (this._productsaleTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  2284. this._productsaleTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  2285. adaptersWithAcceptChangesDuringUpdate.Add(this._productsaleTableAdapter.Adapter);
  2286. }
  2287. }
  2288. //
  2289. //---- Perform updates -----------
  2290. //
  2291. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  2292. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  2293. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  2294. }
  2295. else {
  2296. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  2297. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  2298. }
  2299. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  2300. //
  2301. //---- Commit updates -----------
  2302. //
  2303. workTransaction.Commit();
  2304. if ((0 < allAddedRows.Count)) {
  2305. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  2306. allAddedRows.CopyTo(rows);
  2307. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  2308. global::System.Data.DataRow row = rows[i];
  2309. row.AcceptChanges();
  2310. }
  2311. }
  2312. if ((0 < allChangedRows.Count)) {
  2313. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  2314. allChangedRows.CopyTo(rows);
  2315. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  2316. global::System.Data.DataRow row = rows[i];
  2317. row.AcceptChanges();
  2318. }
  2319. }
  2320. }
  2321. catch (global::System.Exception ex) {
  2322. workTransaction.Rollback();
  2323. // ---- Restore the dataset -----------
  2324. if (this.BackupDataSetBeforeUpdate) {
  2325. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  2326. dataSet.Clear();
  2327. dataSet.Merge(backupDataSet);
  2328. }
  2329. else {
  2330. if ((0 < allAddedRows.Count)) {
  2331. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  2332. allAddedRows.CopyTo(rows);
  2333. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  2334. global::System.Data.DataRow row = rows[i];
  2335. row.AcceptChanges();
  2336. row.SetAdded();
  2337. }
  2338. }
  2339. }
  2340. throw ex;
  2341. }
  2342. finally {
  2343. if (workConnOpened) {
  2344. workConnection.Close();
  2345. }
  2346. if ((this._manufacturerTableAdapter != null)) {
  2347. this._manufacturerTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._manufacturerTableAdapter]));
  2348. this._manufacturerTableAdapter.Transaction = null;
  2349. }
  2350. if ((this._productTableAdapter != null)) {
  2351. this._productTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productTableAdapter]));
  2352. this._productTableAdapter.Transaction = null;
  2353. }
  2354. if ((this._productsaleTableAdapter != null)) {
  2355. this._productsaleTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productsaleTableAdapter]));
  2356. this._productsaleTableAdapter.Transaction = null;
  2357. }
  2358. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  2359. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  2360. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  2361. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  2362. global::System.Data.Common.DataAdapter adapter = adapters[i];
  2363. adapter.AcceptChangesDuringUpdate = true;
  2364. }
  2365. }
  2366. }
  2367. return result;
  2368. }
  2369. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2370. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2371. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  2372. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  2373. }
  2374. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2375. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2376. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  2377. if ((this._connection != null)) {
  2378. return true;
  2379. }
  2380. if (((this.Connection == null)
  2381. || (inputConnection == null))) {
  2382. return true;
  2383. }
  2384. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  2385. return true;
  2386. }
  2387. return false;
  2388. }
  2389. /// <summary>
  2390. ///Update Order Option
  2391. ///</summary>
  2392. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2393. public enum UpdateOrderOption {
  2394. InsertUpdateDelete = 0,
  2395. UpdateInsertDelete = 1,
  2396. }
  2397. /// <summary>
  2398. ///Used to sort self-referenced table's rows
  2399. ///</summary>
  2400. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2401. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  2402. private global::System.Data.DataRelation _relation;
  2403. private int _childFirst;
  2404. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2405. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2406. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  2407. this._relation = relation;
  2408. if (childFirst) {
  2409. this._childFirst = -1;
  2410. }
  2411. else {
  2412. this._childFirst = 1;
  2413. }
  2414. }
  2415. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2416. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2417. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  2418. global::System.Diagnostics.Debug.Assert((row != null));
  2419. global::System.Data.DataRow root = row;
  2420. distance = 0;
  2421. 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>();
  2422. traversedRows[row] = row;
  2423. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  2424. for (
  2425. ; ((parent != null)
  2426. && (traversedRows.ContainsKey(parent) == false));
  2427. ) {
  2428. distance = (distance + 1);
  2429. root = parent;
  2430. traversedRows[parent] = parent;
  2431. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  2432. }
  2433. if ((distance == 0)) {
  2434. traversedRows.Clear();
  2435. traversedRows[row] = row;
  2436. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  2437. for (
  2438. ; ((parent != null)
  2439. && (traversedRows.ContainsKey(parent) == false));
  2440. ) {
  2441. distance = (distance + 1);
  2442. root = parent;
  2443. traversedRows[parent] = parent;
  2444. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  2445. }
  2446. }
  2447. return root;
  2448. }
  2449. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2450. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  2451. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  2452. if (object.ReferenceEquals(row1, row2)) {
  2453. return 0;
  2454. }
  2455. if ((row1 == null)) {
  2456. return -1;
  2457. }
  2458. if ((row2 == null)) {
  2459. return 1;
  2460. }
  2461. int distance1 = 0;
  2462. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  2463. int distance2 = 0;
  2464. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  2465. if (object.ReferenceEquals(root1, root2)) {
  2466. return (this._childFirst * distance1.CompareTo(distance2));
  2467. }
  2468. else {
  2469. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  2470. && (root2.Table != null)));
  2471. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  2472. return -1;
  2473. }
  2474. else {
  2475. return 1;
  2476. }
  2477. }
  2478. }
  2479. }
  2480. }
  2481. }
  2482. #pragma warning restore 1591