konkursDataSet1.Designer.cs 83 KB

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