AdminUsersDataSet.Designer.cs 59 KB

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