1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635 |
- #pragma warning disable 1591
- //------------------------------------------------------------------------------
- // <auto-generated>
- // Этот код создан программой.
- // Исполняемая версия:4.0.30319.42000
- //
- // Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
- // повторной генерации кода.
- // </auto-generated>
- //------------------------------------------------------------------------------
- namespace lyahov_tim
- {
- using System.Data.Linq;
- using System.Data.Linq.Mapping;
- using System.Data;
- using System.Collections.Generic;
- using System.Reflection;
- using System.Linq;
- using System.Linq.Expressions;
- using System.ComponentModel;
- using System;
-
-
- [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="lyahov_port")]
- public partial class DataClasses1DataContext : System.Data.Linq.DataContext
- {
-
- private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
-
- #region Определения метода расширяемости
- partial void OnCreated();
- partial void InsertUsers(Users instance);
- partial void UpdateUsers(Users instance);
- partial void DeleteUsers(Users instance);
- partial void InsertTickets(Tickets instance);
- partial void UpdateTickets(Tickets instance);
- partial void DeleteTickets(Tickets instance);
- partial void InsertRoutes(Routes instance);
- partial void UpdateRoutes(Routes instance);
- partial void DeleteRoutes(Routes instance);
- partial void InsertSchedules(Schedules instance);
- partial void UpdateSchedules(Schedules instance);
- partial void DeleteSchedules(Schedules instance);
- partial void InsertRoles(Roles instance);
- partial void UpdateRoles(Roles instance);
- partial void DeleteRoles(Roles instance);
- partial void InsertOffices(Offices instance);
- partial void UpdateOffices(Offices instance);
- partial void DeleteOffices(Offices instance);
- partial void InsertCountries(Countries instance);
- partial void UpdateCountries(Countries instance);
- partial void DeleteCountries(Countries instance);
- partial void InsertCabinTypes(CabinTypes instance);
- partial void UpdateCabinTypes(CabinTypes instance);
- partial void DeleteCabinTypes(CabinTypes instance);
- partial void InsertAirports(Airports instance);
- partial void UpdateAirports(Airports instance);
- partial void DeleteAirports(Airports instance);
- partial void InsertAircrafts(Aircrafts instance);
- partial void UpdateAircrafts(Aircrafts instance);
- partial void DeleteAircrafts(Aircrafts instance);
- #endregion
-
- public DataClasses1DataContext() :
- base(global::lyahov_tim.Properties.Settings.Default.lyahov_portConnectionString, mappingSource)
- {
- OnCreated();
- }
-
- public DataClasses1DataContext(string connection) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public DataClasses1DataContext(System.Data.IDbConnection connection) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public DataClasses1DataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public DataClasses1DataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public System.Data.Linq.Table<Users> Users
- {
- get
- {
- return this.GetTable<Users>();
- }
- }
-
- public System.Data.Linq.Table<Tickets> Tickets
- {
- get
- {
- return this.GetTable<Tickets>();
- }
- }
-
- public System.Data.Linq.Table<Routes> Routes
- {
- get
- {
- return this.GetTable<Routes>();
- }
- }
-
- public System.Data.Linq.Table<Schedules> Schedules
- {
- get
- {
- return this.GetTable<Schedules>();
- }
- }
-
- public System.Data.Linq.Table<Roles> Roles
- {
- get
- {
- return this.GetTable<Roles>();
- }
- }
-
- public System.Data.Linq.Table<Offices> Offices
- {
- get
- {
- return this.GetTable<Offices>();
- }
- }
-
- public System.Data.Linq.Table<Countries> Countries
- {
- get
- {
- return this.GetTable<Countries>();
- }
- }
-
- public System.Data.Linq.Table<CabinTypes> CabinTypes
- {
- get
- {
- return this.GetTable<CabinTypes>();
- }
- }
-
- public System.Data.Linq.Table<Airports> Airports
- {
- get
- {
- return this.GetTable<Airports>();
- }
- }
-
- public System.Data.Linq.Table<Aircrafts> Aircrafts
- {
- get
- {
- return this.GetTable<Aircrafts>();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Users")]
- public partial class Users : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private int _RoleID;
-
- private string _Email;
-
- private string _Password;
-
- private string _FirstName;
-
- private string _LastName;
-
- private System.Nullable<int> _OfficeID;
-
- private System.Nullable<System.DateTime> _Birthdate;
-
- private System.Nullable<bool> _Active;
-
- private EntitySet<Tickets> _Tickets;
-
- private EntityRef<Roles> _Roles;
-
- private EntityRef<Offices> _Offices;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnRoleIDChanging(int value);
- partial void OnRoleIDChanged();
- partial void OnEmailChanging(string value);
- partial void OnEmailChanged();
- partial void OnPasswordChanging(string value);
- partial void OnPasswordChanged();
- partial void OnFirstNameChanging(string value);
- partial void OnFirstNameChanged();
- partial void OnLastNameChanging(string value);
- partial void OnLastNameChanged();
- partial void OnOfficeIDChanging(System.Nullable<int> value);
- partial void OnOfficeIDChanged();
- partial void OnBirthdateChanging(System.Nullable<System.DateTime> value);
- partial void OnBirthdateChanged();
- partial void OnActiveChanging(System.Nullable<bool> value);
- partial void OnActiveChanged();
- #endregion
-
- public Users()
- {
- this._Tickets = new EntitySet<Tickets>(new Action<Tickets>(this.attach_Tickets), new Action<Tickets>(this.detach_Tickets));
- this._Roles = default(EntityRef<Roles>);
- this._Offices = default(EntityRef<Offices>);
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleID", DbType="Int NOT NULL")]
- public int RoleID
- {
- get
- {
- return this._RoleID;
- }
- set
- {
- if ((this._RoleID != value))
- {
- if (this._Roles.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnRoleIDChanging(value);
- this.SendPropertyChanging();
- this._RoleID = value;
- this.SendPropertyChanged("RoleID");
- this.OnRoleIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Email", DbType="NVarChar(150) NOT NULL", CanBeNull=false)]
- public string Email
- {
- get
- {
- return this._Email;
- }
- set
- {
- if ((this._Email != value))
- {
- this.OnEmailChanging(value);
- this.SendPropertyChanging();
- this._Email = value;
- this.SendPropertyChanged("Email");
- this.OnEmailChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Password", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Password
- {
- get
- {
- return this._Password;
- }
- set
- {
- if ((this._Password != value))
- {
- this.OnPasswordChanging(value);
- this.SendPropertyChanging();
- this._Password = value;
- this.SendPropertyChanged("Password");
- this.OnPasswordChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FirstName", DbType="NVarChar(50)")]
- public string FirstName
- {
- get
- {
- return this._FirstName;
- }
- set
- {
- if ((this._FirstName != value))
- {
- this.OnFirstNameChanging(value);
- this.SendPropertyChanging();
- this._FirstName = value;
- this.SendPropertyChanged("FirstName");
- this.OnFirstNameChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string LastName
- {
- get
- {
- return this._LastName;
- }
- set
- {
- if ((this._LastName != value))
- {
- this.OnLastNameChanging(value);
- this.SendPropertyChanging();
- this._LastName = value;
- this.SendPropertyChanged("LastName");
- this.OnLastNameChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OfficeID", DbType="Int")]
- public System.Nullable<int> OfficeID
- {
- get
- {
- return this._OfficeID;
- }
- set
- {
- if ((this._OfficeID != value))
- {
- if (this._Offices.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnOfficeIDChanging(value);
- this.SendPropertyChanging();
- this._OfficeID = value;
- this.SendPropertyChanged("OfficeID");
- this.OnOfficeIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Birthdate", DbType="Date")]
- public System.Nullable<System.DateTime> Birthdate
- {
- get
- {
- return this._Birthdate;
- }
- set
- {
- if ((this._Birthdate != value))
- {
- this.OnBirthdateChanging(value);
- this.SendPropertyChanging();
- this._Birthdate = value;
- this.SendPropertyChanged("Birthdate");
- this.OnBirthdateChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Active", DbType="Bit")]
- public System.Nullable<bool> Active
- {
- get
- {
- return this._Active;
- }
- set
- {
- if ((this._Active != value))
- {
- this.OnActiveChanging(value);
- this.SendPropertyChanging();
- this._Active = value;
- this.SendPropertyChanged("Active");
- this.OnActiveChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Users_Tickets", Storage="_Tickets", ThisKey="ID", OtherKey="UserID")]
- public EntitySet<Tickets> Tickets
- {
- get
- {
- return this._Tickets;
- }
- set
- {
- this._Tickets.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Roles_Users", Storage="_Roles", ThisKey="RoleID", OtherKey="ID", IsForeignKey=true)]
- public Roles Roles
- {
- get
- {
- return this._Roles.Entity;
- }
- set
- {
- Roles previousValue = this._Roles.Entity;
- if (((previousValue != value)
- || (this._Roles.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Roles.Entity = null;
- previousValue.Users.Remove(this);
- }
- this._Roles.Entity = value;
- if ((value != null))
- {
- value.Users.Add(this);
- this._RoleID = value.ID;
- }
- else
- {
- this._RoleID = default(int);
- }
- this.SendPropertyChanged("Roles");
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Offices_Users", Storage="_Offices", ThisKey="OfficeID", OtherKey="ID", IsForeignKey=true)]
- public Offices Offices
- {
- get
- {
- return this._Offices.Entity;
- }
- set
- {
- Offices previousValue = this._Offices.Entity;
- if (((previousValue != value)
- || (this._Offices.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Offices.Entity = null;
- previousValue.Users.Remove(this);
- }
- this._Offices.Entity = value;
- if ((value != null))
- {
- value.Users.Add(this);
- this._OfficeID = value.ID;
- }
- else
- {
- this._OfficeID = default(Nullable<int>);
- }
- this.SendPropertyChanged("Offices");
- }
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Tickets(Tickets entity)
- {
- this.SendPropertyChanging();
- entity.Users = this;
- }
-
- private void detach_Tickets(Tickets entity)
- {
- this.SendPropertyChanging();
- entity.Users = null;
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Tickets")]
- public partial class Tickets : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private int _UserID;
-
- private int _ScheduleID;
-
- private int _CabinTypeID;
-
- private string _Firstname;
-
- private string _Lastname;
-
- private string _Email;
-
- private string _Phone;
-
- private string _PassportNumber;
-
- private int _PassportCountryID;
-
- private string _BookingReference;
-
- private bool _Confirmed;
-
- private EntityRef<Users> _Users;
-
- private EntityRef<Schedules> _Schedules;
-
- private EntityRef<CabinTypes> _CabinTypes;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnUserIDChanging(int value);
- partial void OnUserIDChanged();
- partial void OnScheduleIDChanging(int value);
- partial void OnScheduleIDChanged();
- partial void OnCabinTypeIDChanging(int value);
- partial void OnCabinTypeIDChanged();
- partial void OnFirstnameChanging(string value);
- partial void OnFirstnameChanged();
- partial void OnLastnameChanging(string value);
- partial void OnLastnameChanged();
- partial void OnEmailChanging(string value);
- partial void OnEmailChanged();
- partial void OnPhoneChanging(string value);
- partial void OnPhoneChanged();
- partial void OnPassportNumberChanging(string value);
- partial void OnPassportNumberChanged();
- partial void OnPassportCountryIDChanging(int value);
- partial void OnPassportCountryIDChanged();
- partial void OnBookingReferenceChanging(string value);
- partial void OnBookingReferenceChanged();
- partial void OnConfirmedChanging(bool value);
- partial void OnConfirmedChanged();
- #endregion
-
- public Tickets()
- {
- this._Users = default(EntityRef<Users>);
- this._Schedules = default(EntityRef<Schedules>);
- this._CabinTypes = default(EntityRef<CabinTypes>);
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserID", DbType="Int NOT NULL")]
- public int UserID
- {
- get
- {
- return this._UserID;
- }
- set
- {
- if ((this._UserID != value))
- {
- if (this._Users.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnUserIDChanging(value);
- this.SendPropertyChanging();
- this._UserID = value;
- this.SendPropertyChanged("UserID");
- this.OnUserIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ScheduleID", DbType="Int NOT NULL")]
- public int ScheduleID
- {
- get
- {
- return this._ScheduleID;
- }
- set
- {
- if ((this._ScheduleID != value))
- {
- if (this._Schedules.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnScheduleIDChanging(value);
- this.SendPropertyChanging();
- this._ScheduleID = value;
- this.SendPropertyChanged("ScheduleID");
- this.OnScheduleIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CabinTypeID", DbType="Int NOT NULL")]
- public int CabinTypeID
- {
- get
- {
- return this._CabinTypeID;
- }
- set
- {
- if ((this._CabinTypeID != value))
- {
- if (this._CabinTypes.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnCabinTypeIDChanging(value);
- this.SendPropertyChanging();
- this._CabinTypeID = value;
- this.SendPropertyChanged("CabinTypeID");
- this.OnCabinTypeIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Firstname", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Firstname
- {
- get
- {
- return this._Firstname;
- }
- set
- {
- if ((this._Firstname != value))
- {
- this.OnFirstnameChanging(value);
- this.SendPropertyChanging();
- this._Firstname = value;
- this.SendPropertyChanged("Firstname");
- this.OnFirstnameChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Lastname", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Lastname
- {
- get
- {
- return this._Lastname;
- }
- set
- {
- if ((this._Lastname != value))
- {
- this.OnLastnameChanging(value);
- this.SendPropertyChanging();
- this._Lastname = value;
- this.SendPropertyChanged("Lastname");
- this.OnLastnameChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Email", DbType="NVarChar(50)")]
- public string Email
- {
- get
- {
- return this._Email;
- }
- set
- {
- if ((this._Email != value))
- {
- this.OnEmailChanging(value);
- this.SendPropertyChanging();
- this._Email = value;
- this.SendPropertyChanged("Email");
- this.OnEmailChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Phone", DbType="NVarChar(14) NOT NULL", CanBeNull=false)]
- public string Phone
- {
- get
- {
- return this._Phone;
- }
- set
- {
- if ((this._Phone != value))
- {
- this.OnPhoneChanging(value);
- this.SendPropertyChanging();
- this._Phone = value;
- this.SendPropertyChanged("Phone");
- this.OnPhoneChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PassportNumber", DbType="NVarChar(9) NOT NULL", CanBeNull=false)]
- public string PassportNumber
- {
- get
- {
- return this._PassportNumber;
- }
- set
- {
- if ((this._PassportNumber != value))
- {
- this.OnPassportNumberChanging(value);
- this.SendPropertyChanging();
- this._PassportNumber = value;
- this.SendPropertyChanged("PassportNumber");
- this.OnPassportNumberChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PassportCountryID", DbType="Int NOT NULL")]
- public int PassportCountryID
- {
- get
- {
- return this._PassportCountryID;
- }
- set
- {
- if ((this._PassportCountryID != value))
- {
- this.OnPassportCountryIDChanging(value);
- this.SendPropertyChanging();
- this._PassportCountryID = value;
- this.SendPropertyChanged("PassportCountryID");
- this.OnPassportCountryIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BookingReference", DbType="NVarChar(6) NOT NULL", CanBeNull=false)]
- public string BookingReference
- {
- get
- {
- return this._BookingReference;
- }
- set
- {
- if ((this._BookingReference != value))
- {
- this.OnBookingReferenceChanging(value);
- this.SendPropertyChanging();
- this._BookingReference = value;
- this.SendPropertyChanged("BookingReference");
- this.OnBookingReferenceChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Confirmed", DbType="Bit NOT NULL")]
- public bool Confirmed
- {
- get
- {
- return this._Confirmed;
- }
- set
- {
- if ((this._Confirmed != value))
- {
- this.OnConfirmedChanging(value);
- this.SendPropertyChanging();
- this._Confirmed = value;
- this.SendPropertyChanged("Confirmed");
- this.OnConfirmedChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Users_Tickets", Storage="_Users", ThisKey="UserID", OtherKey="ID", IsForeignKey=true)]
- public Users Users
- {
- get
- {
- return this._Users.Entity;
- }
- set
- {
- Users previousValue = this._Users.Entity;
- if (((previousValue != value)
- || (this._Users.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Users.Entity = null;
- previousValue.Tickets.Remove(this);
- }
- this._Users.Entity = value;
- if ((value != null))
- {
- value.Tickets.Add(this);
- this._UserID = value.ID;
- }
- else
- {
- this._UserID = default(int);
- }
- this.SendPropertyChanged("Users");
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Schedules_Tickets", Storage="_Schedules", ThisKey="ScheduleID", OtherKey="ID", IsForeignKey=true)]
- public Schedules Schedules
- {
- get
- {
- return this._Schedules.Entity;
- }
- set
- {
- Schedules previousValue = this._Schedules.Entity;
- if (((previousValue != value)
- || (this._Schedules.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Schedules.Entity = null;
- previousValue.Tickets.Remove(this);
- }
- this._Schedules.Entity = value;
- if ((value != null))
- {
- value.Tickets.Add(this);
- this._ScheduleID = value.ID;
- }
- else
- {
- this._ScheduleID = default(int);
- }
- this.SendPropertyChanged("Schedules");
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="CabinTypes_Tickets", Storage="_CabinTypes", ThisKey="CabinTypeID", OtherKey="ID", IsForeignKey=true)]
- public CabinTypes CabinTypes
- {
- get
- {
- return this._CabinTypes.Entity;
- }
- set
- {
- CabinTypes previousValue = this._CabinTypes.Entity;
- if (((previousValue != value)
- || (this._CabinTypes.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._CabinTypes.Entity = null;
- previousValue.Tickets.Remove(this);
- }
- this._CabinTypes.Entity = value;
- if ((value != null))
- {
- value.Tickets.Add(this);
- this._CabinTypeID = value.ID;
- }
- else
- {
- this._CabinTypeID = default(int);
- }
- this.SendPropertyChanged("CabinTypes");
- }
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Routes")]
- public partial class Routes : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private int _DepartureAirportID;
-
- private int _ArrivalAirportID;
-
- private int _Distance;
-
- private int _FlightTime;
-
- private EntitySet<Schedules> _Schedules;
-
- private EntityRef<Airports> _Airports;
-
- private EntityRef<Airports> _Airports1;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnDepartureAirportIDChanging(int value);
- partial void OnDepartureAirportIDChanged();
- partial void OnArrivalAirportIDChanging(int value);
- partial void OnArrivalAirportIDChanged();
- partial void OnDistanceChanging(int value);
- partial void OnDistanceChanged();
- partial void OnFlightTimeChanging(int value);
- partial void OnFlightTimeChanged();
- #endregion
-
- public Routes()
- {
- this._Schedules = new EntitySet<Schedules>(new Action<Schedules>(this.attach_Schedules), new Action<Schedules>(this.detach_Schedules));
- this._Airports = default(EntityRef<Airports>);
- this._Airports1 = default(EntityRef<Airports>);
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DepartureAirportID", DbType="Int NOT NULL")]
- public int DepartureAirportID
- {
- get
- {
- return this._DepartureAirportID;
- }
- set
- {
- if ((this._DepartureAirportID != value))
- {
- if (this._Airports.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnDepartureAirportIDChanging(value);
- this.SendPropertyChanging();
- this._DepartureAirportID = value;
- this.SendPropertyChanged("DepartureAirportID");
- this.OnDepartureAirportIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArrivalAirportID", DbType="Int NOT NULL")]
- public int ArrivalAirportID
- {
- get
- {
- return this._ArrivalAirportID;
- }
- set
- {
- if ((this._ArrivalAirportID != value))
- {
- if (this._Airports1.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnArrivalAirportIDChanging(value);
- this.SendPropertyChanging();
- this._ArrivalAirportID = value;
- this.SendPropertyChanged("ArrivalAirportID");
- this.OnArrivalAirportIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Distance", DbType="Int NOT NULL")]
- public int Distance
- {
- get
- {
- return this._Distance;
- }
- set
- {
- if ((this._Distance != value))
- {
- this.OnDistanceChanging(value);
- this.SendPropertyChanging();
- this._Distance = value;
- this.SendPropertyChanged("Distance");
- this.OnDistanceChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FlightTime", DbType="Int NOT NULL")]
- public int FlightTime
- {
- get
- {
- return this._FlightTime;
- }
- set
- {
- if ((this._FlightTime != value))
- {
- this.OnFlightTimeChanging(value);
- this.SendPropertyChanging();
- this._FlightTime = value;
- this.SendPropertyChanged("FlightTime");
- this.OnFlightTimeChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Routes_Schedules", Storage="_Schedules", ThisKey="ID", OtherKey="RouteID")]
- public EntitySet<Schedules> Schedules
- {
- get
- {
- return this._Schedules;
- }
- set
- {
- this._Schedules.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Airports_Routes", Storage="_Airports", ThisKey="DepartureAirportID", OtherKey="ID", IsForeignKey=true)]
- public Airports Airports
- {
- get
- {
- return this._Airports.Entity;
- }
- set
- {
- Airports previousValue = this._Airports.Entity;
- if (((previousValue != value)
- || (this._Airports.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Airports.Entity = null;
- previousValue.Routes.Remove(this);
- }
- this._Airports.Entity = value;
- if ((value != null))
- {
- value.Routes.Add(this);
- this._DepartureAirportID = value.ID;
- }
- else
- {
- this._DepartureAirportID = default(int);
- }
- this.SendPropertyChanged("Airports");
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Airports_Routes1", Storage="_Airports1", ThisKey="ArrivalAirportID", OtherKey="ID", IsForeignKey=true)]
- public Airports Airports1
- {
- get
- {
- return this._Airports1.Entity;
- }
- set
- {
- Airports previousValue = this._Airports1.Entity;
- if (((previousValue != value)
- || (this._Airports1.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Airports1.Entity = null;
- previousValue.Routes1.Remove(this);
- }
- this._Airports1.Entity = value;
- if ((value != null))
- {
- value.Routes1.Add(this);
- this._ArrivalAirportID = value.ID;
- }
- else
- {
- this._ArrivalAirportID = default(int);
- }
- this.SendPropertyChanged("Airports1");
- }
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Schedules(Schedules entity)
- {
- this.SendPropertyChanging();
- entity.Routes = this;
- }
-
- private void detach_Schedules(Schedules entity)
- {
- this.SendPropertyChanging();
- entity.Routes = null;
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Schedules")]
- public partial class Schedules : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private System.DateTime _Date;
-
- private System.TimeSpan _Time;
-
- private int _AircraftID;
-
- private int _RouteID;
-
- private decimal _EconomyPrice;
-
- private bool _Confirmed;
-
- private string _FlightNumber;
-
- private EntitySet<Tickets> _Tickets;
-
- private EntityRef<Routes> _Routes;
-
- private EntityRef<Aircrafts> _Aircrafts;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnDateChanging(System.DateTime value);
- partial void OnDateChanged();
- partial void OnTimeChanging(System.TimeSpan value);
- partial void OnTimeChanged();
- partial void OnAircraftIDChanging(int value);
- partial void OnAircraftIDChanged();
- partial void OnRouteIDChanging(int value);
- partial void OnRouteIDChanged();
- partial void OnEconomyPriceChanging(decimal value);
- partial void OnEconomyPriceChanged();
- partial void OnConfirmedChanging(bool value);
- partial void OnConfirmedChanged();
- partial void OnFlightNumberChanging(string value);
- partial void OnFlightNumberChanged();
- #endregion
-
- public Schedules()
- {
- this._Tickets = new EntitySet<Tickets>(new Action<Tickets>(this.attach_Tickets), new Action<Tickets>(this.detach_Tickets));
- this._Routes = default(EntityRef<Routes>);
- this._Aircrafts = default(EntityRef<Aircrafts>);
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Date", DbType="Date NOT NULL")]
- public System.DateTime Date
- {
- get
- {
- return this._Date;
- }
- set
- {
- if ((this._Date != value))
- {
- this.OnDateChanging(value);
- this.SendPropertyChanging();
- this._Date = value;
- this.SendPropertyChanged("Date");
- this.OnDateChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Time", DbType="Time NOT NULL")]
- public System.TimeSpan Time
- {
- get
- {
- return this._Time;
- }
- set
- {
- if ((this._Time != value))
- {
- this.OnTimeChanging(value);
- this.SendPropertyChanging();
- this._Time = value;
- this.SendPropertyChanged("Time");
- this.OnTimeChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AircraftID", DbType="Int NOT NULL")]
- public int AircraftID
- {
- get
- {
- return this._AircraftID;
- }
- set
- {
- if ((this._AircraftID != value))
- {
- if (this._Aircrafts.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnAircraftIDChanging(value);
- this.SendPropertyChanging();
- this._AircraftID = value;
- this.SendPropertyChanged("AircraftID");
- this.OnAircraftIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RouteID", DbType="Int NOT NULL")]
- public int RouteID
- {
- get
- {
- return this._RouteID;
- }
- set
- {
- if ((this._RouteID != value))
- {
- if (this._Routes.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnRouteIDChanging(value);
- this.SendPropertyChanging();
- this._RouteID = value;
- this.SendPropertyChanged("RouteID");
- this.OnRouteIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EconomyPrice", DbType="Money NOT NULL")]
- public decimal EconomyPrice
- {
- get
- {
- return this._EconomyPrice;
- }
- set
- {
- if ((this._EconomyPrice != value))
- {
- this.OnEconomyPriceChanging(value);
- this.SendPropertyChanging();
- this._EconomyPrice = value;
- this.SendPropertyChanged("EconomyPrice");
- this.OnEconomyPriceChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Confirmed", DbType="Bit NOT NULL")]
- public bool Confirmed
- {
- get
- {
- return this._Confirmed;
- }
- set
- {
- if ((this._Confirmed != value))
- {
- this.OnConfirmedChanging(value);
- this.SendPropertyChanging();
- this._Confirmed = value;
- this.SendPropertyChanged("Confirmed");
- this.OnConfirmedChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FlightNumber", DbType="NVarChar(10)")]
- public string FlightNumber
- {
- get
- {
- return this._FlightNumber;
- }
- set
- {
- if ((this._FlightNumber != value))
- {
- this.OnFlightNumberChanging(value);
- this.SendPropertyChanging();
- this._FlightNumber = value;
- this.SendPropertyChanged("FlightNumber");
- this.OnFlightNumberChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Schedules_Tickets", Storage="_Tickets", ThisKey="ID", OtherKey="ScheduleID")]
- public EntitySet<Tickets> Tickets
- {
- get
- {
- return this._Tickets;
- }
- set
- {
- this._Tickets.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Routes_Schedules", Storage="_Routes", ThisKey="RouteID", OtherKey="ID", IsForeignKey=true)]
- public Routes Routes
- {
- get
- {
- return this._Routes.Entity;
- }
- set
- {
- Routes previousValue = this._Routes.Entity;
- if (((previousValue != value)
- || (this._Routes.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Routes.Entity = null;
- previousValue.Schedules.Remove(this);
- }
- this._Routes.Entity = value;
- if ((value != null))
- {
- value.Schedules.Add(this);
- this._RouteID = value.ID;
- }
- else
- {
- this._RouteID = default(int);
- }
- this.SendPropertyChanged("Routes");
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Aircrafts_Schedules", Storage="_Aircrafts", ThisKey="AircraftID", OtherKey="ID", IsForeignKey=true)]
- public Aircrafts Aircrafts
- {
- get
- {
- return this._Aircrafts.Entity;
- }
- set
- {
- Aircrafts previousValue = this._Aircrafts.Entity;
- if (((previousValue != value)
- || (this._Aircrafts.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Aircrafts.Entity = null;
- previousValue.Schedules.Remove(this);
- }
- this._Aircrafts.Entity = value;
- if ((value != null))
- {
- value.Schedules.Add(this);
- this._AircraftID = value.ID;
- }
- else
- {
- this._AircraftID = default(int);
- }
- this.SendPropertyChanged("Aircrafts");
- }
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Tickets(Tickets entity)
- {
- this.SendPropertyChanging();
- entity.Schedules = this;
- }
-
- private void detach_Tickets(Tickets entity)
- {
- this.SendPropertyChanging();
- entity.Schedules = null;
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Roles")]
- public partial class Roles : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private string _Title;
-
- private EntitySet<Users> _Users;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnTitleChanging(string value);
- partial void OnTitleChanged();
- #endregion
-
- public Roles()
- {
- this._Users = new EntitySet<Users>(new Action<Users>(this.attach_Users), new Action<Users>(this.detach_Users));
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Title", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Title
- {
- get
- {
- return this._Title;
- }
- set
- {
- if ((this._Title != value))
- {
- this.OnTitleChanging(value);
- this.SendPropertyChanging();
- this._Title = value;
- this.SendPropertyChanged("Title");
- this.OnTitleChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Roles_Users", Storage="_Users", ThisKey="ID", OtherKey="RoleID")]
- public EntitySet<Users> Users
- {
- get
- {
- return this._Users;
- }
- set
- {
- this._Users.Assign(value);
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Users(Users entity)
- {
- this.SendPropertyChanging();
- entity.Roles = this;
- }
-
- private void detach_Users(Users entity)
- {
- this.SendPropertyChanging();
- entity.Roles = null;
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Offices")]
- public partial class Offices : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private int _CountryID;
-
- private string _Title;
-
- private string _Phone;
-
- private string _Contact;
-
- private EntitySet<Users> _Users;
-
- private EntityRef<Countries> _Countries;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnCountryIDChanging(int value);
- partial void OnCountryIDChanged();
- partial void OnTitleChanging(string value);
- partial void OnTitleChanged();
- partial void OnPhoneChanging(string value);
- partial void OnPhoneChanged();
- partial void OnContactChanging(string value);
- partial void OnContactChanged();
- #endregion
-
- public Offices()
- {
- this._Users = new EntitySet<Users>(new Action<Users>(this.attach_Users), new Action<Users>(this.detach_Users));
- this._Countries = default(EntityRef<Countries>);
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CountryID", DbType="Int NOT NULL")]
- public int CountryID
- {
- get
- {
- return this._CountryID;
- }
- set
- {
- if ((this._CountryID != value))
- {
- if (this._Countries.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnCountryIDChanging(value);
- this.SendPropertyChanging();
- this._CountryID = value;
- this.SendPropertyChanged("CountryID");
- this.OnCountryIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Title", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Title
- {
- get
- {
- return this._Title;
- }
- set
- {
- if ((this._Title != value))
- {
- this.OnTitleChanging(value);
- this.SendPropertyChanging();
- this._Title = value;
- this.SendPropertyChanged("Title");
- this.OnTitleChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Phone", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Phone
- {
- get
- {
- return this._Phone;
- }
- set
- {
- if ((this._Phone != value))
- {
- this.OnPhoneChanging(value);
- this.SendPropertyChanging();
- this._Phone = value;
- this.SendPropertyChanged("Phone");
- this.OnPhoneChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Contact", DbType="NVarChar(250) NOT NULL", CanBeNull=false)]
- public string Contact
- {
- get
- {
- return this._Contact;
- }
- set
- {
- if ((this._Contact != value))
- {
- this.OnContactChanging(value);
- this.SendPropertyChanging();
- this._Contact = value;
- this.SendPropertyChanged("Contact");
- this.OnContactChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Offices_Users", Storage="_Users", ThisKey="ID", OtherKey="OfficeID")]
- public EntitySet<Users> Users
- {
- get
- {
- return this._Users;
- }
- set
- {
- this._Users.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Countries_Offices", Storage="_Countries", ThisKey="CountryID", OtherKey="ID", IsForeignKey=true)]
- public Countries Countries
- {
- get
- {
- return this._Countries.Entity;
- }
- set
- {
- Countries previousValue = this._Countries.Entity;
- if (((previousValue != value)
- || (this._Countries.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Countries.Entity = null;
- previousValue.Offices.Remove(this);
- }
- this._Countries.Entity = value;
- if ((value != null))
- {
- value.Offices.Add(this);
- this._CountryID = value.ID;
- }
- else
- {
- this._CountryID = default(int);
- }
- this.SendPropertyChanged("Countries");
- }
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Users(Users entity)
- {
- this.SendPropertyChanging();
- entity.Offices = this;
- }
-
- private void detach_Users(Users entity)
- {
- this.SendPropertyChanging();
- entity.Offices = null;
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Countries")]
- public partial class Countries : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private string _Name;
-
- private EntitySet<Offices> _Offices;
-
- private EntitySet<Airports> _Airports;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- #endregion
-
- public Countries()
- {
- this._Offices = new EntitySet<Offices>(new Action<Offices>(this.attach_Offices), new Action<Offices>(this.detach_Offices));
- this._Airports = new EntitySet<Airports>(new Action<Airports>(this.attach_Airports), new Action<Airports>(this.detach_Airports));
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Name
- {
- get
- {
- return this._Name;
- }
- set
- {
- if ((this._Name != value))
- {
- this.OnNameChanging(value);
- this.SendPropertyChanging();
- this._Name = value;
- this.SendPropertyChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Countries_Offices", Storage="_Offices", ThisKey="ID", OtherKey="CountryID")]
- public EntitySet<Offices> Offices
- {
- get
- {
- return this._Offices;
- }
- set
- {
- this._Offices.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Countries_Airports", Storage="_Airports", ThisKey="ID", OtherKey="CountryID")]
- public EntitySet<Airports> Airports
- {
- get
- {
- return this._Airports;
- }
- set
- {
- this._Airports.Assign(value);
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Offices(Offices entity)
- {
- this.SendPropertyChanging();
- entity.Countries = this;
- }
-
- private void detach_Offices(Offices entity)
- {
- this.SendPropertyChanging();
- entity.Countries = null;
- }
-
- private void attach_Airports(Airports entity)
- {
- this.SendPropertyChanging();
- entity.Countries = this;
- }
-
- private void detach_Airports(Airports entity)
- {
- this.SendPropertyChanging();
- entity.Countries = null;
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CabinTypes")]
- public partial class CabinTypes : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private string _Name;
-
- private EntitySet<Tickets> _Tickets;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- #endregion
-
- public CabinTypes()
- {
- this._Tickets = new EntitySet<Tickets>(new Action<Tickets>(this.attach_Tickets), new Action<Tickets>(this.detach_Tickets));
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Name
- {
- get
- {
- return this._Name;
- }
- set
- {
- if ((this._Name != value))
- {
- this.OnNameChanging(value);
- this.SendPropertyChanging();
- this._Name = value;
- this.SendPropertyChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="CabinTypes_Tickets", Storage="_Tickets", ThisKey="ID", OtherKey="CabinTypeID")]
- public EntitySet<Tickets> Tickets
- {
- get
- {
- return this._Tickets;
- }
- set
- {
- this._Tickets.Assign(value);
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Tickets(Tickets entity)
- {
- this.SendPropertyChanging();
- entity.CabinTypes = this;
- }
-
- private void detach_Tickets(Tickets entity)
- {
- this.SendPropertyChanging();
- entity.CabinTypes = null;
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Airports")]
- public partial class Airports : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private int _CountryID;
-
- private string _IATACode;
-
- private string _Name;
-
- private EntitySet<Routes> _Routes;
-
- private EntitySet<Routes> _Routes1;
-
- private EntityRef<Countries> _Countries;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnCountryIDChanging(int value);
- partial void OnCountryIDChanged();
- partial void OnIATACodeChanging(string value);
- partial void OnIATACodeChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- #endregion
-
- public Airports()
- {
- this._Routes = new EntitySet<Routes>(new Action<Routes>(this.attach_Routes), new Action<Routes>(this.detach_Routes));
- this._Routes1 = new EntitySet<Routes>(new Action<Routes>(this.attach_Routes1), new Action<Routes>(this.detach_Routes1));
- this._Countries = default(EntityRef<Countries>);
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CountryID", DbType="Int NOT NULL")]
- public int CountryID
- {
- get
- {
- return this._CountryID;
- }
- set
- {
- if ((this._CountryID != value))
- {
- if (this._Countries.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnCountryIDChanging(value);
- this.SendPropertyChanging();
- this._CountryID = value;
- this.SendPropertyChanged("CountryID");
- this.OnCountryIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IATACode", DbType="VarChar(3) NOT NULL", CanBeNull=false)]
- public string IATACode
- {
- get
- {
- return this._IATACode;
- }
- set
- {
- if ((this._IATACode != value))
- {
- this.OnIATACodeChanging(value);
- this.SendPropertyChanging();
- this._IATACode = value;
- this.SendPropertyChanged("IATACode");
- this.OnIATACodeChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")]
- public string Name
- {
- get
- {
- return this._Name;
- }
- set
- {
- if ((this._Name != value))
- {
- this.OnNameChanging(value);
- this.SendPropertyChanging();
- this._Name = value;
- this.SendPropertyChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Airports_Routes", Storage="_Routes", ThisKey="ID", OtherKey="DepartureAirportID")]
- public EntitySet<Routes> Routes
- {
- get
- {
- return this._Routes;
- }
- set
- {
- this._Routes.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Airports_Routes1", Storage="_Routes1", ThisKey="ID", OtherKey="ArrivalAirportID")]
- public EntitySet<Routes> Routes1
- {
- get
- {
- return this._Routes1;
- }
- set
- {
- this._Routes1.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Countries_Airports", Storage="_Countries", ThisKey="CountryID", OtherKey="ID", IsForeignKey=true)]
- public Countries Countries
- {
- get
- {
- return this._Countries.Entity;
- }
- set
- {
- Countries previousValue = this._Countries.Entity;
- if (((previousValue != value)
- || (this._Countries.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Countries.Entity = null;
- previousValue.Airports.Remove(this);
- }
- this._Countries.Entity = value;
- if ((value != null))
- {
- value.Airports.Add(this);
- this._CountryID = value.ID;
- }
- else
- {
- this._CountryID = default(int);
- }
- this.SendPropertyChanged("Countries");
- }
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Routes(Routes entity)
- {
- this.SendPropertyChanging();
- entity.Airports = this;
- }
-
- private void detach_Routes(Routes entity)
- {
- this.SendPropertyChanging();
- entity.Airports = null;
- }
-
- private void attach_Routes1(Routes entity)
- {
- this.SendPropertyChanging();
- entity.Airports1 = this;
- }
-
- private void detach_Routes1(Routes entity)
- {
- this.SendPropertyChanging();
- entity.Airports1 = null;
- }
- }
-
- [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Aircrafts")]
- public partial class Aircrafts : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ID;
-
- private string _Name;
-
- private string _MakeModel;
-
- private int _TotalSeats;
-
- private int _EconomySeats;
-
- private int _BusinessSeats;
-
- private EntitySet<Schedules> _Schedules;
-
- #region Определения метода расширяемости
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnIDChanging(int value);
- partial void OnIDChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnMakeModelChanging(string value);
- partial void OnMakeModelChanged();
- partial void OnTotalSeatsChanging(int value);
- partial void OnTotalSeatsChanged();
- partial void OnEconomySeatsChanging(int value);
- partial void OnEconomySeatsChanged();
- partial void OnBusinessSeatsChanging(int value);
- partial void OnBusinessSeatsChanged();
- #endregion
-
- public Aircrafts()
- {
- this._Schedules = new EntitySet<Schedules>(new Action<Schedules>(this.attach_Schedules), new Action<Schedules>(this.detach_Schedules));
- OnCreated();
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ID
- {
- get
- {
- return this._ID;
- }
- set
- {
- if ((this._ID != value))
- {
- this.OnIDChanging(value);
- this.SendPropertyChanging();
- this._ID = value;
- this.SendPropertyChanged("ID");
- this.OnIDChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Name
- {
- get
- {
- return this._Name;
- }
- set
- {
- if ((this._Name != value))
- {
- this.OnNameChanging(value);
- this.SendPropertyChanging();
- this._Name = value;
- this.SendPropertyChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MakeModel", DbType="NVarChar(10)")]
- public string MakeModel
- {
- get
- {
- return this._MakeModel;
- }
- set
- {
- if ((this._MakeModel != value))
- {
- this.OnMakeModelChanging(value);
- this.SendPropertyChanging();
- this._MakeModel = value;
- this.SendPropertyChanged("MakeModel");
- this.OnMakeModelChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalSeats", DbType="Int NOT NULL")]
- public int TotalSeats
- {
- get
- {
- return this._TotalSeats;
- }
- set
- {
- if ((this._TotalSeats != value))
- {
- this.OnTotalSeatsChanging(value);
- this.SendPropertyChanging();
- this._TotalSeats = value;
- this.SendPropertyChanged("TotalSeats");
- this.OnTotalSeatsChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EconomySeats", DbType="Int NOT NULL")]
- public int EconomySeats
- {
- get
- {
- return this._EconomySeats;
- }
- set
- {
- if ((this._EconomySeats != value))
- {
- this.OnEconomySeatsChanging(value);
- this.SendPropertyChanging();
- this._EconomySeats = value;
- this.SendPropertyChanged("EconomySeats");
- this.OnEconomySeatsChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BusinessSeats", DbType="Int NOT NULL")]
- public int BusinessSeats
- {
- get
- {
- return this._BusinessSeats;
- }
- set
- {
- if ((this._BusinessSeats != value))
- {
- this.OnBusinessSeatsChanging(value);
- this.SendPropertyChanging();
- this._BusinessSeats = value;
- this.SendPropertyChanged("BusinessSeats");
- this.OnBusinessSeatsChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Aircrafts_Schedules", Storage="_Schedules", ThisKey="ID", OtherKey="AircraftID")]
- public EntitySet<Schedules> Schedules
- {
- get
- {
- return this._Schedules;
- }
- set
- {
- this._Schedules.Assign(value);
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Schedules(Schedules entity)
- {
- this.SendPropertyChanging();
- entity.Aircrafts = this;
- }
-
- private void detach_Schedules(Schedules entity)
- {
- this.SendPropertyChanging();
- entity.Aircrafts = null;
- }
- }
- }
- #pragma warning restore 1591
|