_Юсов_Владислав_Сергеевич_ИСП_11_18_3DataSet8.Designer.cs 82 KB

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