/DV_Enterprises.Web/DV_Enterprises.Web/DataContext.designer.cs
C# | 3564 lines | 3199 code | 356 blank | 9 comment | 327 complexity | 627bc39a1c293f06f4fb84e2d6eb6145 MD5 | raw file
- #pragma warning disable 1591
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- // Runtime Version:2.0.50727.3074
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
- namespace DV_Enterprises.Web.DAL
- {
- 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;
-
-
- [System.Data.Linq.Mapping.DatabaseAttribute(Name="ASPNETDB")]
- public partial class DataContext : System.Data.Linq.DataContext
- {
-
- private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
-
- #region Extensibility Method Definitions
- partial void OnCreated();
- partial void InsertCrop(DV_Enterprises.Web.BLL.Crop instance);
- partial void UpdateCrop(DV_Enterprises.Web.BLL.Crop instance);
- partial void DeleteCrop(DV_Enterprises.Web.BLL.Crop instance);
- partial void InsertSectionLog(DV_Enterprises.Web.BLL.SectionLog instance);
- partial void UpdateSectionLog(DV_Enterprises.Web.BLL.SectionLog instance);
- partial void DeleteSectionLog(DV_Enterprises.Web.BLL.SectionLog instance);
- partial void InsertEnvironment(DV_Enterprises.Web.BLL.Environment instance);
- partial void UpdateEnvironment(DV_Enterprises.Web.BLL.Environment instance);
- partial void DeleteEnvironment(DV_Enterprises.Web.BLL.Environment instance);
- partial void InsertGreenhouse(DV_Enterprises.Web.BLL.Greenhouse instance);
- partial void UpdateGreenhouse(DV_Enterprises.Web.BLL.Greenhouse instance);
- partial void DeleteGreenhouse(DV_Enterprises.Web.BLL.Greenhouse instance);
- partial void InsertSchedule(DV_Enterprises.Web.BLL.Schedule instance);
- partial void UpdateSchedule(DV_Enterprises.Web.BLL.Schedule instance);
- partial void DeleteSchedule(DV_Enterprises.Web.BLL.Schedule instance);
- partial void InsertScheduleType(DV_Enterprises.Web.BLL.ScheduleType instance);
- partial void UpdateScheduleType(DV_Enterprises.Web.BLL.ScheduleType instance);
- partial void DeleteScheduleType(DV_Enterprises.Web.BLL.ScheduleType instance);
- partial void InsertSection(DV_Enterprises.Web.BLL.Section instance);
- partial void UpdateSection(DV_Enterprises.Web.BLL.Section instance);
- partial void DeleteSection(DV_Enterprises.Web.BLL.Section instance);
- partial void InsertLocation(DV_Enterprises.Web.BLL.Location instance);
- partial void UpdateLocation(DV_Enterprises.Web.BLL.Location instance);
- partial void DeleteLocation(DV_Enterprises.Web.BLL.Location instance);
- partial void InsertMembership(DV_Enterprises.Web.BLL.Membership instance);
- partial void UpdateMembership(DV_Enterprises.Web.BLL.Membership instance);
- partial void DeleteMembership(DV_Enterprises.Web.BLL.Membership instance);
- partial void InsertUser(DV_Enterprises.Web.BLL.User instance);
- partial void UpdateUser(DV_Enterprises.Web.BLL.User instance);
- partial void DeleteUser(DV_Enterprises.Web.BLL.User instance);
- partial void InsertCustomer(DV_Enterprises.Web.BLL.Customer instance);
- partial void UpdateCustomer(DV_Enterprises.Web.BLL.Customer instance);
- partial void DeleteCustomer(DV_Enterprises.Web.BLL.Customer instance);
- #endregion
-
- public DataContext() :
- base(global::DV_Enterprises.Web.Properties.Settings.Default.ASPNETDBConnectionString, mappingSource)
- {
- OnCreated();
- }
-
- public DataContext(string connection) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public DataContext(System.Data.IDbConnection connection) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public DataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public DataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
- base(connection, mappingSource)
- {
- OnCreated();
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.Crop> Crops
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.Crop>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.SectionLog> SectionLogs
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.SectionLog>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.Environment> Environments
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.Environment>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.Greenhouse> Greenhouses
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.Greenhouse>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.Schedule> Schedules
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.Schedule>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.ScheduleType> ScheduleTypes
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.ScheduleType>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.Section> Sections
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.Section>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.Location> Locations
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.Location>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.Membership> Memberships
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.Membership>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.User> Users
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.User>();
- }
- }
-
- public System.Data.Linq.Table<DV_Enterprises.Web.BLL.Customer> Customers
- {
- get
- {
- return this.GetTable<DV_Enterprises.Web.BLL.Customer>();
- }
- }
- }
- }
- namespace DV_Enterprises.Web.BLL
- {
- using System.Data.Linq;
- using System.Data.Linq.Mapping;
- using System.ComponentModel;
- using System;
-
-
- [Table(Name="dbo.dvent_Crop")]
- public partial class Crop : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _CropId;
-
- private string _Name;
-
- private int _Length;
-
- private int _Width;
-
- private int _Height;
-
- private int _MinTemperature;
-
- private int _MaxTemperature;
-
- private int _MinHumidity;
-
- private int _MaxHumidity;
-
- private System.DateTime _DateCreated;
-
- private System.Nullable<System.DateTime> _DateDeleted;
-
- private EntitySet<Environment> _Environments;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnCropIdChanging(int value);
- partial void OnCropIdChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnLengthChanging(int value);
- partial void OnLengthChanged();
- partial void OnWidthChanging(int value);
- partial void OnWidthChanged();
- partial void OnHeightChanging(int value);
- partial void OnHeightChanged();
- partial void OnMinTemperatureChanging(int value);
- partial void OnMinTemperatureChanged();
- partial void OnMaxTemperatureChanging(int value);
- partial void OnMaxTemperatureChanged();
- partial void OnMinHumidityChanging(int value);
- partial void OnMinHumidityChanged();
- partial void OnMaxHumidityChanging(int value);
- partial void OnMaxHumidityChanged();
- partial void OnDateCreatedChanging(System.DateTime value);
- partial void OnDateCreatedChanged();
- partial void OnDateDeletedChanging(System.Nullable<System.DateTime> value);
- partial void OnDateDeletedChanged();
- #endregion
-
- public Crop()
- {
- this._Environments = new EntitySet<Environment>(new Action<Environment>(this.attach_Environments), new Action<Environment>(this.detach_Environments));
- OnCreated();
- }
-
- [Column(Storage="_CropId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int CropId
- {
- get
- {
- return this._CropId;
- }
- set
- {
- if ((this._CropId != value))
- {
- this.OnCropIdChanging(value);
- this.SendPropertyChanging();
- this._CropId = value;
- this.SendPropertyChanged("CropId");
- this.OnCropIdChanged();
- }
- }
- }
-
- [Column(Storage="_Name", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
- public string Name
- {
- get
- {
- return this._Name;
- }
- set
- {
- if ((this._Name != value))
- {
- this.OnNameChanging(value);
- this.SendPropertyChanging();
- this._Name = value;
- this.SendPropertyChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- [Column(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();
- }
- }
- }
-
- [Column(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();
- }
- }
- }
-
- [Column(Storage="_Height", DbType="Int NOT NULL")]
- public int Height
- {
- get
- {
- return this._Height;
- }
- set
- {
- if ((this._Height != value))
- {
- this.OnHeightChanging(value);
- this.SendPropertyChanging();
- this._Height = value;
- this.SendPropertyChanged("Height");
- this.OnHeightChanged();
- }
- }
- }
-
- [Column(Storage="_MinTemperature", DbType="Int NOT NULL")]
- public int MinTemperature
- {
- get
- {
- return this._MinTemperature;
- }
- set
- {
- if ((this._MinTemperature != value))
- {
- this.OnMinTemperatureChanging(value);
- this.SendPropertyChanging();
- this._MinTemperature = value;
- this.SendPropertyChanged("MinTemperature");
- this.OnMinTemperatureChanged();
- }
- }
- }
-
- [Column(Storage="_MaxTemperature", DbType="Int NOT NULL")]
- public int MaxTemperature
- {
- get
- {
- return this._MaxTemperature;
- }
- set
- {
- if ((this._MaxTemperature != value))
- {
- this.OnMaxTemperatureChanging(value);
- this.SendPropertyChanging();
- this._MaxTemperature = value;
- this.SendPropertyChanged("MaxTemperature");
- this.OnMaxTemperatureChanged();
- }
- }
- }
-
- [Column(Storage="_MinHumidity", DbType="Int NOT NULL")]
- public int MinHumidity
- {
- get
- {
- return this._MinHumidity;
- }
- set
- {
- if ((this._MinHumidity != value))
- {
- this.OnMinHumidityChanging(value);
- this.SendPropertyChanging();
- this._MinHumidity = value;
- this.SendPropertyChanged("MinHumidity");
- this.OnMinHumidityChanged();
- }
- }
- }
-
- [Column(Storage="_MaxHumidity", DbType="Int NOT NULL")]
- public int MaxHumidity
- {
- get
- {
- return this._MaxHumidity;
- }
- set
- {
- if ((this._MaxHumidity != value))
- {
- this.OnMaxHumidityChanging(value);
- this.SendPropertyChanging();
- this._MaxHumidity = value;
- this.SendPropertyChanged("MaxHumidity");
- this.OnMaxHumidityChanged();
- }
- }
- }
-
- [Column(Storage="_DateCreated", DbType="DateTime NOT NULL")]
- public System.DateTime DateCreated
- {
- get
- {
- return this._DateCreated;
- }
- set
- {
- if ((this._DateCreated != value))
- {
- this.OnDateCreatedChanging(value);
- this.SendPropertyChanging();
- this._DateCreated = value;
- this.SendPropertyChanged("DateCreated");
- this.OnDateCreatedChanged();
- }
- }
- }
-
- [Column(Storage="_DateDeleted", DbType="DateTime")]
- public System.Nullable<System.DateTime> DateDeleted
- {
- get
- {
- return this._DateDeleted;
- }
- set
- {
- if ((this._DateDeleted != value))
- {
- this.OnDateDeletedChanging(value);
- this.SendPropertyChanging();
- this._DateDeleted = value;
- this.SendPropertyChanged("DateDeleted");
- this.OnDateDeletedChanged();
- }
- }
- }
-
- [Association(Name="Crop_Environment", Storage="_Environments", ThisKey="CropId", OtherKey="CropId")]
- public EntitySet<Environment> Environments
- {
- get
- {
- return this._Environments;
- }
- set
- {
- this._Environments.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_Environments(Environment entity)
- {
- this.SendPropertyChanging();
- entity.Crop = this;
- }
-
- private void detach_Environments(Environment entity)
- {
- this.SendPropertyChanging();
- entity.Crop = null;
- }
- }
-
- [Table(Name="dbo.dvent_SectionLog")]
- public partial class SectionLog : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _SectionLogId;
-
- private System.Data.Linq.Binary _Time;
-
- private int _Temperature;
-
- private int _Humidity;
-
- private bool _isLightOn;
-
- private int _SectionId;
-
- private EntityRef<Section> _Section;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnSectionLogIdChanging(int value);
- partial void OnSectionLogIdChanged();
- partial void OnTimeChanging(System.Data.Linq.Binary value);
- partial void OnTimeChanged();
- partial void OnTemperatureChanging(int value);
- partial void OnTemperatureChanged();
- partial void OnHumidityChanging(int value);
- partial void OnHumidityChanged();
- partial void OnisLightOnChanging(bool value);
- partial void OnisLightOnChanged();
- partial void OnSectionIdChanging(int value);
- partial void OnSectionIdChanged();
- #endregion
-
- public SectionLog()
- {
- this._Section = default(EntityRef<Section>);
- OnCreated();
- }
-
- [Column(Storage="_SectionLogId", DbType="Int NOT NULL", IsPrimaryKey=true, UpdateCheck=UpdateCheck.Never)]
- public int SectionLogId
- {
- get
- {
- return this._SectionLogId;
- }
- set
- {
- if ((this._SectionLogId != value))
- {
- this.OnSectionLogIdChanging(value);
- this.SendPropertyChanging();
- this._SectionLogId = value;
- this.SendPropertyChanged("SectionLogId");
- this.OnSectionLogIdChanged();
- }
- }
- }
-
- [Column(Storage="_Time", AutoSync=AutoSync.Always, DbType="rowversion NOT NULL", CanBeNull=false, IsDbGenerated=true, IsVersion=true, UpdateCheck=UpdateCheck.Never)]
- public System.Data.Linq.Binary Time
- {
- get
- {
- return this._Time;
- }
- set
- {
- if ((this._Time != value))
- {
- this.OnTimeChanging(value);
- this.SendPropertyChanging();
- this._Time = value;
- this.SendPropertyChanged("Time");
- this.OnTimeChanged();
- }
- }
- }
-
- [Column(Storage="_Temperature", DbType="Int NOT NULL", UpdateCheck=UpdateCheck.Never)]
- public int Temperature
- {
- get
- {
- return this._Temperature;
- }
- set
- {
- if ((this._Temperature != value))
- {
- this.OnTemperatureChanging(value);
- this.SendPropertyChanging();
- this._Temperature = value;
- this.SendPropertyChanged("Temperature");
- this.OnTemperatureChanged();
- }
- }
- }
-
- [Column(Storage="_Humidity", DbType="Int NOT NULL", UpdateCheck=UpdateCheck.Never)]
- public int Humidity
- {
- get
- {
- return this._Humidity;
- }
- set
- {
- if ((this._Humidity != value))
- {
- this.OnHumidityChanging(value);
- this.SendPropertyChanging();
- this._Humidity = value;
- this.SendPropertyChanged("Humidity");
- this.OnHumidityChanged();
- }
- }
- }
-
- [Column(Storage="_isLightOn", DbType="Bit NOT NULL", UpdateCheck=UpdateCheck.Never)]
- public bool isLightOn
- {
- get
- {
- return this._isLightOn;
- }
- set
- {
- if ((this._isLightOn != value))
- {
- this.OnisLightOnChanging(value);
- this.SendPropertyChanging();
- this._isLightOn = value;
- this.SendPropertyChanged("isLightOn");
- this.OnisLightOnChanged();
- }
- }
- }
-
- [Column(Storage="_SectionId", DbType="Int NOT NULL", UpdateCheck=UpdateCheck.Never)]
- public int SectionId
- {
- get
- {
- return this._SectionId;
- }
- set
- {
- if ((this._SectionId != value))
- {
- if (this._Section.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnSectionIdChanging(value);
- this.SendPropertyChanging();
- this._SectionId = value;
- this.SendPropertyChanged("SectionId");
- this.OnSectionIdChanged();
- }
- }
- }
-
- [Association(Name="Section_SectionLog", Storage="_Section", ThisKey="SectionId", OtherKey="SectionId", IsForeignKey=true)]
- public Section Section
- {
- get
- {
- return this._Section.Entity;
- }
- set
- {
- Section previousValue = this._Section.Entity;
- if (((previousValue != value)
- || (this._Section.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Section.Entity = null;
- previousValue.SectionLogs.Remove(this);
- }
- this._Section.Entity = value;
- if ((value != null))
- {
- value.SectionLogs.Add(this);
- this._SectionId = value.SectionId;
- }
- else
- {
- this._SectionId = default(int);
- }
- this.SendPropertyChanged("Section");
- }
- }
- }
-
- 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));
- }
- }
- }
-
- [Table(Name="dbo.dvent_Environment")]
- public partial class Environment : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _EnvironmentId;
-
- private int _CropId;
-
- private System.Nullable<int> _MaxTemp;
-
- private System.Nullable<int> _MinTemp;
-
- private System.Nullable<int> _MaxHumidity;
-
- private System.Nullable<int> _MinHumidity;
-
- private System.DateTime _DateCreated;
-
- private System.Nullable<System.DateTime> _DateDeleted;
-
- private EntitySet<Schedule> _Schedules;
-
- private EntitySet<Section> _Sections;
-
- private EntityRef<Crop> _Crop;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnEnvironmentIdChanging(int value);
- partial void OnEnvironmentIdChanged();
- partial void OnCropIdChanging(int value);
- partial void OnCropIdChanged();
- partial void OnMaxTempChanging(System.Nullable<int> value);
- partial void OnMaxTempChanged();
- partial void OnMinTempChanging(System.Nullable<int> value);
- partial void OnMinTempChanged();
- partial void OnMaxHumidityChanging(System.Nullable<int> value);
- partial void OnMaxHumidityChanged();
- partial void OnMinHumidityChanging(System.Nullable<int> value);
- partial void OnMinHumidityChanged();
- partial void OnDateCreatedChanging(System.DateTime value);
- partial void OnDateCreatedChanged();
- partial void OnDateDeletedChanging(System.Nullable<System.DateTime> value);
- partial void OnDateDeletedChanged();
- #endregion
-
- public Environment()
- {
- this._Schedules = new EntitySet<Schedule>(new Action<Schedule>(this.attach_Schedules), new Action<Schedule>(this.detach_Schedules));
- this._Sections = new EntitySet<Section>(new Action<Section>(this.attach_Sections), new Action<Section>(this.detach_Sections));
- this._Crop = default(EntityRef<Crop>);
- OnCreated();
- }
-
- [Column(Storage="_EnvironmentId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int EnvironmentId
- {
- get
- {
- return this._EnvironmentId;
- }
- set
- {
- if ((this._EnvironmentId != value))
- {
- this.OnEnvironmentIdChanging(value);
- this.SendPropertyChanging();
- this._EnvironmentId = value;
- this.SendPropertyChanged("EnvironmentId");
- this.OnEnvironmentIdChanged();
- }
- }
- }
-
- [Column(Storage="_CropId", DbType="Int NOT NULL")]
- public int CropId
- {
- get
- {
- return this._CropId;
- }
- set
- {
- if ((this._CropId != value))
- {
- if (this._Crop.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnCropIdChanging(value);
- this.SendPropertyChanging();
- this._CropId = value;
- this.SendPropertyChanged("CropId");
- this.OnCropIdChanged();
- }
- }
- }
-
- [Column(Storage="_MaxTemp", DbType="Int")]
- public System.Nullable<int> MaxTemp
- {
- get
- {
- return this._MaxTemp;
- }
- set
- {
- if ((this._MaxTemp != value))
- {
- this.OnMaxTempChanging(value);
- this.SendPropertyChanging();
- this._MaxTemp = value;
- this.SendPropertyChanged("MaxTemp");
- this.OnMaxTempChanged();
- }
- }
- }
-
- [Column(Storage="_MinTemp", DbType="Int")]
- public System.Nullable<int> MinTemp
- {
- get
- {
- return this._MinTemp;
- }
- set
- {
- if ((this._MinTemp != value))
- {
- this.OnMinTempChanging(value);
- this.SendPropertyChanging();
- this._MinTemp = value;
- this.SendPropertyChanged("MinTemp");
- this.OnMinTempChanged();
- }
- }
- }
-
- [Column(Storage="_MaxHumidity", DbType="Int")]
- public System.Nullable<int> MaxHumidity
- {
- get
- {
- return this._MaxHumidity;
- }
- set
- {
- if ((this._MaxHumidity != value))
- {
- this.OnMaxHumidityChanging(value);
- this.SendPropertyChanging();
- this._MaxHumidity = value;
- this.SendPropertyChanged("MaxHumidity");
- this.OnMaxHumidityChanged();
- }
- }
- }
-
- [Column(Storage="_MinHumidity", DbType="Int")]
- public System.Nullable<int> MinHumidity
- {
- get
- {
- return this._MinHumidity;
- }
- set
- {
- if ((this._MinHumidity != value))
- {
- this.OnMinHumidityChanging(value);
- this.SendPropertyChanging();
- this._MinHumidity = value;
- this.SendPropertyChanged("MinHumidity");
- this.OnMinHumidityChanged();
- }
- }
- }
-
- [Column(Storage="_DateCreated", DbType="DateTime NOT NULL")]
- public System.DateTime DateCreated
- {
- get
- {
- return this._DateCreated;
- }
- set
- {
- if ((this._DateCreated != value))
- {
- this.OnDateCreatedChanging(value);
- this.SendPropertyChanging();
- this._DateCreated = value;
- this.SendPropertyChanged("DateCreated");
- this.OnDateCreatedChanged();
- }
- }
- }
-
- [Column(Storage="_DateDeleted", DbType="DateTime")]
- public System.Nullable<System.DateTime> DateDeleted
- {
- get
- {
- return this._DateDeleted;
- }
- set
- {
- if ((this._DateDeleted != value))
- {
- this.OnDateDeletedChanging(value);
- this.SendPropertyChanging();
- this._DateDeleted = value;
- this.SendPropertyChanged("DateDeleted");
- this.OnDateDeletedChanged();
- }
- }
- }
-
- [Association(Name="Environment_Schedule", Storage="_Schedules", ThisKey="EnvironmentId", OtherKey="EnviromentId")]
- public EntitySet<Schedule> Schedules
- {
- get
- {
- return this._Schedules;
- }
- set
- {
- this._Schedules.Assign(value);
- }
- }
-
- [Association(Name="Environment_Section", Storage="_Sections", ThisKey="EnvironmentId", OtherKey="EnviromentId")]
- public EntitySet<Section> Sections
- {
- get
- {
- return this._Sections;
- }
- set
- {
- this._Sections.Assign(value);
- }
- }
-
- [Association(Name="Crop_Environment", Storage="_Crop", ThisKey="CropId", OtherKey="CropId", IsForeignKey=true)]
- public Crop Crop
- {
- get
- {
- return this._Crop.Entity;
- }
- set
- {
- Crop previousValue = this._Crop.Entity;
- if (((previousValue != value)
- || (this._Crop.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Crop.Entity = null;
- previousValue.Environments.Remove(this);
- }
- this._Crop.Entity = value;
- if ((value != null))
- {
- value.Environments.Add(this);
- this._CropId = value.CropId;
- }
- else
- {
- this._CropId = default(int);
- }
- this.SendPropertyChanged("Crop");
- }
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Schedules(Schedule entity)
- {
- this.SendPropertyChanging();
- entity.Environment = this;
- }
-
- private void detach_Schedules(Schedule entity)
- {
- this.SendPropertyChanging();
- entity.Environment = null;
- }
-
- private void attach_Sections(Section entity)
- {
- this.SendPropertyChanging();
- entity.Environment = this;
- }
-
- private void detach_Sections(Section entity)
- {
- this.SendPropertyChanging();
- entity.Environment = null;
- }
- }
-
- [Table(Name="dbo.dvent_Greenhouse")]
- public partial class Greenhouse : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _GreenhouseId;
-
- private int _Width;
-
- private int _Height;
-
- private int _Length;
-
- private int _LocationId;
-
- private EntitySet<Section> _Sections;
-
- private EntityRef<Location> _Location;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnGreenhouseIdChanging(int value);
- partial void OnGreenhouseIdChanged();
- partial void OnWidthChanging(int value);
- partial void OnWidthChanged();
- partial void OnHeightChanging(int value);
- partial void OnHeightChanged();
- partial void OnLengthChanging(int value);
- partial void OnLengthChanged();
- partial void OnLocationIdChanging(int value);
- partial void OnLocationIdChanged();
- #endregion
-
- public Greenhouse()
- {
- this._Sections = new EntitySet<Section>(new Action<Section>(this.attach_Sections), new Action<Section>(this.detach_Sections));
- this._Location = default(EntityRef<Location>);
- OnCreated();
- }
-
- [Column(Storage="_GreenhouseId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int GreenhouseId
- {
- get
- {
- return this._GreenhouseId;
- }
- set
- {
- if ((this._GreenhouseId != value))
- {
- this.OnGreenhouseIdChanging(value);
- this.SendPropertyChanging();
- this._GreenhouseId = value;
- this.SendPropertyChanged("GreenhouseId");
- this.OnGreenhouseIdChanged();
- }
- }
- }
-
- [Column(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();
- }
- }
- }
-
- [Column(Storage="_Height", DbType="Int NOT NULL")]
- public int Height
- {
- get
- {
- return this._Height;
- }
- set
- {
- if ((this._Height != value))
- {
- this.OnHeightChanging(value);
- this.SendPropertyChanging();
- this._Height = value;
- this.SendPropertyChanged("Height");
- this.OnHeightChanged();
- }
- }
- }
-
- [Column(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();
- }
- }
- }
-
- [Column(Storage="_LocationId", DbType="Int NOT NULL")]
- public int LocationId
- {
- get
- {
- return this._LocationId;
- }
- set
- {
- if ((this._LocationId != value))
- {
- if (this._Location.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnLocationIdChanging(value);
- this.SendPropertyChanging();
- this._LocationId = value;
- this.SendPropertyChanged("LocationId");
- this.OnLocationIdChanged();
- }
- }
- }
-
- [Association(Name="Greenhouse_Section", Storage="_Sections", ThisKey="GreenhouseId", OtherKey="GreenhouseId")]
- public EntitySet<Section> Sections
- {
- get
- {
- return this._Sections;
- }
- set
- {
- this._Sections.Assign(value);
- }
- }
-
- [Association(Name="Location_Greenhouse", Storage="_Location", ThisKey="LocationId", OtherKey="LocationId", IsForeignKey=true)]
- public Location Location
- {
- get
- {
- return this._Location.Entity;
- }
- set
- {
- Location previousValue = this._Location.Entity;
- if (((previousValue != value)
- || (this._Location.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Location.Entity = null;
- previousValue.Greenhouses.Remove(this);
- }
- this._Location.Entity = value;
- if ((value != null))
- {
- value.Greenhouses.Add(this);
- this._LocationId = value.LocationId;
- }
- else
- {
- this._LocationId = default(int);
- }
- this.SendPropertyChanged("Location");
- }
- }
- }
-
- 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_Sections(Section entity)
- {
- this.SendPropertyChanging();
- entity.Greenhouse = this;
- }
-
- private void detach_Sections(Section entity)
- {
- this.SendPropertyChanging();
- entity.Greenhouse = null;
- }
- }
-
- [Table(Name="dbo.dvent_Schedule")]
- public partial class Schedule : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ScheduleId;
-
- private System.DateTime _Time;
-
- private int _interval;
-
- private int _EnviromentId;
-
- private int _ScheduleTypeId;
-
- private System.DateTime _DateCreated;
-
- private System.Nullable<System.DateTime> _DateDeleted;
-
- private EntityRef<Environment> _Environment;
-
- private EntityRef<ScheduleType> _ScheduleType;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnScheduleIdChanging(int value);
- partial void OnScheduleIdChanged();
- partial void OnTimeChanging(System.DateTime value);
- partial void OnTimeChanged();
- partial void OnintervalChanging(int value);
- partial void OnintervalChanged();
- partial void OnEnviromentIdChanging(int value);
- partial void OnEnviromentIdChanged();
- partial void OnScheduleTypeIdChanging(int value);
- partial void OnScheduleTypeIdChanged();
- partial void OnDateCreatedChanging(System.DateTime value);
- partial void OnDateCreatedChanged();
- partial void OnDateDeletedChanging(System.Nullable<System.DateTime> value);
- partial void OnDateDeletedChanged();
- #endregion
-
- public Schedule()
- {
- this._Environment = default(EntityRef<Environment>);
- this._ScheduleType = default(EntityRef<ScheduleType>);
- OnCreated();
- }
-
- [Column(Storage="_ScheduleId", DbType="Int NOT NULL", IsPrimaryKey=true)]
- public int ScheduleId
- {
- get
- {
- return this._ScheduleId;
- }
- set
- {
- if ((this._ScheduleId != value))
- {
- this.OnScheduleIdChanging(value);
- this.SendPropertyChanging();
- this._ScheduleId = value;
- this.SendPropertyChanged("ScheduleId");
- this.OnScheduleIdChanged();
- }
- }
- }
-
- [Column(Storage="_Time", DbType="DateTime NOT NULL")]
- public System.DateTime Time
- {
- get
- {
- return this._Time;
- }
- set
- {
- if ((this._Time != value))
- {
- this.OnTimeChanging(value);
- this.SendPropertyChanging();
- this._Time = value;
- this.SendPropertyChanged("Time");
- this.OnTimeChanged();
- }
- }
- }
-
- [Column(Storage="_interval", DbType="Int NOT NULL")]
- public int interval
- {
- get
- {
- return this._interval;
- }
- set
- {
- if ((this._interval != value))
- {
- this.OnintervalChanging(value);
- this.SendPropertyChanging();
- this._interval = value;
- this.SendPropertyChanged("interval");
- this.OnintervalChanged();
- }
- }
- }
-
- [Column(Storage="_EnviromentId", DbType="Int NOT NULL")]
- public int EnviromentId
- {
- get
- {
- return this._EnviromentId;
- }
- set
- {
- if ((this._EnviromentId != value))
- {
- if (this._Environment.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnEnviromentIdChanging(value);
- this.SendPropertyChanging();
- this._EnviromentId = value;
- this.SendPropertyChanged("EnviromentId");
- this.OnEnviromentIdChanged();
- }
- }
- }
-
- [Column(Storage="_ScheduleTypeId", DbType="Int NOT NULL")]
- public int ScheduleTypeId
- {
- get
- {
- return this._ScheduleTypeId;
- }
- set
- {
- if ((this._ScheduleTypeId != value))
- {
- if (this._ScheduleType.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnScheduleTypeIdChanging(value);
- this.SendPropertyChanging();
- this._ScheduleTypeId = value;
- this.SendPropertyChanged("ScheduleTypeId");
- this.OnScheduleTypeIdChanged();
- }
- }
- }
-
- [Column(Storage="_DateCreated", DbType="DateTime NOT NULL")]
- public System.DateTime DateCreated
- {
- get
- {
- return this._DateCreated;
- }
- set
- {
- if ((this._DateCreated != value))
- {
- this.OnDateCreatedChanging(value);
- this.SendPropertyChanging();
- this._DateCreated = value;
- this.SendPropertyChanged("DateCreated");
- this.OnDateCreatedChanged();
- }
- }
- }
-
- [Column(Storage="_DateDeleted", DbType="DateTime")]
- public System.Nullable<System.DateTime> DateDeleted
- {
- get
- {
- return this._DateDeleted;
- }
- set
- {
- if ((this._DateDeleted != value))
- {
- this.OnDateDeletedChanging(value);
- this.SendPropertyChanging();
- this._DateDeleted = value;
- this.SendPropertyChanged("DateDeleted");
- this.OnDateDeletedChanged();
- }
- }
- }
-
- [Association(Name="Environment_Schedule", Storage="_Environment", ThisKey="EnviromentId", OtherKey="EnvironmentId", IsForeignKey=true)]
- public Environment Environment
- {
- get
- {
- return this._Environment.Entity;
- }
- set
- {
- Environment previousValue = this._Environment.Entity;
- if (((previousValue != value)
- || (this._Environment.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Environment.Entity = null;
- previousValue.Schedules.Remove(this);
- }
- this._Environment.Entity = value;
- if ((value != null))
- {
- value.Schedules.Add(this);
- this._EnviromentId = value.EnvironmentId;
- }
- else
- {
- this._EnviromentId = default(int);
- }
- this.SendPropertyChanged("Environment");
- }
- }
- }
-
- [Association(Name="ScheduleType_Schedule", Storage="_ScheduleType", ThisKey="ScheduleTypeId", OtherKey="ScheduleTypeId", IsForeignKey=true)]
- public ScheduleType ScheduleType
- {
- get
- {
- return this._ScheduleType.Entity;
- }
- set
- {
- ScheduleType previousValue = this._ScheduleType.Entity;
- if (((previousValue != value)
- || (this._ScheduleType.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._ScheduleType.Entity = null;
- previousValue.Schedules.Remove(this);
- }
- this._ScheduleType.Entity = value;
- if ((value != null))
- {
- value.Schedules.Add(this);
- this._ScheduleTypeId = value.ScheduleTypeId;
- }
- else
- {
- this._ScheduleTypeId = default(int);
- }
- this.SendPropertyChanged("ScheduleType");
- }
- }
- }
-
- 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));
- }
- }
- }
-
- [Table(Name="dbo.dvent_ScheduleType")]
- public partial class ScheduleType : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _ScheduleTypeId;
-
- private string _name;
-
- private EntitySet<Schedule> _Schedules;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnScheduleTypeIdChanging(int value);
- partial void OnScheduleTypeIdChanged();
- partial void OnnameChanging(string value);
- partial void OnnameChanged();
- #endregion
-
- public ScheduleType()
- {
- this._Schedules = new EntitySet<Schedule>(new Action<Schedule>(this.attach_Schedules), new Action<Schedule>(this.detach_Schedules));
- OnCreated();
- }
-
- [Column(Storage="_ScheduleTypeId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int ScheduleTypeId
- {
- get
- {
- return this._ScheduleTypeId;
- }
- set
- {
- if ((this._ScheduleTypeId != value))
- {
- this.OnScheduleTypeIdChanging(value);
- this.SendPropertyChanging();
- this._ScheduleTypeId = value;
- this.SendPropertyChanged("ScheduleTypeId");
- this.OnScheduleTypeIdChanged();
- }
- }
- }
-
- [Column(Storage="_name", DbType="NVarChar(253) NOT NULL", CanBeNull=false)]
- public string name
- {
- get
- {
- return this._name;
- }
- set
- {
- if ((this._name != value))
- {
- this.OnnameChanging(value);
- this.SendPropertyChanging();
- this._name = value;
- this.SendPropertyChanged("name");
- this.OnnameChanged();
- }
- }
- }
-
- [Association(Name="ScheduleType_Schedule", Storage="_Schedules", ThisKey="ScheduleTypeId", OtherKey="ScheduleTypeId")]
- public EntitySet<Schedule> Schedules
- {
- get
- {
- return this._Schedules;
- }
- set
- {
- this._Schedules.Assign(value);
- }
- }
-
- public event PropertyChangingEventHandler PropertyChanging;
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void SendPropertyChanging()
- {
- if ((this.PropertyChanging != null))
- {
- this.PropertyChanging(this, emptyChangingEventArgs);
- }
- }
-
- protected virtual void SendPropertyChanged(String propertyName)
- {
- if ((this.PropertyChanged != null))
- {
- this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- private void attach_Schedules(Schedule entity)
- {
- this.SendPropertyChanging();
- entity.ScheduleType = this;
- }
-
- private void detach_Schedules(Schedule entity)
- {
- this.SendPropertyChanging();
- entity.ScheduleType = null;
- }
- }
-
- [Table(Name="dbo.dvent_Section")]
- public partial class Section : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _SectionId;
-
- private int _GreenhouseId;
-
- private int _EnviromentId;
-
- private int _CropId;
-
- private string _Name;
-
- private System.Nullable<int> _OwnerId;
-
- private int _Length;
-
- private int _Width;
-
- private int _Height;
-
- private EntitySet<SectionLog> _SectionLogs;
-
- private EntityRef<Environment> _Environment;
-
- private EntityRef<Greenhouse> _Greenhouse;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnSectionIdChanging(int value);
- partial void OnSectionIdChanged();
- partial void OnGreenhouseIdChanging(int value);
- partial void OnGreenhouseIdChanged();
- partial void OnEnviromentIdChanging(int value);
- partial void OnEnviromentIdChanged();
- partial void OnCropIdChanging(int value);
- partial void OnCropIdChanged();
- partial void OnNameChanging(string value);
- partial void OnNameChanged();
- partial void OnCustomerIdChanging(System.Nullable<int> value);
- partial void OnCustomerIdChanged();
- partial void OnLengthChanging(int value);
- partial void OnLengthChanged();
- partial void OnWidthChanging(int value);
- partial void OnWidthChanged();
- partial void OnHeightChanging(int value);
- partial void OnHeightChanged();
- #endregion
-
- public Section()
- {
- this._SectionLogs = new EntitySet<SectionLog>(new Action<SectionLog>(this.attach_SectionLogs), new Action<SectionLog>(this.detach_SectionLogs));
- this._Environment = default(EntityRef<Environment>);
- this._Greenhouse = default(EntityRef<Greenhouse>);
- OnCreated();
- }
-
- [Column(Storage="_SectionId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int SectionId
- {
- get
- {
- return this._SectionId;
- }
- set
- {
- if ((this._SectionId != value))
- {
- this.OnSectionIdChanging(value);
- this.SendPropertyChanging();
- this._SectionId = value;
- this.SendPropertyChanged("SectionId");
- this.OnSectionIdChanged();
- }
- }
- }
-
- [Column(Storage="_GreenhouseId", DbType="Int NOT NULL")]
- public int GreenhouseId
- {
- get
- {
- return this._GreenhouseId;
- }
- set
- {
- if ((this._GreenhouseId != value))
- {
- if (this._Greenhouse.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnGreenhouseIdChanging(value);
- this.SendPropertyChanging();
- this._GreenhouseId = value;
- this.SendPropertyChanged("GreenhouseId");
- this.OnGreenhouseIdChanged();
- }
- }
- }
-
- [Column(Storage="_EnviromentId", DbType="Int NOT NULL")]
- public int EnviromentId
- {
- get
- {
- return this._EnviromentId;
- }
- set
- {
- if ((this._EnviromentId != value))
- {
- if (this._Environment.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnEnviromentIdChanging(value);
- this.SendPropertyChanging();
- this._EnviromentId = value;
- this.SendPropertyChanged("EnviromentId");
- this.OnEnviromentIdChanged();
- }
- }
- }
-
- [Column(Storage="_CropId", DbType="Int NOT NULL")]
- public int CropId
- {
- get
- {
- return this._CropId;
- }
- set
- {
- if ((this._CropId != value))
- {
- this.OnCropIdChanging(value);
- this.SendPropertyChanging();
- this._CropId = value;
- this.SendPropertyChanged("CropId");
- this.OnCropIdChanged();
- }
- }
- }
-
- [Column(Storage="_Name", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
- public string Name
- {
- get
- {
- return this._Name;
- }
- set
- {
- if ((this._Name != value))
- {
- this.OnNameChanging(value);
- this.SendPropertyChanging();
- this._Name = value;
- this.SendPropertyChanged("Name");
- this.OnNameChanged();
- }
- }
- }
-
- [Column(Name="OwnerId", Storage="_OwnerId", DbType="Int")]
- public System.Nullable<int> CustomerId
- {
- get
- {
- return this._OwnerId;
- }
- set
- {
- if ((this._OwnerId != value))
- {
- this.OnCustomerIdChanging(value);
- this.SendPropertyChanging();
- this._OwnerId = value;
- this.SendPropertyChanged("CustomerId");
- this.OnCustomerIdChanged();
- }
- }
- }
-
- [Column(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();
- }
- }
- }
-
- [Column(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();
- }
- }
- }
-
- [Column(Storage="_Height", DbType="Int NOT NULL")]
- public int Height
- {
- get
- {
- return this._Height;
- }
- set
- {
- if ((this._Height != value))
- {
- this.OnHeightChanging(value);
- this.SendPropertyChanging();
- this._Height = value;
- this.SendPropertyChanged("Height");
- this.OnHeightChanged();
- }
- }
- }
-
- [Association(Name="Section_SectionLog", Storage="_SectionLogs", ThisKey="SectionId", OtherKey="SectionId")]
- public EntitySet<SectionLog> SectionLogs
- {
- get
- {
- return this._SectionLogs;
- }
- set
- {
- this._SectionLogs.Assign(value);
- }
- }
-
- [Association(Name="Environment_Section", Storage="_Environment", ThisKey="EnviromentId", OtherKey="EnvironmentId", IsForeignKey=true)]
- public Environment Environment
- {
- get
- {
- return this._Environment.Entity;
- }
- set
- {
- Environment previousValue = this._Environment.Entity;
- if (((previousValue != value)
- || (this._Environment.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Environment.Entity = null;
- previousValue.Sections.Remove(this);
- }
- this._Environment.Entity = value;
- if ((value != null))
- {
- value.Sections.Add(this);
- this._EnviromentId = value.EnvironmentId;
- }
- else
- {
- this._EnviromentId = default(int);
- }
- this.SendPropertyChanged("Environment");
- }
- }
- }
-
- [Association(Name="Greenhouse_Section", Storage="_Greenhouse", ThisKey="GreenhouseId", OtherKey="GreenhouseId", IsForeignKey=true)]
- public Greenhouse Greenhouse
- {
- get
- {
- return this._Greenhouse.Entity;
- }
- set
- {
- Greenhouse previousValue = this._Greenhouse.Entity;
- if (((previousValue != value)
- || (this._Greenhouse.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Greenhouse.Entity = null;
- previousValue.Sections.Remove(this);
- }
- this._Greenhouse.Entity = value;
- if ((value != null))
- {
- value.Sections.Add(this);
- this._GreenhouseId = value.GreenhouseId;
- }
- else
- {
- this._GreenhouseId = default(int);
- }
- this.SendPropertyChanged("Greenhouse");
- }
- }
- }
-
- 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_SectionLogs(SectionLog entity)
- {
- this.SendPropertyChanging();
- entity.Section = this;
- }
-
- private void detach_SectionLogs(SectionLog entity)
- {
- this.SendPropertyChanging();
- entity.Section = null;
- }
- }
-
- [Table(Name="dbo.dvent_Location")]
- public partial class Location : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _LocationId;
-
- private string _City;
-
- private string _State;
-
- private string _AddressLine1;
-
- private string _AddressLine2;
-
- private System.Nullable<int> _Zip;
-
- private string _Country;
-
- private EntitySet<Greenhouse> _Greenhouses;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnLocationIdChanging(int value);
- partial void OnLocationIdChanged();
- partial void OnCityChanging(string value);
- partial void OnCityChanged();
- partial void OnStateChanging(string value);
- partial void OnStateChanged();
- partial void OnAddressLine1Changing(string value);
- partial void OnAddressLine1Changed();
- partial void OnAddressLine2Changing(string value);
- partial void OnAddressLine2Changed();
- partial void OnZipChanging(System.Nullable<int> value);
- partial void OnZipChanged();
- partial void OnCountryChanging(string value);
- partial void OnCountryChanged();
- #endregion
-
- public Location()
- {
- this._Greenhouses = new EntitySet<Greenhouse>(new Action<Greenhouse>(this.attach_Greenhouses), new Action<Greenhouse>(this.detach_Greenhouses));
- OnCreated();
- }
-
- [Column(Storage="_LocationId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int LocationId
- {
- get
- {
- return this._LocationId;
- }
- set
- {
- if ((this._LocationId != value))
- {
- this.OnLocationIdChanging(value);
- this.SendPropertyChanging();
- this._LocationId = value;
- this.SendPropertyChanged("LocationId");
- this.OnLocationIdChanged();
- }
- }
- }
-
- [Column(Storage="_City", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
- public string City
- {
- get
- {
- return this._City;
- }
- set
- {
- if ((this._City != value))
- {
- this.OnCityChanging(value);
- this.SendPropertyChanging();
- this._City = value;
- this.SendPropertyChanged("City");
- this.OnCityChanged();
- }
- }
- }
-
- [Column(Storage="_State", DbType="NVarChar(50)")]
- public string State
- {
- get
- {
- return this._State;
- }
- set
- {
- if ((this._State != value))
- {
- this.OnStateChanging(value);
- this.SendPropertyChanging();
- this._State = value;
- this.SendPropertyChanged("State");
- this.OnStateChanged();
- }
- }
- }
-
- [Column(Storage="_AddressLine1", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
- public string AddressLine1
- {
- get
- {
- return this._AddressLine1;
- }
- set
- {
- if ((this._AddressLine1 != value))
- {
- this.OnAddressLine1Changing(value);
- this.SendPropertyChanging();
- this._AddressLine1 = value;
- this.SendPropertyChanged("AddressLine1");
- this.OnAddressLine1Changed();
- }
- }
- }
-
- [Column(Storage="_AddressLine2", DbType="NVarChar(255)")]
- public string AddressLine2
- {
- get
- {
- return this._AddressLine2;
- }
- set
- {
- if ((this._AddressLine2 != value))
- {
- this.OnAddressLine2Changing(value);
- this.SendPropertyChanging();
- this._AddressLine2 = value;
- this.SendPropertyChanged("AddressLine2");
- this.OnAddressLine2Changed();
- }
- }
- }
-
- [Column(Storage="_Zip", DbType="Int")]
- public System.Nullable<int> Zip
- {
- get
- {
- return this._Zip;
- }
- set
- {
- if ((this._Zip != value))
- {
- this.OnZipChanging(value);
- this.SendPropertyChanging();
- this._Zip = value;
- this.SendPropertyChanged("Zip");
- this.OnZipChanged();
- }
- }
- }
-
- [Column(Storage="_Country", DbType="NVarChar(255) NOT NULL", CanBeNull=false)]
- public string Country
- {
- get
- {
- return this._Country;
- }
- set
- {
- if ((this._Country != value))
- {
- this.OnCountryChanging(value);
- this.SendPropertyChanging();
- this._Country = value;
- this.SendPropertyChanged("Country");
- this.OnCountryChanged();
- }
- }
- }
-
- [Association(Name="Location_Greenhouse", Storage="_Greenhouses", ThisKey="LocationId", OtherKey="LocationId")]
- public EntitySet<Greenhouse> Greenhouses
- {
- get
- {
- return this._Greenhouses;
- }
- set
- {
- this._Greenhouses.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_Greenhouses(Greenhouse entity)
- {
- this.SendPropertyChanging();
- entity.Location = this;
- }
-
- private void detach_Greenhouses(Greenhouse entity)
- {
- this.SendPropertyChanging();
- entity.Location = null;
- }
- }
-
- [Table(Name="dbo.aspnet_Membership")]
- public partial class Membership : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private System.Guid _ApplicationId;
-
- private System.Guid _UserId;
-
- private string _Password;
-
- private int _PasswordFormat;
-
- private string _PasswordSalt;
-
- private string _MobilePIN;
-
- private string _Email;
-
- private string _LoweredEmail;
-
- private string _PasswordQuestion;
-
- private string _PasswordAnswer;
-
- private bool _IsApproved;
-
- private bool _IsLockedOut;
-
- private System.DateTime _CreateDate;
-
- private System.DateTime _LastLoginDate;
-
- private System.DateTime _LastPasswordChangedDate;
-
- private System.DateTime _LastLockoutDate;
-
- private int _FailedPasswordAttemptCount;
-
- private System.DateTime _FailedPasswordAttemptWindowStart;
-
- private int _FailedPasswordAnswerAttemptCount;
-
- private System.DateTime _FailedPasswordAnswerAttemptWindowStart;
-
- private string _Comment;
-
- private EntityRef<User> _User;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnApplicationIdChanging(System.Guid value);
- partial void OnApplicationIdChanged();
- partial void OnUserIdChanging(System.Guid value);
- partial void OnUserIdChanged();
- partial void OnPasswordChanging(string value);
- partial void OnPasswordChanged();
- partial void OnPasswordFormatChanging(int value);
- partial void OnPasswordFormatChanged();
- partial void OnPasswordSaltChanging(string value);
- partial void OnPasswordSaltChanged();
- partial void OnMobilePINChanging(string value);
- partial void OnMobilePINChanged();
- partial void OnEmailChanging(string value);
- partial void OnEmailChanged();
- partial void OnLoweredEmailChanging(string value);
- partial void OnLoweredEmailChanged();
- partial void OnPasswordQuestionChanging(string value);
- partial void OnPasswordQuestionChanged();
- partial void OnPasswordAnswerChanging(string value);
- partial void OnPasswordAnswerChanged();
- partial void OnIsApprovedChanging(bool value);
- partial void OnIsApprovedChanged();
- partial void OnIsLockedOutChanging(bool value);
- partial void OnIsLockedOutChanged();
- partial void OnCreateDateChanging(System.DateTime value);
- partial void OnCreateDateChanged();
- partial void OnLastLoginDateChanging(System.DateTime value);
- partial void OnLastLoginDateChanged();
- partial void OnLastPasswordChangedDateChanging(System.DateTime value);
- partial void OnLastPasswordChangedDateChanged();
- partial void OnLastLockoutDateChanging(System.DateTime value);
- partial void OnLastLockoutDateChanged();
- partial void OnFailedPasswordAttemptCountChanging(int value);
- partial void OnFailedPasswordAttemptCountChanged();
- partial void OnFailedPasswordAttemptWindowStartChanging(System.DateTime value);
- partial void OnFailedPasswordAttemptWindowStartChanged();
- partial void OnFailedPasswordAnswerAttemptCountChanging(int value);
- partial void OnFailedPasswordAnswerAttemptCountChanged();
- partial void OnFailedPasswordAnswerAttemptWindowStartChanging(System.DateTime value);
- partial void OnFailedPasswordAnswerAttemptWindowStartChanged();
- partial void OnCommentChanging(string value);
- partial void OnCommentChanged();
- #endregion
-
- public Membership()
- {
- this._User = default(EntityRef<User>);
- OnCreated();
- }
-
- [Column(Storage="_ApplicationId", DbType="UniqueIdentifier NOT NULL")]
- public System.Guid ApplicationId
- {
- get
- {
- return this._ApplicationId;
- }
- set
- {
- if ((this._ApplicationId != value))
- {
- this.OnApplicationIdChanging(value);
- this.SendPropertyChanging();
- this._ApplicationId = value;
- this.SendPropertyChanged("ApplicationId");
- this.OnApplicationIdChanged();
- }
- }
- }
-
- [Column(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
- public System.Guid UserId
- {
- get
- {
- return this._UserId;
- }
- set
- {
- if ((this._UserId != value))
- {
- if (this._User.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnUserIdChanging(value);
- this.SendPropertyChanging();
- this._UserId = value;
- this.SendPropertyChanged("UserId");
- this.OnUserIdChanged();
- }
- }
- }
-
- [Column(Storage="_Password", DbType="NVarChar(128) 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();
- }
- }
- }
-
- [Column(Storage="_PasswordFormat", DbType="Int NOT NULL")]
- public int PasswordFormat
- {
- get
- {
- return this._PasswordFormat;
- }
- set
- {
- if ((this._PasswordFormat != value))
- {
- this.OnPasswordFormatChanging(value);
- this.SendPropertyChanging();
- this._PasswordFormat = value;
- this.SendPropertyChanged("PasswordFormat");
- this.OnPasswordFormatChanged();
- }
- }
- }
-
- [Column(Storage="_PasswordSalt", DbType="NVarChar(128) NOT NULL", CanBeNull=false)]
- public string PasswordSalt
- {
- get
- {
- return this._PasswordSalt;
- }
- set
- {
- if ((this._PasswordSalt != value))
- {
- this.OnPasswordSaltChanging(value);
- this.SendPropertyChanging();
- this._PasswordSalt = value;
- this.SendPropertyChanged("PasswordSalt");
- this.OnPasswordSaltChanged();
- }
- }
- }
-
- [Column(Storage="_MobilePIN", DbType="NVarChar(16)")]
- public string MobilePIN
- {
- get
- {
- return this._MobilePIN;
- }
- set
- {
- if ((this._MobilePIN != value))
- {
- this.OnMobilePINChanging(value);
- this.SendPropertyChanging();
- this._MobilePIN = value;
- this.SendPropertyChanged("MobilePIN");
- this.OnMobilePINChanged();
- }
- }
- }
-
- [Column(Storage="_Email", DbType="NVarChar(256)")]
- 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();
- }
- }
- }
-
- [Column(Storage="_LoweredEmail", DbType="NVarChar(256)")]
- public string LoweredEmail
- {
- get
- {
- return this._LoweredEmail;
- }
- set
- {
- if ((this._LoweredEmail != value))
- {
- this.OnLoweredEmailChanging(value);
- this.SendPropertyChanging();
- this._LoweredEmail = value;
- this.SendPropertyChanged("LoweredEmail");
- this.OnLoweredEmailChanged();
- }
- }
- }
-
- [Column(Storage="_PasswordQuestion", DbType="NVarChar(256)")]
- public string PasswordQuestion
- {
- get
- {
- return this._PasswordQuestion;
- }
- set
- {
- if ((this._PasswordQuestion != value))
- {
- this.OnPasswordQuestionChanging(value);
- this.SendPropertyChanging();
- this._PasswordQuestion = value;
- this.SendPropertyChanged("PasswordQuestion");
- this.OnPasswordQuestionChanged();
- }
- }
- }
-
- [Column(Storage="_PasswordAnswer", DbType="NVarChar(128)")]
- public string PasswordAnswer
- {
- get
- {
- return this._PasswordAnswer;
- }
- set
- {
- if ((this._PasswordAnswer != value))
- {
- this.OnPasswordAnswerChanging(value);
- this.SendPropertyChanging();
- this._PasswordAnswer = value;
- this.SendPropertyChanged("PasswordAnswer");
- this.OnPasswordAnswerChanged();
- }
- }
- }
-
- [Column(Storage="_IsApproved", DbType="Bit NOT NULL")]
- public bool IsApproved
- {
- get
- {
- return this._IsApproved;
- }
- set
- {
- if ((this._IsApproved != value))
- {
- this.OnIsApprovedChanging(value);
- this.SendPropertyChanging();
- this._IsApproved = value;
- this.SendPropertyChanged("IsApproved");
- this.OnIsApprovedChanged();
- }
- }
- }
-
- [Column(Storage="_IsLockedOut", DbType="Bit NOT NULL")]
- public bool IsLockedOut
- {
- get
- {
- return this._IsLockedOut;
- }
- set
- {
- if ((this._IsLockedOut != value))
- {
- this.OnIsLockedOutChanging(value);
- this.SendPropertyChanging();
- this._IsLockedOut = value;
- this.SendPropertyChanged("IsLockedOut");
- this.OnIsLockedOutChanged();
- }
- }
- }
-
- [Column(Storage="_CreateDate", DbType="DateTime NOT NULL")]
- public System.DateTime CreateDate
- {
- get
- {
- return this._CreateDate;
- }
- set
- {
- if ((this._CreateDate != value))
- {
- this.OnCreateDateChanging(value);
- this.SendPropertyChanging();
- this._CreateDate = value;
- this.SendPropertyChanged("CreateDate");
- this.OnCreateDateChanged();
- }
- }
- }
-
- [Column(Storage="_LastLoginDate", DbType="DateTime NOT NULL")]
- public System.DateTime LastLoginDate
- {
- get
- {
- return this._LastLoginDate;
- }
- set
- {
- if ((this._LastLoginDate != value))
- {
- this.OnLastLoginDateChanging(value);
- this.SendPropertyChanging();
- this._LastLoginDate = value;
- this.SendPropertyChanged("LastLoginDate");
- this.OnLastLoginDateChanged();
- }
- }
- }
-
- [Column(Storage="_LastPasswordChangedDate", DbType="DateTime NOT NULL")]
- public System.DateTime LastPasswordChangedDate
- {
- get
- {
- return this._LastPasswordChangedDate;
- }
- set
- {
- if ((this._LastPasswordChangedDate != value))
- {
- this.OnLastPasswordChangedDateChanging(value);
- this.SendPropertyChanging();
- this._LastPasswordChangedDate = value;
- this.SendPropertyChanged("LastPasswordChangedDate");
- this.OnLastPasswordChangedDateChanged();
- }
- }
- }
-
- [Column(Storage="_LastLockoutDate", DbType="DateTime NOT NULL")]
- public System.DateTime LastLockoutDate
- {
- get
- {
- return this._LastLockoutDate;
- }
- set
- {
- if ((this._LastLockoutDate != value))
- {
- this.OnLastLockoutDateChanging(value);
- this.SendPropertyChanging();
- this._LastLockoutDate = value;
- this.SendPropertyChanged("LastLockoutDate");
- this.OnLastLockoutDateChanged();
- }
- }
- }
-
- [Column(Storage="_FailedPasswordAttemptCount", DbType="Int NOT NULL")]
- public int FailedPasswordAttemptCount
- {
- get
- {
- return this._FailedPasswordAttemptCount;
- }
- set
- {
- if ((this._FailedPasswordAttemptCount != value))
- {
- this.OnFailedPasswordAttemptCountChanging(value);
- this.SendPropertyChanging();
- this._FailedPasswordAttemptCount = value;
- this.SendPropertyChanged("FailedPasswordAttemptCount");
- this.OnFailedPasswordAttemptCountChanged();
- }
- }
- }
-
- [Column(Storage="_FailedPasswordAttemptWindowStart", DbType="DateTime NOT NULL")]
- public System.DateTime FailedPasswordAttemptWindowStart
- {
- get
- {
- return this._FailedPasswordAttemptWindowStart;
- }
- set
- {
- if ((this._FailedPasswordAttemptWindowStart != value))
- {
- this.OnFailedPasswordAttemptWindowStartChanging(value);
- this.SendPropertyChanging();
- this._FailedPasswordAttemptWindowStart = value;
- this.SendPropertyChanged("FailedPasswordAttemptWindowStart");
- this.OnFailedPasswordAttemptWindowStartChanged();
- }
- }
- }
-
- [Column(Storage="_FailedPasswordAnswerAttemptCount", DbType="Int NOT NULL")]
- public int FailedPasswordAnswerAttemptCount
- {
- get
- {
- return this._FailedPasswordAnswerAttemptCount;
- }
- set
- {
- if ((this._FailedPasswordAnswerAttemptCount != value))
- {
- this.OnFailedPasswordAnswerAttemptCountChanging(value);
- this.SendPropertyChanging();
- this._FailedPasswordAnswerAttemptCount = value;
- this.SendPropertyChanged("FailedPasswordAnswerAttemptCount");
- this.OnFailedPasswordAnswerAttemptCountChanged();
- }
- }
- }
-
- [Column(Storage="_FailedPasswordAnswerAttemptWindowStart", DbType="DateTime NOT NULL")]
- public System.DateTime FailedPasswordAnswerAttemptWindowStart
- {
- get
- {
- return this._FailedPasswordAnswerAttemptWindowStart;
- }
- set
- {
- if ((this._FailedPasswordAnswerAttemptWindowStart != value))
- {
- this.OnFailedPasswordAnswerAttemptWindowStartChanging(value);
- this.SendPropertyChanging();
- this._FailedPasswordAnswerAttemptWindowStart = value;
- this.SendPropertyChanged("FailedPasswordAnswerAttemptWindowStart");
- this.OnFailedPasswordAnswerAttemptWindowStartChanged();
- }
- }
- }
-
- [Column(Storage="_Comment", DbType="NText", UpdateCheck=UpdateCheck.Never)]
- public string Comment
- {
- get
- {
- return this._Comment;
- }
- set
- {
- if ((this._Comment != value))
- {
- this.OnCommentChanging(value);
- this.SendPropertyChanging();
- this._Comment = value;
- this.SendPropertyChanged("Comment");
- this.OnCommentChanged();
- }
- }
- }
-
- [Association(Name="aspnet_User_aspnet_Membership", Storage="_User", ThisKey="UserId", 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.Membership = null;
- }
- this._User.Entity = value;
- if ((value != null))
- {
- value.Membership = this;
- this._UserId = value.UserId;
- }
- else
- {
- this._UserId = default(System.Guid);
- }
- 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));
- }
- }
- }
-
- [Table(Name="dbo.aspnet_Users")]
- public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private System.Guid _ApplicationId;
-
- private System.Guid _UserId;
-
- private string _UserName;
-
- private string _LoweredUserName;
-
- private string _MobileAlias;
-
- private bool _IsAnonymous;
-
- private System.DateTime _LastActivityDate;
-
- private EntityRef<Membership> _Membership;
-
- private EntitySet<Customer> _Customers;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnApplicationIdChanging(System.Guid value);
- partial void OnApplicationIdChanged();
- partial void OnUserIdChanging(System.Guid value);
- partial void OnUserIdChanged();
- partial void OnUserNameChanging(string value);
- partial void OnUserNameChanged();
- partial void OnLoweredUserNameChanging(string value);
- partial void OnLoweredUserNameChanged();
- partial void OnMobileAliasChanging(string value);
- partial void OnMobileAliasChanged();
- partial void OnIsAnonymousChanging(bool value);
- partial void OnIsAnonymousChanged();
- partial void OnLastActivityDateChanging(System.DateTime value);
- partial void OnLastActivityDateChanged();
- #endregion
-
- public User()
- {
- this._Membership = default(EntityRef<Membership>);
- this._Customers = new EntitySet<Customer>(new Action<Customer>(this.attach_Customers), new Action<Customer>(this.detach_Customers));
- OnCreated();
- }
-
- [Column(Storage="_ApplicationId", DbType="UniqueIdentifier NOT NULL")]
- public System.Guid ApplicationId
- {
- get
- {
- return this._ApplicationId;
- }
- set
- {
- if ((this._ApplicationId != value))
- {
- this.OnApplicationIdChanging(value);
- this.SendPropertyChanging();
- this._ApplicationId = value;
- this.SendPropertyChanged("ApplicationId");
- this.OnApplicationIdChanged();
- }
- }
- }
-
- [Column(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
- public System.Guid UserId
- {
- get
- {
- return this._UserId;
- }
- set
- {
- if ((this._UserId != value))
- {
- this.OnUserIdChanging(value);
- this.SendPropertyChanging();
- this._UserId = value;
- this.SendPropertyChanged("UserId");
- this.OnUserIdChanged();
- }
- }
- }
-
- [Column(Storage="_UserName", DbType="NVarChar(256) 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();
- }
- }
- }
-
- [Column(Storage="_LoweredUserName", DbType="NVarChar(256) NOT NULL", CanBeNull=false)]
- public string LoweredUserName
- {
- get
- {
- return this._LoweredUserName;
- }
- set
- {
- if ((this._LoweredUserName != value))
- {
- this.OnLoweredUserNameChanging(value);
- this.SendPropertyChanging();
- this._LoweredUserName = value;
- this.SendPropertyChanged("LoweredUserName");
- this.OnLoweredUserNameChanged();
- }
- }
- }
-
- [Column(Storage="_MobileAlias", DbType="NVarChar(16)")]
- public string MobileAlias
- {
- get
- {
- return this._MobileAlias;
- }
- set
- {
- if ((this._MobileAlias != value))
- {
- this.OnMobileAliasChanging(value);
- this.SendPropertyChanging();
- this._MobileAlias = value;
- this.SendPropertyChanged("MobileAlias");
- this.OnMobileAliasChanged();
- }
- }
- }
-
- [Column(Storage="_IsAnonymous", DbType="Bit NOT NULL")]
- public bool IsAnonymous
- {
- get
- {
- return this._IsAnonymous;
- }
- set
- {
- if ((this._IsAnonymous != value))
- {
- this.OnIsAnonymousChanging(value);
- this.SendPropertyChanging();
- this._IsAnonymous = value;
- this.SendPropertyChanged("IsAnonymous");
- this.OnIsAnonymousChanged();
- }
- }
- }
-
- [Column(Storage="_LastActivityDate", DbType="DateTime NOT NULL")]
- public System.DateTime LastActivityDate
- {
- get
- {
- return this._LastActivityDate;
- }
- set
- {
- if ((this._LastActivityDate != value))
- {
- this.OnLastActivityDateChanging(value);
- this.SendPropertyChanging();
- this._LastActivityDate = value;
- this.SendPropertyChanged("LastActivityDate");
- this.OnLastActivityDateChanged();
- }
- }
- }
-
- [Association(Name="aspnet_User_aspnet_Membership", Storage="_Membership", ThisKey="UserId", OtherKey="UserId", IsUnique=true, IsForeignKey=false)]
- public Membership Membership
- {
- get
- {
- return this._Membership.Entity;
- }
- set
- {
- Membership previousValue = this._Membership.Entity;
- if (((previousValue != value)
- || (this._Membership.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Membership.Entity = null;
- previousValue.User = null;
- }
- this._Membership.Entity = value;
- if ((value != null))
- {
- value.User = this;
- }
- this.SendPropertyChanged("Membership");
- }
- }
- }
-
- [Association(Name="aspnet_User_dvent_Customer", Storage="_Customers", ThisKey="UserId", OtherKey="UserId")]
- public EntitySet<Customer> Customers
- {
- get
- {
- return this._Customers;
- }
- set
- {
- this._Customers.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_Customers(Customer entity)
- {
- this.SendPropertyChanging();
- entity.User = this;
- }
-
- private void detach_Customers(Customer entity)
- {
- this.SendPropertyChanging();
- entity.User = null;
- }
- }
-
- [Table(Name="dbo.dvent_Customer")]
- public partial class Customer : INotifyPropertyChanging, INotifyPropertyChanged
- {
-
- private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-
- private int _CustomerId;
-
- private string _FirstName;
-
- private string _LastName;
-
- private string _Address1;
-
- private string _Address2;
-
- private string _Phone;
-
- private string _Email;
-
- private string _Username;
-
- private string _Password;
-
- private string _AddedBy;
-
- private string _ModifiedBy;
-
- private System.DateTime _DateAdded;
-
- private System.Nullable<System.DateTime> _DateModified;
-
- private System.Nullable<System.Guid> _UserId;
-
- private EntityRef<User> _User;
-
- #region Extensibility Method Definitions
- partial void OnLoaded();
- partial void OnValidate(System.Data.Linq.ChangeAction action);
- partial void OnCreated();
- partial void OnCustomerIdChanging(int value);
- partial void OnCustomerIdChanged();
- partial void OnFirstNameChanging(string value);
- partial void OnFirstNameChanged();
- partial void OnLastNameChanging(string value);
- partial void OnLastNameChanged();
- partial void OnAddress1Changing(string value);
- partial void OnAddress1Changed();
- partial void OnAddress2Changing(string value);
- partial void OnAddress2Changed();
- partial void OnPhoneChanging(string value);
- partial void OnPhoneChanged();
- partial void OnEmailChanging(string value);
- partial void OnEmailChanged();
- partial void OnUsernameChanging(string value);
- partial void OnUsernameChanged();
- partial void OnPasswordChanging(string value);
- partial void OnPasswordChanged();
- partial void OnAddedByChanging(string value);
- partial void OnAddedByChanged();
- partial void OnModifiedByChanging(string value);
- partial void OnModifiedByChanged();
- partial void OnDateAddedChanging(System.DateTime value);
- partial void OnDateAddedChanged();
- partial void OnDateModifiedChanging(System.Nullable<System.DateTime> value);
- partial void OnDateModifiedChanged();
- partial void OnUserIdChanging(System.Nullable<System.Guid> value);
- partial void OnUserIdChanged();
- #endregion
-
- public Customer()
- {
- this._User = default(EntityRef<User>);
- OnCreated();
- }
-
- [Column(Storage="_CustomerId", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
- public int CustomerId
- {
- get
- {
- return this._CustomerId;
- }
- set
- {
- if ((this._CustomerId != value))
- {
- this.OnCustomerIdChanging(value);
- this.SendPropertyChanging();
- this._CustomerId = value;
- this.SendPropertyChanged("CustomerId");
- this.OnCustomerIdChanged();
- }
- }
- }
-
- [Column(Storage="_FirstName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string FirstName
- {
- get
- {
- return this._FirstName;
- }
- set
- {
- if ((this._FirstName != value))
- {
- this.OnFirstNameChanging(value);
- this.SendPropertyChanging();
- this._FirstName = value;
- this.SendPropertyChanged("FirstName");
- this.OnFirstNameChanged();
- }
- }
- }
-
- [Column(Storage="_LastName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string LastName
- {
- get
- {
- return this._LastName;
- }
- set
- {
- if ((this._LastName != value))
- {
- this.OnLastNameChanging(value);
- this.SendPropertyChanging();
- this._LastName = value;
- this.SendPropertyChanged("LastName");
- this.OnLastNameChanged();
- }
- }
- }
-
- [Column(Storage="_Address1", DbType="NVarChar(MAX) NOT NULL", CanBeNull=false)]
- public string Address1
- {
- get
- {
- return this._Address1;
- }
- set
- {
- if ((this._Address1 != value))
- {
- this.OnAddress1Changing(value);
- this.SendPropertyChanging();
- this._Address1 = value;
- this.SendPropertyChanged("Address1");
- this.OnAddress1Changed();
- }
- }
- }
-
- [Column(Storage="_Address2", DbType="NVarChar(50)")]
- public string Address2
- {
- get
- {
- return this._Address2;
- }
- set
- {
- if ((this._Address2 != value))
- {
- this.OnAddress2Changing(value);
- this.SendPropertyChanging();
- this._Address2 = value;
- this.SendPropertyChanged("Address2");
- this.OnAddress2Changed();
- }
- }
- }
-
- [Column(Storage="_Phone", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
- public string Phone
- {
- get
- {
- return this._Phone;
- }
- set
- {
- if ((this._Phone != value))
- {
- this.OnPhoneChanging(value);
- this.SendPropertyChanging();
- this._Phone = value;
- this.SendPropertyChanged("Phone");
- this.OnPhoneChanged();
- }
- }
- }
-
- [Column(Storage="_Email", DbType="NVarChar(50) 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();
- }
- }
- }
-
- [Column(Storage="_Username", DbType="NVarChar(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();
- }
- }
- }
-
- [Column(Storage="_Password", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string Password
- {
- get
- {
- return this._Password;
- }
- set
- {
- if ((this._Password != value))
- {
- this.OnPasswordChanging(value);
- this.SendPropertyChanging();
- this._Password = value;
- this.SendPropertyChanged("Password");
- this.OnPasswordChanged();
- }
- }
- }
-
- [Column(Storage="_AddedBy", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
- public string AddedBy
- {
- get
- {
- return this._AddedBy;
- }
- set
- {
- if ((this._AddedBy != value))
- {
- this.OnAddedByChanging(value);
- this.SendPropertyChanging();
- this._AddedBy = value;
- this.SendPropertyChanged("AddedBy");
- this.OnAddedByChanged();
- }
- }
- }
-
- [Column(Storage="_ModifiedBy", DbType="NVarChar(50)")]
- public string ModifiedBy
- {
- get
- {
- return this._ModifiedBy;
- }
- set
- {
- if ((this._ModifiedBy != value))
- {
- this.OnModifiedByChanging(value);
- this.SendPropertyChanging();
- this._ModifiedBy = value;
- this.SendPropertyChanged("ModifiedBy");
- this.OnModifiedByChanged();
- }
- }
- }
-
- [Column(Storage="_DateAdded", DbType="DateTime NOT NULL")]
- public System.DateTime DateAdded
- {
- get
- {
- return this._DateAdded;
- }
- set
- {
- if ((this._DateAdded != value))
- {
- this.OnDateAddedChanging(value);
- this.SendPropertyChanging();
- this._DateAdded = value;
- this.SendPropertyChanged("DateAdded");
- this.OnDateAddedChanged();
- }
- }
- }
-
- [Column(Storage="_DateModified", DbType="DateTime")]
- public System.Nullable<System.DateTime> DateModified
- {
- get
- {
- return this._DateModified;
- }
- set
- {
- if ((this._DateModified != value))
- {
- this.OnDateModifiedChanging(value);
- this.SendPropertyChanging();
- this._DateModified = value;
- this.SendPropertyChanged("DateModified");
- this.OnDateModifiedChanged();
- }
- }
- }
-
- [Column(Storage="_UserId", DbType="UniqueIdentifier")]
- public System.Nullable<System.Guid> UserId
- {
- get
- {
- return this._UserId;
- }
- set
- {
- if ((this._UserId != value))
- {
- if (this._User.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
- this.OnUserIdChanging(value);
- this.SendPropertyChanging();
- this._UserId = value;
- this.SendPropertyChanged("UserId");
- this.OnUserIdChanged();
- }
- }
- }
-
- [Association(Name="aspnet_User_dvent_Customer", Storage="_User", ThisKey="UserId", 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.Customers.Remove(this);
- }
- this._User.Entity = value;
- if ((value != null))
- {
- value.Customers.Add(this);
- this._UserId = value.UserId;
- }
- else
- {
- this._UserId = default(Nullable<System.Guid>);
- }
- 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));
- }
- }
- }
- }
- #pragma warning restore 1591