#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.1
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace MainTemplate
{
	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="HotelResJad")]
	public partial class Lsc_LinqToSqlDataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InserttblUserType(tblUserType instance);
    partial void UpdatetblUserType(tblUserType instance);
    partial void DeletetblUserType(tblUserType instance);
    partial void InserttblUser(tblUser instance);
    partial void UpdatetblUser(tblUser instance);
    partial void DeletetblUser(tblUser instance);
    partial void InserttblLog(tblLog instance);
    partial void UpdatetblLog(tblLog instance);
    partial void DeletetblLog(tblLog instance);
    partial void InserttblHotelRoom(tblHotelRoom instance);
    partial void UpdatetblHotelRoom(tblHotelRoom instance);
    partial void DeletetblHotelRoom(tblHotelRoom instance);
    partial void InserttblRoomType(tblRoomType instance);
    partial void UpdatetblRoomType(tblRoomType instance);
    partial void DeletetblRoomType(tblRoomType instance);
    partial void InserttblRoomReserved(tblRoomReserved instance);
    partial void UpdatetblRoomReserved(tblRoomReserved instance);
    partial void DeletetblRoomReserved(tblRoomReserved instance);
    partial void InserttblRoomTahvil(tblRoomTahvil instance);
    partial void UpdatetblRoomTahvil(tblRoomTahvil instance);
    partial void DeletetblRoomTahvil(tblRoomTahvil instance);
    #endregion
		
		public Lsc_LinqToSqlDataContext() : 
				base(global::MainTemplate.Properties.Settings.Default.HotelResJadConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public Lsc_LinqToSqlDataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public Lsc_LinqToSqlDataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public Lsc_LinqToSqlDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public Lsc_LinqToSqlDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<tblUserType> tblUserTypes
		{
			get
			{
				return this.GetTable<tblUserType>();
			}
		}
		
		public System.Data.Linq.Table<tblUser> tblUsers
		{
			get
			{
				return this.GetTable<tblUser>();
			}
		}
		
		public System.Data.Linq.Table<tblLog> tblLogs
		{
			get
			{
				return this.GetTable<tblLog>();
			}
		}
		
		public System.Data.Linq.Table<tblHotelRoom> tblHotelRooms
		{
			get
			{
				return this.GetTable<tblHotelRoom>();
			}
		}
		
		public System.Data.Linq.Table<tblRoomType> tblRoomTypes
		{
			get
			{
				return this.GetTable<tblRoomType>();
			}
		}
		
		public System.Data.Linq.Table<tblRoomReserved> tblRoomReserveds
		{
			get
			{
				return this.GetTable<tblRoomReserved>();
			}
		}
		
		public System.Data.Linq.Table<tblRoomTahvil> tblRoomTahvils
		{
			get
			{
				return this.GetTable<tblRoomTahvil>();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblUserTypes")]
	public partial class tblUserType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _UserTypeID;
		
		private string _UserTypeDescr;
		
		private EntitySet<tblUser> _tblUsers;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnUserTypeIDChanging(int value);
    partial void OnUserTypeIDChanged();
    partial void OnUserTypeDescrChanging(string value);
    partial void OnUserTypeDescrChanged();
    #endregion
		
		public tblUserType()
		{
			this._tblUsers = new EntitySet<tblUser>(new Action<tblUser>(this.attach_tblUsers), new Action<tblUser>(this.detach_tblUsers));
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserTypeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int UserTypeID
		{
			get
			{
				return this._UserTypeID;
			}
			set
			{
				if ((this._UserTypeID != value))
				{
					this.OnUserTypeIDChanging(value);
					this.SendPropertyChanging();
					this._UserTypeID = value;
					this.SendPropertyChanged("UserTypeID");
					this.OnUserTypeIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserTypeDescr", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string UserTypeDescr
		{
			get
			{
				return this._UserTypeDescr;
			}
			set
			{
				if ((this._UserTypeDescr != value))
				{
					this.OnUserTypeDescrChanging(value);
					this.SendPropertyChanging();
					this._UserTypeDescr = value;
					this.SendPropertyChanged("UserTypeDescr");
					this.OnUserTypeDescrChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUserType_tblUser", Storage="_tblUsers", ThisKey="UserTypeID", OtherKey="UsrType")]
		public EntitySet<tblUser> tblUsers
		{
			get
			{
				return this._tblUsers;
			}
			set
			{
				this._tblUsers.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_tblUsers(tblUser entity)
		{
			this.SendPropertyChanging();
			entity.tblUserType = this;
		}
		
		private void detach_tblUsers(tblUser entity)
		{
			this.SendPropertyChanging();
			entity.tblUserType = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblUsers")]
	public partial class tblUser : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _RowID;
		
		private string _UsrName;
		
		private string _PsWord;
		
		private int _UsrType;
		
		private string _NameOfUser;
		
		private string _SnameOfUser;
		
		private string _PhoneNumber;
		
		private string _MobilePhones;
		
		private System.Nullable<System.DateTime> _DateOfRegister;
		
		private EntitySet<tblLog> _tblLogs;
		
		private EntitySet<tblRoomReserved> _tblRoomReserveds;
		
		private EntitySet<tblRoomReserved> _tblRoomReserveds1;
		
		private EntitySet<tblRoomTahvil> _tblRoomTahvils;
		
		private EntityRef<tblUserType> _tblUserType;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnRowIDChanging(int value);
    partial void OnRowIDChanged();
    partial void OnUsrNameChanging(string value);
    partial void OnUsrNameChanged();
    partial void OnPsWordChanging(string value);
    partial void OnPsWordChanged();
    partial void OnUsrTypeChanging(int value);
    partial void OnUsrTypeChanged();
    partial void OnNameOfUserChanging(string value);
    partial void OnNameOfUserChanged();
    partial void OnSnameOfUserChanging(string value);
    partial void OnSnameOfUserChanged();
    partial void OnPhoneNumberChanging(string value);
    partial void OnPhoneNumberChanged();
    partial void OnMobilePhonesChanging(string value);
    partial void OnMobilePhonesChanged();
    partial void OnDateOfRegisterChanging(System.Nullable<System.DateTime> value);
    partial void OnDateOfRegisterChanged();
    #endregion
		
		public tblUser()
		{
			this._tblLogs = new EntitySet<tblLog>(new Action<tblLog>(this.attach_tblLogs), new Action<tblLog>(this.detach_tblLogs));
			this._tblRoomReserveds = new EntitySet<tblRoomReserved>(new Action<tblRoomReserved>(this.attach_tblRoomReserveds), new Action<tblRoomReserved>(this.detach_tblRoomReserveds));
			this._tblRoomReserveds1 = new EntitySet<tblRoomReserved>(new Action<tblRoomReserved>(this.attach_tblRoomReserveds1), new Action<tblRoomReserved>(this.detach_tblRoomReserveds1));
			this._tblRoomTahvils = new EntitySet<tblRoomTahvil>(new Action<tblRoomTahvil>(this.attach_tblRoomTahvils), new Action<tblRoomTahvil>(this.detach_tblRoomTahvils));
			this._tblUserType = default(EntityRef<tblUserType>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RowID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int RowID
		{
			get
			{
				return this._RowID;
			}
			set
			{
				if ((this._RowID != value))
				{
					this.OnRowIDChanging(value);
					this.SendPropertyChanging();
					this._RowID = value;
					this.SendPropertyChanged("RowID");
					this.OnRowIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsrName", DbType="NVarChar(150) NOT NULL", CanBeNull=false)]
		public string UsrName
		{
			get
			{
				return this._UsrName;
			}
			set
			{
				if ((this._UsrName != value))
				{
					this.OnUsrNameChanging(value);
					this.SendPropertyChanging();
					this._UsrName = value;
					this.SendPropertyChanged("UsrName");
					this.OnUsrNameChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PsWord", DbType="NVarChar(150) NOT NULL", CanBeNull=false)]
		public string PsWord
		{
			get
			{
				return this._PsWord;
			}
			set
			{
				if ((this._PsWord != value))
				{
					this.OnPsWordChanging(value);
					this.SendPropertyChanging();
					this._PsWord = value;
					this.SendPropertyChanged("PsWord");
					this.OnPsWordChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsrType", DbType="Int NOT NULL")]
		public int UsrType
		{
			get
			{
				return this._UsrType;
			}
			set
			{
				if ((this._UsrType != value))
				{
					if (this._tblUserType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnUsrTypeChanging(value);
					this.SendPropertyChanging();
					this._UsrType = value;
					this.SendPropertyChanged("UsrType");
					this.OnUsrTypeChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NameOfUser", DbType="NVarChar(100)")]
		public string NameOfUser
		{
			get
			{
				return this._NameOfUser;
			}
			set
			{
				if ((this._NameOfUser != value))
				{
					this.OnNameOfUserChanging(value);
					this.SendPropertyChanging();
					this._NameOfUser = value;
					this.SendPropertyChanged("NameOfUser");
					this.OnNameOfUserChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SnameOfUser", DbType="NVarChar(150)")]
		public string SnameOfUser
		{
			get
			{
				return this._SnameOfUser;
			}
			set
			{
				if ((this._SnameOfUser != value))
				{
					this.OnSnameOfUserChanging(value);
					this.SendPropertyChanging();
					this._SnameOfUser = value;
					this.SendPropertyChanged("SnameOfUser");
					this.OnSnameOfUserChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PhoneNumber", DbType="NVarChar(250)")]
		public string PhoneNumber
		{
			get
			{
				return this._PhoneNumber;
			}
			set
			{
				if ((this._PhoneNumber != value))
				{
					this.OnPhoneNumberChanging(value);
					this.SendPropertyChanging();
					this._PhoneNumber = value;
					this.SendPropertyChanged("PhoneNumber");
					this.OnPhoneNumberChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MobilePhones", DbType="NVarChar(250)")]
		public string MobilePhones
		{
			get
			{
				return this._MobilePhones;
			}
			set
			{
				if ((this._MobilePhones != value))
				{
					this.OnMobilePhonesChanging(value);
					this.SendPropertyChanging();
					this._MobilePhones = value;
					this.SendPropertyChanged("MobilePhones");
					this.OnMobilePhonesChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateOfRegister", DbType="DateTime")]
		public System.Nullable<System.DateTime> DateOfRegister
		{
			get
			{
				return this._DateOfRegister;
			}
			set
			{
				if ((this._DateOfRegister != value))
				{
					this.OnDateOfRegisterChanging(value);
					this.SendPropertyChanging();
					this._DateOfRegister = value;
					this.SendPropertyChanged("DateOfRegister");
					this.OnDateOfRegisterChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUser_tblLog", Storage="_tblLogs", ThisKey="RowID", OtherKey="UserID")]
		public EntitySet<tblLog> tblLogs
		{
			get
			{
				return this._tblLogs;
			}
			set
			{
				this._tblLogs.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUser_tblRoomReserved", Storage="_tblRoomReserveds", ThisKey="RowID", OtherKey="CustomerID")]
		public EntitySet<tblRoomReserved> tblRoomReserveds
		{
			get
			{
				return this._tblRoomReserveds;
			}
			set
			{
				this._tblRoomReserveds.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUser_tblRoomReserved1", Storage="_tblRoomReserveds1", ThisKey="RowID", OtherKey="OperatorID")]
		public EntitySet<tblRoomReserved> tblRoomReserveds1
		{
			get
			{
				return this._tblRoomReserveds1;
			}
			set
			{
				this._tblRoomReserveds1.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUser_tblRoomTahvil", Storage="_tblRoomTahvils", ThisKey="RowID", OtherKey="CustomerID")]
		public EntitySet<tblRoomTahvil> tblRoomTahvils
		{
			get
			{
				return this._tblRoomTahvils;
			}
			set
			{
				this._tblRoomTahvils.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUserType_tblUser", Storage="_tblUserType", ThisKey="UsrType", OtherKey="UserTypeID", IsForeignKey=true)]
		public tblUserType tblUserType
		{
			get
			{
				return this._tblUserType.Entity;
			}
			set
			{
				tblUserType previousValue = this._tblUserType.Entity;
				if (((previousValue != value) 
							|| (this._tblUserType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblUserType.Entity = null;
						previousValue.tblUsers.Remove(this);
					}
					this._tblUserType.Entity = value;
					if ((value != null))
					{
						value.tblUsers.Add(this);
						this._UsrType = value.UserTypeID;
					}
					else
					{
						this._UsrType = default(int);
					}
					this.SendPropertyChanged("tblUserType");
				}
			}
		}
		
		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_tblLogs(tblLog entity)
		{
			this.SendPropertyChanging();
			entity.tblUser = this;
		}
		
		private void detach_tblLogs(tblLog entity)
		{
			this.SendPropertyChanging();
			entity.tblUser = null;
		}
		
		private void attach_tblRoomReserveds(tblRoomReserved entity)
		{
			this.SendPropertyChanging();
			entity.tblUser = this;
		}
		
		private void detach_tblRoomReserveds(tblRoomReserved entity)
		{
			this.SendPropertyChanging();
			entity.tblUser = null;
		}
		
		private void attach_tblRoomReserveds1(tblRoomReserved entity)
		{
			this.SendPropertyChanging();
			entity.tblUser1 = this;
		}
		
		private void detach_tblRoomReserveds1(tblRoomReserved entity)
		{
			this.SendPropertyChanging();
			entity.tblUser1 = null;
		}
		
		private void attach_tblRoomTahvils(tblRoomTahvil entity)
		{
			this.SendPropertyChanging();
			entity.tblUser = this;
		}
		
		private void detach_tblRoomTahvils(tblRoomTahvil entity)
		{
			this.SendPropertyChanging();
			entity.tblUser = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblLogs")]
	public partial class tblLog : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private decimal _RowLogID;
		
		private string _LogDescription;
		
		private System.Nullable<int> _UserID;
		
		private EntityRef<tblUser> _tblUser;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnRowLogIDChanging(decimal value);
    partial void OnRowLogIDChanged();
    partial void OnLogDescriptionChanging(string value);
    partial void OnLogDescriptionChanged();
    partial void OnUserIDChanging(System.Nullable<int> value);
    partial void OnUserIDChanged();
    #endregion
		
		public tblLog()
		{
			this._tblUser = default(EntityRef<tblUser>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RowLogID", AutoSync=AutoSync.OnInsert, DbType="Decimal(18,0) NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public decimal RowLogID
		{
			get
			{
				return this._RowLogID;
			}
			set
			{
				if ((this._RowLogID != value))
				{
					this.OnRowLogIDChanging(value);
					this.SendPropertyChanging();
					this._RowLogID = value;
					this.SendPropertyChanged("RowLogID");
					this.OnRowLogIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LogDescription", DbType="NVarChar(150)")]
		public string LogDescription
		{
			get
			{
				return this._LogDescription;
			}
			set
			{
				if ((this._LogDescription != value))
				{
					this.OnLogDescriptionChanging(value);
					this.SendPropertyChanging();
					this._LogDescription = value;
					this.SendPropertyChanged("LogDescription");
					this.OnLogDescriptionChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserID", DbType="Int")]
		public System.Nullable<int> UserID
		{
			get
			{
				return this._UserID;
			}
			set
			{
				if ((this._UserID != value))
				{
					if (this._tblUser.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.AssociationAttribute(Name="tblUser_tblLog", Storage="_tblUser", ThisKey="UserID", OtherKey="RowID", IsForeignKey=true, DeleteRule="CASCADE")]
		public tblUser tblUser
		{
			get
			{
				return this._tblUser.Entity;
			}
			set
			{
				tblUser previousValue = this._tblUser.Entity;
				if (((previousValue != value) 
							|| (this._tblUser.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblUser.Entity = null;
						previousValue.tblLogs.Remove(this);
					}
					this._tblUser.Entity = value;
					if ((value != null))
					{
						value.tblLogs.Add(this);
						this._UserID = value.RowID;
					}
					else
					{
						this._UserID = default(Nullable<int>);
					}
					this.SendPropertyChanged("tblUser");
				}
			}
		}
		
		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.tblHotelRooms")]
	public partial class tblHotelRoom : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _RoomID;
		
		private int _RoomTypeID;
		
		private int _BedQuantity;
		
		private decimal _PriceOfPerNight;
		
		private System.Nullable<bool> _ReservedBit;
		
		private System.Nullable<bool> _InUseBit;
		
		private System.Nullable<bool> _OutOfOrderBit;
		
		private string _NotesBen;
		
		private EntitySet<tblRoomReserved> _tblRoomReserveds;
		
		private EntitySet<tblRoomTahvil> _tblRoomTahvils;
		
		private EntityRef<tblRoomType> _tblRoomType;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnRoomIDChanging(int value);
    partial void OnRoomIDChanged();
    partial void OnRoomTypeIDChanging(int value);
    partial void OnRoomTypeIDChanged();
    partial void OnBedQuantityChanging(int value);
    partial void OnBedQuantityChanged();
    partial void OnPriceOfPerNightChanging(decimal value);
    partial void OnPriceOfPerNightChanged();
    partial void OnReservedBitChanging(System.Nullable<bool> value);
    partial void OnReservedBitChanged();
    partial void OnInUseBitChanging(System.Nullable<bool> value);
    partial void OnInUseBitChanged();
    partial void OnOutOfOrderBitChanging(System.Nullable<bool> value);
    partial void OnOutOfOrderBitChanged();
    partial void OnNotesBenChanging(string value);
    partial void OnNotesBenChanged();
    #endregion
		
		public tblHotelRoom()
		{
			this._tblRoomReserveds = new EntitySet<tblRoomReserved>(new Action<tblRoomReserved>(this.attach_tblRoomReserveds), new Action<tblRoomReserved>(this.detach_tblRoomReserveds));
			this._tblRoomTahvils = new EntitySet<tblRoomTahvil>(new Action<tblRoomTahvil>(this.attach_tblRoomTahvils), new Action<tblRoomTahvil>(this.detach_tblRoomTahvils));
			this._tblRoomType = default(EntityRef<tblRoomType>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int RoomID
		{
			get
			{
				return this._RoomID;
			}
			set
			{
				if ((this._RoomID != value))
				{
					this.OnRoomIDChanging(value);
					this.SendPropertyChanging();
					this._RoomID = value;
					this.SendPropertyChanged("RoomID");
					this.OnRoomIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomTypeID", DbType="Int NOT NULL")]
		public int RoomTypeID
		{
			get
			{
				return this._RoomTypeID;
			}
			set
			{
				if ((this._RoomTypeID != value))
				{
					if (this._tblRoomType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnRoomTypeIDChanging(value);
					this.SendPropertyChanging();
					this._RoomTypeID = value;
					this.SendPropertyChanged("RoomTypeID");
					this.OnRoomTypeIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BedQuantity", DbType="Int NOT NULL")]
		public int BedQuantity
		{
			get
			{
				return this._BedQuantity;
			}
			set
			{
				if ((this._BedQuantity != value))
				{
					this.OnBedQuantityChanging(value);
					this.SendPropertyChanging();
					this._BedQuantity = value;
					this.SendPropertyChanged("BedQuantity");
					this.OnBedQuantityChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PriceOfPerNight", DbType="Decimal(18,0) NOT NULL")]
		public decimal PriceOfPerNight
		{
			get
			{
				return this._PriceOfPerNight;
			}
			set
			{
				if ((this._PriceOfPerNight != value))
				{
					this.OnPriceOfPerNightChanging(value);
					this.SendPropertyChanging();
					this._PriceOfPerNight = value;
					this.SendPropertyChanged("PriceOfPerNight");
					this.OnPriceOfPerNightChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReservedBit", DbType="Bit")]
		public System.Nullable<bool> ReservedBit
		{
			get
			{
				return this._ReservedBit;
			}
			set
			{
				if ((this._ReservedBit != value))
				{
					this.OnReservedBitChanging(value);
					this.SendPropertyChanging();
					this._ReservedBit = value;
					this.SendPropertyChanged("ReservedBit");
					this.OnReservedBitChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InUseBit", DbType="Bit")]
		public System.Nullable<bool> InUseBit
		{
			get
			{
				return this._InUseBit;
			}
			set
			{
				if ((this._InUseBit != value))
				{
					this.OnInUseBitChanging(value);
					this.SendPropertyChanging();
					this._InUseBit = value;
					this.SendPropertyChanged("InUseBit");
					this.OnInUseBitChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OutOfOrderBit", DbType="Bit")]
		public System.Nullable<bool> OutOfOrderBit
		{
			get
			{
				return this._OutOfOrderBit;
			}
			set
			{
				if ((this._OutOfOrderBit != value))
				{
					this.OnOutOfOrderBitChanging(value);
					this.SendPropertyChanging();
					this._OutOfOrderBit = value;
					this.SendPropertyChanged("OutOfOrderBit");
					this.OnOutOfOrderBitChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NotesBen", DbType="NVarChar(250)")]
		public string NotesBen
		{
			get
			{
				return this._NotesBen;
			}
			set
			{
				if ((this._NotesBen != value))
				{
					this.OnNotesBenChanging(value);
					this.SendPropertyChanging();
					this._NotesBen = value;
					this.SendPropertyChanged("NotesBen");
					this.OnNotesBenChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblHotelRoom_tblRoomReserved", Storage="_tblRoomReserveds", ThisKey="RoomID", OtherKey="RoomID")]
		public EntitySet<tblRoomReserved> tblRoomReserveds
		{
			get
			{
				return this._tblRoomReserveds;
			}
			set
			{
				this._tblRoomReserveds.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblHotelRoom_tblRoomTahvil", Storage="_tblRoomTahvils", ThisKey="RoomID", OtherKey="RoomID")]
		public EntitySet<tblRoomTahvil> tblRoomTahvils
		{
			get
			{
				return this._tblRoomTahvils;
			}
			set
			{
				this._tblRoomTahvils.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblRoomType_tblHotelRoom", Storage="_tblRoomType", ThisKey="RoomTypeID", OtherKey="RoomTypeID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblRoomType tblRoomType
		{
			get
			{
				return this._tblRoomType.Entity;
			}
			set
			{
				tblRoomType previousValue = this._tblRoomType.Entity;
				if (((previousValue != value) 
							|| (this._tblRoomType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblRoomType.Entity = null;
						previousValue.tblHotelRooms.Remove(this);
					}
					this._tblRoomType.Entity = value;
					if ((value != null))
					{
						value.tblHotelRooms.Add(this);
						this._RoomTypeID = value.RoomTypeID;
					}
					else
					{
						this._RoomTypeID = default(int);
					}
					this.SendPropertyChanged("tblRoomType");
				}
			}
		}
		
		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_tblRoomReserveds(tblRoomReserved entity)
		{
			this.SendPropertyChanging();
			entity.tblHotelRoom = this;
		}
		
		private void detach_tblRoomReserveds(tblRoomReserved entity)
		{
			this.SendPropertyChanging();
			entity.tblHotelRoom = null;
		}
		
		private void attach_tblRoomTahvils(tblRoomTahvil entity)
		{
			this.SendPropertyChanging();
			entity.tblHotelRoom = this;
		}
		
		private void detach_tblRoomTahvils(tblRoomTahvil entity)
		{
			this.SendPropertyChanging();
			entity.tblHotelRoom = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblRoomTypes")]
	public partial class tblRoomType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _RoomTypeID;
		
		private string _RoomTypeDescription;
		
		private EntitySet<tblHotelRoom> _tblHotelRooms;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnRoomTypeIDChanging(int value);
    partial void OnRoomTypeIDChanged();
    partial void OnRoomTypeDescriptionChanging(string value);
    partial void OnRoomTypeDescriptionChanged();
    #endregion
		
		public tblRoomType()
		{
			this._tblHotelRooms = new EntitySet<tblHotelRoom>(new Action<tblHotelRoom>(this.attach_tblHotelRooms), new Action<tblHotelRoom>(this.detach_tblHotelRooms));
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomTypeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int RoomTypeID
		{
			get
			{
				return this._RoomTypeID;
			}
			set
			{
				if ((this._RoomTypeID != value))
				{
					this.OnRoomTypeIDChanging(value);
					this.SendPropertyChanging();
					this._RoomTypeID = value;
					this.SendPropertyChanged("RoomTypeID");
					this.OnRoomTypeIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomTypeDescription", DbType="NVarChar(100)")]
		public string RoomTypeDescription
		{
			get
			{
				return this._RoomTypeDescription;
			}
			set
			{
				if ((this._RoomTypeDescription != value))
				{
					this.OnRoomTypeDescriptionChanging(value);
					this.SendPropertyChanging();
					this._RoomTypeDescription = value;
					this.SendPropertyChanged("RoomTypeDescription");
					this.OnRoomTypeDescriptionChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblRoomType_tblHotelRoom", Storage="_tblHotelRooms", ThisKey="RoomTypeID", OtherKey="RoomTypeID")]
		public EntitySet<tblHotelRoom> tblHotelRooms
		{
			get
			{
				return this._tblHotelRooms;
			}
			set
			{
				this._tblHotelRooms.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_tblHotelRooms(tblHotelRoom entity)
		{
			this.SendPropertyChanging();
			entity.tblRoomType = this;
		}
		
		private void detach_tblHotelRooms(tblHotelRoom entity)
		{
			this.SendPropertyChanging();
			entity.tblRoomType = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblRoomReserved")]
	public partial class tblRoomReserved : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _ReserveID;
		
		private int _RoomID;
		
		private int _CustomerID;
		
		private int _OperatorID;
		
		private string _ReserveDate;
		
		private EntityRef<tblHotelRoom> _tblHotelRoom;
		
		private EntityRef<tblUser> _tblUser;
		
		private EntityRef<tblUser> _tblUser1;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnReserveIDChanging(int value);
    partial void OnReserveIDChanged();
    partial void OnRoomIDChanging(int value);
    partial void OnRoomIDChanged();
    partial void OnCustomerIDChanging(int value);
    partial void OnCustomerIDChanged();
    partial void OnOperatorIDChanging(int value);
    partial void OnOperatorIDChanged();
    partial void OnReserveDateChanging(string value);
    partial void OnReserveDateChanged();
    #endregion
		
		public tblRoomReserved()
		{
			this._tblHotelRoom = default(EntityRef<tblHotelRoom>);
			this._tblUser = default(EntityRef<tblUser>);
			this._tblUser1 = default(EntityRef<tblUser>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReserveID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int ReserveID
		{
			get
			{
				return this._ReserveID;
			}
			set
			{
				if ((this._ReserveID != value))
				{
					this.OnReserveIDChanging(value);
					this.SendPropertyChanging();
					this._ReserveID = value;
					this.SendPropertyChanged("ReserveID");
					this.OnReserveIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomID", DbType="Int NOT NULL")]
		public int RoomID
		{
			get
			{
				return this._RoomID;
			}
			set
			{
				if ((this._RoomID != value))
				{
					if (this._tblHotelRoom.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnRoomIDChanging(value);
					this.SendPropertyChanging();
					this._RoomID = value;
					this.SendPropertyChanged("RoomID");
					this.OnRoomIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerID", DbType="Int NOT NULL")]
		public int CustomerID
		{
			get
			{
				return this._CustomerID;
			}
			set
			{
				if ((this._CustomerID != value))
				{
					if (this._tblUser.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnCustomerIDChanging(value);
					this.SendPropertyChanging();
					this._CustomerID = value;
					this.SendPropertyChanged("CustomerID");
					this.OnCustomerIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OperatorID", DbType="Int NOT NULL")]
		public int OperatorID
		{
			get
			{
				return this._OperatorID;
			}
			set
			{
				if ((this._OperatorID != value))
				{
					if (this._tblUser1.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnOperatorIDChanging(value);
					this.SendPropertyChanging();
					this._OperatorID = value;
					this.SendPropertyChanged("OperatorID");
					this.OnOperatorIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReserveDate", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
		public string ReserveDate
		{
			get
			{
				return this._ReserveDate;
			}
			set
			{
				if ((this._ReserveDate != value))
				{
					this.OnReserveDateChanging(value);
					this.SendPropertyChanging();
					this._ReserveDate = value;
					this.SendPropertyChanged("ReserveDate");
					this.OnReserveDateChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblHotelRoom_tblRoomReserved", Storage="_tblHotelRoom", ThisKey="RoomID", OtherKey="RoomID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblHotelRoom tblHotelRoom
		{
			get
			{
				return this._tblHotelRoom.Entity;
			}
			set
			{
				tblHotelRoom previousValue = this._tblHotelRoom.Entity;
				if (((previousValue != value) 
							|| (this._tblHotelRoom.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblHotelRoom.Entity = null;
						previousValue.tblRoomReserveds.Remove(this);
					}
					this._tblHotelRoom.Entity = value;
					if ((value != null))
					{
						value.tblRoomReserveds.Add(this);
						this._RoomID = value.RoomID;
					}
					else
					{
						this._RoomID = default(int);
					}
					this.SendPropertyChanged("tblHotelRoom");
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUser_tblRoomReserved", Storage="_tblUser", ThisKey="CustomerID", OtherKey="RowID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblUser tblUser
		{
			get
			{
				return this._tblUser.Entity;
			}
			set
			{
				tblUser previousValue = this._tblUser.Entity;
				if (((previousValue != value) 
							|| (this._tblUser.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblUser.Entity = null;
						previousValue.tblRoomReserveds.Remove(this);
					}
					this._tblUser.Entity = value;
					if ((value != null))
					{
						value.tblRoomReserveds.Add(this);
						this._CustomerID = value.RowID;
					}
					else
					{
						this._CustomerID = default(int);
					}
					this.SendPropertyChanged("tblUser");
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUser_tblRoomReserved1", Storage="_tblUser1", ThisKey="OperatorID", OtherKey="RowID", IsForeignKey=true)]
		public tblUser tblUser1
		{
			get
			{
				return this._tblUser1.Entity;
			}
			set
			{
				tblUser previousValue = this._tblUser1.Entity;
				if (((previousValue != value) 
							|| (this._tblUser1.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblUser1.Entity = null;
						previousValue.tblRoomReserveds1.Remove(this);
					}
					this._tblUser1.Entity = value;
					if ((value != null))
					{
						value.tblRoomReserveds1.Add(this);
						this._OperatorID = value.RowID;
					}
					else
					{
						this._OperatorID = default(int);
					}
					this.SendPropertyChanged("tblUser1");
				}
			}
		}
		
		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.tblRoomTahvil")]
	public partial class tblRoomTahvil : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private long _TahvilID;
		
		private int _CustomerID;
		
		private int _RoomID;
		
		private string _EnterDateSh;
		
		private string _ExitDateSh;
		
		private System.Nullable<System.DateTime> _EnterDateMiladi;
		
		private System.Nullable<System.DateTime> _ExitDateMiladi;
		
		private System.Nullable<decimal> _PricePerNight;
		
		private System.Nullable<decimal> _KhorakiGaza;
		
		private System.Nullable<decimal> _VarzeshiSargarmi;
		
		private System.Nullable<decimal> _OtherService;
		
		private System.Nullable<decimal> _Takhfif;
		
		private System.Nullable<decimal> _TotalEgamatPrice;
		
		private System.Nullable<decimal> _TotalPrice;
		
		private System.Nullable<bool> _TasviehBit;
		
		private EntityRef<tblHotelRoom> _tblHotelRoom;
		
		private EntityRef<tblUser> _tblUser;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnTahvilIDChanging(long value);
    partial void OnTahvilIDChanged();
    partial void OnCustomerIDChanging(int value);
    partial void OnCustomerIDChanged();
    partial void OnRoomIDChanging(int value);
    partial void OnRoomIDChanged();
    partial void OnEnterDateShChanging(string value);
    partial void OnEnterDateShChanged();
    partial void OnExitDateShChanging(string value);
    partial void OnExitDateShChanged();
    partial void OnEnterDateMiladiChanging(System.Nullable<System.DateTime> value);
    partial void OnEnterDateMiladiChanged();
    partial void OnExitDateMiladiChanging(System.Nullable<System.DateTime> value);
    partial void OnExitDateMiladiChanged();
    partial void OnPricePerNightChanging(System.Nullable<decimal> value);
    partial void OnPricePerNightChanged();
    partial void OnKhorakiGazaChanging(System.Nullable<decimal> value);
    partial void OnKhorakiGazaChanged();
    partial void OnVarzeshiSargarmiChanging(System.Nullable<decimal> value);
    partial void OnVarzeshiSargarmiChanged();
    partial void OnOtherServiceChanging(System.Nullable<decimal> value);
    partial void OnOtherServiceChanged();
    partial void OnTakhfifChanging(System.Nullable<decimal> value);
    partial void OnTakhfifChanged();
    partial void OnTotalEgamatPriceChanging(System.Nullable<decimal> value);
    partial void OnTotalEgamatPriceChanged();
    partial void OnTotalPriceChanging(System.Nullable<decimal> value);
    partial void OnTotalPriceChanged();
    partial void OnTasviehBitChanging(System.Nullable<bool> value);
    partial void OnTasviehBitChanged();
    #endregion
		
		public tblRoomTahvil()
		{
			this._tblHotelRoom = default(EntityRef<tblHotelRoom>);
			this._tblUser = default(EntityRef<tblUser>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TahvilID", AutoSync=AutoSync.Always, DbType="BigInt NOT NULL IDENTITY", IsDbGenerated=true)]
		public long TahvilID
		{
			get
			{
				return this._TahvilID;
			}
			set
			{
				if ((this._TahvilID != value))
				{
					this.OnTahvilIDChanging(value);
					this.SendPropertyChanging();
					this._TahvilID = value;
					this.SendPropertyChanged("TahvilID");
					this.OnTahvilIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerID", DbType="Int NOT NULL", IsPrimaryKey=true)]
		public int CustomerID
		{
			get
			{
				return this._CustomerID;
			}
			set
			{
				if ((this._CustomerID != value))
				{
					if (this._tblUser.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnCustomerIDChanging(value);
					this.SendPropertyChanging();
					this._CustomerID = value;
					this.SendPropertyChanged("CustomerID");
					this.OnCustomerIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomID", DbType="Int NOT NULL", IsPrimaryKey=true)]
		public int RoomID
		{
			get
			{
				return this._RoomID;
			}
			set
			{
				if ((this._RoomID != value))
				{
					if (this._tblHotelRoom.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnRoomIDChanging(value);
					this.SendPropertyChanging();
					this._RoomID = value;
					this.SendPropertyChanged("RoomID");
					this.OnRoomIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EnterDateSh", DbType="NVarChar(10) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
		public string EnterDateSh
		{
			get
			{
				return this._EnterDateSh;
			}
			set
			{
				if ((this._EnterDateSh != value))
				{
					this.OnEnterDateShChanging(value);
					this.SendPropertyChanging();
					this._EnterDateSh = value;
					this.SendPropertyChanged("EnterDateSh");
					this.OnEnterDateShChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExitDateSh", DbType="NVarChar(10)")]
		public string ExitDateSh
		{
			get
			{
				return this._ExitDateSh;
			}
			set
			{
				if ((this._ExitDateSh != value))
				{
					this.OnExitDateShChanging(value);
					this.SendPropertyChanging();
					this._ExitDateSh = value;
					this.SendPropertyChanged("ExitDateSh");
					this.OnExitDateShChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EnterDateMiladi", DbType="DateTime")]
		public System.Nullable<System.DateTime> EnterDateMiladi
		{
			get
			{
				return this._EnterDateMiladi;
			}
			set
			{
				if ((this._EnterDateMiladi != value))
				{
					this.OnEnterDateMiladiChanging(value);
					this.SendPropertyChanging();
					this._EnterDateMiladi = value;
					this.SendPropertyChanged("EnterDateMiladi");
					this.OnEnterDateMiladiChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExitDateMiladi", DbType="DateTime")]
		public System.Nullable<System.DateTime> ExitDateMiladi
		{
			get
			{
				return this._ExitDateMiladi;
			}
			set
			{
				if ((this._ExitDateMiladi != value))
				{
					this.OnExitDateMiladiChanging(value);
					this.SendPropertyChanging();
					this._ExitDateMiladi = value;
					this.SendPropertyChanged("ExitDateMiladi");
					this.OnExitDateMiladiChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PricePerNight", DbType="Decimal(18,0)")]
		public System.Nullable<decimal> PricePerNight
		{
			get
			{
				return this._PricePerNight;
			}
			set
			{
				if ((this._PricePerNight != value))
				{
					this.OnPricePerNightChanging(value);
					this.SendPropertyChanging();
					this._PricePerNight = value;
					this.SendPropertyChanged("PricePerNight");
					this.OnPricePerNightChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KhorakiGaza", DbType="Decimal(18,0)")]
		public System.Nullable<decimal> KhorakiGaza
		{
			get
			{
				return this._KhorakiGaza;
			}
			set
			{
				if ((this._KhorakiGaza != value))
				{
					this.OnKhorakiGazaChanging(value);
					this.SendPropertyChanging();
					this._KhorakiGaza = value;
					this.SendPropertyChanged("KhorakiGaza");
					this.OnKhorakiGazaChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VarzeshiSargarmi", DbType="Decimal(18,0)")]
		public System.Nullable<decimal> VarzeshiSargarmi
		{
			get
			{
				return this._VarzeshiSargarmi;
			}
			set
			{
				if ((this._VarzeshiSargarmi != value))
				{
					this.OnVarzeshiSargarmiChanging(value);
					this.SendPropertyChanging();
					this._VarzeshiSargarmi = value;
					this.SendPropertyChanged("VarzeshiSargarmi");
					this.OnVarzeshiSargarmiChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherService", DbType="Decimal(18,0)")]
		public System.Nullable<decimal> OtherService
		{
			get
			{
				return this._OtherService;
			}
			set
			{
				if ((this._OtherService != value))
				{
					this.OnOtherServiceChanging(value);
					this.SendPropertyChanging();
					this._OtherService = value;
					this.SendPropertyChanged("OtherService");
					this.OnOtherServiceChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Takhfif", DbType="Decimal(18,0)")]
		public System.Nullable<decimal> Takhfif
		{
			get
			{
				return this._Takhfif;
			}
			set
			{
				if ((this._Takhfif != value))
				{
					this.OnTakhfifChanging(value);
					this.SendPropertyChanging();
					this._Takhfif = value;
					this.SendPropertyChanged("Takhfif");
					this.OnTakhfifChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalEgamatPrice", DbType="Decimal(18,0)")]
		public System.Nullable<decimal> TotalEgamatPrice
		{
			get
			{
				return this._TotalEgamatPrice;
			}
			set
			{
				if ((this._TotalEgamatPrice != value))
				{
					this.OnTotalEgamatPriceChanging(value);
					this.SendPropertyChanging();
					this._TotalEgamatPrice = value;
					this.SendPropertyChanged("TotalEgamatPrice");
					this.OnTotalEgamatPriceChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalPrice", DbType="Decimal(18,0)")]
		public System.Nullable<decimal> TotalPrice
		{
			get
			{
				return this._TotalPrice;
			}
			set
			{
				if ((this._TotalPrice != value))
				{
					this.OnTotalPriceChanging(value);
					this.SendPropertyChanging();
					this._TotalPrice = value;
					this.SendPropertyChanged("TotalPrice");
					this.OnTotalPriceChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TasviehBit", DbType="Bit")]
		public System.Nullable<bool> TasviehBit
		{
			get
			{
				return this._TasviehBit;
			}
			set
			{
				if ((this._TasviehBit != value))
				{
					this.OnTasviehBitChanging(value);
					this.SendPropertyChanging();
					this._TasviehBit = value;
					this.SendPropertyChanged("TasviehBit");
					this.OnTasviehBitChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblHotelRoom_tblRoomTahvil", Storage="_tblHotelRoom", ThisKey="RoomID", OtherKey="RoomID", IsForeignKey=true)]
		public tblHotelRoom tblHotelRoom
		{
			get
			{
				return this._tblHotelRoom.Entity;
			}
			set
			{
				tblHotelRoom previousValue = this._tblHotelRoom.Entity;
				if (((previousValue != value) 
							|| (this._tblHotelRoom.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblHotelRoom.Entity = null;
						previousValue.tblRoomTahvils.Remove(this);
					}
					this._tblHotelRoom.Entity = value;
					if ((value != null))
					{
						value.tblRoomTahvils.Add(this);
						this._RoomID = value.RoomID;
					}
					else
					{
						this._RoomID = default(int);
					}
					this.SendPropertyChanged("tblHotelRoom");
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUser_tblRoomTahvil", Storage="_tblUser", ThisKey="CustomerID", OtherKey="RowID", IsForeignKey=true)]
		public tblUser tblUser
		{
			get
			{
				return this._tblUser.Entity;
			}
			set
			{
				tblUser previousValue = this._tblUser.Entity;
				if (((previousValue != value) 
							|| (this._tblUser.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblUser.Entity = null;
						previousValue.tblRoomTahvils.Remove(this);
					}
					this._tblUser.Entity = value;
					if ((value != null))
					{
						value.tblRoomTahvils.Add(this);
						this._CustomerID = value.RowID;
					}
					else
					{
						this._CustomerID = default(int);
					}
					this.SendPropertyChanged("tblUser");
				}
			}
		}
		
		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));
			}
		}
	}
}
#pragma warning restore 1591
