1
0

PersonnelDataSet.Designer.cs 152 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // Этот код создан программой.
  4. // Исполняемая версия:4.0.30319.42000
  5. //
  6. // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
  7. // повторной генерации кода.
  8. // </auto-generated>
  9. //------------------------------------------------------------------------------
  10. #pragma warning disable 1591
  11. namespace SUBD_Medical_Staff {
  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("PersonnelDataSet")]
  20. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
  21. public partial class PersonnelDataSet : global::System.Data.DataSet {
  22. private Medical_staffDataTable tableMedical_staff;
  23. private RolesDataTable tableRoles;
  24. private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  25. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  26. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  27. public PersonnelDataSet() {
  28. this.BeginInit();
  29. this.InitClass();
  30. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  31. base.Tables.CollectionChanged += schemaChangedHandler;
  32. base.Relations.CollectionChanged += schemaChangedHandler;
  33. this.EndInit();
  34. }
  35. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  36. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  37. protected PersonnelDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  38. base(info, context, false) {
  39. if ((this.IsBinarySerialized(info, context) == true)) {
  40. this.InitVars(false);
  41. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  42. this.Tables.CollectionChanged += schemaChangedHandler1;
  43. this.Relations.CollectionChanged += schemaChangedHandler1;
  44. return;
  45. }
  46. string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
  47. if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  48. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  49. ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  50. if ((ds.Tables["Medical_staff"] != null)) {
  51. base.Tables.Add(new Medical_staffDataTable(ds.Tables["Medical_staff"]));
  52. }
  53. if ((ds.Tables["Roles"] != null)) {
  54. base.Tables.Add(new RolesDataTable(ds.Tables["Roles"]));
  55. }
  56. this.DataSetName = ds.DataSetName;
  57. this.Prefix = ds.Prefix;
  58. this.Namespace = ds.Namespace;
  59. this.Locale = ds.Locale;
  60. this.CaseSensitive = ds.CaseSensitive;
  61. this.EnforceConstraints = ds.EnforceConstraints;
  62. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  63. this.InitVars();
  64. }
  65. else {
  66. this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
  67. }
  68. this.GetSerializationData(info, context);
  69. global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  70. base.Tables.CollectionChanged += schemaChangedHandler;
  71. this.Relations.CollectionChanged += schemaChangedHandler;
  72. }
  73. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  74. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  75. [global::System.ComponentModel.Browsable(false)]
  76. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  77. public Medical_staffDataTable Medical_staff {
  78. get {
  79. return this.tableMedical_staff;
  80. }
  81. }
  82. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  83. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  84. [global::System.ComponentModel.Browsable(false)]
  85. [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
  86. public RolesDataTable Roles {
  87. get {
  88. return this.tableRoles;
  89. }
  90. }
  91. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  92. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  93. [global::System.ComponentModel.BrowsableAttribute(true)]
  94. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
  95. public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
  96. get {
  97. return this._schemaSerializationMode;
  98. }
  99. set {
  100. this._schemaSerializationMode = value;
  101. }
  102. }
  103. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  104. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  105. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  106. public new global::System.Data.DataTableCollection Tables {
  107. get {
  108. return base.Tables;
  109. }
  110. }
  111. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  112. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  113. [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
  114. public new global::System.Data.DataRelationCollection Relations {
  115. get {
  116. return base.Relations;
  117. }
  118. }
  119. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  120. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  121. protected override void InitializeDerivedDataSet() {
  122. this.BeginInit();
  123. this.InitClass();
  124. this.EndInit();
  125. }
  126. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  127. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  128. public override global::System.Data.DataSet Clone() {
  129. PersonnelDataSet cln = ((PersonnelDataSet)(base.Clone()));
  130. cln.InitVars();
  131. cln.SchemaSerializationMode = this.SchemaSerializationMode;
  132. return cln;
  133. }
  134. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  135. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  136. protected override bool ShouldSerializeTables() {
  137. return false;
  138. }
  139. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  140. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  141. protected override bool ShouldSerializeRelations() {
  142. return false;
  143. }
  144. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  145. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  146. protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
  147. if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
  148. this.Reset();
  149. global::System.Data.DataSet ds = new global::System.Data.DataSet();
  150. ds.ReadXml(reader);
  151. if ((ds.Tables["Medical_staff"] != null)) {
  152. base.Tables.Add(new Medical_staffDataTable(ds.Tables["Medical_staff"]));
  153. }
  154. if ((ds.Tables["Roles"] != null)) {
  155. base.Tables.Add(new RolesDataTable(ds.Tables["Roles"]));
  156. }
  157. this.DataSetName = ds.DataSetName;
  158. this.Prefix = ds.Prefix;
  159. this.Namespace = ds.Namespace;
  160. this.Locale = ds.Locale;
  161. this.CaseSensitive = ds.CaseSensitive;
  162. this.EnforceConstraints = ds.EnforceConstraints;
  163. this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
  164. this.InitVars();
  165. }
  166. else {
  167. this.ReadXml(reader);
  168. this.InitVars();
  169. }
  170. }
  171. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  172. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  173. protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
  174. global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
  175. this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
  176. stream.Position = 0;
  177. return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
  178. }
  179. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  180. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  181. internal void InitVars() {
  182. this.InitVars(true);
  183. }
  184. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  185. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  186. internal void InitVars(bool initTable) {
  187. this.tableMedical_staff = ((Medical_staffDataTable)(base.Tables["Medical_staff"]));
  188. if ((initTable == true)) {
  189. if ((this.tableMedical_staff != null)) {
  190. this.tableMedical_staff.InitVars();
  191. }
  192. }
  193. this.tableRoles = ((RolesDataTable)(base.Tables["Roles"]));
  194. if ((initTable == true)) {
  195. if ((this.tableRoles != null)) {
  196. this.tableRoles.InitVars();
  197. }
  198. }
  199. }
  200. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  201. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  202. private void InitClass() {
  203. this.DataSetName = "PersonnelDataSet";
  204. this.Prefix = "";
  205. this.Namespace = "http://tempuri.org/PersonnelDataSet.xsd";
  206. this.EnforceConstraints = true;
  207. this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
  208. this.tableMedical_staff = new Medical_staffDataTable();
  209. base.Tables.Add(this.tableMedical_staff);
  210. this.tableRoles = new RolesDataTable();
  211. base.Tables.Add(this.tableRoles);
  212. }
  213. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  214. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  215. private bool ShouldSerializeMedical_staff() {
  216. return false;
  217. }
  218. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  219. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  220. private bool ShouldSerializeRoles() {
  221. return false;
  222. }
  223. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  224. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  225. private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
  226. if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
  227. this.InitVars();
  228. }
  229. }
  230. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  231. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  232. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  233. PersonnelDataSet ds = new PersonnelDataSet();
  234. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  235. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  236. global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
  237. any.Namespace = ds.Namespace;
  238. sequence.Items.Add(any);
  239. type.Particle = sequence;
  240. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  241. if (xs.Contains(dsSchema.TargetNamespace)) {
  242. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  243. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  244. try {
  245. global::System.Xml.Schema.XmlSchema schema = null;
  246. dsSchema.Write(s1);
  247. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  248. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  249. s2.SetLength(0);
  250. schema.Write(s2);
  251. if ((s1.Length == s2.Length)) {
  252. s1.Position = 0;
  253. s2.Position = 0;
  254. for (; ((s1.Position != s1.Length)
  255. && (s1.ReadByte() == s2.ReadByte())); ) {
  256. ;
  257. }
  258. if ((s1.Position == s1.Length)) {
  259. return type;
  260. }
  261. }
  262. }
  263. }
  264. finally {
  265. if ((s1 != null)) {
  266. s1.Close();
  267. }
  268. if ((s2 != null)) {
  269. s2.Close();
  270. }
  271. }
  272. }
  273. xs.Add(dsSchema);
  274. return type;
  275. }
  276. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  277. public delegate void Medical_staffRowChangeEventHandler(object sender, Medical_staffRowChangeEvent e);
  278. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  279. public delegate void RolesRowChangeEventHandler(object sender, RolesRowChangeEvent e);
  280. /// <summary>
  281. ///Represents the strongly named DataTable class.
  282. ///</summary>
  283. [global::System.Serializable()]
  284. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  285. public partial class Medical_staffDataTable : global::System.Data.TypedTableBase<Medical_staffRow> {
  286. private global::System.Data.DataColumn columnName;
  287. private global::System.Data.DataColumn columnSurname;
  288. private global::System.Data.DataColumn columnOtch;
  289. private global::System.Data.DataColumn columnTelephone;
  290. private global::System.Data.DataColumn columnAdres;
  291. private global::System.Data.DataColumn columnGender;
  292. private global::System.Data.DataColumn columnIDRole;
  293. private global::System.Data.DataColumn columnPhoto;
  294. private global::System.Data.DataColumn columnIDHuman;
  295. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  296. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  297. public Medical_staffDataTable() {
  298. this.TableName = "Medical_staff";
  299. this.BeginInit();
  300. this.InitClass();
  301. this.EndInit();
  302. }
  303. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  304. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  305. internal Medical_staffDataTable(global::System.Data.DataTable table) {
  306. this.TableName = table.TableName;
  307. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  308. this.CaseSensitive = table.CaseSensitive;
  309. }
  310. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  311. this.Locale = table.Locale;
  312. }
  313. if ((table.Namespace != table.DataSet.Namespace)) {
  314. this.Namespace = table.Namespace;
  315. }
  316. this.Prefix = table.Prefix;
  317. this.MinimumCapacity = table.MinimumCapacity;
  318. }
  319. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  320. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  321. protected Medical_staffDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  322. base(info, context) {
  323. this.InitVars();
  324. }
  325. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  326. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  327. public global::System.Data.DataColumn NameColumn {
  328. get {
  329. return this.columnName;
  330. }
  331. }
  332. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  333. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  334. public global::System.Data.DataColumn SurnameColumn {
  335. get {
  336. return this.columnSurname;
  337. }
  338. }
  339. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  340. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  341. public global::System.Data.DataColumn OtchColumn {
  342. get {
  343. return this.columnOtch;
  344. }
  345. }
  346. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  347. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  348. public global::System.Data.DataColumn TelephoneColumn {
  349. get {
  350. return this.columnTelephone;
  351. }
  352. }
  353. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  354. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  355. public global::System.Data.DataColumn AdresColumn {
  356. get {
  357. return this.columnAdres;
  358. }
  359. }
  360. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  361. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  362. public global::System.Data.DataColumn GenderColumn {
  363. get {
  364. return this.columnGender;
  365. }
  366. }
  367. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  368. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  369. public global::System.Data.DataColumn IDRoleColumn {
  370. get {
  371. return this.columnIDRole;
  372. }
  373. }
  374. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  375. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  376. public global::System.Data.DataColumn PhotoColumn {
  377. get {
  378. return this.columnPhoto;
  379. }
  380. }
  381. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  382. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  383. public global::System.Data.DataColumn IDHumanColumn {
  384. get {
  385. return this.columnIDHuman;
  386. }
  387. }
  388. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  389. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  390. [global::System.ComponentModel.Browsable(false)]
  391. public int Count {
  392. get {
  393. return this.Rows.Count;
  394. }
  395. }
  396. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  397. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  398. public Medical_staffRow this[int index] {
  399. get {
  400. return ((Medical_staffRow)(this.Rows[index]));
  401. }
  402. }
  403. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  404. public event Medical_staffRowChangeEventHandler Medical_staffRowChanging;
  405. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  406. public event Medical_staffRowChangeEventHandler Medical_staffRowChanged;
  407. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  408. public event Medical_staffRowChangeEventHandler Medical_staffRowDeleting;
  409. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  410. public event Medical_staffRowChangeEventHandler Medical_staffRowDeleted;
  411. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  412. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  413. public void AddMedical_staffRow(Medical_staffRow row) {
  414. this.Rows.Add(row);
  415. }
  416. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  417. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  418. public Medical_staffRow AddMedical_staffRow(string Name, string Surname, string Otch, string Telephone, string Adres, string Gender, int IDRole, byte[] Photo) {
  419. Medical_staffRow rowMedical_staffRow = ((Medical_staffRow)(this.NewRow()));
  420. object[] columnValuesArray = new object[] {
  421. Name,
  422. Surname,
  423. Otch,
  424. Telephone,
  425. Adres,
  426. Gender,
  427. IDRole,
  428. Photo,
  429. null};
  430. rowMedical_staffRow.ItemArray = columnValuesArray;
  431. this.Rows.Add(rowMedical_staffRow);
  432. return rowMedical_staffRow;
  433. }
  434. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  435. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  436. public Medical_staffRow FindByIDHuman(int IDHuman) {
  437. return ((Medical_staffRow)(this.Rows.Find(new object[] {
  438. IDHuman})));
  439. }
  440. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  441. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  442. public override global::System.Data.DataTable Clone() {
  443. Medical_staffDataTable cln = ((Medical_staffDataTable)(base.Clone()));
  444. cln.InitVars();
  445. return cln;
  446. }
  447. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  448. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  449. protected override global::System.Data.DataTable CreateInstance() {
  450. return new Medical_staffDataTable();
  451. }
  452. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  453. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  454. internal void InitVars() {
  455. this.columnName = base.Columns["Name"];
  456. this.columnSurname = base.Columns["Surname"];
  457. this.columnOtch = base.Columns["Otch"];
  458. this.columnTelephone = base.Columns["Telephone"];
  459. this.columnAdres = base.Columns["Adres"];
  460. this.columnGender = base.Columns["Gender"];
  461. this.columnIDRole = base.Columns["IDRole"];
  462. this.columnPhoto = base.Columns["Photo"];
  463. this.columnIDHuman = base.Columns["IDHuman"];
  464. }
  465. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  466. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  467. private void InitClass() {
  468. this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element);
  469. base.Columns.Add(this.columnName);
  470. this.columnSurname = new global::System.Data.DataColumn("Surname", typeof(string), null, global::System.Data.MappingType.Element);
  471. base.Columns.Add(this.columnSurname);
  472. this.columnOtch = new global::System.Data.DataColumn("Otch", typeof(string), null, global::System.Data.MappingType.Element);
  473. base.Columns.Add(this.columnOtch);
  474. this.columnTelephone = new global::System.Data.DataColumn("Telephone", typeof(string), null, global::System.Data.MappingType.Element);
  475. base.Columns.Add(this.columnTelephone);
  476. this.columnAdres = new global::System.Data.DataColumn("Adres", typeof(string), null, global::System.Data.MappingType.Element);
  477. base.Columns.Add(this.columnAdres);
  478. this.columnGender = new global::System.Data.DataColumn("Gender", typeof(string), null, global::System.Data.MappingType.Element);
  479. base.Columns.Add(this.columnGender);
  480. this.columnIDRole = new global::System.Data.DataColumn("IDRole", typeof(int), null, global::System.Data.MappingType.Element);
  481. base.Columns.Add(this.columnIDRole);
  482. this.columnPhoto = new global::System.Data.DataColumn("Photo", typeof(byte[]), null, global::System.Data.MappingType.Element);
  483. base.Columns.Add(this.columnPhoto);
  484. this.columnIDHuman = new global::System.Data.DataColumn("IDHuman", typeof(int), null, global::System.Data.MappingType.Element);
  485. base.Columns.Add(this.columnIDHuman);
  486. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  487. this.columnIDHuman}, true));
  488. this.columnName.AllowDBNull = false;
  489. this.columnName.MaxLength = 70;
  490. this.columnSurname.AllowDBNull = false;
  491. this.columnSurname.MaxLength = 70;
  492. this.columnOtch.MaxLength = 70;
  493. this.columnTelephone.MaxLength = 11;
  494. this.columnAdres.MaxLength = 150;
  495. this.columnGender.AllowDBNull = false;
  496. this.columnGender.MaxLength = 20;
  497. this.columnIDRole.AllowDBNull = false;
  498. this.columnIDHuman.AutoIncrement = true;
  499. this.columnIDHuman.AutoIncrementSeed = -1;
  500. this.columnIDHuman.AutoIncrementStep = -1;
  501. this.columnIDHuman.AllowDBNull = false;
  502. this.columnIDHuman.ReadOnly = true;
  503. this.columnIDHuman.Unique = true;
  504. }
  505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  506. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  507. public Medical_staffRow NewMedical_staffRow() {
  508. return ((Medical_staffRow)(this.NewRow()));
  509. }
  510. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  511. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  512. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  513. return new Medical_staffRow(builder);
  514. }
  515. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  516. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  517. protected override global::System.Type GetRowType() {
  518. return typeof(Medical_staffRow);
  519. }
  520. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  521. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  522. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  523. base.OnRowChanged(e);
  524. if ((this.Medical_staffRowChanged != null)) {
  525. this.Medical_staffRowChanged(this, new Medical_staffRowChangeEvent(((Medical_staffRow)(e.Row)), e.Action));
  526. }
  527. }
  528. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  529. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  530. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  531. base.OnRowChanging(e);
  532. if ((this.Medical_staffRowChanging != null)) {
  533. this.Medical_staffRowChanging(this, new Medical_staffRowChangeEvent(((Medical_staffRow)(e.Row)), e.Action));
  534. }
  535. }
  536. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  537. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  538. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  539. base.OnRowDeleted(e);
  540. if ((this.Medical_staffRowDeleted != null)) {
  541. this.Medical_staffRowDeleted(this, new Medical_staffRowChangeEvent(((Medical_staffRow)(e.Row)), e.Action));
  542. }
  543. }
  544. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  545. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  546. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  547. base.OnRowDeleting(e);
  548. if ((this.Medical_staffRowDeleting != null)) {
  549. this.Medical_staffRowDeleting(this, new Medical_staffRowChangeEvent(((Medical_staffRow)(e.Row)), e.Action));
  550. }
  551. }
  552. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  553. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  554. public void RemoveMedical_staffRow(Medical_staffRow row) {
  555. this.Rows.Remove(row);
  556. }
  557. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  558. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  559. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  560. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  561. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  562. PersonnelDataSet ds = new PersonnelDataSet();
  563. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  564. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  565. any1.MinOccurs = new decimal(0);
  566. any1.MaxOccurs = decimal.MaxValue;
  567. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  568. sequence.Items.Add(any1);
  569. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  570. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  571. any2.MinOccurs = new decimal(1);
  572. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  573. sequence.Items.Add(any2);
  574. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  575. attribute1.Name = "namespace";
  576. attribute1.FixedValue = ds.Namespace;
  577. type.Attributes.Add(attribute1);
  578. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  579. attribute2.Name = "tableTypeName";
  580. attribute2.FixedValue = "Medical_staffDataTable";
  581. type.Attributes.Add(attribute2);
  582. type.Particle = sequence;
  583. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  584. if (xs.Contains(dsSchema.TargetNamespace)) {
  585. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  586. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  587. try {
  588. global::System.Xml.Schema.XmlSchema schema = null;
  589. dsSchema.Write(s1);
  590. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  591. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  592. s2.SetLength(0);
  593. schema.Write(s2);
  594. if ((s1.Length == s2.Length)) {
  595. s1.Position = 0;
  596. s2.Position = 0;
  597. for (; ((s1.Position != s1.Length)
  598. && (s1.ReadByte() == s2.ReadByte())); ) {
  599. ;
  600. }
  601. if ((s1.Position == s1.Length)) {
  602. return type;
  603. }
  604. }
  605. }
  606. }
  607. finally {
  608. if ((s1 != null)) {
  609. s1.Close();
  610. }
  611. if ((s2 != null)) {
  612. s2.Close();
  613. }
  614. }
  615. }
  616. xs.Add(dsSchema);
  617. return type;
  618. }
  619. }
  620. /// <summary>
  621. ///Represents the strongly named DataTable class.
  622. ///</summary>
  623. [global::System.Serializable()]
  624. [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
  625. public partial class RolesDataTable : global::System.Data.TypedTableBase<RolesRow> {
  626. private global::System.Data.DataColumn columnIDRole;
  627. private global::System.Data.DataColumn columnRole;
  628. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  629. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  630. public RolesDataTable() {
  631. this.TableName = "Roles";
  632. this.BeginInit();
  633. this.InitClass();
  634. this.EndInit();
  635. }
  636. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  637. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  638. internal RolesDataTable(global::System.Data.DataTable table) {
  639. this.TableName = table.TableName;
  640. if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  641. this.CaseSensitive = table.CaseSensitive;
  642. }
  643. if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  644. this.Locale = table.Locale;
  645. }
  646. if ((table.Namespace != table.DataSet.Namespace)) {
  647. this.Namespace = table.Namespace;
  648. }
  649. this.Prefix = table.Prefix;
  650. this.MinimumCapacity = table.MinimumCapacity;
  651. }
  652. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  653. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  654. protected RolesDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
  655. base(info, context) {
  656. this.InitVars();
  657. }
  658. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  659. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  660. public global::System.Data.DataColumn IDRoleColumn {
  661. get {
  662. return this.columnIDRole;
  663. }
  664. }
  665. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  666. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  667. public global::System.Data.DataColumn RoleColumn {
  668. get {
  669. return this.columnRole;
  670. }
  671. }
  672. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  673. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  674. [global::System.ComponentModel.Browsable(false)]
  675. public int Count {
  676. get {
  677. return this.Rows.Count;
  678. }
  679. }
  680. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  681. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  682. public RolesRow this[int index] {
  683. get {
  684. return ((RolesRow)(this.Rows[index]));
  685. }
  686. }
  687. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  688. public event RolesRowChangeEventHandler RolesRowChanging;
  689. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  690. public event RolesRowChangeEventHandler RolesRowChanged;
  691. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  692. public event RolesRowChangeEventHandler RolesRowDeleting;
  693. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  694. public event RolesRowChangeEventHandler RolesRowDeleted;
  695. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  696. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  697. public void AddRolesRow(RolesRow row) {
  698. this.Rows.Add(row);
  699. }
  700. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  701. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  702. public RolesRow AddRolesRow(string Role) {
  703. RolesRow rowRolesRow = ((RolesRow)(this.NewRow()));
  704. object[] columnValuesArray = new object[] {
  705. null,
  706. Role};
  707. rowRolesRow.ItemArray = columnValuesArray;
  708. this.Rows.Add(rowRolesRow);
  709. return rowRolesRow;
  710. }
  711. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  712. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  713. public RolesRow FindByIDRole(int IDRole) {
  714. return ((RolesRow)(this.Rows.Find(new object[] {
  715. IDRole})));
  716. }
  717. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  718. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  719. public override global::System.Data.DataTable Clone() {
  720. RolesDataTable cln = ((RolesDataTable)(base.Clone()));
  721. cln.InitVars();
  722. return cln;
  723. }
  724. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  725. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  726. protected override global::System.Data.DataTable CreateInstance() {
  727. return new RolesDataTable();
  728. }
  729. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  730. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  731. internal void InitVars() {
  732. this.columnIDRole = base.Columns["IDRole"];
  733. this.columnRole = base.Columns["Role"];
  734. }
  735. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  736. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  737. private void InitClass() {
  738. this.columnIDRole = new global::System.Data.DataColumn("IDRole", typeof(int), null, global::System.Data.MappingType.Element);
  739. base.Columns.Add(this.columnIDRole);
  740. this.columnRole = new global::System.Data.DataColumn("Role", typeof(string), null, global::System.Data.MappingType.Element);
  741. base.Columns.Add(this.columnRole);
  742. this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
  743. this.columnIDRole}, true));
  744. this.columnIDRole.AutoIncrement = true;
  745. this.columnIDRole.AutoIncrementSeed = -1;
  746. this.columnIDRole.AutoIncrementStep = -1;
  747. this.columnIDRole.AllowDBNull = false;
  748. this.columnIDRole.ReadOnly = true;
  749. this.columnIDRole.Unique = true;
  750. this.columnRole.MaxLength = 100;
  751. }
  752. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  753. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  754. public RolesRow NewRolesRow() {
  755. return ((RolesRow)(this.NewRow()));
  756. }
  757. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  758. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  759. protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
  760. return new RolesRow(builder);
  761. }
  762. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  763. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  764. protected override global::System.Type GetRowType() {
  765. return typeof(RolesRow);
  766. }
  767. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  768. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  769. protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
  770. base.OnRowChanged(e);
  771. if ((this.RolesRowChanged != null)) {
  772. this.RolesRowChanged(this, new RolesRowChangeEvent(((RolesRow)(e.Row)), e.Action));
  773. }
  774. }
  775. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  776. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  777. protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
  778. base.OnRowChanging(e);
  779. if ((this.RolesRowChanging != null)) {
  780. this.RolesRowChanging(this, new RolesRowChangeEvent(((RolesRow)(e.Row)), e.Action));
  781. }
  782. }
  783. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  784. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  785. protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
  786. base.OnRowDeleted(e);
  787. if ((this.RolesRowDeleted != null)) {
  788. this.RolesRowDeleted(this, new RolesRowChangeEvent(((RolesRow)(e.Row)), e.Action));
  789. }
  790. }
  791. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  792. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  793. protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
  794. base.OnRowDeleting(e);
  795. if ((this.RolesRowDeleting != null)) {
  796. this.RolesRowDeleting(this, new RolesRowChangeEvent(((RolesRow)(e.Row)), e.Action));
  797. }
  798. }
  799. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  800. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  801. public void RemoveRolesRow(RolesRow row) {
  802. this.Rows.Remove(row);
  803. }
  804. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  805. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  806. public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
  807. global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
  808. global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
  809. PersonnelDataSet ds = new PersonnelDataSet();
  810. global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
  811. any1.Namespace = "http://www.w3.org/2001/XMLSchema";
  812. any1.MinOccurs = new decimal(0);
  813. any1.MaxOccurs = decimal.MaxValue;
  814. any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  815. sequence.Items.Add(any1);
  816. global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
  817. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
  818. any2.MinOccurs = new decimal(1);
  819. any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  820. sequence.Items.Add(any2);
  821. global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
  822. attribute1.Name = "namespace";
  823. attribute1.FixedValue = ds.Namespace;
  824. type.Attributes.Add(attribute1);
  825. global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
  826. attribute2.Name = "tableTypeName";
  827. attribute2.FixedValue = "RolesDataTable";
  828. type.Attributes.Add(attribute2);
  829. type.Particle = sequence;
  830. global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
  831. if (xs.Contains(dsSchema.TargetNamespace)) {
  832. global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
  833. global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
  834. try {
  835. global::System.Xml.Schema.XmlSchema schema = null;
  836. dsSchema.Write(s1);
  837. for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
  838. schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
  839. s2.SetLength(0);
  840. schema.Write(s2);
  841. if ((s1.Length == s2.Length)) {
  842. s1.Position = 0;
  843. s2.Position = 0;
  844. for (; ((s1.Position != s1.Length)
  845. && (s1.ReadByte() == s2.ReadByte())); ) {
  846. ;
  847. }
  848. if ((s1.Position == s1.Length)) {
  849. return type;
  850. }
  851. }
  852. }
  853. }
  854. finally {
  855. if ((s1 != null)) {
  856. s1.Close();
  857. }
  858. if ((s2 != null)) {
  859. s2.Close();
  860. }
  861. }
  862. }
  863. xs.Add(dsSchema);
  864. return type;
  865. }
  866. }
  867. /// <summary>
  868. ///Represents strongly named DataRow class.
  869. ///</summary>
  870. public partial class Medical_staffRow : global::System.Data.DataRow {
  871. private Medical_staffDataTable tableMedical_staff;
  872. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  873. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  874. internal Medical_staffRow(global::System.Data.DataRowBuilder rb) :
  875. base(rb) {
  876. this.tableMedical_staff = ((Medical_staffDataTable)(this.Table));
  877. }
  878. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  879. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  880. public string Name {
  881. get {
  882. return ((string)(this[this.tableMedical_staff.NameColumn]));
  883. }
  884. set {
  885. this[this.tableMedical_staff.NameColumn] = value;
  886. }
  887. }
  888. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  889. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  890. public string Surname {
  891. get {
  892. return ((string)(this[this.tableMedical_staff.SurnameColumn]));
  893. }
  894. set {
  895. this[this.tableMedical_staff.SurnameColumn] = value;
  896. }
  897. }
  898. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  899. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  900. public string Otch {
  901. get {
  902. try {
  903. return ((string)(this[this.tableMedical_staff.OtchColumn]));
  904. }
  905. catch (global::System.InvalidCastException e) {
  906. throw new global::System.Data.StrongTypingException("Значение для столбца \'Otch\' в таблице \'Medical_staff\' равно DBNull.", e);
  907. }
  908. }
  909. set {
  910. this[this.tableMedical_staff.OtchColumn] = value;
  911. }
  912. }
  913. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  914. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  915. public string Telephone {
  916. get {
  917. try {
  918. return ((string)(this[this.tableMedical_staff.TelephoneColumn]));
  919. }
  920. catch (global::System.InvalidCastException e) {
  921. throw new global::System.Data.StrongTypingException("Значение для столбца \'Telephone\' в таблице \'Medical_staff\' равно DBNull.", e);
  922. }
  923. }
  924. set {
  925. this[this.tableMedical_staff.TelephoneColumn] = value;
  926. }
  927. }
  928. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  929. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  930. public string Adres {
  931. get {
  932. try {
  933. return ((string)(this[this.tableMedical_staff.AdresColumn]));
  934. }
  935. catch (global::System.InvalidCastException e) {
  936. throw new global::System.Data.StrongTypingException("Значение для столбца \'Adres\' в таблице \'Medical_staff\' равно DBNull.", e);
  937. }
  938. }
  939. set {
  940. this[this.tableMedical_staff.AdresColumn] = value;
  941. }
  942. }
  943. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  944. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  945. public string Gender {
  946. get {
  947. return ((string)(this[this.tableMedical_staff.GenderColumn]));
  948. }
  949. set {
  950. this[this.tableMedical_staff.GenderColumn] = value;
  951. }
  952. }
  953. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  954. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  955. public int IDRole {
  956. get {
  957. return ((int)(this[this.tableMedical_staff.IDRoleColumn]));
  958. }
  959. set {
  960. this[this.tableMedical_staff.IDRoleColumn] = value;
  961. }
  962. }
  963. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  964. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  965. public byte[] Photo {
  966. get {
  967. try {
  968. return ((byte[])(this[this.tableMedical_staff.PhotoColumn]));
  969. }
  970. catch (global::System.InvalidCastException e) {
  971. throw new global::System.Data.StrongTypingException("Значение для столбца \'Photo\' в таблице \'Medical_staff\' равно DBNull.", e);
  972. }
  973. }
  974. set {
  975. this[this.tableMedical_staff.PhotoColumn] = value;
  976. }
  977. }
  978. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  979. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  980. public int IDHuman {
  981. get {
  982. return ((int)(this[this.tableMedical_staff.IDHumanColumn]));
  983. }
  984. set {
  985. this[this.tableMedical_staff.IDHumanColumn] = value;
  986. }
  987. }
  988. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  989. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  990. public bool IsOtchNull() {
  991. return this.IsNull(this.tableMedical_staff.OtchColumn);
  992. }
  993. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  994. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  995. public void SetOtchNull() {
  996. this[this.tableMedical_staff.OtchColumn] = global::System.Convert.DBNull;
  997. }
  998. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  999. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1000. public bool IsTelephoneNull() {
  1001. return this.IsNull(this.tableMedical_staff.TelephoneColumn);
  1002. }
  1003. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1004. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1005. public void SetTelephoneNull() {
  1006. this[this.tableMedical_staff.TelephoneColumn] = global::System.Convert.DBNull;
  1007. }
  1008. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1009. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1010. public bool IsAdresNull() {
  1011. return this.IsNull(this.tableMedical_staff.AdresColumn);
  1012. }
  1013. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1014. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1015. public void SetAdresNull() {
  1016. this[this.tableMedical_staff.AdresColumn] = global::System.Convert.DBNull;
  1017. }
  1018. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1019. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1020. public bool IsPhotoNull() {
  1021. return this.IsNull(this.tableMedical_staff.PhotoColumn);
  1022. }
  1023. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1024. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1025. public void SetPhotoNull() {
  1026. this[this.tableMedical_staff.PhotoColumn] = global::System.Convert.DBNull;
  1027. }
  1028. }
  1029. /// <summary>
  1030. ///Represents strongly named DataRow class.
  1031. ///</summary>
  1032. public partial class RolesRow : global::System.Data.DataRow {
  1033. private RolesDataTable tableRoles;
  1034. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1035. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1036. internal RolesRow(global::System.Data.DataRowBuilder rb) :
  1037. base(rb) {
  1038. this.tableRoles = ((RolesDataTable)(this.Table));
  1039. }
  1040. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1041. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1042. public int IDRole {
  1043. get {
  1044. return ((int)(this[this.tableRoles.IDRoleColumn]));
  1045. }
  1046. set {
  1047. this[this.tableRoles.IDRoleColumn] = value;
  1048. }
  1049. }
  1050. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1051. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1052. public string Role {
  1053. get {
  1054. try {
  1055. return ((string)(this[this.tableRoles.RoleColumn]));
  1056. }
  1057. catch (global::System.InvalidCastException e) {
  1058. throw new global::System.Data.StrongTypingException("Значение для столбца \'Role\' в таблице \'Roles\' равно DBNull.", e);
  1059. }
  1060. }
  1061. set {
  1062. this[this.tableRoles.RoleColumn] = value;
  1063. }
  1064. }
  1065. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1066. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1067. public bool IsRoleNull() {
  1068. return this.IsNull(this.tableRoles.RoleColumn);
  1069. }
  1070. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1071. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1072. public void SetRoleNull() {
  1073. this[this.tableRoles.RoleColumn] = global::System.Convert.DBNull;
  1074. }
  1075. }
  1076. /// <summary>
  1077. ///Row event argument class
  1078. ///</summary>
  1079. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1080. public class Medical_staffRowChangeEvent : global::System.EventArgs {
  1081. private Medical_staffRow eventRow;
  1082. private global::System.Data.DataRowAction eventAction;
  1083. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1084. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1085. public Medical_staffRowChangeEvent(Medical_staffRow row, global::System.Data.DataRowAction action) {
  1086. this.eventRow = row;
  1087. this.eventAction = action;
  1088. }
  1089. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1090. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1091. public Medical_staffRow Row {
  1092. get {
  1093. return this.eventRow;
  1094. }
  1095. }
  1096. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1097. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1098. public global::System.Data.DataRowAction Action {
  1099. get {
  1100. return this.eventAction;
  1101. }
  1102. }
  1103. }
  1104. /// <summary>
  1105. ///Row event argument class
  1106. ///</summary>
  1107. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1108. public class RolesRowChangeEvent : global::System.EventArgs {
  1109. private RolesRow eventRow;
  1110. private global::System.Data.DataRowAction eventAction;
  1111. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1112. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1113. public RolesRowChangeEvent(RolesRow row, global::System.Data.DataRowAction action) {
  1114. this.eventRow = row;
  1115. this.eventAction = action;
  1116. }
  1117. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1118. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1119. public RolesRow Row {
  1120. get {
  1121. return this.eventRow;
  1122. }
  1123. }
  1124. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1125. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1126. public global::System.Data.DataRowAction Action {
  1127. get {
  1128. return this.eventAction;
  1129. }
  1130. }
  1131. }
  1132. }
  1133. }
  1134. namespace SUBD_Medical_Staff.PersonnelDataSetTableAdapters {
  1135. /// <summary>
  1136. ///Represents the connection and commands used to retrieve and save data.
  1137. ///</summary>
  1138. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1139. [global::System.ComponentModel.ToolboxItem(true)]
  1140. [global::System.ComponentModel.DataObjectAttribute(true)]
  1141. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  1142. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1143. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1144. public partial class Medical_staffTableAdapter : global::System.ComponentModel.Component {
  1145. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  1146. private global::System.Data.SqlClient.SqlConnection _connection;
  1147. private global::System.Data.SqlClient.SqlTransaction _transaction;
  1148. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  1149. private bool _clearBeforeFill;
  1150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1151. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1152. public Medical_staffTableAdapter() {
  1153. this.ClearBeforeFill = true;
  1154. }
  1155. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1156. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1157. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  1158. get {
  1159. if ((this._adapter == null)) {
  1160. this.InitAdapter();
  1161. }
  1162. return this._adapter;
  1163. }
  1164. }
  1165. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1166. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1167. internal global::System.Data.SqlClient.SqlConnection Connection {
  1168. get {
  1169. if ((this._connection == null)) {
  1170. this.InitConnection();
  1171. }
  1172. return this._connection;
  1173. }
  1174. set {
  1175. this._connection = value;
  1176. if ((this.Adapter.InsertCommand != null)) {
  1177. this.Adapter.InsertCommand.Connection = value;
  1178. }
  1179. if ((this.Adapter.DeleteCommand != null)) {
  1180. this.Adapter.DeleteCommand.Connection = value;
  1181. }
  1182. if ((this.Adapter.UpdateCommand != null)) {
  1183. this.Adapter.UpdateCommand.Connection = value;
  1184. }
  1185. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1186. if ((this.CommandCollection[i] != null)) {
  1187. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  1188. }
  1189. }
  1190. }
  1191. }
  1192. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1193. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1194. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  1195. get {
  1196. return this._transaction;
  1197. }
  1198. set {
  1199. this._transaction = value;
  1200. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1201. this.CommandCollection[i].Transaction = this._transaction;
  1202. }
  1203. if (((this.Adapter != null)
  1204. && (this.Adapter.DeleteCommand != null))) {
  1205. this.Adapter.DeleteCommand.Transaction = this._transaction;
  1206. }
  1207. if (((this.Adapter != null)
  1208. && (this.Adapter.InsertCommand != null))) {
  1209. this.Adapter.InsertCommand.Transaction = this._transaction;
  1210. }
  1211. if (((this.Adapter != null)
  1212. && (this.Adapter.UpdateCommand != null))) {
  1213. this.Adapter.UpdateCommand.Transaction = this._transaction;
  1214. }
  1215. }
  1216. }
  1217. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1218. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1219. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  1220. get {
  1221. if ((this._commandCollection == null)) {
  1222. this.InitCommandCollection();
  1223. }
  1224. return this._commandCollection;
  1225. }
  1226. }
  1227. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1228. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1229. public bool ClearBeforeFill {
  1230. get {
  1231. return this._clearBeforeFill;
  1232. }
  1233. set {
  1234. this._clearBeforeFill = value;
  1235. }
  1236. }
  1237. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1238. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1239. private void InitAdapter() {
  1240. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  1241. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  1242. tableMapping.SourceTable = "Table";
  1243. tableMapping.DataSetTable = "Medical_staff";
  1244. tableMapping.ColumnMappings.Add("Name", "Name");
  1245. tableMapping.ColumnMappings.Add("Surname", "Surname");
  1246. tableMapping.ColumnMappings.Add("Otch", "Otch");
  1247. tableMapping.ColumnMappings.Add("Telephone", "Telephone");
  1248. tableMapping.ColumnMappings.Add("Adres", "Adres");
  1249. tableMapping.ColumnMappings.Add("Gender", "Gender");
  1250. tableMapping.ColumnMappings.Add("IDRole", "IDRole");
  1251. tableMapping.ColumnMappings.Add("Photo", "Photo");
  1252. tableMapping.ColumnMappings.Add("IDHuman", "IDHuman");
  1253. this._adapter.TableMappings.Add(tableMapping);
  1254. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  1255. this._adapter.DeleteCommand.Connection = this.Connection;
  1256. this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Medical_staff] WHERE (([Name] = @Original_Name) AND ([Surname] = @Original_Surname) AND ((@IsNull_Otch = 1 AND [Otch] IS NULL) OR ([Otch] = @Original_Otch)) AND ((@IsNull_Telephone = 1 AND [Telephone] IS NULL) OR ([Telephone] = @Original_Telephone)) AND ((@IsNull_Adres = 1 AND [Adres] IS NULL) OR ([Adres] = @Original_Adres)) AND ([Gender] = @Original_Gender) AND ([IDRole] = @Original_IDRole) AND ([IDHuman] = @Original_IDHuman))";
  1257. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  1258. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1259. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Surname", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Surname", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1260. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Otch", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Otch", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1261. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Otch", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Otch", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1262. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Telephone", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Telephone", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1263. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Telephone", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Telephone", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1264. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Adres", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Adres", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1265. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Adres", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Adres", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1266. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Gender", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Gender", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1267. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IDRole", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IDRole", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1268. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IDHuman", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IDHuman", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1269. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  1270. this._adapter.InsertCommand.Connection = this.Connection;
  1271. this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Medical_staff] ([Name], [Surname], [Otch], [Telephone], [Adres], [Gender], [IDRole], [Photo]) VALUES (@Name, @Surname, @Otch, @Telephone, @Adres, @Gender, @IDRole, @Photo);
  1272. SELECT Name, Surname, Otch, Telephone, Adres, Gender, IDRole, Photo, IDHuman FROM Medical_staff WHERE (IDHuman = SCOPE_IDENTITY())";
  1273. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  1274. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1275. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Surname", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Surname", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1276. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Otch", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Otch", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1277. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Telephone", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Telephone", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1278. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Adres", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Adres", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1279. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Gender", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Gender", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1280. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IDRole", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IDRole", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1281. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Photo", global::System.Data.SqlDbType.VarBinary, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Photo", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1282. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  1283. this._adapter.UpdateCommand.Connection = this.Connection;
  1284. this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Medical_staff] SET [Name] = @Name, [Surname] = @Surname, [Otch] = @Otch, [Telephone] = @Telephone, [Adres] = @Adres, [Gender] = @Gender, [IDRole] = @IDRole, [Photo] = @Photo WHERE (([Name] = @Original_Name) AND ([Surname] = @Original_Surname) AND ((@IsNull_Otch = 1 AND [Otch] IS NULL) OR ([Otch] = @Original_Otch)) AND ((@IsNull_Telephone = 1 AND [Telephone] IS NULL) OR ([Telephone] = @Original_Telephone)) AND ((@IsNull_Adres = 1 AND [Adres] IS NULL) OR ([Adres] = @Original_Adres)) AND ([Gender] = @Original_Gender) AND ([IDRole] = @Original_IDRole) AND ([IDHuman] = @Original_IDHuman));
  1285. SELECT Name, Surname, Otch, Telephone, Adres, Gender, IDRole, Photo, IDHuman FROM Medical_staff WHERE (IDHuman = @IDHuman)";
  1286. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  1287. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1288. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Surname", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Surname", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1289. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Otch", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Otch", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1290. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Telephone", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Telephone", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1291. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Adres", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Adres", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1292. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Gender", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Gender", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1293. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IDRole", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IDRole", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1294. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Photo", global::System.Data.SqlDbType.VarBinary, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Photo", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1295. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1296. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Surname", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Surname", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1297. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Otch", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Otch", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1298. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Otch", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Otch", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1299. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Telephone", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Telephone", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1300. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Telephone", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Telephone", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1301. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Adres", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Adres", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1302. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Adres", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Adres", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1303. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Gender", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Gender", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1304. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IDRole", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IDRole", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1305. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IDHuman", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IDHuman", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1306. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IDHuman", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IDHuman", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1307. }
  1308. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1309. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1310. private void InitConnection() {
  1311. this._connection = new global::System.Data.SqlClient.SqlConnection();
  1312. this._connection.ConnectionString = global::SUBD_Medical_Staff.Properties.Settings.Default.PersonnelConnectionString;
  1313. }
  1314. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1315. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1316. private void InitCommandCollection() {
  1317. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  1318. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  1319. this._commandCollection[0].Connection = this.Connection;
  1320. this._commandCollection[0].CommandText = "SELECT Name, Surname, Otch, Telephone, Adres, Gender, IDRole, Photo, IDHuman FROM" +
  1321. " dbo.Medical_staff";
  1322. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  1323. }
  1324. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1325. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1326. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1327. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  1328. public virtual int Fill(PersonnelDataSet.Medical_staffDataTable dataTable) {
  1329. this.Adapter.SelectCommand = this.CommandCollection[0];
  1330. if ((this.ClearBeforeFill == true)) {
  1331. dataTable.Clear();
  1332. }
  1333. int returnValue = this.Adapter.Fill(dataTable);
  1334. return returnValue;
  1335. }
  1336. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1337. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1338. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1339. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  1340. public virtual PersonnelDataSet.Medical_staffDataTable GetData() {
  1341. this.Adapter.SelectCommand = this.CommandCollection[0];
  1342. PersonnelDataSet.Medical_staffDataTable dataTable = new PersonnelDataSet.Medical_staffDataTable();
  1343. this.Adapter.Fill(dataTable);
  1344. return dataTable;
  1345. }
  1346. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1347. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1348. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1349. public virtual int Update(PersonnelDataSet.Medical_staffDataTable dataTable) {
  1350. return this.Adapter.Update(dataTable);
  1351. }
  1352. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1353. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1354. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1355. public virtual int Update(PersonnelDataSet dataSet) {
  1356. return this.Adapter.Update(dataSet, "Medical_staff");
  1357. }
  1358. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1359. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1360. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1361. public virtual int Update(global::System.Data.DataRow dataRow) {
  1362. return this.Adapter.Update(new global::System.Data.DataRow[] {
  1363. dataRow});
  1364. }
  1365. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1366. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1367. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1368. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  1369. return this.Adapter.Update(dataRows);
  1370. }
  1371. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1372. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1373. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1374. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  1375. public virtual int Delete(string Original_Name, string Original_Surname, string Original_Otch, string Original_Telephone, string Original_Adres, string Original_Gender, int Original_IDRole, int Original_IDHuman) {
  1376. if ((Original_Name == null)) {
  1377. throw new global::System.ArgumentNullException("Original_Name");
  1378. }
  1379. else {
  1380. this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Name));
  1381. }
  1382. if ((Original_Surname == null)) {
  1383. throw new global::System.ArgumentNullException("Original_Surname");
  1384. }
  1385. else {
  1386. this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Surname));
  1387. }
  1388. if ((Original_Otch == null)) {
  1389. this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1));
  1390. this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value;
  1391. }
  1392. else {
  1393. this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0));
  1394. this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Otch));
  1395. }
  1396. if ((Original_Telephone == null)) {
  1397. this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1));
  1398. this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value;
  1399. }
  1400. else {
  1401. this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0));
  1402. this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_Telephone));
  1403. }
  1404. if ((Original_Adres == null)) {
  1405. this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1));
  1406. this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value;
  1407. }
  1408. else {
  1409. this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0));
  1410. this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_Adres));
  1411. }
  1412. if ((Original_Gender == null)) {
  1413. throw new global::System.ArgumentNullException("Original_Gender");
  1414. }
  1415. else {
  1416. this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_Gender));
  1417. }
  1418. this.Adapter.DeleteCommand.Parameters[9].Value = ((int)(Original_IDRole));
  1419. this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_IDHuman));
  1420. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  1421. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1422. != global::System.Data.ConnectionState.Open)) {
  1423. this.Adapter.DeleteCommand.Connection.Open();
  1424. }
  1425. try {
  1426. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  1427. return returnValue;
  1428. }
  1429. finally {
  1430. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1431. this.Adapter.DeleteCommand.Connection.Close();
  1432. }
  1433. }
  1434. }
  1435. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1436. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1437. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1438. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  1439. public virtual int Insert(string Name, string Surname, string Otch, string Telephone, string Adres, string Gender, int IDRole, byte[] Photo) {
  1440. if ((Name == null)) {
  1441. throw new global::System.ArgumentNullException("Name");
  1442. }
  1443. else {
  1444. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
  1445. }
  1446. if ((Surname == null)) {
  1447. throw new global::System.ArgumentNullException("Surname");
  1448. }
  1449. else {
  1450. this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Surname));
  1451. }
  1452. if ((Otch == null)) {
  1453. this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
  1454. }
  1455. else {
  1456. this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Otch));
  1457. }
  1458. if ((Telephone == null)) {
  1459. this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
  1460. }
  1461. else {
  1462. this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Telephone));
  1463. }
  1464. if ((Adres == null)) {
  1465. this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
  1466. }
  1467. else {
  1468. this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Adres));
  1469. }
  1470. if ((Gender == null)) {
  1471. throw new global::System.ArgumentNullException("Gender");
  1472. }
  1473. else {
  1474. this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Gender));
  1475. }
  1476. this.Adapter.InsertCommand.Parameters[6].Value = ((int)(IDRole));
  1477. if ((Photo == null)) {
  1478. this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value;
  1479. }
  1480. else {
  1481. this.Adapter.InsertCommand.Parameters[7].Value = ((byte[])(Photo));
  1482. }
  1483. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  1484. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1485. != global::System.Data.ConnectionState.Open)) {
  1486. this.Adapter.InsertCommand.Connection.Open();
  1487. }
  1488. try {
  1489. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  1490. return returnValue;
  1491. }
  1492. finally {
  1493. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1494. this.Adapter.InsertCommand.Connection.Close();
  1495. }
  1496. }
  1497. }
  1498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1499. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1500. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1501. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  1502. public virtual int Update(
  1503. string Name,
  1504. string Surname,
  1505. string Otch,
  1506. string Telephone,
  1507. string Adres,
  1508. string Gender,
  1509. int IDRole,
  1510. byte[] Photo,
  1511. string Original_Name,
  1512. string Original_Surname,
  1513. string Original_Otch,
  1514. string Original_Telephone,
  1515. string Original_Adres,
  1516. string Original_Gender,
  1517. int Original_IDRole,
  1518. int Original_IDHuman,
  1519. int IDHuman) {
  1520. if ((Name == null)) {
  1521. throw new global::System.ArgumentNullException("Name");
  1522. }
  1523. else {
  1524. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
  1525. }
  1526. if ((Surname == null)) {
  1527. throw new global::System.ArgumentNullException("Surname");
  1528. }
  1529. else {
  1530. this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Surname));
  1531. }
  1532. if ((Otch == null)) {
  1533. this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
  1534. }
  1535. else {
  1536. this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Otch));
  1537. }
  1538. if ((Telephone == null)) {
  1539. this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
  1540. }
  1541. else {
  1542. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Telephone));
  1543. }
  1544. if ((Adres == null)) {
  1545. this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
  1546. }
  1547. else {
  1548. this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Adres));
  1549. }
  1550. if ((Gender == null)) {
  1551. throw new global::System.ArgumentNullException("Gender");
  1552. }
  1553. else {
  1554. this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Gender));
  1555. }
  1556. this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(IDRole));
  1557. if ((Photo == null)) {
  1558. this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value;
  1559. }
  1560. else {
  1561. this.Adapter.UpdateCommand.Parameters[7].Value = ((byte[])(Photo));
  1562. }
  1563. if ((Original_Name == null)) {
  1564. throw new global::System.ArgumentNullException("Original_Name");
  1565. }
  1566. else {
  1567. this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_Name));
  1568. }
  1569. if ((Original_Surname == null)) {
  1570. throw new global::System.ArgumentNullException("Original_Surname");
  1571. }
  1572. else {
  1573. this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Surname));
  1574. }
  1575. if ((Original_Otch == null)) {
  1576. this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1));
  1577. this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value;
  1578. }
  1579. else {
  1580. this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0));
  1581. this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_Otch));
  1582. }
  1583. if ((Original_Telephone == null)) {
  1584. this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1));
  1585. this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value;
  1586. }
  1587. else {
  1588. this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0));
  1589. this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_Telephone));
  1590. }
  1591. if ((Original_Adres == null)) {
  1592. this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1));
  1593. this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value;
  1594. }
  1595. else {
  1596. this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0));
  1597. this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_Adres));
  1598. }
  1599. if ((Original_Gender == null)) {
  1600. throw new global::System.ArgumentNullException("Original_Gender");
  1601. }
  1602. else {
  1603. this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_Gender));
  1604. }
  1605. this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_IDRole));
  1606. this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(Original_IDHuman));
  1607. this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(IDHuman));
  1608. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  1609. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1610. != global::System.Data.ConnectionState.Open)) {
  1611. this.Adapter.UpdateCommand.Connection.Open();
  1612. }
  1613. try {
  1614. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  1615. return returnValue;
  1616. }
  1617. finally {
  1618. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1619. this.Adapter.UpdateCommand.Connection.Close();
  1620. }
  1621. }
  1622. }
  1623. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1624. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1625. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1626. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  1627. public virtual int Update(
  1628. string Name,
  1629. string Surname,
  1630. string Otch,
  1631. string Telephone,
  1632. string Adres,
  1633. string Gender,
  1634. int IDRole,
  1635. byte[] Photo,
  1636. string Original_Name,
  1637. string Original_Surname,
  1638. string Original_Otch,
  1639. string Original_Telephone,
  1640. string Original_Adres,
  1641. string Original_Gender,
  1642. int Original_IDRole,
  1643. int Original_IDHuman) {
  1644. return this.Update(Name, Surname, Otch, Telephone, Adres, Gender, IDRole, Photo, Original_Name, Original_Surname, Original_Otch, Original_Telephone, Original_Adres, Original_Gender, Original_IDRole, Original_IDHuman, Original_IDHuman);
  1645. }
  1646. }
  1647. /// <summary>
  1648. ///Represents the connection and commands used to retrieve and save data.
  1649. ///</summary>
  1650. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1651. [global::System.ComponentModel.ToolboxItem(true)]
  1652. [global::System.ComponentModel.DataObjectAttribute(true)]
  1653. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  1654. ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1655. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1656. public partial class RolesTableAdapter : global::System.ComponentModel.Component {
  1657. private global::System.Data.SqlClient.SqlDataAdapter _adapter;
  1658. private global::System.Data.SqlClient.SqlConnection _connection;
  1659. private global::System.Data.SqlClient.SqlTransaction _transaction;
  1660. private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
  1661. private bool _clearBeforeFill;
  1662. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1663. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1664. public RolesTableAdapter() {
  1665. this.ClearBeforeFill = true;
  1666. }
  1667. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1668. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1669. protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
  1670. get {
  1671. if ((this._adapter == null)) {
  1672. this.InitAdapter();
  1673. }
  1674. return this._adapter;
  1675. }
  1676. }
  1677. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1678. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1679. internal global::System.Data.SqlClient.SqlConnection Connection {
  1680. get {
  1681. if ((this._connection == null)) {
  1682. this.InitConnection();
  1683. }
  1684. return this._connection;
  1685. }
  1686. set {
  1687. this._connection = value;
  1688. if ((this.Adapter.InsertCommand != null)) {
  1689. this.Adapter.InsertCommand.Connection = value;
  1690. }
  1691. if ((this.Adapter.DeleteCommand != null)) {
  1692. this.Adapter.DeleteCommand.Connection = value;
  1693. }
  1694. if ((this.Adapter.UpdateCommand != null)) {
  1695. this.Adapter.UpdateCommand.Connection = value;
  1696. }
  1697. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1698. if ((this.CommandCollection[i] != null)) {
  1699. ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  1700. }
  1701. }
  1702. }
  1703. }
  1704. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1705. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1706. internal global::System.Data.SqlClient.SqlTransaction Transaction {
  1707. get {
  1708. return this._transaction;
  1709. }
  1710. set {
  1711. this._transaction = value;
  1712. for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1713. this.CommandCollection[i].Transaction = this._transaction;
  1714. }
  1715. if (((this.Adapter != null)
  1716. && (this.Adapter.DeleteCommand != null))) {
  1717. this.Adapter.DeleteCommand.Transaction = this._transaction;
  1718. }
  1719. if (((this.Adapter != null)
  1720. && (this.Adapter.InsertCommand != null))) {
  1721. this.Adapter.InsertCommand.Transaction = this._transaction;
  1722. }
  1723. if (((this.Adapter != null)
  1724. && (this.Adapter.UpdateCommand != null))) {
  1725. this.Adapter.UpdateCommand.Transaction = this._transaction;
  1726. }
  1727. }
  1728. }
  1729. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1730. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1731. protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
  1732. get {
  1733. if ((this._commandCollection == null)) {
  1734. this.InitCommandCollection();
  1735. }
  1736. return this._commandCollection;
  1737. }
  1738. }
  1739. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1740. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1741. public bool ClearBeforeFill {
  1742. get {
  1743. return this._clearBeforeFill;
  1744. }
  1745. set {
  1746. this._clearBeforeFill = value;
  1747. }
  1748. }
  1749. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1750. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1751. private void InitAdapter() {
  1752. this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
  1753. global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
  1754. tableMapping.SourceTable = "Table";
  1755. tableMapping.DataSetTable = "Roles";
  1756. tableMapping.ColumnMappings.Add("IDRole", "IDRole");
  1757. tableMapping.ColumnMappings.Add("Role", "Role");
  1758. this._adapter.TableMappings.Add(tableMapping);
  1759. this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
  1760. this._adapter.DeleteCommand.Connection = this.Connection;
  1761. this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Roles] WHERE (([IDRole] = @Original_IDRole) AND ((@IsNull_Role" +
  1762. " = 1 AND [Role] IS NULL) OR ([Role] = @Original_Role)))";
  1763. this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
  1764. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IDRole", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IDRole", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1765. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Role", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Role", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1766. this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Role", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Role", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1767. this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
  1768. this._adapter.InsertCommand.Connection = this.Connection;
  1769. this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Roles] ([Role]) VALUES (@Role);\r\nSELECT IDRole, Role FROM Role" +
  1770. "s WHERE (IDRole = SCOPE_IDENTITY())";
  1771. this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
  1772. this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Role", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Role", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1773. this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
  1774. this._adapter.UpdateCommand.Connection = this.Connection;
  1775. this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Roles] SET [Role] = @Role WHERE (([IDRole] = @Original_IDRole) AND " +
  1776. "((@IsNull_Role = 1 AND [Role] IS NULL) OR ([Role] = @Original_Role)));\r\nSELECT I" +
  1777. "DRole, Role FROM Roles WHERE (IDRole = @IDRole)";
  1778. this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
  1779. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Role", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Role", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1780. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IDRole", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IDRole", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1781. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Role", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Role", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1782. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Role", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Role", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1783. this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IDRole", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "IDRole", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1784. }
  1785. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1786. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1787. private void InitConnection() {
  1788. this._connection = new global::System.Data.SqlClient.SqlConnection();
  1789. this._connection.ConnectionString = global::SUBD_Medical_Staff.Properties.Settings.Default.PersonnelConnectionString;
  1790. }
  1791. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1792. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1793. private void InitCommandCollection() {
  1794. this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
  1795. this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
  1796. this._commandCollection[0].Connection = this.Connection;
  1797. this._commandCollection[0].CommandText = "SELECT IDRole, Role FROM dbo.Roles";
  1798. this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
  1799. }
  1800. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1801. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1802. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1803. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
  1804. public virtual int Fill(PersonnelDataSet.RolesDataTable dataTable) {
  1805. this.Adapter.SelectCommand = this.CommandCollection[0];
  1806. if ((this.ClearBeforeFill == true)) {
  1807. dataTable.Clear();
  1808. }
  1809. int returnValue = this.Adapter.Fill(dataTable);
  1810. return returnValue;
  1811. }
  1812. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1813. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1814. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1815. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  1816. public virtual PersonnelDataSet.RolesDataTable GetData() {
  1817. this.Adapter.SelectCommand = this.CommandCollection[0];
  1818. PersonnelDataSet.RolesDataTable dataTable = new PersonnelDataSet.RolesDataTable();
  1819. this.Adapter.Fill(dataTable);
  1820. return dataTable;
  1821. }
  1822. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1823. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1824. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1825. public virtual int Update(PersonnelDataSet.RolesDataTable dataTable) {
  1826. return this.Adapter.Update(dataTable);
  1827. }
  1828. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1829. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1830. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1831. public virtual int Update(PersonnelDataSet dataSet) {
  1832. return this.Adapter.Update(dataSet, "Roles");
  1833. }
  1834. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1835. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1836. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1837. public virtual int Update(global::System.Data.DataRow dataRow) {
  1838. return this.Adapter.Update(new global::System.Data.DataRow[] {
  1839. dataRow});
  1840. }
  1841. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1842. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1843. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1844. public virtual int Update(global::System.Data.DataRow[] dataRows) {
  1845. return this.Adapter.Update(dataRows);
  1846. }
  1847. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1848. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1849. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1850. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
  1851. public virtual int Delete(int Original_IDRole, string Original_Role) {
  1852. this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_IDRole));
  1853. if ((Original_Role == null)) {
  1854. this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
  1855. this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
  1856. }
  1857. else {
  1858. this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
  1859. this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Role));
  1860. }
  1861. global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  1862. if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1863. != global::System.Data.ConnectionState.Open)) {
  1864. this.Adapter.DeleteCommand.Connection.Open();
  1865. }
  1866. try {
  1867. int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  1868. return returnValue;
  1869. }
  1870. finally {
  1871. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1872. this.Adapter.DeleteCommand.Connection.Close();
  1873. }
  1874. }
  1875. }
  1876. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1877. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1878. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1879. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
  1880. public virtual int Insert(string Role) {
  1881. if ((Role == null)) {
  1882. this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value;
  1883. }
  1884. else {
  1885. this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Role));
  1886. }
  1887. global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  1888. if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1889. != global::System.Data.ConnectionState.Open)) {
  1890. this.Adapter.InsertCommand.Connection.Open();
  1891. }
  1892. try {
  1893. int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  1894. return returnValue;
  1895. }
  1896. finally {
  1897. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1898. this.Adapter.InsertCommand.Connection.Close();
  1899. }
  1900. }
  1901. }
  1902. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1903. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1904. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1905. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  1906. public virtual int Update(string Role, int Original_IDRole, string Original_Role, int IDRole) {
  1907. if ((Role == null)) {
  1908. this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value;
  1909. }
  1910. else {
  1911. this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Role));
  1912. }
  1913. this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_IDRole));
  1914. if ((Original_Role == null)) {
  1915. this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(1));
  1916. this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
  1917. }
  1918. else {
  1919. this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(0));
  1920. this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Role));
  1921. }
  1922. this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(IDRole));
  1923. global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  1924. if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
  1925. != global::System.Data.ConnectionState.Open)) {
  1926. this.Adapter.UpdateCommand.Connection.Open();
  1927. }
  1928. try {
  1929. int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  1930. return returnValue;
  1931. }
  1932. finally {
  1933. if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
  1934. this.Adapter.UpdateCommand.Connection.Close();
  1935. }
  1936. }
  1937. }
  1938. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1939. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1940. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1941. [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
  1942. public virtual int Update(string Role, int Original_IDRole, string Original_Role) {
  1943. return this.Update(Role, Original_IDRole, Original_Role, Original_IDRole);
  1944. }
  1945. }
  1946. /// <summary>
  1947. ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
  1948. ///</summary>
  1949. [global::System.ComponentModel.DesignerCategoryAttribute("code")]
  1950. [global::System.ComponentModel.ToolboxItem(true)]
  1951. [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
  1952. "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1953. [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
  1954. public partial class TableAdapterManager : global::System.ComponentModel.Component {
  1955. private UpdateOrderOption _updateOrder;
  1956. private Medical_staffTableAdapter _medical_staffTableAdapter;
  1957. private RolesTableAdapter _rolesTableAdapter;
  1958. private bool _backupDataSetBeforeUpdate;
  1959. private global::System.Data.IDbConnection _connection;
  1960. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1961. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1962. public UpdateOrderOption UpdateOrder {
  1963. get {
  1964. return this._updateOrder;
  1965. }
  1966. set {
  1967. this._updateOrder = value;
  1968. }
  1969. }
  1970. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1971. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1972. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  1973. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  1974. "a", "System.Drawing.Design.UITypeEditor")]
  1975. public Medical_staffTableAdapter Medical_staffTableAdapter {
  1976. get {
  1977. return this._medical_staffTableAdapter;
  1978. }
  1979. set {
  1980. this._medical_staffTableAdapter = value;
  1981. }
  1982. }
  1983. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1984. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1985. [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
  1986. "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
  1987. "a", "System.Drawing.Design.UITypeEditor")]
  1988. public RolesTableAdapter RolesTableAdapter {
  1989. get {
  1990. return this._rolesTableAdapter;
  1991. }
  1992. set {
  1993. this._rolesTableAdapter = value;
  1994. }
  1995. }
  1996. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1997. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  1998. public bool BackupDataSetBeforeUpdate {
  1999. get {
  2000. return this._backupDataSetBeforeUpdate;
  2001. }
  2002. set {
  2003. this._backupDataSetBeforeUpdate = value;
  2004. }
  2005. }
  2006. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2007. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2008. [global::System.ComponentModel.Browsable(false)]
  2009. public global::System.Data.IDbConnection Connection {
  2010. get {
  2011. if ((this._connection != null)) {
  2012. return this._connection;
  2013. }
  2014. if (((this._medical_staffTableAdapter != null)
  2015. && (this._medical_staffTableAdapter.Connection != null))) {
  2016. return this._medical_staffTableAdapter.Connection;
  2017. }
  2018. if (((this._rolesTableAdapter != null)
  2019. && (this._rolesTableAdapter.Connection != null))) {
  2020. return this._rolesTableAdapter.Connection;
  2021. }
  2022. return null;
  2023. }
  2024. set {
  2025. this._connection = value;
  2026. }
  2027. }
  2028. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2029. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2030. [global::System.ComponentModel.Browsable(false)]
  2031. public int TableAdapterInstanceCount {
  2032. get {
  2033. int count = 0;
  2034. if ((this._medical_staffTableAdapter != null)) {
  2035. count = (count + 1);
  2036. }
  2037. if ((this._rolesTableAdapter != null)) {
  2038. count = (count + 1);
  2039. }
  2040. return count;
  2041. }
  2042. }
  2043. /// <summary>
  2044. ///Update rows in top-down order.
  2045. ///</summary>
  2046. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2047. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2048. private int UpdateUpdatedRows(PersonnelDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  2049. int result = 0;
  2050. if ((this._medical_staffTableAdapter != null)) {
  2051. global::System.Data.DataRow[] updatedRows = dataSet.Medical_staff.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  2052. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  2053. if (((updatedRows != null)
  2054. && (0 < updatedRows.Length))) {
  2055. result = (result + this._medical_staffTableAdapter.Update(updatedRows));
  2056. allChangedRows.AddRange(updatedRows);
  2057. }
  2058. }
  2059. if ((this._rolesTableAdapter != null)) {
  2060. global::System.Data.DataRow[] updatedRows = dataSet.Roles.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
  2061. updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
  2062. if (((updatedRows != null)
  2063. && (0 < updatedRows.Length))) {
  2064. result = (result + this._rolesTableAdapter.Update(updatedRows));
  2065. allChangedRows.AddRange(updatedRows);
  2066. }
  2067. }
  2068. return result;
  2069. }
  2070. /// <summary>
  2071. ///Insert rows in top-down order.
  2072. ///</summary>
  2073. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2074. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2075. private int UpdateInsertedRows(PersonnelDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  2076. int result = 0;
  2077. if ((this._medical_staffTableAdapter != null)) {
  2078. global::System.Data.DataRow[] addedRows = dataSet.Medical_staff.Select(null, null, global::System.Data.DataViewRowState.Added);
  2079. if (((addedRows != null)
  2080. && (0 < addedRows.Length))) {
  2081. result = (result + this._medical_staffTableAdapter.Update(addedRows));
  2082. allAddedRows.AddRange(addedRows);
  2083. }
  2084. }
  2085. if ((this._rolesTableAdapter != null)) {
  2086. global::System.Data.DataRow[] addedRows = dataSet.Roles.Select(null, null, global::System.Data.DataViewRowState.Added);
  2087. if (((addedRows != null)
  2088. && (0 < addedRows.Length))) {
  2089. result = (result + this._rolesTableAdapter.Update(addedRows));
  2090. allAddedRows.AddRange(addedRows);
  2091. }
  2092. }
  2093. return result;
  2094. }
  2095. /// <summary>
  2096. ///Delete rows in bottom-up order.
  2097. ///</summary>
  2098. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2099. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2100. private int UpdateDeletedRows(PersonnelDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
  2101. int result = 0;
  2102. if ((this._rolesTableAdapter != null)) {
  2103. global::System.Data.DataRow[] deletedRows = dataSet.Roles.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  2104. if (((deletedRows != null)
  2105. && (0 < deletedRows.Length))) {
  2106. result = (result + this._rolesTableAdapter.Update(deletedRows));
  2107. allChangedRows.AddRange(deletedRows);
  2108. }
  2109. }
  2110. if ((this._medical_staffTableAdapter != null)) {
  2111. global::System.Data.DataRow[] deletedRows = dataSet.Medical_staff.Select(null, null, global::System.Data.DataViewRowState.Deleted);
  2112. if (((deletedRows != null)
  2113. && (0 < deletedRows.Length))) {
  2114. result = (result + this._medical_staffTableAdapter.Update(deletedRows));
  2115. allChangedRows.AddRange(deletedRows);
  2116. }
  2117. }
  2118. return result;
  2119. }
  2120. /// <summary>
  2121. ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
  2122. ///</summary>
  2123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2124. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2125. private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
  2126. if (((updatedRows == null)
  2127. || (updatedRows.Length < 1))) {
  2128. return updatedRows;
  2129. }
  2130. if (((allAddedRows == null)
  2131. || (allAddedRows.Count < 1))) {
  2132. return updatedRows;
  2133. }
  2134. global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  2135. for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
  2136. global::System.Data.DataRow row = updatedRows[i];
  2137. if ((allAddedRows.Contains(row) == false)) {
  2138. realUpdatedRows.Add(row);
  2139. }
  2140. }
  2141. return realUpdatedRows.ToArray();
  2142. }
  2143. /// <summary>
  2144. ///Update all changes to the dataset.
  2145. ///</summary>
  2146. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2147. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2148. public virtual int UpdateAll(PersonnelDataSet dataSet) {
  2149. if ((dataSet == null)) {
  2150. throw new global::System.ArgumentNullException("dataSet");
  2151. }
  2152. if ((dataSet.HasChanges() == false)) {
  2153. return 0;
  2154. }
  2155. if (((this._medical_staffTableAdapter != null)
  2156. && (this.MatchTableAdapterConnection(this._medical_staffTableAdapter.Connection) == false))) {
  2157. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  2158. "r, должны использовать одинаковую строку подключения.");
  2159. }
  2160. if (((this._rolesTableAdapter != null)
  2161. && (this.MatchTableAdapterConnection(this._rolesTableAdapter.Connection) == false))) {
  2162. throw new global::System.ArgumentException("Все адаптеры таблицы, управляемые диспетчером адаптера таблицы TableAdapterManage" +
  2163. "r, должны использовать одинаковую строку подключения.");
  2164. }
  2165. global::System.Data.IDbConnection workConnection = this.Connection;
  2166. if ((workConnection == null)) {
  2167. throw new global::System.ApplicationException("TableAdapterManager не содержит сведений о подключении. Укажите для каждого адапт" +
  2168. "ера таблицы TableAdapterManager допустимый экземпляр адаптера таблицы.");
  2169. }
  2170. bool workConnOpened = false;
  2171. if (((workConnection.State & global::System.Data.ConnectionState.Broken)
  2172. == global::System.Data.ConnectionState.Broken)) {
  2173. workConnection.Close();
  2174. }
  2175. if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
  2176. workConnection.Open();
  2177. workConnOpened = true;
  2178. }
  2179. global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
  2180. if ((workTransaction == null)) {
  2181. throw new global::System.ApplicationException("Не удается начать транзакцию. Текущее соединение данных не поддерживает транзакци" +
  2182. "и или текущее состояние не позволяет начать транзакцию.");
  2183. }
  2184. global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  2185. global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
  2186. global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
  2187. global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
  2188. int result = 0;
  2189. global::System.Data.DataSet backupDataSet = null;
  2190. if (this.BackupDataSetBeforeUpdate) {
  2191. backupDataSet = new global::System.Data.DataSet();
  2192. backupDataSet.Merge(dataSet);
  2193. }
  2194. try {
  2195. // ---- Prepare for update -----------
  2196. //
  2197. if ((this._medical_staffTableAdapter != null)) {
  2198. revertConnections.Add(this._medical_staffTableAdapter, this._medical_staffTableAdapter.Connection);
  2199. this._medical_staffTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  2200. this._medical_staffTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  2201. if (this._medical_staffTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  2202. this._medical_staffTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  2203. adaptersWithAcceptChangesDuringUpdate.Add(this._medical_staffTableAdapter.Adapter);
  2204. }
  2205. }
  2206. if ((this._rolesTableAdapter != null)) {
  2207. revertConnections.Add(this._rolesTableAdapter, this._rolesTableAdapter.Connection);
  2208. this._rolesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
  2209. this._rolesTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
  2210. if (this._rolesTableAdapter.Adapter.AcceptChangesDuringUpdate) {
  2211. this._rolesTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
  2212. adaptersWithAcceptChangesDuringUpdate.Add(this._rolesTableAdapter.Adapter);
  2213. }
  2214. }
  2215. //
  2216. //---- Perform updates -----------
  2217. //
  2218. if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
  2219. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  2220. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  2221. }
  2222. else {
  2223. result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
  2224. result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
  2225. }
  2226. result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
  2227. //
  2228. //---- Commit updates -----------
  2229. //
  2230. workTransaction.Commit();
  2231. if ((0 < allAddedRows.Count)) {
  2232. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  2233. allAddedRows.CopyTo(rows);
  2234. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  2235. global::System.Data.DataRow row = rows[i];
  2236. row.AcceptChanges();
  2237. }
  2238. }
  2239. if ((0 < allChangedRows.Count)) {
  2240. global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
  2241. allChangedRows.CopyTo(rows);
  2242. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  2243. global::System.Data.DataRow row = rows[i];
  2244. row.AcceptChanges();
  2245. }
  2246. }
  2247. }
  2248. catch (global::System.Exception ex) {
  2249. workTransaction.Rollback();
  2250. // ---- Restore the dataset -----------
  2251. if (this.BackupDataSetBeforeUpdate) {
  2252. global::System.Diagnostics.Debug.Assert((backupDataSet != null));
  2253. dataSet.Clear();
  2254. dataSet.Merge(backupDataSet);
  2255. }
  2256. else {
  2257. if ((0 < allAddedRows.Count)) {
  2258. global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
  2259. allAddedRows.CopyTo(rows);
  2260. for (int i = 0; (i < rows.Length); i = (i + 1)) {
  2261. global::System.Data.DataRow row = rows[i];
  2262. row.AcceptChanges();
  2263. row.SetAdded();
  2264. }
  2265. }
  2266. }
  2267. throw ex;
  2268. }
  2269. finally {
  2270. if (workConnOpened) {
  2271. workConnection.Close();
  2272. }
  2273. if ((this._medical_staffTableAdapter != null)) {
  2274. this._medical_staffTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._medical_staffTableAdapter]));
  2275. this._medical_staffTableAdapter.Transaction = null;
  2276. }
  2277. if ((this._rolesTableAdapter != null)) {
  2278. this._rolesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._rolesTableAdapter]));
  2279. this._rolesTableAdapter.Transaction = null;
  2280. }
  2281. if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
  2282. global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
  2283. adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
  2284. for (int i = 0; (i < adapters.Length); i = (i + 1)) {
  2285. global::System.Data.Common.DataAdapter adapter = adapters[i];
  2286. adapter.AcceptChangesDuringUpdate = true;
  2287. }
  2288. }
  2289. }
  2290. return result;
  2291. }
  2292. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2293. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2294. protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
  2295. global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
  2296. }
  2297. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2298. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2299. protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
  2300. if ((this._connection != null)) {
  2301. return true;
  2302. }
  2303. if (((this.Connection == null)
  2304. || (inputConnection == null))) {
  2305. return true;
  2306. }
  2307. if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
  2308. return true;
  2309. }
  2310. return false;
  2311. }
  2312. /// <summary>
  2313. ///Update Order Option
  2314. ///</summary>
  2315. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2316. public enum UpdateOrderOption {
  2317. InsertUpdateDelete = 0,
  2318. UpdateInsertDelete = 1,
  2319. }
  2320. /// <summary>
  2321. ///Used to sort self-referenced table's rows
  2322. ///</summary>
  2323. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2324. private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
  2325. private global::System.Data.DataRelation _relation;
  2326. private int _childFirst;
  2327. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2328. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2329. internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
  2330. this._relation = relation;
  2331. if (childFirst) {
  2332. this._childFirst = -1;
  2333. }
  2334. else {
  2335. this._childFirst = 1;
  2336. }
  2337. }
  2338. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2339. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2340. private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
  2341. global::System.Diagnostics.Debug.Assert((row != null));
  2342. global::System.Data.DataRow root = row;
  2343. distance = 0;
  2344. 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>();
  2345. traversedRows[row] = row;
  2346. global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  2347. for (
  2348. ; ((parent != null)
  2349. && (traversedRows.ContainsKey(parent) == false));
  2350. ) {
  2351. distance = (distance + 1);
  2352. root = parent;
  2353. traversedRows[parent] = parent;
  2354. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
  2355. }
  2356. if ((distance == 0)) {
  2357. traversedRows.Clear();
  2358. traversedRows[row] = row;
  2359. parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  2360. for (
  2361. ; ((parent != null)
  2362. && (traversedRows.ContainsKey(parent) == false));
  2363. ) {
  2364. distance = (distance + 1);
  2365. root = parent;
  2366. traversedRows[parent] = parent;
  2367. parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
  2368. }
  2369. }
  2370. return root;
  2371. }
  2372. [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  2373. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
  2374. public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
  2375. if (object.ReferenceEquals(row1, row2)) {
  2376. return 0;
  2377. }
  2378. if ((row1 == null)) {
  2379. return -1;
  2380. }
  2381. if ((row2 == null)) {
  2382. return 1;
  2383. }
  2384. int distance1 = 0;
  2385. global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
  2386. int distance2 = 0;
  2387. global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
  2388. if (object.ReferenceEquals(root1, root2)) {
  2389. return (this._childFirst * distance1.CompareTo(distance2));
  2390. }
  2391. else {
  2392. global::System.Diagnostics.Debug.Assert(((root1.Table != null)
  2393. && (root2.Table != null)));
  2394. if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
  2395. return -1;
  2396. }
  2397. else {
  2398. return 1;
  2399. }
  2400. }
  2401. }
  2402. }
  2403. }
  2404. }
  2405. #pragma warning restore 1591