#pragma warning disable 1591
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.21006.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace StockholmLibrary.Data
{
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="stockholm_db")]
public partial class StockholmDbDataContext : System.Data.Linq.DataContext
{
private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
#region Extensibility Method Definitions
partial void OnCreated();
partial void InsertBadge(Badge instance);
partial void UpdateBadge(Badge instance);
partial void DeleteBadge(Badge instance);
partial void InsertVoucher(Voucher instance);
partial void UpdateVoucher(Voucher instance);
partial void DeleteVoucher(Voucher instance);
partial void InsertFurni(Furni instance);
partial void UpdateFurni(Furni instance);
partial void DeleteFurni(Furni instance);
partial void InsertFurniDefinition(FurniDefinition instance);
partial void UpdateFurniDefinition(FurniDefinition instance);
partial void DeleteFurniDefinition(FurniDefinition instance);
partial void InsertPhysicsObject(PhysicsObject instance);
partial void UpdatePhysicsObject(PhysicsObject instance);
partial void DeletePhysicsObject(PhysicsObject instance);
partial void InsertRoleAccess(RoleAccess instance);
partial void UpdateRoleAccess(RoleAccess instance);
partial void DeleteRoleAccess(RoleAccess instance);
partial void InsertRole(Role instance);
partial void UpdateRole(Role instance);
partial void DeleteRole(Role instance);
partial void InsertRoomCategory(RoomCategory instance);
partial void UpdateRoomCategory(RoomCategory instance);
partial void DeleteRoomCategory(RoomCategory instance);
partial void InsertRoomModel(RoomModel instance);
partial void UpdateRoomModel(RoomModel instance);
partial void DeleteRoomModel(RoomModel instance);
partial void InsertRoom(Room instance);
partial void UpdateRoom(Room instance);
partial void DeleteRoom(Room instance);
partial void InsertRoomState(RoomState instance);
partial void UpdateRoomState(RoomState instance);
partial void DeleteRoomState(RoomState instance);
partial void InsertSetting(Setting instance);
partial void UpdateSetting(Setting instance);
partial void DeleteSetting(Setting instance);
partial void InsertUser(User instance);
partial void UpdateUser(User instance);
partial void DeleteUser(User instance);
#endregion
public StockholmDbDataContext() :
base(global::StockholmLibrary.Properties.Settings.Default.stockholm_dbConnectionString, mappingSource)
{
OnCreated();
}
public StockholmDbDataContext(string connection) :
base(connection, mappingSource)
{
OnCreated();
}
public StockholmDbDataContext(System.Data.IDbConnection connection) :
base(connection, mappingSource)
{
OnCreated();
}
public StockholmDbDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public StockholmDbDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public System.Data.Linq.Table Badges
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Vouchers
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Furnis
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table FurniDefinitions
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table PhysicsObjects
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table RoleAccesses
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Roles
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table RoomCategories
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table RoomModels
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Rooms
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table RoomStates
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Settings
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Users
{
get
{
return this.GetTable();
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Badges")]
public partial class Badge : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _BadgeID;
private string _BadgeName;
private int _RoleID;
private EntityRef _Role;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnBadgeIDChanging(int value);
partial void OnBadgeIDChanged();
partial void OnBadgeNameChanging(string value);
partial void OnBadgeNameChanged();
partial void OnRoleIDChanging(int value);
partial void OnRoleIDChanged();
#endregion
public Badge()
{
this._Role = default(EntityRef);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BadgeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int BadgeID
{
get
{
return this._BadgeID;
}
set
{
if ((this._BadgeID != value))
{
this.OnBadgeIDChanging(value);
this.SendPropertyChanging();
this._BadgeID = value;
this.SendPropertyChanged("BadgeID");
this.OnBadgeIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BadgeName", DbType="VarChar(10) NOT NULL", CanBeNull=false)]
public string BadgeName
{
get
{
return this._BadgeName;
}
set
{
if ((this._BadgeName != value))
{
this.OnBadgeNameChanging(value);
this.SendPropertyChanging();
this._BadgeName = value;
this.SendPropertyChanged("BadgeName");
this.OnBadgeNameChanged();
}
}
}
[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._Role.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.AssociationAttribute(Name="Role_Badge", Storage="_Role", ThisKey="RoleID", OtherKey="RoleID", IsForeignKey=true)]
public Role Role
{
get
{
return this._Role.Entity;
}
set
{
Role previousValue = this._Role.Entity;
if (((previousValue != value)
|| (this._Role.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Role.Entity = null;
previousValue.Badges.Remove(this);
}
this._Role.Entity = value;
if ((value != null))
{
value.Badges.Add(this);
this._RoleID = value.RoleID;
}
else
{
this._RoleID = default(int);
}
this.SendPropertyChanged("Role");
}
}
}
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.Vouchers")]
public partial class Voucher : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _Code;
private string _PayloadType;
private string _Payload;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnCodeChanging(string value);
partial void OnCodeChanged();
partial void OnPayloadTypeChanging(string value);
partial void OnPayloadTypeChanged();
partial void OnPayloadChanging(string value);
partial void OnPayloadChanged();
#endregion
public Voucher()
{
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", DbType="VarChar(15) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string Code
{
get
{
return this._Code;
}
set
{
if ((this._Code != value))
{
this.OnCodeChanging(value);
this.SendPropertyChanging();
this._Code = value;
this.SendPropertyChanged("Code");
this.OnCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PayloadType", DbType="VarChar(10) NOT NULL", CanBeNull=false)]
public string PayloadType
{
get
{
return this._PayloadType;
}
set
{
if ((this._PayloadType != value))
{
this.OnPayloadTypeChanging(value);
this.SendPropertyChanging();
this._PayloadType = value;
this.SendPropertyChanged("PayloadType");
this.OnPayloadTypeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Payload", DbType="VarChar(30) NOT NULL", CanBeNull=false)]
public string Payload
{
get
{
return this._Payload;
}
set
{
if ((this._Payload != value))
{
this.OnPayloadChanging(value);
this.SendPropertyChanging();
this._Payload = value;
this.SendPropertyChanged("Payload");
this.OnPayloadChanged();
}
}
}
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.Furni")]
public partial class Furni : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _FurniID;
private int _DefinitionID;
private System.Nullable _RoomID;
private System.Nullable _PositionX;
private System.Nullable _PositionY;
private System.Nullable _PositionZ;
private System.Nullable _Orientation;
private System.Nullable _OwnerID;
private EntityRef _Furni2;
private EntityRef _Furni1;
private EntityRef _FurniDefinition;
private EntityRef _Room;
private EntityRef _User;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnFurniIDChanging(int value);
partial void OnFurniIDChanged();
partial void OnDefinitionIDChanging(int value);
partial void OnDefinitionIDChanged();
partial void OnRoomIDChanging(System.Nullable value);
partial void OnRoomIDChanged();
partial void OnPositionXChanging(System.Nullable value);
partial void OnPositionXChanged();
partial void OnPositionYChanging(System.Nullable value);
partial void OnPositionYChanged();
partial void OnPositionZChanging(System.Nullable value);
partial void OnPositionZChanged();
partial void OnOrientationChanging(System.Nullable value);
partial void OnOrientationChanged();
partial void OnOwnerIDChanging(System.Nullable value);
partial void OnOwnerIDChanged();
#endregion
public Furni()
{
this._Furni2 = default(EntityRef);
this._Furni1 = default(EntityRef);
this._FurniDefinition = default(EntityRef);
this._Room = default(EntityRef);
this._User = default(EntityRef);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FurniID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int FurniID
{
get
{
return this._FurniID;
}
set
{
if ((this._FurniID != value))
{
if (this._Furni1.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnFurniIDChanging(value);
this.SendPropertyChanging();
this._FurniID = value;
this.SendPropertyChanged("FurniID");
this.OnFurniIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DefinitionID", DbType="Int NOT NULL")]
public int DefinitionID
{
get
{
return this._DefinitionID;
}
set
{
if ((this._DefinitionID != value))
{
if (this._FurniDefinition.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnDefinitionIDChanging(value);
this.SendPropertyChanging();
this._DefinitionID = value;
this.SendPropertyChanged("DefinitionID");
this.OnDefinitionIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomID", DbType="Int")]
public System.Nullable RoomID
{
get
{
return this._RoomID;
}
set
{
if ((this._RoomID != value))
{
if (this._Room.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="_PositionX", DbType="Int")]
public System.Nullable PositionX
{
get
{
return this._PositionX;
}
set
{
if ((this._PositionX != value))
{
this.OnPositionXChanging(value);
this.SendPropertyChanging();
this._PositionX = value;
this.SendPropertyChanged("PositionX");
this.OnPositionXChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PositionY", DbType="Int")]
public System.Nullable PositionY
{
get
{
return this._PositionY;
}
set
{
if ((this._PositionY != value))
{
this.OnPositionYChanging(value);
this.SendPropertyChanging();
this._PositionY = value;
this.SendPropertyChanged("PositionY");
this.OnPositionYChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PositionZ", DbType="Float")]
public System.Nullable PositionZ
{
get
{
return this._PositionZ;
}
set
{
if ((this._PositionZ != value))
{
this.OnPositionZChanging(value);
this.SendPropertyChanging();
this._PositionZ = value;
this.SendPropertyChanged("PositionZ");
this.OnPositionZChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Orientation", DbType="Int")]
public System.Nullable Orientation
{
get
{
return this._Orientation;
}
set
{
if ((this._Orientation != value))
{
this.OnOrientationChanging(value);
this.SendPropertyChanging();
this._Orientation = value;
this.SendPropertyChanged("Orientation");
this.OnOrientationChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerID", DbType="Int")]
public System.Nullable OwnerID
{
get
{
return this._OwnerID;
}
set
{
if ((this._OwnerID != value))
{
if (this._User.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnOwnerIDChanging(value);
this.SendPropertyChanging();
this._OwnerID = value;
this.SendPropertyChanged("OwnerID");
this.OnOwnerIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Furni_Furni", Storage="_Furni2", ThisKey="FurniID", OtherKey="FurniID", IsUnique=true, IsForeignKey=false)]
public Furni Furni2
{
get
{
return this._Furni2.Entity;
}
set
{
Furni previousValue = this._Furni2.Entity;
if (((previousValue != value)
|| (this._Furni2.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Furni2.Entity = null;
previousValue.Furni1 = null;
}
this._Furni2.Entity = value;
if ((value != null))
{
value.Furni1 = this;
}
this.SendPropertyChanged("Furni2");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Furni_Furni", Storage="_Furni1", ThisKey="FurniID", OtherKey="FurniID", IsForeignKey=true)]
public Furni Furni1
{
get
{
return this._Furni1.Entity;
}
set
{
Furni previousValue = this._Furni1.Entity;
if (((previousValue != value)
|| (this._Furni1.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Furni1.Entity = null;
previousValue.Furni2 = null;
}
this._Furni1.Entity = value;
if ((value != null))
{
value.Furni2 = this;
this._FurniID = value.FurniID;
}
else
{
this._FurniID = default(int);
}
this.SendPropertyChanged("Furni1");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FurniDefinition_Furni", Storage="_FurniDefinition", ThisKey="DefinitionID", OtherKey="DefinitionID", IsForeignKey=true)]
public FurniDefinition FurniDefinition
{
get
{
return this._FurniDefinition.Entity;
}
set
{
FurniDefinition previousValue = this._FurniDefinition.Entity;
if (((previousValue != value)
|| (this._FurniDefinition.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._FurniDefinition.Entity = null;
previousValue.Furnis.Remove(this);
}
this._FurniDefinition.Entity = value;
if ((value != null))
{
value.Furnis.Add(this);
this._DefinitionID = value.DefinitionID;
}
else
{
this._DefinitionID = default(int);
}
this.SendPropertyChanged("FurniDefinition");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Room_Furni", Storage="_Room", ThisKey="RoomID", OtherKey="RoomID", IsForeignKey=true)]
public Room Room
{
get
{
return this._Room.Entity;
}
set
{
Room previousValue = this._Room.Entity;
if (((previousValue != value)
|| (this._Room.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Room.Entity = null;
previousValue.Furnis.Remove(this);
}
this._Room.Entity = value;
if ((value != null))
{
value.Furnis.Add(this);
this._RoomID = value.RoomID;
}
else
{
this._RoomID = default(Nullable);
}
this.SendPropertyChanged("Room");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_Furni", Storage="_User", ThisKey="OwnerID", OtherKey="UserID", IsForeignKey=true)]
public User User
{
get
{
return this._User.Entity;
}
set
{
User previousValue = this._User.Entity;
if (((previousValue != value)
|| (this._User.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._User.Entity = null;
previousValue.Furnis.Remove(this);
}
this._User.Entity = value;
if ((value != null))
{
value.Furnis.Add(this);
this._OwnerID = value.UserID;
}
else
{
this._OwnerID = default(Nullable);
}
this.SendPropertyChanged("User");
}
}
}
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.FurniDefinitions")]
public partial class FurniDefinition : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _DefinitionID;
private int _PhysicsObjectID;
private string _Sprite;
private string _Colour;
private bool _CanBeTraded;
private int _FurniType;
private EntitySet _Furnis;
private EntityRef _PhysicsObject;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnDefinitionIDChanging(int value);
partial void OnDefinitionIDChanged();
partial void OnPhysicsObjectIDChanging(int value);
partial void OnPhysicsObjectIDChanged();
partial void OnSpriteChanging(string value);
partial void OnSpriteChanged();
partial void OnColourChanging(string value);
partial void OnColourChanged();
partial void OnCanBeTradedChanging(bool value);
partial void OnCanBeTradedChanged();
partial void OnFurniTypeChanging(int value);
partial void OnFurniTypeChanged();
#endregion
public FurniDefinition()
{
this._Furnis = new EntitySet(new Action(this.attach_Furnis), new Action(this.detach_Furnis));
this._PhysicsObject = default(EntityRef);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DefinitionID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int DefinitionID
{
get
{
return this._DefinitionID;
}
set
{
if ((this._DefinitionID != value))
{
this.OnDefinitionIDChanging(value);
this.SendPropertyChanging();
this._DefinitionID = value;
this.SendPropertyChanged("DefinitionID");
this.OnDefinitionIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PhysicsObjectID", DbType="Int NOT NULL")]
public int PhysicsObjectID
{
get
{
return this._PhysicsObjectID;
}
set
{
if ((this._PhysicsObjectID != value))
{
if (this._PhysicsObject.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnPhysicsObjectIDChanging(value);
this.SendPropertyChanging();
this._PhysicsObjectID = value;
this.SendPropertyChanged("PhysicsObjectID");
this.OnPhysicsObjectIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sprite", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
public string Sprite
{
get
{
return this._Sprite;
}
set
{
if ((this._Sprite != value))
{
this.OnSpriteChanging(value);
this.SendPropertyChanging();
this._Sprite = value;
this.SendPropertyChanged("Sprite");
this.OnSpriteChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Colour", DbType="NVarChar(100)")]
public string Colour
{
get
{
return this._Colour;
}
set
{
if ((this._Colour != value))
{
this.OnColourChanging(value);
this.SendPropertyChanging();
this._Colour = value;
this.SendPropertyChanged("Colour");
this.OnColourChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanBeTraded", DbType="Bit NOT NULL")]
public bool CanBeTraded
{
get
{
return this._CanBeTraded;
}
set
{
if ((this._CanBeTraded != value))
{
this.OnCanBeTradedChanging(value);
this.SendPropertyChanging();
this._CanBeTraded = value;
this.SendPropertyChanged("CanBeTraded");
this.OnCanBeTradedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FurniType", DbType="Int NOT NULL")]
public int FurniType
{
get
{
return this._FurniType;
}
set
{
if ((this._FurniType != value))
{
this.OnFurniTypeChanging(value);
this.SendPropertyChanging();
this._FurniType = value;
this.SendPropertyChanged("FurniType");
this.OnFurniTypeChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FurniDefinition_Furni", Storage="_Furnis", ThisKey="DefinitionID", OtherKey="DefinitionID")]
public EntitySet Furnis
{
get
{
return this._Furnis;
}
set
{
this._Furnis.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PhysicsObject_FurniDefinition", Storage="_PhysicsObject", ThisKey="PhysicsObjectID", OtherKey="PhysicsID", IsForeignKey=true)]
public PhysicsObject PhysicsObject
{
get
{
return this._PhysicsObject.Entity;
}
set
{
PhysicsObject previousValue = this._PhysicsObject.Entity;
if (((previousValue != value)
|| (this._PhysicsObject.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PhysicsObject.Entity = null;
previousValue.FurniDefinitions.Remove(this);
}
this._PhysicsObject.Entity = value;
if ((value != null))
{
value.FurniDefinitions.Add(this);
this._PhysicsObjectID = value.PhysicsID;
}
else
{
this._PhysicsObjectID = default(int);
}
this.SendPropertyChanged("PhysicsObject");
}
}
}
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_Furnis(Furni entity)
{
this.SendPropertyChanging();
entity.FurniDefinition = this;
}
private void detach_Furnis(Furni entity)
{
this.SendPropertyChanging();
entity.FurniDefinition = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PhysicsObjects")]
public partial class PhysicsObject : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _PhysicsID;
private string _PhysicsName;
private int _Width;
private int _Length;
private double _Height;
private double _ActionHeight;
private bool _IsPathable;
private EntitySet _FurniDefinitions;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnPhysicsIDChanging(int value);
partial void OnPhysicsIDChanged();
partial void OnPhysicsNameChanging(string value);
partial void OnPhysicsNameChanged();
partial void OnWidthChanging(int value);
partial void OnWidthChanged();
partial void OnLengthChanging(int value);
partial void OnLengthChanged();
partial void OnHeightChanging(double value);
partial void OnHeightChanged();
partial void OnActionHeightChanging(double value);
partial void OnActionHeightChanged();
partial void OnIsPathableChanging(bool value);
partial void OnIsPathableChanged();
#endregion
public PhysicsObject()
{
this._FurniDefinitions = new EntitySet(new Action(this.attach_FurniDefinitions), new Action(this.detach_FurniDefinitions));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PhysicsID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int PhysicsID
{
get
{
return this._PhysicsID;
}
set
{
if ((this._PhysicsID != value))
{
this.OnPhysicsIDChanging(value);
this.SendPropertyChanging();
this._PhysicsID = value;
this.SendPropertyChanged("PhysicsID");
this.OnPhysicsIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PhysicsName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PhysicsName
{
get
{
return this._PhysicsName;
}
set
{
if ((this._PhysicsName != value))
{
this.OnPhysicsNameChanging(value);
this.SendPropertyChanging();
this._PhysicsName = value;
this.SendPropertyChanged("PhysicsName");
this.OnPhysicsNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Width", DbType="Int NOT NULL")]
public int Width
{
get
{
return this._Width;
}
set
{
if ((this._Width != value))
{
this.OnWidthChanging(value);
this.SendPropertyChanging();
this._Width = value;
this.SendPropertyChanged("Width");
this.OnWidthChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Length", DbType="Int NOT NULL")]
public int Length
{
get
{
return this._Length;
}
set
{
if ((this._Length != value))
{
this.OnLengthChanging(value);
this.SendPropertyChanging();
this._Length = value;
this.SendPropertyChanged("Length");
this.OnLengthChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Height", DbType="Float NOT NULL")]
public double Height
{
get
{
return this._Height;
}
set
{
if ((this._Height != value))
{
this.OnHeightChanging(value);
this.SendPropertyChanging();
this._Height = value;
this.SendPropertyChanged("Height");
this.OnHeightChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActionHeight", DbType="Float NOT NULL")]
public double ActionHeight
{
get
{
return this._ActionHeight;
}
set
{
if ((this._ActionHeight != value))
{
this.OnActionHeightChanging(value);
this.SendPropertyChanging();
this._ActionHeight = value;
this.SendPropertyChanged("ActionHeight");
this.OnActionHeightChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsPathable", DbType="Bit NOT NULL")]
public bool IsPathable
{
get
{
return this._IsPathable;
}
set
{
if ((this._IsPathable != value))
{
this.OnIsPathableChanging(value);
this.SendPropertyChanging();
this._IsPathable = value;
this.SendPropertyChanged("IsPathable");
this.OnIsPathableChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PhysicsObject_FurniDefinition", Storage="_FurniDefinitions", ThisKey="PhysicsID", OtherKey="PhysicsObjectID")]
public EntitySet FurniDefinitions
{
get
{
return this._FurniDefinitions;
}
set
{
this._FurniDefinitions.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_FurniDefinitions(FurniDefinition entity)
{
this.SendPropertyChanging();
entity.PhysicsObject = this;
}
private void detach_FurniDefinitions(FurniDefinition entity)
{
this.SendPropertyChanging();
entity.PhysicsObject = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RoleAccess")]
public partial class RoleAccess : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _RoleAccessID;
private int _RoleID;
private string _AccessName;
private EntityRef _Role;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnRoleAccessIDChanging(int value);
partial void OnRoleAccessIDChanged();
partial void OnRoleIDChanging(int value);
partial void OnRoleIDChanged();
partial void OnAccessNameChanging(string value);
partial void OnAccessNameChanged();
#endregion
public RoleAccess()
{
this._Role = default(EntityRef);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleAccessID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int RoleAccessID
{
get
{
return this._RoleAccessID;
}
set
{
if ((this._RoleAccessID != value))
{
this.OnRoleAccessIDChanging(value);
this.SendPropertyChanging();
this._RoleAccessID = value;
this.SendPropertyChanged("RoleAccessID");
this.OnRoleAccessIDChanged();
}
}
}
[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._Role.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="_AccessName", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string AccessName
{
get
{
return this._AccessName;
}
set
{
if ((this._AccessName != value))
{
this.OnAccessNameChanging(value);
this.SendPropertyChanging();
this._AccessName = value;
this.SendPropertyChanged("AccessName");
this.OnAccessNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_RoleAccess", Storage="_Role", ThisKey="RoleID", OtherKey="RoleID", IsForeignKey=true)]
public Role Role
{
get
{
return this._Role.Entity;
}
set
{
Role previousValue = this._Role.Entity;
if (((previousValue != value)
|| (this._Role.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Role.Entity = null;
previousValue.RoleAccesses.Remove(this);
}
this._Role.Entity = value;
if ((value != null))
{
value.RoleAccesses.Add(this);
this._RoleID = value.RoleID;
}
else
{
this._RoleID = default(int);
}
this.SendPropertyChanged("Role");
}
}
}
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.Roles")]
public partial class Role : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _RoleID;
private string _RoleName;
private System.Nullable _InheritedRole;
private EntitySet _Badges;
private EntitySet _RoleAccesses;
private EntitySet _Users;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnRoleIDChanging(int value);
partial void OnRoleIDChanged();
partial void OnRoleNameChanging(string value);
partial void OnRoleNameChanged();
partial void OnInheritedRoleChanging(System.Nullable value);
partial void OnInheritedRoleChanged();
#endregion
public Role()
{
this._Badges = new EntitySet(new Action(this.attach_Badges), new Action(this.detach_Badges));
this._RoleAccesses = new EntitySet(new Action(this.attach_RoleAccesses), new Action(this.detach_RoleAccesses));
this._Users = new EntitySet(new Action(this.attach_Users), new Action(this.detach_Users));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int RoleID
{
get
{
return this._RoleID;
}
set
{
if ((this._RoleID != value))
{
this.OnRoleIDChanging(value);
this.SendPropertyChanging();
this._RoleID = value;
this.SendPropertyChanged("RoleID");
this.OnRoleIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoleName", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string RoleName
{
get
{
return this._RoleName;
}
set
{
if ((this._RoleName != value))
{
this.OnRoleNameChanging(value);
this.SendPropertyChanging();
this._RoleName = value;
this.SendPropertyChanged("RoleName");
this.OnRoleNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InheritedRole", DbType="Int")]
public System.Nullable InheritedRole
{
get
{
return this._InheritedRole;
}
set
{
if ((this._InheritedRole != value))
{
this.OnInheritedRoleChanging(value);
this.SendPropertyChanging();
this._InheritedRole = value;
this.SendPropertyChanged("InheritedRole");
this.OnInheritedRoleChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_Badge", Storage="_Badges", ThisKey="RoleID", OtherKey="RoleID")]
public EntitySet Badges
{
get
{
return this._Badges;
}
set
{
this._Badges.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_RoleAccess", Storage="_RoleAccesses", ThisKey="RoleID", OtherKey="RoleID")]
public EntitySet RoleAccesses
{
get
{
return this._RoleAccesses;
}
set
{
this._RoleAccesses.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_User", Storage="_Users", ThisKey="RoleID", OtherKey="RoleID")]
public EntitySet 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_Badges(Badge entity)
{
this.SendPropertyChanging();
entity.Role = this;
}
private void detach_Badges(Badge entity)
{
this.SendPropertyChanging();
entity.Role = null;
}
private void attach_RoleAccesses(RoleAccess entity)
{
this.SendPropertyChanging();
entity.Role = this;
}
private void detach_RoleAccesses(RoleAccess entity)
{
this.SendPropertyChanging();
entity.Role = null;
}
private void attach_Users(User entity)
{
this.SendPropertyChanging();
entity.Role = this;
}
private void detach_Users(User entity)
{
this.SendPropertyChanging();
entity.Role = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RoomCategories")]
public partial class RoomCategory : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _RoomCategoryID;
private string _RoomCategoryName;
private System.Nullable _RoomCategoryParent;
private bool _CanTrade;
private bool _IsVisible;
private int _CategoryOrder;
private bool _SystemCategory;
private EntitySet _RoomCategories;
private EntitySet _Rooms;
private EntityRef _RoomCategory1;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnRoomCategoryIDChanging(int value);
partial void OnRoomCategoryIDChanged();
partial void OnRoomCategoryNameChanging(string value);
partial void OnRoomCategoryNameChanged();
partial void OnRoomCategoryParentChanging(System.Nullable value);
partial void OnRoomCategoryParentChanged();
partial void OnCanTradeChanging(bool value);
partial void OnCanTradeChanged();
partial void OnIsVisibleChanging(bool value);
partial void OnIsVisibleChanged();
partial void OnCategoryOrderChanging(int value);
partial void OnCategoryOrderChanged();
partial void OnSystemCategoryChanging(bool value);
partial void OnSystemCategoryChanged();
#endregion
public RoomCategory()
{
this._RoomCategories = new EntitySet(new Action(this.attach_RoomCategories), new Action(this.detach_RoomCategories));
this._Rooms = new EntitySet(new Action(this.attach_Rooms), new Action(this.detach_Rooms));
this._RoomCategory1 = default(EntityRef);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomCategoryID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int RoomCategoryID
{
get
{
return this._RoomCategoryID;
}
set
{
if ((this._RoomCategoryID != value))
{
this.OnRoomCategoryIDChanging(value);
this.SendPropertyChanging();
this._RoomCategoryID = value;
this.SendPropertyChanged("RoomCategoryID");
this.OnRoomCategoryIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomCategoryName", DbType="VarChar(100) NOT NULL", CanBeNull=false)]
public string RoomCategoryName
{
get
{
return this._RoomCategoryName;
}
set
{
if ((this._RoomCategoryName != value))
{
this.OnRoomCategoryNameChanging(value);
this.SendPropertyChanging();
this._RoomCategoryName = value;
this.SendPropertyChanged("RoomCategoryName");
this.OnRoomCategoryNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomCategoryParent", DbType="Int")]
public System.Nullable RoomCategoryParent
{
get
{
return this._RoomCategoryParent;
}
set
{
if ((this._RoomCategoryParent != value))
{
if (this._RoomCategory1.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnRoomCategoryParentChanging(value);
this.SendPropertyChanging();
this._RoomCategoryParent = value;
this.SendPropertyChanged("RoomCategoryParent");
this.OnRoomCategoryParentChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanTrade", DbType="Bit NOT NULL")]
public bool CanTrade
{
get
{
return this._CanTrade;
}
set
{
if ((this._CanTrade != value))
{
this.OnCanTradeChanging(value);
this.SendPropertyChanging();
this._CanTrade = value;
this.SendPropertyChanged("CanTrade");
this.OnCanTradeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsVisible", DbType="Bit NOT NULL")]
public bool IsVisible
{
get
{
return this._IsVisible;
}
set
{
if ((this._IsVisible != value))
{
this.OnIsVisibleChanging(value);
this.SendPropertyChanging();
this._IsVisible = value;
this.SendPropertyChanged("IsVisible");
this.OnIsVisibleChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CategoryOrder", DbType="Int NOT NULL")]
public int CategoryOrder
{
get
{
return this._CategoryOrder;
}
set
{
if ((this._CategoryOrder != value))
{
this.OnCategoryOrderChanging(value);
this.SendPropertyChanging();
this._CategoryOrder = value;
this.SendPropertyChanged("CategoryOrder");
this.OnCategoryOrderChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemCategory", DbType="Bit NOT NULL")]
public bool SystemCategory
{
get
{
return this._SystemCategory;
}
set
{
if ((this._SystemCategory != value))
{
this.OnSystemCategoryChanging(value);
this.SendPropertyChanging();
this._SystemCategory = value;
this.SendPropertyChanged("SystemCategory");
this.OnSystemCategoryChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RoomCategory_RoomCategory", Storage="_RoomCategories", ThisKey="RoomCategoryID", OtherKey="RoomCategoryParent")]
public EntitySet RoomCategories
{
get
{
return this._RoomCategories;
}
set
{
this._RoomCategories.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RoomCategory_Room", Storage="_Rooms", ThisKey="RoomCategoryID", OtherKey="CategoryID")]
public EntitySet Rooms
{
get
{
return this._Rooms;
}
set
{
this._Rooms.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RoomCategory_RoomCategory", Storage="_RoomCategory1", ThisKey="RoomCategoryParent", OtherKey="RoomCategoryID", IsForeignKey=true)]
public RoomCategory RoomCategory1
{
get
{
return this._RoomCategory1.Entity;
}
set
{
RoomCategory previousValue = this._RoomCategory1.Entity;
if (((previousValue != value)
|| (this._RoomCategory1.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._RoomCategory1.Entity = null;
previousValue.RoomCategories.Remove(this);
}
this._RoomCategory1.Entity = value;
if ((value != null))
{
value.RoomCategories.Add(this);
this._RoomCategoryParent = value.RoomCategoryID;
}
else
{
this._RoomCategoryParent = default(Nullable);
}
this.SendPropertyChanged("RoomCategory1");
}
}
}
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_RoomCategories(RoomCategory entity)
{
this.SendPropertyChanging();
entity.RoomCategory1 = this;
}
private void detach_RoomCategories(RoomCategory entity)
{
this.SendPropertyChanging();
entity.RoomCategory1 = null;
}
private void attach_Rooms(Room entity)
{
this.SendPropertyChanging();
entity.RoomCategory = this;
}
private void detach_Rooms(Room entity)
{
this.SendPropertyChanging();
entity.RoomCategory = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RoomModels")]
public partial class RoomModel : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _RoomModelID;
private string _ModelName;
private string _NavigatorName;
private string _CCTList;
private int _StartX;
private int _StartY;
private int _StartZ;
private double _MaxAscend;
private double _MaxDescend;
private string _DefaultHeightmap;
private string _AdditionalECs;
private EntitySet _Rooms;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnRoomModelIDChanging(int value);
partial void OnRoomModelIDChanged();
partial void OnModelNameChanging(string value);
partial void OnModelNameChanged();
partial void OnNavigatorNameChanging(string value);
partial void OnNavigatorNameChanged();
partial void OnCCTListChanging(string value);
partial void OnCCTListChanged();
partial void OnStartXChanging(int value);
partial void OnStartXChanged();
partial void OnStartYChanging(int value);
partial void OnStartYChanged();
partial void OnStartZChanging(int value);
partial void OnStartZChanged();
partial void OnMaxAscendChanging(double value);
partial void OnMaxAscendChanged();
partial void OnMaxDescendChanging(double value);
partial void OnMaxDescendChanged();
partial void OnDefaultHeightmapChanging(string value);
partial void OnDefaultHeightmapChanged();
partial void OnAdditionalECsChanging(string value);
partial void OnAdditionalECsChanged();
#endregion
public RoomModel()
{
this._Rooms = new EntitySet(new Action(this.attach_Rooms), new Action(this.detach_Rooms));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomModelID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int RoomModelID
{
get
{
return this._RoomModelID;
}
set
{
if ((this._RoomModelID != value))
{
this.OnRoomModelIDChanging(value);
this.SendPropertyChanging();
this._RoomModelID = value;
this.SendPropertyChanged("RoomModelID");
this.OnRoomModelIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ModelName", DbType="VarChar(100) NOT NULL", CanBeNull=false)]
public string ModelName
{
get
{
return this._ModelName;
}
set
{
if ((this._ModelName != value))
{
this.OnModelNameChanging(value);
this.SendPropertyChanging();
this._ModelName = value;
this.SendPropertyChanged("ModelName");
this.OnModelNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NavigatorName", DbType="VarChar(100) NOT NULL", CanBeNull=false)]
public string NavigatorName
{
get
{
return this._NavigatorName;
}
set
{
if ((this._NavigatorName != value))
{
this.OnNavigatorNameChanging(value);
this.SendPropertyChanging();
this._NavigatorName = value;
this.SendPropertyChanged("NavigatorName");
this.OnNavigatorNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CCTList", DbType="VarChar(500)")]
public string CCTList
{
get
{
return this._CCTList;
}
set
{
if ((this._CCTList != value))
{
this.OnCCTListChanging(value);
this.SendPropertyChanging();
this._CCTList = value;
this.SendPropertyChanged("CCTList");
this.OnCCTListChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartX", DbType="Int NOT NULL")]
public int StartX
{
get
{
return this._StartX;
}
set
{
if ((this._StartX != value))
{
this.OnStartXChanging(value);
this.SendPropertyChanging();
this._StartX = value;
this.SendPropertyChanged("StartX");
this.OnStartXChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartY", DbType="Int NOT NULL")]
public int StartY
{
get
{
return this._StartY;
}
set
{
if ((this._StartY != value))
{
this.OnStartYChanging(value);
this.SendPropertyChanging();
this._StartY = value;
this.SendPropertyChanged("StartY");
this.OnStartYChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartZ", DbType="Int NOT NULL")]
public int StartZ
{
get
{
return this._StartZ;
}
set
{
if ((this._StartZ != value))
{
this.OnStartZChanging(value);
this.SendPropertyChanging();
this._StartZ = value;
this.SendPropertyChanged("StartZ");
this.OnStartZChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaxAscend", DbType="Float NOT NULL")]
public double MaxAscend
{
get
{
return this._MaxAscend;
}
set
{
if ((this._MaxAscend != value))
{
this.OnMaxAscendChanging(value);
this.SendPropertyChanging();
this._MaxAscend = value;
this.SendPropertyChanged("MaxAscend");
this.OnMaxAscendChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaxDescend", DbType="Float NOT NULL")]
public double MaxDescend
{
get
{
return this._MaxDescend;
}
set
{
if ((this._MaxDescend != value))
{
this.OnMaxDescendChanging(value);
this.SendPropertyChanging();
this._MaxDescend = value;
this.SendPropertyChanged("MaxDescend");
this.OnMaxDescendChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DefaultHeightmap", DbType="VarChar(8000) NOT NULL", CanBeNull=false)]
public string DefaultHeightmap
{
get
{
return this._DefaultHeightmap;
}
set
{
if ((this._DefaultHeightmap != value))
{
this.OnDefaultHeightmapChanging(value);
this.SendPropertyChanging();
this._DefaultHeightmap = value;
this.SendPropertyChanged("DefaultHeightmap");
this.OnDefaultHeightmapChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AdditionalECs", DbType="NVarChar(25)")]
public string AdditionalECs
{
get
{
return this._AdditionalECs;
}
set
{
if ((this._AdditionalECs != value))
{
this.OnAdditionalECsChanging(value);
this.SendPropertyChanging();
this._AdditionalECs = value;
this.SendPropertyChanged("AdditionalECs");
this.OnAdditionalECsChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RoomModel_Room", Storage="_Rooms", ThisKey="RoomModelID", OtherKey="ModelID")]
public EntitySet Rooms
{
get
{
return this._Rooms;
}
set
{
this._Rooms.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_Rooms(Room entity)
{
this.SendPropertyChanging();
entity.RoomModel = this;
}
private void detach_Rooms(Room entity)
{
this.SendPropertyChanging();
entity.RoomModel = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Rooms")]
public partial class Room : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _RoomID;
private string _RoomName;
private string _RoomFriendlyName;
private string _RoomDescription;
private int _ModelID;
private System.Nullable _OwnerID;
private System.Nullable _FloorID;
private System.Nullable _WallpaperID;
private int _CategoryID;
private int _MaxGuests;
private System.Nullable _RoomStatus;
private System.Nullable _ShowOwner;
private System.Nullable _SuperUsers;
private string _Password;
private EntitySet _Furnis;
private EntityRef _RoomCategory;
private EntityRef _RoomModel;
private EntityRef _RoomState;
private EntityRef _User;
#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 OnRoomNameChanging(string value);
partial void OnRoomNameChanged();
partial void OnRoomFriendlyNameChanging(string value);
partial void OnRoomFriendlyNameChanged();
partial void OnRoomDescriptionChanging(string value);
partial void OnRoomDescriptionChanged();
partial void OnModelIDChanging(int value);
partial void OnModelIDChanged();
partial void OnOwnerIDChanging(System.Nullable value);
partial void OnOwnerIDChanged();
partial void OnFloorIDChanging(System.Nullable value);
partial void OnFloorIDChanged();
partial void OnWallpaperIDChanging(System.Nullable value);
partial void OnWallpaperIDChanged();
partial void OnCategoryIDChanging(int value);
partial void OnCategoryIDChanged();
partial void OnMaxGuestsChanging(int value);
partial void OnMaxGuestsChanged();
partial void OnRoomStatusChanging(System.Nullable value);
partial void OnRoomStatusChanged();
partial void OnShowOwnerChanging(System.Nullable value);
partial void OnShowOwnerChanged();
partial void OnSuperUsersChanging(System.Nullable value);
partial void OnSuperUsersChanged();
partial void OnPasswordChanging(string value);
partial void OnPasswordChanged();
#endregion
public Room()
{
this._Furnis = new EntitySet(new Action(this.attach_Furnis), new Action(this.detach_Furnis));
this._RoomCategory = default(EntityRef);
this._RoomModel = default(EntityRef);
this._RoomState = default(EntityRef);
this._User = default(EntityRef);
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="_RoomName", DbType="VarChar(100) NOT NULL", CanBeNull=false)]
public string RoomName
{
get
{
return this._RoomName;
}
set
{
if ((this._RoomName != value))
{
this.OnRoomNameChanging(value);
this.SendPropertyChanging();
this._RoomName = value;
this.SendPropertyChanged("RoomName");
this.OnRoomNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomFriendlyName", DbType="VarChar(100) NOT NULL", CanBeNull=false)]
public string RoomFriendlyName
{
get
{
return this._RoomFriendlyName;
}
set
{
if ((this._RoomFriendlyName != value))
{
this.OnRoomFriendlyNameChanging(value);
this.SendPropertyChanging();
this._RoomFriendlyName = value;
this.SendPropertyChanged("RoomFriendlyName");
this.OnRoomFriendlyNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomDescription", DbType="VarChar(500) NOT NULL", CanBeNull=false)]
public string RoomDescription
{
get
{
return this._RoomDescription;
}
set
{
if ((this._RoomDescription != value))
{
this.OnRoomDescriptionChanging(value);
this.SendPropertyChanging();
this._RoomDescription = value;
this.SendPropertyChanged("RoomDescription");
this.OnRoomDescriptionChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ModelID", DbType="Int NOT NULL")]
public int ModelID
{
get
{
return this._ModelID;
}
set
{
if ((this._ModelID != value))
{
if (this._RoomModel.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnModelIDChanging(value);
this.SendPropertyChanging();
this._ModelID = value;
this.SendPropertyChanged("ModelID");
this.OnModelIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerID", DbType="Int")]
public System.Nullable OwnerID
{
get
{
return this._OwnerID;
}
set
{
if ((this._OwnerID != value))
{
if (this._User.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnOwnerIDChanging(value);
this.SendPropertyChanging();
this._OwnerID = value;
this.SendPropertyChanged("OwnerID");
this.OnOwnerIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FloorID", DbType="Int")]
public System.Nullable FloorID
{
get
{
return this._FloorID;
}
set
{
if ((this._FloorID != value))
{
this.OnFloorIDChanging(value);
this.SendPropertyChanging();
this._FloorID = value;
this.SendPropertyChanged("FloorID");
this.OnFloorIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WallpaperID", DbType="Int")]
public System.Nullable WallpaperID
{
get
{
return this._WallpaperID;
}
set
{
if ((this._WallpaperID != value))
{
this.OnWallpaperIDChanging(value);
this.SendPropertyChanging();
this._WallpaperID = value;
this.SendPropertyChanged("WallpaperID");
this.OnWallpaperIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CategoryID", DbType="Int NOT NULL")]
public int CategoryID
{
get
{
return this._CategoryID;
}
set
{
if ((this._CategoryID != value))
{
if (this._RoomCategory.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnCategoryIDChanging(value);
this.SendPropertyChanging();
this._CategoryID = value;
this.SendPropertyChanged("CategoryID");
this.OnCategoryIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaxGuests", DbType="Int NOT NULL")]
public int MaxGuests
{
get
{
return this._MaxGuests;
}
set
{
if ((this._MaxGuests != value))
{
this.OnMaxGuestsChanging(value);
this.SendPropertyChanging();
this._MaxGuests = value;
this.SendPropertyChanged("MaxGuests");
this.OnMaxGuestsChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RoomStatus", DbType="Int")]
public System.Nullable RoomStatus
{
get
{
return this._RoomStatus;
}
set
{
if ((this._RoomStatus != value))
{
if (this._RoomState.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnRoomStatusChanging(value);
this.SendPropertyChanging();
this._RoomStatus = value;
this.SendPropertyChanged("RoomStatus");
this.OnRoomStatusChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShowOwner", DbType="Bit")]
public System.Nullable ShowOwner
{
get
{
return this._ShowOwner;
}
set
{
if ((this._ShowOwner != value))
{
this.OnShowOwnerChanging(value);
this.SendPropertyChanging();
this._ShowOwner = value;
this.SendPropertyChanged("ShowOwner");
this.OnShowOwnerChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuperUsers", DbType="Bit")]
public System.Nullable SuperUsers
{
get
{
return this._SuperUsers;
}
set
{
if ((this._SuperUsers != value))
{
this.OnSuperUsersChanging(value);
this.SendPropertyChanging();
this._SuperUsers = value;
this.SendPropertyChanged("SuperUsers");
this.OnSuperUsersChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Password", DbType="NVarChar(50)")]
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.AssociationAttribute(Name="Room_Furni", Storage="_Furnis", ThisKey="RoomID", OtherKey="RoomID")]
public EntitySet Furnis
{
get
{
return this._Furnis;
}
set
{
this._Furnis.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RoomCategory_Room", Storage="_RoomCategory", ThisKey="CategoryID", OtherKey="RoomCategoryID", IsForeignKey=true)]
public RoomCategory RoomCategory
{
get
{
return this._RoomCategory.Entity;
}
set
{
RoomCategory previousValue = this._RoomCategory.Entity;
if (((previousValue != value)
|| (this._RoomCategory.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._RoomCategory.Entity = null;
previousValue.Rooms.Remove(this);
}
this._RoomCategory.Entity = value;
if ((value != null))
{
value.Rooms.Add(this);
this._CategoryID = value.RoomCategoryID;
}
else
{
this._CategoryID = default(int);
}
this.SendPropertyChanged("RoomCategory");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RoomModel_Room", Storage="_RoomModel", ThisKey="ModelID", OtherKey="RoomModelID", IsForeignKey=true)]
public RoomModel RoomModel
{
get
{
return this._RoomModel.Entity;
}
set
{
RoomModel previousValue = this._RoomModel.Entity;
if (((previousValue != value)
|| (this._RoomModel.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._RoomModel.Entity = null;
previousValue.Rooms.Remove(this);
}
this._RoomModel.Entity = value;
if ((value != null))
{
value.Rooms.Add(this);
this._ModelID = value.RoomModelID;
}
else
{
this._ModelID = default(int);
}
this.SendPropertyChanged("RoomModel");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RoomState_Room", Storage="_RoomState", ThisKey="RoomStatus", OtherKey="StatusID", IsForeignKey=true)]
public RoomState RoomState
{
get
{
return this._RoomState.Entity;
}
set
{
RoomState previousValue = this._RoomState.Entity;
if (((previousValue != value)
|| (this._RoomState.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._RoomState.Entity = null;
previousValue.Rooms.Remove(this);
}
this._RoomState.Entity = value;
if ((value != null))
{
value.Rooms.Add(this);
this._RoomStatus = value.StatusID;
}
else
{
this._RoomStatus = default(Nullable);
}
this.SendPropertyChanged("RoomState");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_Room", Storage="_User", ThisKey="OwnerID", OtherKey="UserID", IsForeignKey=true)]
public User User
{
get
{
return this._User.Entity;
}
set
{
User previousValue = this._User.Entity;
if (((previousValue != value)
|| (this._User.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._User.Entity = null;
previousValue.Rooms.Remove(this);
}
this._User.Entity = value;
if ((value != null))
{
value.Rooms.Add(this);
this._OwnerID = value.UserID;
}
else
{
this._OwnerID = default(Nullable);
}
this.SendPropertyChanged("User");
}
}
}
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_Furnis(Furni entity)
{
this.SendPropertyChanging();
entity.Room = this;
}
private void detach_Furnis(Furni entity)
{
this.SendPropertyChanging();
entity.Room = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RoomStates")]
public partial class RoomState : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _StatusID;
private string _StatusName;
private EntitySet _Rooms;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnStatusIDChanging(int value);
partial void OnStatusIDChanged();
partial void OnStatusNameChanging(string value);
partial void OnStatusNameChanged();
#endregion
public RoomState()
{
this._Rooms = new EntitySet(new Action(this.attach_Rooms), new Action(this.detach_Rooms));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatusID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int StatusID
{
get
{
return this._StatusID;
}
set
{
if ((this._StatusID != value))
{
this.OnStatusIDChanging(value);
this.SendPropertyChanging();
this._StatusID = value;
this.SendPropertyChanged("StatusID");
this.OnStatusIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StatusName", DbType="NVarChar(15) NOT NULL", CanBeNull=false)]
public string StatusName
{
get
{
return this._StatusName;
}
set
{
if ((this._StatusName != value))
{
this.OnStatusNameChanging(value);
this.SendPropertyChanging();
this._StatusName = value;
this.SendPropertyChanged("StatusName");
this.OnStatusNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RoomState_Room", Storage="_Rooms", ThisKey="StatusID", OtherKey="RoomStatus")]
public EntitySet Rooms
{
get
{
return this._Rooms;
}
set
{
this._Rooms.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_Rooms(Room entity)
{
this.SendPropertyChanging();
entity.RoomState = this;
}
private void detach_Rooms(Room entity)
{
this.SendPropertyChanging();
entity.RoomState = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Settings")]
public partial class Setting : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _SettingsVersion;
private int _DatabaseVersion;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnSettingsVersionChanging(int value);
partial void OnSettingsVersionChanged();
partial void OnDatabaseVersionChanging(int value);
partial void OnDatabaseVersionChanged();
#endregion
public Setting()
{
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SettingsVersion", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int SettingsVersion
{
get
{
return this._SettingsVersion;
}
set
{
if ((this._SettingsVersion != value))
{
this.OnSettingsVersionChanging(value);
this.SendPropertyChanging();
this._SettingsVersion = value;
this.SendPropertyChanged("SettingsVersion");
this.OnSettingsVersionChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DatabaseVersion", DbType="Int NOT NULL")]
public int DatabaseVersion
{
get
{
return this._DatabaseVersion;
}
set
{
if ((this._DatabaseVersion != value))
{
this.OnDatabaseVersionChanging(value);
this.SendPropertyChanging();
this._DatabaseVersion = value;
this.SendPropertyChanged("DatabaseVersion");
this.OnDatabaseVersionChanged();
}
}
}
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.Users")]
public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _UserID;
private string _Username;
private string _Password;
private int _RoleID;
private string _Sex;
private string _Figure;
private string _Motto;
private string _Email;
private string _Dob;
private int _Credits;
private int _Tickets;
private int _Film;
private string _PoolFigure;
private int _ClubDaysRemaining;
private int _ClubMonthsRemaining;
private int _ClubMonthsElapsed;
private string _CurrentBadge;
private System.DateTime _LastLogin;
private EntitySet _Furnis;
private EntitySet _Rooms;
private EntityRef _Role;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnUserIDChanging(int value);
partial void OnUserIDChanged();
partial void OnUsernameChanging(string value);
partial void OnUsernameChanged();
partial void OnPasswordChanging(string value);
partial void OnPasswordChanged();
partial void OnRoleIDChanging(int value);
partial void OnRoleIDChanged();
partial void OnSexChanging(string value);
partial void OnSexChanged();
partial void OnFigureChanging(string value);
partial void OnFigureChanged();
partial void OnMottoChanging(string value);
partial void OnMottoChanged();
partial void OnEmailChanging(string value);
partial void OnEmailChanged();
partial void OnDobChanging(string value);
partial void OnDobChanged();
partial void OnCreditsChanging(int value);
partial void OnCreditsChanged();
partial void OnTicketsChanging(int value);
partial void OnTicketsChanged();
partial void OnFilmChanging(int value);
partial void OnFilmChanged();
partial void OnPoolFigureChanging(string value);
partial void OnPoolFigureChanged();
partial void OnClubDaysRemainingChanging(int value);
partial void OnClubDaysRemainingChanged();
partial void OnClubMonthsRemainingChanging(int value);
partial void OnClubMonthsRemainingChanged();
partial void OnClubMonthsElapsedChanging(int value);
partial void OnClubMonthsElapsedChanged();
partial void OnCurrentBadgeChanging(string value);
partial void OnCurrentBadgeChanged();
partial void OnLastLoginChanging(System.DateTime value);
partial void OnLastLoginChanged();
#endregion
public User()
{
this._Furnis = new EntitySet(new Action(this.attach_Furnis), new Action(this.detach_Furnis));
this._Rooms = new EntitySet(new Action(this.attach_Rooms), new Action(this.detach_Rooms));
this._Role = default(EntityRef);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int UserID
{
get
{
return this._UserID;
}
set
{
if ((this._UserID != value))
{
this.OnUserIDChanging(value);
this.SendPropertyChanging();
this._UserID = value;
this.SendPropertyChanged("UserID");
this.OnUserIDChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Username", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string Username
{
get
{
return this._Username;
}
set
{
if ((this._Username != value))
{
this.OnUsernameChanging(value);
this.SendPropertyChanging();
this._Username = value;
this.SendPropertyChanged("Username");
this.OnUsernameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Password", DbType="VarChar(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="_RoleID", DbType="Int NOT NULL")]
public int RoleID
{
get
{
return this._RoleID;
}
set
{
if ((this._RoleID != value))
{
if (this._Role.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="_Sex", DbType="VarChar(1) NOT NULL", CanBeNull=false)]
public string Sex
{
get
{
return this._Sex;
}
set
{
if ((this._Sex != value))
{
this.OnSexChanging(value);
this.SendPropertyChanging();
this._Sex = value;
this.SendPropertyChanged("Sex");
this.OnSexChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Figure", DbType="VarChar(500) NOT NULL", CanBeNull=false)]
public string Figure
{
get
{
return this._Figure;
}
set
{
if ((this._Figure != value))
{
this.OnFigureChanging(value);
this.SendPropertyChanging();
this._Figure = value;
this.SendPropertyChanged("Figure");
this.OnFigureChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Motto", DbType="VarChar(500) NOT NULL", CanBeNull=false)]
public string Motto
{
get
{
return this._Motto;
}
set
{
if ((this._Motto != value))
{
this.OnMottoChanging(value);
this.SendPropertyChanging();
this._Motto = value;
this.SendPropertyChanged("Motto");
this.OnMottoChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Email", DbType="VarChar(500) 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="_Dob", DbType="VarChar(500) NOT NULL", CanBeNull=false)]
public string Dob
{
get
{
return this._Dob;
}
set
{
if ((this._Dob != value))
{
this.OnDobChanging(value);
this.SendPropertyChanging();
this._Dob = value;
this.SendPropertyChanged("Dob");
this.OnDobChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Credits", DbType="Int NOT NULL")]
public int Credits
{
get
{
return this._Credits;
}
set
{
if ((this._Credits != value))
{
this.OnCreditsChanging(value);
this.SendPropertyChanging();
this._Credits = value;
this.SendPropertyChanged("Credits");
this.OnCreditsChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Tickets", DbType="Int NOT NULL")]
public int Tickets
{
get
{
return this._Tickets;
}
set
{
if ((this._Tickets != value))
{
this.OnTicketsChanging(value);
this.SendPropertyChanging();
this._Tickets = value;
this.SendPropertyChanged("Tickets");
this.OnTicketsChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Film", DbType="Int NOT NULL")]
public int Film
{
get
{
return this._Film;
}
set
{
if ((this._Film != value))
{
this.OnFilmChanging(value);
this.SendPropertyChanging();
this._Film = value;
this.SendPropertyChanged("Film");
this.OnFilmChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PoolFigure", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PoolFigure
{
get
{
return this._PoolFigure;
}
set
{
if ((this._PoolFigure != value))
{
this.OnPoolFigureChanging(value);
this.SendPropertyChanging();
this._PoolFigure = value;
this.SendPropertyChanged("PoolFigure");
this.OnPoolFigureChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClubDaysRemaining", DbType="Int NOT NULL")]
public int ClubDaysRemaining
{
get
{
return this._ClubDaysRemaining;
}
set
{
if ((this._ClubDaysRemaining != value))
{
this.OnClubDaysRemainingChanging(value);
this.SendPropertyChanging();
this._ClubDaysRemaining = value;
this.SendPropertyChanged("ClubDaysRemaining");
this.OnClubDaysRemainingChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClubMonthsRemaining", DbType="Int NOT NULL")]
public int ClubMonthsRemaining
{
get
{
return this._ClubMonthsRemaining;
}
set
{
if ((this._ClubMonthsRemaining != value))
{
this.OnClubMonthsRemainingChanging(value);
this.SendPropertyChanging();
this._ClubMonthsRemaining = value;
this.SendPropertyChanged("ClubMonthsRemaining");
this.OnClubMonthsRemainingChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClubMonthsElapsed", DbType="Int NOT NULL")]
public int ClubMonthsElapsed
{
get
{
return this._ClubMonthsElapsed;
}
set
{
if ((this._ClubMonthsElapsed != value))
{
this.OnClubMonthsElapsedChanging(value);
this.SendPropertyChanging();
this._ClubMonthsElapsed = value;
this.SendPropertyChanged("ClubMonthsElapsed");
this.OnClubMonthsElapsedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CurrentBadge", DbType="VarChar(10)")]
public string CurrentBadge
{
get
{
return this._CurrentBadge;
}
set
{
if ((this._CurrentBadge != value))
{
this.OnCurrentBadgeChanging(value);
this.SendPropertyChanging();
this._CurrentBadge = value;
this.SendPropertyChanged("CurrentBadge");
this.OnCurrentBadgeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastLogin", DbType="DateTime NOT NULL")]
public System.DateTime LastLogin
{
get
{
return this._LastLogin;
}
set
{
if ((this._LastLogin != value))
{
this.OnLastLoginChanging(value);
this.SendPropertyChanging();
this._LastLogin = value;
this.SendPropertyChanged("LastLogin");
this.OnLastLoginChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_Furni", Storage="_Furnis", ThisKey="UserID", OtherKey="OwnerID")]
public EntitySet Furnis
{
get
{
return this._Furnis;
}
set
{
this._Furnis.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_Room", Storage="_Rooms", ThisKey="UserID", OtherKey="OwnerID")]
public EntitySet Rooms
{
get
{
return this._Rooms;
}
set
{
this._Rooms.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Role_User", Storage="_Role", ThisKey="RoleID", OtherKey="RoleID", IsForeignKey=true)]
public Role Role
{
get
{
return this._Role.Entity;
}
set
{
Role previousValue = this._Role.Entity;
if (((previousValue != value)
|| (this._Role.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Role.Entity = null;
previousValue.Users.Remove(this);
}
this._Role.Entity = value;
if ((value != null))
{
value.Users.Add(this);
this._RoleID = value.RoleID;
}
else
{
this._RoleID = default(int);
}
this.SendPropertyChanged("Role");
}
}
}
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_Furnis(Furni entity)
{
this.SendPropertyChanging();
entity.User = this;
}
private void detach_Furnis(Furni entity)
{
this.SendPropertyChanging();
entity.User = null;
}
private void attach_Rooms(Room entity)
{
this.SendPropertyChanging();
entity.User = this;
}
private void detach_Rooms(Room entity)
{
this.SendPropertyChanging();
entity.User = null;
}
}
}
#pragma warning restore 1591