Фабрика_ЛорийDataSet.Designer.cs 207 KB

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