Badretdinov_PR13DataSet.Designer.cs 88 KB

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