/DV_Enterprises.Web/DV_Enterprises.Web/DataContext.designer.cs
C# | 3564 lines | 3199 code | 356 blank | 9 comment | 327 complexity | 627bc39a1c293f06f4fb84e2d6eb6145 MD5 | raw file
Large files files are truncated, but you can click here to view the full 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 PropertyCha…
Large files files are truncated, but you can click here to view the full file