DataClasses1.designer.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950
  1. #pragma warning disable 1591
  2. //------------------------------------------------------------------------------
  3. // <auto-generated>
  4. // Этот код создан программой.
  5. // Исполняемая версия:4.0.30319.42000
  6. //
  7. // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
  8. // повторной генерации кода.
  9. // </auto-generated>
  10. //------------------------------------------------------------------------------
  11. namespace WindowsFormsApp1
  12. {
  13. using System.Data.Linq;
  14. using System.Data.Linq.Mapping;
  15. using System.Data;
  16. using System.Collections.Generic;
  17. using System.Reflection;
  18. using System.Linq;
  19. using System.Linq.Expressions;
  20. using System.ComponentModel;
  21. using System;
  22. [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="aero")]
  23. public partial class DataClasses1DataContext : System.Data.Linq.DataContext
  24. {
  25. private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
  26. #region Определения метода расширяемости
  27. partial void OnCreated();
  28. partial void InsertCompany(Company instance);
  29. partial void UpdateCompany(Company instance);
  30. partial void DeleteCompany(Company instance);
  31. partial void InsertPass_in_trip(Pass_in_trip instance);
  32. partial void UpdatePass_in_trip(Pass_in_trip instance);
  33. partial void DeletePass_in_trip(Pass_in_trip instance);
  34. partial void InsertTrip(Trip instance);
  35. partial void UpdateTrip(Trip instance);
  36. partial void DeleteTrip(Trip instance);
  37. partial void InsertPassenger(Passenger instance);
  38. partial void UpdatePassenger(Passenger instance);
  39. partial void DeletePassenger(Passenger instance);
  40. partial void InsertUsers(Users instance);
  41. partial void UpdateUsers(Users instance);
  42. partial void DeleteUsers(Users instance);
  43. #endregion
  44. public DataClasses1DataContext() :
  45. base(global::WindowsFormsApp1.Properties.Settings.Default.aeroConnectionString, mappingSource)
  46. {
  47. OnCreated();
  48. }
  49. public DataClasses1DataContext(string connection) :
  50. base(connection, mappingSource)
  51. {
  52. OnCreated();
  53. }
  54. public DataClasses1DataContext(System.Data.IDbConnection connection) :
  55. base(connection, mappingSource)
  56. {
  57. OnCreated();
  58. }
  59. public DataClasses1DataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
  60. base(connection, mappingSource)
  61. {
  62. OnCreated();
  63. }
  64. public DataClasses1DataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
  65. base(connection, mappingSource)
  66. {
  67. OnCreated();
  68. }
  69. public System.Data.Linq.Table<Company> Company
  70. {
  71. get
  72. {
  73. return this.GetTable<Company>();
  74. }
  75. }
  76. public System.Data.Linq.Table<Pass_in_trip> Pass_in_trip
  77. {
  78. get
  79. {
  80. return this.GetTable<Pass_in_trip>();
  81. }
  82. }
  83. public System.Data.Linq.Table<Trip> Trip
  84. {
  85. get
  86. {
  87. return this.GetTable<Trip>();
  88. }
  89. }
  90. public System.Data.Linq.Table<Passenger> Passenger
  91. {
  92. get
  93. {
  94. return this.GetTable<Passenger>();
  95. }
  96. }
  97. public System.Data.Linq.Table<Users> Users
  98. {
  99. get
  100. {
  101. return this.GetTable<Users>();
  102. }
  103. }
  104. }
  105. [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Company")]
  106. public partial class Company : INotifyPropertyChanging, INotifyPropertyChanged
  107. {
  108. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  109. private int _ID_comp;
  110. private string _name;
  111. private EntitySet<Trip> _Trip;
  112. #region Определения метода расширяемости
  113. partial void OnLoaded();
  114. partial void OnValidate(System.Data.Linq.ChangeAction action);
  115. partial void OnCreated();
  116. partial void OnID_compChanging(int value);
  117. partial void OnID_compChanged();
  118. partial void OnnameChanging(string value);
  119. partial void OnnameChanged();
  120. #endregion
  121. public Company()
  122. {
  123. this._Trip = new EntitySet<Trip>(new Action<Trip>(this.attach_Trip), new Action<Trip>(this.detach_Trip));
  124. OnCreated();
  125. }
  126. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID_comp", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  127. public int ID_comp
  128. {
  129. get
  130. {
  131. return this._ID_comp;
  132. }
  133. set
  134. {
  135. if ((this._ID_comp != value))
  136. {
  137. this.OnID_compChanging(value);
  138. this.SendPropertyChanging();
  139. this._ID_comp = value;
  140. this.SendPropertyChanged("ID_comp");
  141. this.OnID_compChanged();
  142. }
  143. }
  144. }
  145. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_name", DbType="Char(10) NOT NULL", CanBeNull=false)]
  146. public string name
  147. {
  148. get
  149. {
  150. return this._name;
  151. }
  152. set
  153. {
  154. if ((this._name != value))
  155. {
  156. this.OnnameChanging(value);
  157. this.SendPropertyChanging();
  158. this._name = value;
  159. this.SendPropertyChanged("name");
  160. this.OnnameChanged();
  161. }
  162. }
  163. }
  164. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Company_Trip", Storage="_Trip", ThisKey="ID_comp", OtherKey="ID_comp")]
  165. public EntitySet<Trip> Trip
  166. {
  167. get
  168. {
  169. return this._Trip;
  170. }
  171. set
  172. {
  173. this._Trip.Assign(value);
  174. }
  175. }
  176. public event PropertyChangingEventHandler PropertyChanging;
  177. public event PropertyChangedEventHandler PropertyChanged;
  178. protected virtual void SendPropertyChanging()
  179. {
  180. if ((this.PropertyChanging != null))
  181. {
  182. this.PropertyChanging(this, emptyChangingEventArgs);
  183. }
  184. }
  185. protected virtual void SendPropertyChanged(String propertyName)
  186. {
  187. if ((this.PropertyChanged != null))
  188. {
  189. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  190. }
  191. }
  192. private void attach_Trip(Trip entity)
  193. {
  194. this.SendPropertyChanging();
  195. entity.Company = this;
  196. }
  197. private void detach_Trip(Trip entity)
  198. {
  199. this.SendPropertyChanging();
  200. entity.Company = null;
  201. }
  202. }
  203. [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Pass_in_trip")]
  204. public partial class Pass_in_trip : INotifyPropertyChanging, INotifyPropertyChanged
  205. {
  206. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  207. private int _trip_no;
  208. private System.DateTime _date;
  209. private int _ID_psg;
  210. private string _place;
  211. private EntityRef<Trip> _Trip;
  212. private EntityRef<Passenger> _Passenger;
  213. #region Определения метода расширяемости
  214. partial void OnLoaded();
  215. partial void OnValidate(System.Data.Linq.ChangeAction action);
  216. partial void OnCreated();
  217. partial void Ontrip_noChanging(int value);
  218. partial void Ontrip_noChanged();
  219. partial void OndateChanging(System.DateTime value);
  220. partial void OndateChanged();
  221. partial void OnID_psgChanging(int value);
  222. partial void OnID_psgChanged();
  223. partial void OnplaceChanging(string value);
  224. partial void OnplaceChanged();
  225. #endregion
  226. public Pass_in_trip()
  227. {
  228. this._Trip = default(EntityRef<Trip>);
  229. this._Passenger = default(EntityRef<Passenger>);
  230. OnCreated();
  231. }
  232. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_trip_no", DbType="Int NOT NULL", IsPrimaryKey=true)]
  233. public int trip_no
  234. {
  235. get
  236. {
  237. return this._trip_no;
  238. }
  239. set
  240. {
  241. if ((this._trip_no != value))
  242. {
  243. if (this._Trip.HasLoadedOrAssignedValue)
  244. {
  245. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  246. }
  247. this.Ontrip_noChanging(value);
  248. this.SendPropertyChanging();
  249. this._trip_no = value;
  250. this.SendPropertyChanged("trip_no");
  251. this.Ontrip_noChanged();
  252. }
  253. }
  254. }
  255. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date", DbType="DateTime NOT NULL", IsPrimaryKey=true)]
  256. public System.DateTime date
  257. {
  258. get
  259. {
  260. return this._date;
  261. }
  262. set
  263. {
  264. if ((this._date != value))
  265. {
  266. this.OndateChanging(value);
  267. this.SendPropertyChanging();
  268. this._date = value;
  269. this.SendPropertyChanged("date");
  270. this.OndateChanged();
  271. }
  272. }
  273. }
  274. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID_psg", DbType="Int NOT NULL", IsPrimaryKey=true)]
  275. public int ID_psg
  276. {
  277. get
  278. {
  279. return this._ID_psg;
  280. }
  281. set
  282. {
  283. if ((this._ID_psg != value))
  284. {
  285. if (this._Passenger.HasLoadedOrAssignedValue)
  286. {
  287. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  288. }
  289. this.OnID_psgChanging(value);
  290. this.SendPropertyChanging();
  291. this._ID_psg = value;
  292. this.SendPropertyChanged("ID_psg");
  293. this.OnID_psgChanged();
  294. }
  295. }
  296. }
  297. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_place", DbType="Char(10) NOT NULL", CanBeNull=false)]
  298. public string place
  299. {
  300. get
  301. {
  302. return this._place;
  303. }
  304. set
  305. {
  306. if ((this._place != value))
  307. {
  308. this.OnplaceChanging(value);
  309. this.SendPropertyChanging();
  310. this._place = value;
  311. this.SendPropertyChanged("place");
  312. this.OnplaceChanged();
  313. }
  314. }
  315. }
  316. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Trip_Pass_in_trip", Storage="_Trip", ThisKey="trip_no", OtherKey="trip_no", IsForeignKey=true)]
  317. public Trip Trip
  318. {
  319. get
  320. {
  321. return this._Trip.Entity;
  322. }
  323. set
  324. {
  325. Trip previousValue = this._Trip.Entity;
  326. if (((previousValue != value)
  327. || (this._Trip.HasLoadedOrAssignedValue == false)))
  328. {
  329. this.SendPropertyChanging();
  330. if ((previousValue != null))
  331. {
  332. this._Trip.Entity = null;
  333. previousValue.Pass_in_trip.Remove(this);
  334. }
  335. this._Trip.Entity = value;
  336. if ((value != null))
  337. {
  338. value.Pass_in_trip.Add(this);
  339. this._trip_no = value.trip_no;
  340. }
  341. else
  342. {
  343. this._trip_no = default(int);
  344. }
  345. this.SendPropertyChanged("Trip");
  346. }
  347. }
  348. }
  349. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Passenger_Pass_in_trip", Storage="_Passenger", ThisKey="ID_psg", OtherKey="ID_psg", IsForeignKey=true)]
  350. public Passenger Passenger
  351. {
  352. get
  353. {
  354. return this._Passenger.Entity;
  355. }
  356. set
  357. {
  358. Passenger previousValue = this._Passenger.Entity;
  359. if (((previousValue != value)
  360. || (this._Passenger.HasLoadedOrAssignedValue == false)))
  361. {
  362. this.SendPropertyChanging();
  363. if ((previousValue != null))
  364. {
  365. this._Passenger.Entity = null;
  366. previousValue.Pass_in_trip.Remove(this);
  367. }
  368. this._Passenger.Entity = value;
  369. if ((value != null))
  370. {
  371. value.Pass_in_trip.Add(this);
  372. this._ID_psg = value.ID_psg;
  373. }
  374. else
  375. {
  376. this._ID_psg = default(int);
  377. }
  378. this.SendPropertyChanged("Passenger");
  379. }
  380. }
  381. }
  382. public event PropertyChangingEventHandler PropertyChanging;
  383. public event PropertyChangedEventHandler PropertyChanged;
  384. protected virtual void SendPropertyChanging()
  385. {
  386. if ((this.PropertyChanging != null))
  387. {
  388. this.PropertyChanging(this, emptyChangingEventArgs);
  389. }
  390. }
  391. protected virtual void SendPropertyChanged(String propertyName)
  392. {
  393. if ((this.PropertyChanged != null))
  394. {
  395. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  396. }
  397. }
  398. }
  399. [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Trip")]
  400. public partial class Trip : INotifyPropertyChanging, INotifyPropertyChanged
  401. {
  402. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  403. private int _trip_no;
  404. private int _ID_comp;
  405. private string _plane;
  406. private string _town_from;
  407. private string _town_to;
  408. private System.DateTime _time_out;
  409. private System.DateTime _time_in;
  410. private EntitySet<Pass_in_trip> _Pass_in_trip;
  411. private EntityRef<Company> _Company;
  412. #region Определения метода расширяемости
  413. partial void OnLoaded();
  414. partial void OnValidate(System.Data.Linq.ChangeAction action);
  415. partial void OnCreated();
  416. partial void Ontrip_noChanging(int value);
  417. partial void Ontrip_noChanged();
  418. partial void OnID_compChanging(int value);
  419. partial void OnID_compChanged();
  420. partial void OnplaneChanging(string value);
  421. partial void OnplaneChanged();
  422. partial void Ontown_fromChanging(string value);
  423. partial void Ontown_fromChanged();
  424. partial void Ontown_toChanging(string value);
  425. partial void Ontown_toChanged();
  426. partial void Ontime_outChanging(System.DateTime value);
  427. partial void Ontime_outChanged();
  428. partial void Ontime_inChanging(System.DateTime value);
  429. partial void Ontime_inChanged();
  430. #endregion
  431. public Trip()
  432. {
  433. this._Pass_in_trip = new EntitySet<Pass_in_trip>(new Action<Pass_in_trip>(this.attach_Pass_in_trip), new Action<Pass_in_trip>(this.detach_Pass_in_trip));
  434. this._Company = default(EntityRef<Company>);
  435. OnCreated();
  436. }
  437. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_trip_no", DbType="Int NOT NULL", IsPrimaryKey=true)]
  438. public int trip_no
  439. {
  440. get
  441. {
  442. return this._trip_no;
  443. }
  444. set
  445. {
  446. if ((this._trip_no != value))
  447. {
  448. this.Ontrip_noChanging(value);
  449. this.SendPropertyChanging();
  450. this._trip_no = value;
  451. this.SendPropertyChanged("trip_no");
  452. this.Ontrip_noChanged();
  453. }
  454. }
  455. }
  456. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID_comp", DbType="Int NOT NULL")]
  457. public int ID_comp
  458. {
  459. get
  460. {
  461. return this._ID_comp;
  462. }
  463. set
  464. {
  465. if ((this._ID_comp != value))
  466. {
  467. if (this._Company.HasLoadedOrAssignedValue)
  468. {
  469. throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
  470. }
  471. this.OnID_compChanging(value);
  472. this.SendPropertyChanging();
  473. this._ID_comp = value;
  474. this.SendPropertyChanged("ID_comp");
  475. this.OnID_compChanged();
  476. }
  477. }
  478. }
  479. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_plane", DbType="Char(10) NOT NULL", CanBeNull=false)]
  480. public string plane
  481. {
  482. get
  483. {
  484. return this._plane;
  485. }
  486. set
  487. {
  488. if ((this._plane != value))
  489. {
  490. this.OnplaneChanging(value);
  491. this.SendPropertyChanging();
  492. this._plane = value;
  493. this.SendPropertyChanged("plane");
  494. this.OnplaneChanged();
  495. }
  496. }
  497. }
  498. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_town_from", DbType="Char(25) NOT NULL", CanBeNull=false)]
  499. public string town_from
  500. {
  501. get
  502. {
  503. return this._town_from;
  504. }
  505. set
  506. {
  507. if ((this._town_from != value))
  508. {
  509. this.Ontown_fromChanging(value);
  510. this.SendPropertyChanging();
  511. this._town_from = value;
  512. this.SendPropertyChanged("town_from");
  513. this.Ontown_fromChanged();
  514. }
  515. }
  516. }
  517. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_town_to", DbType="Char(25) NOT NULL", CanBeNull=false)]
  518. public string town_to
  519. {
  520. get
  521. {
  522. return this._town_to;
  523. }
  524. set
  525. {
  526. if ((this._town_to != value))
  527. {
  528. this.Ontown_toChanging(value);
  529. this.SendPropertyChanging();
  530. this._town_to = value;
  531. this.SendPropertyChanged("town_to");
  532. this.Ontown_toChanged();
  533. }
  534. }
  535. }
  536. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_time_out", DbType="DateTime NOT NULL")]
  537. public System.DateTime time_out
  538. {
  539. get
  540. {
  541. return this._time_out;
  542. }
  543. set
  544. {
  545. if ((this._time_out != value))
  546. {
  547. this.Ontime_outChanging(value);
  548. this.SendPropertyChanging();
  549. this._time_out = value;
  550. this.SendPropertyChanged("time_out");
  551. this.Ontime_outChanged();
  552. }
  553. }
  554. }
  555. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_time_in", DbType="DateTime NOT NULL")]
  556. public System.DateTime time_in
  557. {
  558. get
  559. {
  560. return this._time_in;
  561. }
  562. set
  563. {
  564. if ((this._time_in != value))
  565. {
  566. this.Ontime_inChanging(value);
  567. this.SendPropertyChanging();
  568. this._time_in = value;
  569. this.SendPropertyChanged("time_in");
  570. this.Ontime_inChanged();
  571. }
  572. }
  573. }
  574. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Trip_Pass_in_trip", Storage="_Pass_in_trip", ThisKey="trip_no", OtherKey="trip_no")]
  575. public EntitySet<Pass_in_trip> Pass_in_trip
  576. {
  577. get
  578. {
  579. return this._Pass_in_trip;
  580. }
  581. set
  582. {
  583. this._Pass_in_trip.Assign(value);
  584. }
  585. }
  586. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Company_Trip", Storage="_Company", ThisKey="ID_comp", OtherKey="ID_comp", IsForeignKey=true)]
  587. public Company Company
  588. {
  589. get
  590. {
  591. return this._Company.Entity;
  592. }
  593. set
  594. {
  595. Company previousValue = this._Company.Entity;
  596. if (((previousValue != value)
  597. || (this._Company.HasLoadedOrAssignedValue == false)))
  598. {
  599. this.SendPropertyChanging();
  600. if ((previousValue != null))
  601. {
  602. this._Company.Entity = null;
  603. previousValue.Trip.Remove(this);
  604. }
  605. this._Company.Entity = value;
  606. if ((value != null))
  607. {
  608. value.Trip.Add(this);
  609. this._ID_comp = value.ID_comp;
  610. }
  611. else
  612. {
  613. this._ID_comp = default(int);
  614. }
  615. this.SendPropertyChanged("Company");
  616. }
  617. }
  618. }
  619. public event PropertyChangingEventHandler PropertyChanging;
  620. public event PropertyChangedEventHandler PropertyChanged;
  621. protected virtual void SendPropertyChanging()
  622. {
  623. if ((this.PropertyChanging != null))
  624. {
  625. this.PropertyChanging(this, emptyChangingEventArgs);
  626. }
  627. }
  628. protected virtual void SendPropertyChanged(String propertyName)
  629. {
  630. if ((this.PropertyChanged != null))
  631. {
  632. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  633. }
  634. }
  635. private void attach_Pass_in_trip(Pass_in_trip entity)
  636. {
  637. this.SendPropertyChanging();
  638. entity.Trip = this;
  639. }
  640. private void detach_Pass_in_trip(Pass_in_trip entity)
  641. {
  642. this.SendPropertyChanging();
  643. entity.Trip = null;
  644. }
  645. }
  646. [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Passenger")]
  647. public partial class Passenger : INotifyPropertyChanging, INotifyPropertyChanged
  648. {
  649. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  650. private int _ID_psg;
  651. private string _name;
  652. private EntitySet<Pass_in_trip> _Pass_in_trip;
  653. #region Определения метода расширяемости
  654. partial void OnLoaded();
  655. partial void OnValidate(System.Data.Linq.ChangeAction action);
  656. partial void OnCreated();
  657. partial void OnID_psgChanging(int value);
  658. partial void OnID_psgChanged();
  659. partial void OnnameChanging(string value);
  660. partial void OnnameChanged();
  661. #endregion
  662. public Passenger()
  663. {
  664. this._Pass_in_trip = new EntitySet<Pass_in_trip>(new Action<Pass_in_trip>(this.attach_Pass_in_trip), new Action<Pass_in_trip>(this.detach_Pass_in_trip));
  665. OnCreated();
  666. }
  667. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID_psg", DbType="Int NOT NULL", IsPrimaryKey=true)]
  668. public int ID_psg
  669. {
  670. get
  671. {
  672. return this._ID_psg;
  673. }
  674. set
  675. {
  676. if ((this._ID_psg != value))
  677. {
  678. this.OnID_psgChanging(value);
  679. this.SendPropertyChanging();
  680. this._ID_psg = value;
  681. this.SendPropertyChanged("ID_psg");
  682. this.OnID_psgChanged();
  683. }
  684. }
  685. }
  686. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_name", DbType="Char(20) NOT NULL", CanBeNull=false)]
  687. public string name
  688. {
  689. get
  690. {
  691. return this._name;
  692. }
  693. set
  694. {
  695. if ((this._name != value))
  696. {
  697. this.OnnameChanging(value);
  698. this.SendPropertyChanging();
  699. this._name = value;
  700. this.SendPropertyChanged("name");
  701. this.OnnameChanged();
  702. }
  703. }
  704. }
  705. [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Passenger_Pass_in_trip", Storage="_Pass_in_trip", ThisKey="ID_psg", OtherKey="ID_psg")]
  706. public EntitySet<Pass_in_trip> Pass_in_trip
  707. {
  708. get
  709. {
  710. return this._Pass_in_trip;
  711. }
  712. set
  713. {
  714. this._Pass_in_trip.Assign(value);
  715. }
  716. }
  717. public event PropertyChangingEventHandler PropertyChanging;
  718. public event PropertyChangedEventHandler PropertyChanged;
  719. protected virtual void SendPropertyChanging()
  720. {
  721. if ((this.PropertyChanging != null))
  722. {
  723. this.PropertyChanging(this, emptyChangingEventArgs);
  724. }
  725. }
  726. protected virtual void SendPropertyChanged(String propertyName)
  727. {
  728. if ((this.PropertyChanged != null))
  729. {
  730. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  731. }
  732. }
  733. private void attach_Pass_in_trip(Pass_in_trip entity)
  734. {
  735. this.SendPropertyChanging();
  736. entity.Passenger = this;
  737. }
  738. private void detach_Pass_in_trip(Pass_in_trip entity)
  739. {
  740. this.SendPropertyChanging();
  741. entity.Passenger = null;
  742. }
  743. }
  744. [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Users")]
  745. public partial class Users : INotifyPropertyChanging, INotifyPropertyChanged
  746. {
  747. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  748. private int _id;
  749. private string _Login;
  750. private string _Password;
  751. #region Определения метода расширяемости
  752. partial void OnLoaded();
  753. partial void OnValidate(System.Data.Linq.ChangeAction action);
  754. partial void OnCreated();
  755. partial void OnidChanging(int value);
  756. partial void OnidChanged();
  757. partial void OnLoginChanging(string value);
  758. partial void OnLoginChanged();
  759. partial void OnPasswordChanging(string value);
  760. partial void OnPasswordChanged();
  761. #endregion
  762. public Users()
  763. {
  764. OnCreated();
  765. }
  766. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
  767. public int id
  768. {
  769. get
  770. {
  771. return this._id;
  772. }
  773. set
  774. {
  775. if ((this._id != value))
  776. {
  777. this.OnidChanging(value);
  778. this.SendPropertyChanging();
  779. this._id = value;
  780. this.SendPropertyChanged("id");
  781. this.OnidChanged();
  782. }
  783. }
  784. }
  785. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Login", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
  786. public string Login
  787. {
  788. get
  789. {
  790. return this._Login;
  791. }
  792. set
  793. {
  794. if ((this._Login != value))
  795. {
  796. this.OnLoginChanging(value);
  797. this.SendPropertyChanging();
  798. this._Login = value;
  799. this.SendPropertyChanged("Login");
  800. this.OnLoginChanged();
  801. }
  802. }
  803. }
  804. [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Password", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
  805. public string Password
  806. {
  807. get
  808. {
  809. return this._Password;
  810. }
  811. set
  812. {
  813. if ((this._Password != value))
  814. {
  815. this.OnPasswordChanging(value);
  816. this.SendPropertyChanging();
  817. this._Password = value;
  818. this.SendPropertyChanged("Password");
  819. this.OnPasswordChanged();
  820. }
  821. }
  822. }
  823. public event PropertyChangingEventHandler PropertyChanging;
  824. public event PropertyChangedEventHandler PropertyChanged;
  825. protected virtual void SendPropertyChanging()
  826. {
  827. if ((this.PropertyChanging != null))
  828. {
  829. this.PropertyChanging(this, emptyChangingEventArgs);
  830. }
  831. }
  832. protected virtual void SendPropertyChanged(String propertyName)
  833. {
  834. if ((this.PropertyChanged != null))
  835. {
  836. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  837. }
  838. }
  839. }
  840. }
  841. #pragma warning restore 1591