courseDataSet.Designer.cs 79 KB

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