Lyakhov_Bilet10DataSet1.Designer.cs 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // Этот код создан программой.
  4. // Исполняемая версия:4.0.30319.42000
  5. //
  6. // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
  7. // повторной генерации кода.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. #pragma warning disable 1591
  11. namespace Lyakhov_Bilet10 {
  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("Lyakhov_Bilet10DataSet1")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class Lyakhov_Bilet10DataSet1 : global::System.Data.DataSet {
  22. private View_1DataTable tableView_1;
  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 Lyakhov_Bilet10DataSet1() {
  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 Lyakhov_Bilet10DataSet1(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["View_1"] != null)) {
  50. base.Tables.Add(new View_1DataTable(ds.Tables["View_1"]));
  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 View_1DataTable View_1 {
  74. get {
  75. return this.tableView_1;
  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. Lyakhov_Bilet10DataSet1 cln = ((Lyakhov_Bilet10DataSet1)(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["View_1"] != null)) {
  139. base.Tables.Add(new View_1DataTable(ds.Tables["View_1"]));
  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.tableView_1 = ((View_1DataTable)(base.Tables["View_1"]));
  172. if ((initTable == true)) {
  173. if ((this.tableView_1 != null)) {
  174. this.tableView_1.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 = "Lyakhov_Bilet10DataSet1";
  182. this.Prefix = "";
  183. this.Namespace = "http://tempuri.org/Lyakhov_Bilet10DataSet1.xsd";
  184. this.EnforceConstraints = true;
  185. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  186. this.tableView_1 = new View_1DataTable();
  187. base.Tables.Add(this.tableView_1);
  188. }
  189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  190. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  191. private bool ShouldSerializeView_1() {
  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. Lyakhov_Bilet10DataSet1 ds = new Lyakhov_Bilet10DataSet1();
  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 View_1RowChangeEventHandler(object sender, View_1RowChangeEvent 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 View_1DataTable : global::System.Data.TypedTableBase<View_1Row> {
  255. private global::System.Data.DataColumn columnДата;
  256. private global::System.Data.DataColumn columnНазвание;
  257. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  258. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  259. public View_1DataTable() {
  260. this.TableName = "View_1";
  261. this.BeginInit();
  262. this.InitClass();
  263. this.EndInit();
  264. }
  265. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  266. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  267. internal View_1DataTable(global::System.Data.DataTable table) {
  268. this.TableName = table.TableName;
  269. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  270. this.CaseSensitive = table.CaseSensitive;
  271. }
  272. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  273. this.Locale = table.Locale;
  274. }
  275. if ((table.Namespace != table.DataSet.Namespace)) {
  276. this.Namespace = table.Namespace;
  277. }
  278. this.Prefix = table.Prefix;
  279. this.MinimumCapacity = table.MinimumCapacity;
  280. }
  281. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  282. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  283. protected View_1DataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  284. base(info, context) {
  285. this.InitVars();
  286. }
  287. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  288. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  289. public global::System.Data.DataColumn ДатаColumn {
  290. get {
  291. return this.columnДата;
  292. }
  293. }
  294. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  295. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  296. public global::System.Data.DataColumn НазваниеColumn {
  297. get {
  298. return this.columnНазвание;
  299. }
  300. }
  301. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  302. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  303. [global::System.ComponentModel.Browsable(false)]
  304. public int Count {
  305. get {
  306. return this.Rows.Count;
  307. }
  308. }
  309. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  310. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  311. public View_1Row this[int index] {
  312. get {
  313. return ((View_1Row)(this.Rows[index]));
  314. }
  315. }
  316. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  317. public event View_1RowChangeEventHandler View_1RowChanging;
  318. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  319. public event View_1RowChangeEventHandler View_1RowChanged;
  320. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  321. public event View_1RowChangeEventHandler View_1RowDeleting;
  322. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  323. public event View_1RowChangeEventHandler View_1RowDeleted;
  324. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  325. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  326. public void AddView_1Row(View_1Row row) {
  327. this.Rows.Add(row);
  328. }
  329. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  330. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  331. public View_1Row AddView_1Row(System.DateTime Дата, string Название) {
  332. View_1Row rowView_1Row = ((View_1Row)(this.NewRow()));
  333. object[] columnValuesArray = new object[] {
  334. Дата,
  335. Название};
  336. rowView_1Row.ItemArray = columnValuesArray;
  337. this.Rows.Add(rowView_1Row);
  338. return rowView_1Row;
  339. }
  340. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  341. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  342. public override global::System.Data.DataTable Clone() {
  343. View_1DataTable cln = ((View_1DataTable)(base.Clone()));
  344. cln.InitVars();
  345. return cln;
  346. }
  347. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  348. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  349. protected override global::System.Data.DataTable CreateInstance() {
  350. return new View_1DataTable();
  351. }
  352. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  353. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  354. internal void InitVars() {
  355. this.columnДата = base.Columns["Дата"];
  356. this.columnНазвание = base.Columns["Название"];
  357. }
  358. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  359. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  360. private void InitClass() {
  361. this.columnДата = new global::System.Data.DataColumn("Дата", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
  362. base.Columns.Add(this.columnДата);
  363. this.columnНазвание = new global::System.Data.DataColumn("Название", typeof(string), null, global::System.Data.MappingType.Element);
  364. base.Columns.Add(this.columnНазвание);
  365. this.columnДата.AllowDBNull = false;
  366. this.columnНазвание.AllowDBNull = false;
  367. this.columnНазвание.MaxLength = 50;
  368. }
  369. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  370. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  371. public View_1Row NewView_1Row() {
  372. return ((View_1Row)(this.NewRow()));
  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.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  377. return new View_1Row(builder);
  378. }
  379. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  380. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  381. protected override global::System.Type GetRowType() {
  382. return typeof(View_1Row);
  383. }
  384. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  385. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  386. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  387. base.OnRowChanged(e);
  388. if ((this.View_1RowChanged != null)) {
  389. this.View_1RowChanged(this, new View_1RowChangeEvent(((View_1Row)(e.Row)), e.Action));
  390. }
  391. }
  392. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  393. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  394. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  395. base.OnRowChanging(e);
  396. if ((this.View_1RowChanging != null)) {
  397. this.View_1RowChanging(this, new View_1RowChangeEvent(((View_1Row)(e.Row)), e.Action));
  398. }
  399. }
  400. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  401. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  402. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  403. base.OnRowDeleted(e);
  404. if ((this.View_1RowDeleted != null)) {
  405. this.View_1RowDeleted(this, new View_1RowChangeEvent(((View_1Row)(e.Row)), e.Action));
  406. }
  407. }
  408. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  409. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  410. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  411. base.OnRowDeleting(e);
  412. if ((this.View_1RowDeleting != null)) {
  413. this.View_1RowDeleting(this, new View_1RowChangeEvent(((View_1Row)(e.Row)), e.Action));
  414. }
  415. }
  416. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  417. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  418. public void RemoveView_1Row(View_1Row row) {
  419. this.Rows.Remove(row);
  420. }
  421. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  422. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  423. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  424. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  425. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  426. Lyakhov_Bilet10DataSet1 ds = new Lyakhov_Bilet10DataSet1();
  427. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  428. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  429. any1.MinOccurs = new decimal(0);
  430. any1.MaxOccurs = decimal.MaxValue;
  431. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  432. sequence.Items.Add(any1);
  433. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  434. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  435. any2.MinOccurs = new decimal(1);
  436. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  437. sequence.Items.Add(any2);
  438. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  439. attribute1.Name = "namespace";
  440. attribute1.FixedValue = ds.Namespace;
  441. type.Attributes.Add(attribute1);
  442. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  443. attribute2.Name = "tableTypeName";
  444. attribute2.FixedValue = "View_1DataTable";
  445. type.Attributes.Add(attribute2);
  446. type.Particle = sequence;
  447. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  448. if (xs.Contains(dsSchema.TargetNamespace)) {
  449. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  450. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  451. try {
  452. global::System.Xml.Schema.XmlSchema schema = null;
  453. dsSchema.Write(s1);
  454. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  455. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  456. s2.SetLength(0);
  457. schema.Write(s2);
  458. if ((s1.Length == s2.Length)) {
  459. s1.Position = 0;
  460. s2.Position = 0;
  461. for (; ((s1.Position != s1.Length)
  462. && (s1.ReadByte() == s2.ReadByte())); ) {
  463. ;
  464. }
  465. if ((s1.Position == s1.Length)) {
  466. return type;
  467. }
  468. }
  469. }
  470. }
  471. finally {
  472. if ((s1 != null)) {
  473. s1.Close();
  474. }
  475. if ((s2 != null)) {
  476. s2.Close();
  477. }
  478. }
  479. }
  480. xs.Add(dsSchema);
  481. return type;
  482. }
  483. }
  484. /// <summary>
  485. ///Represents strongly named DataRow class.
  486. ///</summary>
  487. public partial class View_1Row : global::System.Data.DataRow {
  488. private View_1DataTable tableView_1;
  489. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  490. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  491. internal View_1Row(global::System.Data.DataRowBuilder rb) :
  492. base(rb) {
  493. this.tableView_1 = ((View_1DataTable)(this.Table));
  494. }
  495. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  496. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  497. public System.DateTime Дата {
  498. get {
  499. return ((global::System.DateTime)(this[this.tableView_1.ДатаColumn]));
  500. }
  501. set {
  502. this[this.tableView_1.ДатаColumn] = value;
  503. }
  504. }
  505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  506. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  507. public string Название {
  508. get {
  509. return ((string)(this[this.tableView_1.НазваниеColumn]));
  510. }
  511. set {
  512. this[this.tableView_1.НазваниеColumn] = value;
  513. }
  514. }
  515. }
  516. /// <summary>
  517. ///Row event argument class
  518. ///</summary>
  519. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  520. public class View_1RowChangeEvent : global::System.EventArgs {
  521. private View_1Row eventRow;
  522. private global::System.Data.DataRowAction eventAction;
  523. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  524. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  525. public View_1RowChangeEvent(View_1Row row, global::System.Data.DataRowAction action) {
  526. this.eventRow = row;
  527. this.eventAction = action;
  528. }
  529. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  530. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  531. public View_1Row Row {
  532. get {
  533. return this.eventRow;
  534. }
  535. }
  536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  537. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  538. public global::System.Data.DataRowAction Action {
  539. get {
  540. return this.eventAction;
  541. }
  542. }
  543. }
  544. }
  545. }
  546. namespace Lyakhov_Bilet10.Lyakhov_Bilet10DataSet1TableAdapters {
  547. /// <summary>
  548. ///Represents the connection and commands used to retrieve and save data.
  549. ///</summary>
  550. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  551. [global::System.ComponentModel.ToolboxItem(true)]
  552. [global::System.ComponentModel.DataObjectAttribute(true)]
  553. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  554. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  555. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  556. public partial class View_1TableAdapter : global::System.ComponentModel.Component {
  557. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  558. private global::System.Data.SqlClient.SqlConnection _connection;
  559. private global::System.Data.SqlClient.SqlTransaction _transaction;
  560. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  561. private bool _clearBeforeFill;
  562. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  563. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  564. public View_1TableAdapter() {
  565. this.ClearBeforeFill = true;
  566. }
  567. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  568. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  569. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  570. get {
  571. if ((this._adapter == null)) {
  572. this.InitAdapter();
  573. }
  574. return this._adapter;
  575. }
  576. }
  577. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  578. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  579. internal global::System.Data.SqlClient.SqlConnection Connection {
  580. get {
  581. if ((this._connection == null)) {
  582. this.InitConnection();
  583. }
  584. return this._connection;
  585. }
  586. set {
  587. this._connection = value;
  588. if ((this.Adapter.InsertCommand != null)) {
  589. this.Adapter.InsertCommand.Connection = value;
  590. }
  591. if ((this.Adapter.DeleteCommand != null)) {
  592. this.Adapter.DeleteCommand.Connection = value;
  593. }
  594. if ((this.Adapter.UpdateCommand != null)) {
  595. this.Adapter.UpdateCommand.Connection = value;
  596. }
  597. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  598. if ((this.CommandCollection[i] != null)) {
  599. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  600. }
  601. }
  602. }
  603. }
  604. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  605. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  606. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  607. get {
  608. return this._transaction;
  609. }
  610. set {
  611. this._transaction = value;
  612. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  613. this.CommandCollection[i].Transaction = this._transaction;
  614. }
  615. if (((this.Adapter != null)
  616. && (this.Adapter.DeleteCommand != null))) {
  617. this.Adapter.DeleteCommand.Transaction = this._transaction;
  618. }
  619. if (((this.Adapter != null)
  620. && (this.Adapter.InsertCommand != null))) {
  621. this.Adapter.InsertCommand.Transaction = this._transaction;
  622. }
  623. if (((this.Adapter != null)
  624. && (this.Adapter.UpdateCommand != null))) {
  625. this.Adapter.UpdateCommand.Transaction = this._transaction;
  626. }
  627. }
  628. }
  629. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  630. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  631. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  632. get {
  633. if ((this._commandCollection == null)) {
  634. this.InitCommandCollection();
  635. }
  636. return this._commandCollection;
  637. }
  638. }
  639. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  640. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  641. public bool ClearBeforeFill {
  642. get {
  643. return this._clearBeforeFill;
  644. }
  645. set {
  646. this._clearBeforeFill = value;
  647. }
  648. }
  649. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  650. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  651. private void InitAdapter() {
  652. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  653. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  654. tableMapping.SourceTable = "Table";
  655. tableMapping.DataSetTable = "View_1";
  656. tableMapping.ColumnMappings.Add("Дата", "Дата");
  657. tableMapping.ColumnMappings.Add("Название", "Название");
  658. this._adapter.TableMappings.Add(tableMapping);
  659. }
  660. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  661. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  662. private void InitConnection() {
  663. this._connection = new global::System.Data.SqlClient.SqlConnection();
  664. this._connection.ConnectionString = global::Lyakhov_Bilet10.Properties.Settings.Default.Lyakhov_Bilet10ConnectionString;
  665. }
  666. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  667. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  668. private void InitCommandCollection() {
  669. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  670. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  671. this._commandCollection[0].Connection = this.Connection;
  672. this._commandCollection[0].CommandText = "SELECT Дата, Название FROM dbo.View_1";
  673. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  674. }
  675. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  676. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  677. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  678. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  679. public virtual int Fill(Lyakhov_Bilet10DataSet1.View_1DataTable dataTable) {
  680. this.Adapter.SelectCommand = this.CommandCollection[0];
  681. if ((this.ClearBeforeFill == true)) {
  682. dataTable.Clear();
  683. }
  684. int returnValue = this.Adapter.Fill(dataTable);
  685. return returnValue;
  686. }
  687. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  688. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  689. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  690. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  691. public virtual Lyakhov_Bilet10DataSet1.View_1DataTable GetData() {
  692. this.Adapter.SelectCommand = this.CommandCollection[0];
  693. Lyakhov_Bilet10DataSet1.View_1DataTable dataTable = new Lyakhov_Bilet10DataSet1.View_1DataTable();
  694. this.Adapter.Fill(dataTable);
  695. return dataTable;
  696. }
  697. }
  698. /// <summary>
  699. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  700. ///</summary>
  701. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  702. [global::System.ComponentModel.ToolboxItem(true)]
  703. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  704. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  705. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  706. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  707. private UpdateOrderOption _updateOrder;
  708. private bool _backupDataSetBeforeUpdate;
  709. private global::System.Data.IDbConnection _connection;
  710. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  711. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  712. public UpdateOrderOption UpdateOrder {
  713. get {
  714. return this._updateOrder;
  715. }
  716. set {
  717. this._updateOrder = value;
  718. }
  719. }
  720. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  721. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  722. public bool BackupDataSetBeforeUpdate {
  723. get {
  724. return this._backupDataSetBeforeUpdate;
  725. }
  726. set {
  727. this._backupDataSetBeforeUpdate = value;
  728. }
  729. }
  730. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  731. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  732. [global::System.ComponentModel.Browsable(false)]
  733. public global::System.Data.IDbConnection Connection {
  734. get {
  735. if ((this._connection != null)) {
  736. return this._connection;
  737. }
  738. return null;
  739. }
  740. set {
  741. this._connection = value;
  742. }
  743. }
  744. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  745. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  746. [global::System.ComponentModel.Browsable(false)]
  747. public int TableAdapterInstanceCount {
  748. get {
  749. int count = 0;
  750. return count;
  751. }
  752. }
  753. /// <summary>
  754. ///Update rows in top-down order.
  755. ///</summary>
  756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  757. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  758. private int UpdateUpdatedRows(Lyakhov_Bilet10DataSet1 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  759. int result = 0;
  760. return result;
  761. }
  762. /// <summary>
  763. ///Insert rows in top-down order.
  764. ///</summary>
  765. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  766. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  767. private int UpdateInsertedRows(Lyakhov_Bilet10DataSet1 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  768. int result = 0;
  769. return result;
  770. }
  771. /// <summary>
  772. ///Delete rows in bottom-up order.
  773. ///</summary>
  774. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  775. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  776. private int UpdateDeletedRows(Lyakhov_Bilet10DataSet1 dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  777. int result = 0;
  778. return result;
  779. }
  780. /// <summary>
  781. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  782. ///</summary>
  783. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  784. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  785. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  786. if (((updatedRows == null)
  787. || (updatedRows.Length < 1))) {
  788. return updatedRows;
  789. }
  790. if (((allAddedRows == null)
  791. || (allAddedRows.Count < 1))) {
  792. return updatedRows;
  793. }
  794. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  795. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  796. global::System.Data.DataRow row = updatedRows[i];
  797. if ((allAddedRows.Contains(row) == false)) {
  798. realUpdatedRows.Add(row);
  799. }
  800. }
  801. return realUpdatedRows.ToArray();
  802. }
  803. /// <summary>
  804. ///Update all changes to the dataset.
  805. ///</summary>
  806. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  807. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  808. public virtual int UpdateAll(Lyakhov_Bilet10DataSet1 dataSet) {
  809. if ((dataSet == null)) {
  810. throw new global::System.ArgumentNullException("dataSet");
  811. }
  812. if ((dataSet.HasChanges() == false)) {
  813. return 0;
  814. }
  815. global::System.Data.IDbConnection workConnection = this.Connection;
  816. if ((workConnection == null)) {
  817. throw new global::System.ApplicationException("TableAdapterManager не содержит сведений о подключении. Укажите для каждого адапт" +
  818. "ера таблицы TableAdapterManager допустимый экземпляр адаптера таблицы.");
  819. }
  820. bool workConnOpened = false;
  821. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  822. == global::System.Data.ConnectionState.Broken)) {
  823. workConnection.Close();
  824. }
  825. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  826. workConnection.Open();
  827. workConnOpened = true;
  828. }
  829. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  830. if ((workTransaction == null)) {
  831. throw new global::System.ApplicationException("Не удается начать транзакцию. Текущее соединение данных не поддерживает транзакци" +
  832. "и или текущее состояние не позволяет начать транзакцию.");
  833. }
  834. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  835. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  836. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  837. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  838. int result = 0;
  839. global::System.Data.DataSet backupDataSet = null;
  840. if (this.BackupDataSetBeforeUpdate) {
  841. backupDataSet = new global::System.Data.DataSet();
  842. backupDataSet.Merge(dataSet);
  843. }
  844. try {
  845. // ---- Prepare for update -----------
  846. //
  847. //
  848. //---- Perform updates -----------
  849. //
  850. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  851. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  852. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  853. }
  854. else {
  855. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  856. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  857. }
  858. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  859. //
  860. //---- Commit updates -----------
  861. //
  862. workTransaction.Commit();
  863. if ((0 < allAddedRows.Count)) {
  864. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  865. allAddedRows.CopyTo(rows);
  866. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  867. global::System.Data.DataRow row = rows[i];
  868. row.AcceptChanges();
  869. }
  870. }
  871. if ((0 < allChangedRows.Count)) {
  872. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  873. allChangedRows.CopyTo(rows);
  874. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  875. global::System.Data.DataRow row = rows[i];
  876. row.AcceptChanges();
  877. }
  878. }
  879. }
  880. catch (global::System.Exception ex) {
  881. workTransaction.Rollback();
  882. // ---- Restore the dataset -----------
  883. if (this.BackupDataSetBeforeUpdate) {
  884. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  885. dataSet.Clear();
  886. dataSet.Merge(backupDataSet);
  887. }
  888. else {
  889. if ((0 < allAddedRows.Count)) {
  890. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  891. allAddedRows.CopyTo(rows);
  892. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  893. global::System.Data.DataRow row = rows[i];
  894. row.AcceptChanges();
  895. row.SetAdded();
  896. }
  897. }
  898. }
  899. throw ex;
  900. }
  901. finally {
  902. if (workConnOpened) {
  903. workConnection.Close();
  904. }
  905. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  906. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  907. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  908. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  909. global::System.Data.Common.DataAdapter adapter = adapters[i];
  910. adapter.AcceptChangesDuringUpdate = true;
  911. }
  912. }
  913. }
  914. return result;
  915. }
  916. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  917. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  918. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  919. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  920. }
  921. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  922. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  923. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  924. if ((this._connection != null)) {
  925. return true;
  926. }
  927. if (((this.Connection == null)
  928. || (inputConnection == null))) {
  929. return true;
  930. }
  931. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  932. return true;
  933. }
  934. return false;
  935. }
  936. /// <summary>
  937. ///Update Order Option
  938. ///</summary>
  939. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  940. public enum UpdateOrderOption {
  941. InsertUpdateDelete = 0,
  942. UpdateInsertDelete = 1,
  943. }
  944. /// <summary>
  945. ///Used to sort self-referenced table's rows
  946. ///</summary>
  947. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  948. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  949. private global::System.Data.DataRelation _relation;
  950. private int _childFirst;
  951. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  952. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  953. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  954. this._relation = relation;
  955. if (childFirst) {
  956. this._childFirst = -1;
  957. }
  958. else {
  959. this._childFirst = 1;
  960. }
  961. }
  962. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  963. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  964. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  965. global::System.Diagnostics.Debug.Assert((row != null));
  966. global::System.Data.DataRow root = row;
  967. distance = 0;
  968. 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>();
  969. traversedRows[row] = row;
  970. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  971. for (
  972. ; ((parent != null)
  973. && (traversedRows.ContainsKey(parent) == false));
  974. ) {
  975. distance = (distance + 1);
  976. root = parent;
  977. traversedRows[parent] = parent;
  978. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  979. }
  980. if ((distance == 0)) {
  981. traversedRows.Clear();
  982. traversedRows[row] = row;
  983. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  984. for (
  985. ; ((parent != null)
  986. && (traversedRows.ContainsKey(parent) == false));
  987. ) {
  988. distance = (distance + 1);
  989. root = parent;
  990. traversedRows[parent] = parent;
  991. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  992. }
  993. }
  994. return root;
  995. }
  996. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  997. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
  998. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  999. if (object.ReferenceEquals(row1, row2)) {
  1000. return 0;
  1001. }
  1002. if ((row1 == null)) {
  1003. return -1;
  1004. }
  1005. if ((row2 == null)) {
  1006. return 1;
  1007. }
  1008. int distance1 = 0;
  1009. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  1010. int distance2 = 0;
  1011. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  1012. if (object.ReferenceEquals(root1, root2)) {
  1013. return (this._childFirst * distance1.CompareTo(distance2));
  1014. }
  1015. else {
  1016. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  1017. && (root2.Table != null)));
  1018. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  1019. return -1;
  1020. }
  1021. else {
  1022. return 1;
  1023. }
  1024. }
  1025. }
  1026. }
  1027. }
  1028. }
  1029. #pragma warning restore 1591