#pragma warning disable 1591
//------------------------------------------------------------------------------
//
// 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.
//
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
[System.Data.Linq.Mapping.DatabaseAttribute(Name="ITC")]
public partial class ITCDataContext : System.Data.Linq.DataContext
{
private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
#region Extensibility Method Definitions
partial void OnCreated();
partial void InsertDailySale(DailySale instance);
partial void UpdateDailySale(DailySale instance);
partial void DeleteDailySale(DailySale instance);
partial void InsertCommittee(Committee instance);
partial void UpdateCommittee(Committee instance);
partial void DeleteCommittee(Committee instance);
partial void InsertEvent(Event instance);
partial void UpdateEvent(Event instance);
partial void DeleteEvent(Event instance);
partial void InsertTransferLog(TransferLog instance);
partial void UpdateTransferLog(TransferLog instance);
partial void DeleteTransferLog(TransferLog instance);
partial void InsertJK(JK instance);
partial void UpdateJK(JK instance);
partial void DeleteJK(JK instance);
partial void InsertCurrentEvent(CurrentEvent instance);
partial void UpdateCurrentEvent(CurrentEvent instance);
partial void DeleteCurrentEvent(CurrentEvent instance);
partial void InsertTicketsAllocation(TicketsAllocation instance);
partial void UpdateTicketsAllocation(TicketsAllocation instance);
partial void DeleteTicketsAllocation(TicketsAllocation instance);
partial void InsertBankDeposit(BankDeposit instance);
partial void UpdateBankDeposit(BankDeposit instance);
partial void DeleteBankDeposit(BankDeposit instance);
#endregion
public ITCDataContext() :
base(global::System.Configuration.ConfigurationManager.ConnectionStrings["ITCConnectionString"].ConnectionString, mappingSource)
{
OnCreated();
}
public ITCDataContext(string connection) :
base(connection, mappingSource)
{
OnCreated();
}
public ITCDataContext(System.Data.IDbConnection connection) :
base(connection, mappingSource)
{
OnCreated();
}
public ITCDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public ITCDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public System.Data.Linq.Table DailySales
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Committees
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table Events
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table TransferLogs
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table JKs
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table CurrentEvents
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table TicketsAllocations
{
get
{
return this.GetTable();
}
}
public System.Data.Linq.Table BankDeposits
{
get
{
return this.GetTable();
}
}
}
[Table(Name="dbo.DailySales")]
public partial class DailySale : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _JKID;
private System.DateTime _DateSold;
private int _EventID;
private int _TicketsSold;
private System.Nullable _Modified;
private EntityRef _Event;
private EntityRef _JK;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnJKIDChanging(int value);
partial void OnJKIDChanged();
partial void OnDateSoldChanging(System.DateTime value);
partial void OnDateSoldChanged();
partial void OnEventIDChanging(int value);
partial void OnEventIDChanged();
partial void OnTicketsSoldChanging(int value);
partial void OnTicketsSoldChanged();
partial void OnModifiedChanging(System.Nullable value);
partial void OnModifiedChanged();
#endregion
public DailySale()
{
this._Event = default(EntityRef);
this._JK = default(EntityRef);
OnCreated();
}
[Column(Storage="_JKID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int JKID
{
get
{
return this._JKID;
}
set
{
if ((this._JKID != value))
{
if (this._JK.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnJKIDChanging(value);
this.SendPropertyChanging();
this._JKID = value;
this.SendPropertyChanged("JKID");
this.OnJKIDChanged();
}
}
}
[Column(Storage="_DateSold", DbType="Date NOT NULL", IsPrimaryKey=true)]
public System.DateTime DateSold
{
get
{
return this._DateSold;
}
set
{
if ((this._DateSold != value))
{
this.OnDateSoldChanging(value);
this.SendPropertyChanging();
this._DateSold = value;
this.SendPropertyChanged("DateSold");
this.OnDateSoldChanged();
}
}
}
[Column(Storage="_EventID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int EventID
{
get
{
return this._EventID;
}
set
{
if ((this._EventID != value))
{
if (this._Event.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnEventIDChanging(value);
this.SendPropertyChanging();
this._EventID = value;
this.SendPropertyChanged("EventID");
this.OnEventIDChanged();
}
}
}
[Column(Storage="_TicketsSold", DbType="Int NOT NULL")]
public int TicketsSold
{
get
{
return this._TicketsSold;
}
set
{
if ((this._TicketsSold != value))
{
this.OnTicketsSoldChanging(value);
this.SendPropertyChanging();
this._TicketsSold = value;
this.SendPropertyChanged("TicketsSold");
this.OnTicketsSoldChanged();
}
}
}
[Column(Storage="_Modified", DbType="DateTime")]
public System.Nullable Modified
{
get
{
return this._Modified;
}
set
{
if ((this._Modified != value))
{
this.OnModifiedChanging(value);
this.SendPropertyChanging();
this._Modified = value;
this.SendPropertyChanged("Modified");
this.OnModifiedChanged();
}
}
}
[Association(Name="Event_DailySale", Storage="_Event", ThisKey="EventID", OtherKey="EventID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public Event Event
{
get
{
return this._Event.Entity;
}
set
{
Event previousValue = this._Event.Entity;
if (((previousValue != value)
|| (this._Event.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Event.Entity = null;
previousValue.DailySales.Remove(this);
}
this._Event.Entity = value;
if ((value != null))
{
value.DailySales.Add(this);
this._EventID = value.EventID;
}
else
{
this._EventID = default(int);
}
this.SendPropertyChanged("Event");
}
}
}
[Association(Name="JK_DailySale", Storage="_JK", ThisKey="JKID", OtherKey="JKID", IsForeignKey=true)]
public JK JK
{
get
{
return this._JK.Entity;
}
set
{
JK previousValue = this._JK.Entity;
if (((previousValue != value)
|| (this._JK.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._JK.Entity = null;
previousValue.DailySales.Remove(this);
}
this._JK.Entity = value;
if ((value != null))
{
value.DailySales.Add(this);
this._JKID = value.JKID;
}
else
{
this._JKID = default(int);
}
this.SendPropertyChanged("JK");
}
}
}
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.Committee")]
public partial class Committee : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _CommitteeID;
private string _CommitteeName;
private string _Chairperson;
private string _ChairpersonPhone;
private string _ChairpersonEmail;
private string _ContactPerson;
private string _ContactPersonPhone;
private string _ContactPersonEmail;
private EntitySet _Events;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnCommitteeIDChanging(int value);
partial void OnCommitteeIDChanged();
partial void OnCommitteeNameChanging(string value);
partial void OnCommitteeNameChanged();
partial void OnChairpersonChanging(string value);
partial void OnChairpersonChanged();
partial void OnChairpersonPhoneChanging(string value);
partial void OnChairpersonPhoneChanged();
partial void OnChairpersonEmailChanging(string value);
partial void OnChairpersonEmailChanged();
partial void OnContactPersonChanging(string value);
partial void OnContactPersonChanged();
partial void OnContactPersonPhoneChanging(string value);
partial void OnContactPersonPhoneChanged();
partial void OnContactPersonEmailChanging(string value);
partial void OnContactPersonEmailChanged();
#endregion
public Committee()
{
this._Events = new EntitySet(new Action(this.attach_Events), new Action(this.detach_Events));
OnCreated();
}
[Column(Storage="_CommitteeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int CommitteeID
{
get
{
return this._CommitteeID;
}
set
{
if ((this._CommitteeID != value))
{
this.OnCommitteeIDChanging(value);
this.SendPropertyChanging();
this._CommitteeID = value;
this.SendPropertyChanged("CommitteeID");
this.OnCommitteeIDChanged();
}
}
}
[Column(Storage="_CommitteeName", DbType="VarChar(25)")]
public string CommitteeName
{
get
{
return this._CommitteeName;
}
set
{
if ((this._CommitteeName != value))
{
this.OnCommitteeNameChanging(value);
this.SendPropertyChanging();
this._CommitteeName = value;
this.SendPropertyChanged("CommitteeName");
this.OnCommitteeNameChanged();
}
}
}
[Column(Storage="_Chairperson", DbType="VarChar(25)")]
public string Chairperson
{
get
{
return this._Chairperson;
}
set
{
if ((this._Chairperson != value))
{
this.OnChairpersonChanging(value);
this.SendPropertyChanging();
this._Chairperson = value;
this.SendPropertyChanged("Chairperson");
this.OnChairpersonChanged();
}
}
}
[Column(Storage="_ChairpersonPhone", DbType="VarChar(15)")]
public string ChairpersonPhone
{
get
{
return this._ChairpersonPhone;
}
set
{
if ((this._ChairpersonPhone != value))
{
this.OnChairpersonPhoneChanging(value);
this.SendPropertyChanging();
this._ChairpersonPhone = value;
this.SendPropertyChanged("ChairpersonPhone");
this.OnChairpersonPhoneChanged();
}
}
}
[Column(Storage="_ChairpersonEmail", DbType="VarChar(25)")]
public string ChairpersonEmail
{
get
{
return this._ChairpersonEmail;
}
set
{
if ((this._ChairpersonEmail != value))
{
this.OnChairpersonEmailChanging(value);
this.SendPropertyChanging();
this._ChairpersonEmail = value;
this.SendPropertyChanged("ChairpersonEmail");
this.OnChairpersonEmailChanged();
}
}
}
[Column(Storage="_ContactPerson", DbType="VarChar(25)")]
public string ContactPerson
{
get
{
return this._ContactPerson;
}
set
{
if ((this._ContactPerson != value))
{
this.OnContactPersonChanging(value);
this.SendPropertyChanging();
this._ContactPerson = value;
this.SendPropertyChanged("ContactPerson");
this.OnContactPersonChanged();
}
}
}
[Column(Storage="_ContactPersonPhone", DbType="VarChar(15)")]
public string ContactPersonPhone
{
get
{
return this._ContactPersonPhone;
}
set
{
if ((this._ContactPersonPhone != value))
{
this.OnContactPersonPhoneChanging(value);
this.SendPropertyChanging();
this._ContactPersonPhone = value;
this.SendPropertyChanged("ContactPersonPhone");
this.OnContactPersonPhoneChanged();
}
}
}
[Column(Storage="_ContactPersonEmail", DbType="VarChar(25)")]
public string ContactPersonEmail
{
get
{
return this._ContactPersonEmail;
}
set
{
if ((this._ContactPersonEmail != value))
{
this.OnContactPersonEmailChanging(value);
this.SendPropertyChanging();
this._ContactPersonEmail = value;
this.SendPropertyChanged("ContactPersonEmail");
this.OnContactPersonEmailChanged();
}
}
}
[Association(Name="Committee_Event", Storage="_Events", ThisKey="CommitteeID", OtherKey="CommitteeID")]
public EntitySet Events
{
get
{
return this._Events;
}
set
{
this._Events.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_Events(Event entity)
{
this.SendPropertyChanging();
entity.Committee = this;
}
private void detach_Events(Event entity)
{
this.SendPropertyChanging();
entity.Committee = null;
}
}
[Table(Name="dbo.Events")]
public partial class Event : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _EventID;
private string _EventName;
private System.DateTime _EventDate;
private string _EventLocation;
private decimal _EventPrice;
private int _TotalTicketsIssued;
private int _CommitteeID;
private System.Nullable _Refreshments;
private System.Nullable _Posters;
private EntitySet _DailySales;
private EntitySet _TransferLogs;
private EntitySet _TicketsAllocations;
private EntitySet _BankDeposits;
private EntityRef _Committee;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnEventIDChanging(int value);
partial void OnEventIDChanged();
partial void OnEventNameChanging(string value);
partial void OnEventNameChanged();
partial void OnEventDateChanging(System.DateTime value);
partial void OnEventDateChanged();
partial void OnEventLocationChanging(string value);
partial void OnEventLocationChanged();
partial void OnEventPriceChanging(decimal value);
partial void OnEventPriceChanged();
partial void OnTotalTicketsIssuedChanging(int value);
partial void OnTotalTicketsIssuedChanged();
partial void OnCommitteeIDChanging(int value);
partial void OnCommitteeIDChanged();
partial void OnRefreshmentsChanging(System.Nullable value);
partial void OnRefreshmentsChanged();
partial void OnPostersChanging(System.Nullable value);
partial void OnPostersChanged();
#endregion
public Event()
{
this._DailySales = new EntitySet(new Action(this.attach_DailySales), new Action(this.detach_DailySales));
this._TransferLogs = new EntitySet(new Action(this.attach_TransferLogs), new Action(this.detach_TransferLogs));
this._TicketsAllocations = new EntitySet(new Action(this.attach_TicketsAllocations), new Action(this.detach_TicketsAllocations));
this._BankDeposits = new EntitySet(new Action(this.attach_BankDeposits), new Action(this.detach_BankDeposits));
this._Committee = default(EntityRef);
OnCreated();
}
[Column(Storage="_EventID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int EventID
{
get
{
return this._EventID;
}
set
{
if ((this._EventID != value))
{
this.OnEventIDChanging(value);
this.SendPropertyChanging();
this._EventID = value;
this.SendPropertyChanged("EventID");
this.OnEventIDChanged();
}
}
}
[Column(Storage="_EventName", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string EventName
{
get
{
return this._EventName;
}
set
{
if ((this._EventName != value))
{
this.OnEventNameChanging(value);
this.SendPropertyChanging();
this._EventName = value;
this.SendPropertyChanged("EventName");
this.OnEventNameChanged();
}
}
}
[Column(Storage="_EventDate", DbType="Date NOT NULL")]
public System.DateTime EventDate
{
get
{
return this._EventDate;
}
set
{
if ((this._EventDate != value))
{
this.OnEventDateChanging(value);
this.SendPropertyChanging();
this._EventDate = value;
this.SendPropertyChanged("EventDate");
this.OnEventDateChanged();
}
}
}
[Column(Storage="_EventLocation", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string EventLocation
{
get
{
return this._EventLocation;
}
set
{
if ((this._EventLocation != value))
{
this.OnEventLocationChanging(value);
this.SendPropertyChanging();
this._EventLocation = value;
this.SendPropertyChanged("EventLocation");
this.OnEventLocationChanged();
}
}
}
[Column(Storage="_EventPrice", DbType="Money NOT NULL")]
public decimal EventPrice
{
get
{
return this._EventPrice;
}
set
{
if ((this._EventPrice != value))
{
this.OnEventPriceChanging(value);
this.SendPropertyChanging();
this._EventPrice = value;
this.SendPropertyChanged("EventPrice");
this.OnEventPriceChanged();
}
}
}
[Column(Storage="_TotalTicketsIssued", DbType="Int NOT NULL")]
public int TotalTicketsIssued
{
get
{
return this._TotalTicketsIssued;
}
set
{
if ((this._TotalTicketsIssued != value))
{
this.OnTotalTicketsIssuedChanging(value);
this.SendPropertyChanging();
this._TotalTicketsIssued = value;
this.SendPropertyChanged("TotalTicketsIssued");
this.OnTotalTicketsIssuedChanged();
}
}
}
[Column(Storage="_CommitteeID", DbType="Int NOT NULL")]
public int CommitteeID
{
get
{
return this._CommitteeID;
}
set
{
if ((this._CommitteeID != value))
{
if (this._Committee.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnCommitteeIDChanging(value);
this.SendPropertyChanging();
this._CommitteeID = value;
this.SendPropertyChanged("CommitteeID");
this.OnCommitteeIDChanged();
}
}
}
[Column(Storage="_Refreshments", DbType="Bit")]
public System.Nullable Refreshments
{
get
{
return this._Refreshments;
}
set
{
if ((this._Refreshments != value))
{
this.OnRefreshmentsChanging(value);
this.SendPropertyChanging();
this._Refreshments = value;
this.SendPropertyChanged("Refreshments");
this.OnRefreshmentsChanged();
}
}
}
[Column(Storage="_Posters", DbType="Bit")]
public System.Nullable Posters
{
get
{
return this._Posters;
}
set
{
if ((this._Posters != value))
{
this.OnPostersChanging(value);
this.SendPropertyChanging();
this._Posters = value;
this.SendPropertyChanged("Posters");
this.OnPostersChanged();
}
}
}
[Association(Name="Event_DailySale", Storage="_DailySales", ThisKey="EventID", OtherKey="EventID")]
public EntitySet DailySales
{
get
{
return this._DailySales;
}
set
{
this._DailySales.Assign(value);
}
}
[Association(Name="Event_TransferLog", Storage="_TransferLogs", ThisKey="EventID", OtherKey="EventID")]
public EntitySet TransferLogs
{
get
{
return this._TransferLogs;
}
set
{
this._TransferLogs.Assign(value);
}
}
[Association(Name="Event_TicketsAllocation", Storage="_TicketsAllocations", ThisKey="EventID", OtherKey="EventID")]
public EntitySet TicketsAllocations
{
get
{
return this._TicketsAllocations;
}
set
{
this._TicketsAllocations.Assign(value);
}
}
[Association(Name="Event_BankDeposit", Storage="_BankDeposits", ThisKey="EventID", OtherKey="EventID")]
public EntitySet BankDeposits
{
get
{
return this._BankDeposits;
}
set
{
this._BankDeposits.Assign(value);
}
}
[Association(Name="Committee_Event", Storage="_Committee", ThisKey="CommitteeID", OtherKey="CommitteeID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public Committee Committee
{
get
{
return this._Committee.Entity;
}
set
{
Committee previousValue = this._Committee.Entity;
if (((previousValue != value)
|| (this._Committee.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Committee.Entity = null;
previousValue.Events.Remove(this);
}
this._Committee.Entity = value;
if ((value != null))
{
value.Events.Add(this);
this._CommitteeID = value.CommitteeID;
}
else
{
this._CommitteeID = default(int);
}
this.SendPropertyChanged("Committee");
}
}
}
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_DailySales(DailySale entity)
{
this.SendPropertyChanging();
entity.Event = this;
}
private void detach_DailySales(DailySale entity)
{
this.SendPropertyChanging();
entity.Event = null;
}
private void attach_TransferLogs(TransferLog entity)
{
this.SendPropertyChanging();
entity.Event = this;
}
private void detach_TransferLogs(TransferLog entity)
{
this.SendPropertyChanging();
entity.Event = null;
}
private void attach_TicketsAllocations(TicketsAllocation entity)
{
this.SendPropertyChanging();
entity.Event = this;
}
private void detach_TicketsAllocations(TicketsAllocation entity)
{
this.SendPropertyChanging();
entity.Event = null;
}
private void attach_BankDeposits(BankDeposit entity)
{
this.SendPropertyChanging();
entity.Event = this;
}
private void detach_BankDeposits(BankDeposit entity)
{
this.SendPropertyChanging();
entity.Event = null;
}
}
[Table(Name="dbo.TransferLog")]
public partial class TransferLog : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _EventID;
private System.DateTime _DateTransfer;
private int _JKIDFrom;
private int _JKIDTo;
private int _QtyTransfer;
private string _Comments;
private System.Nullable _Modified;
private EntityRef _Event;
private EntityRef _JK;
private EntityRef _JK1;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnEventIDChanging(int value);
partial void OnEventIDChanged();
partial void OnDateTransferChanging(System.DateTime value);
partial void OnDateTransferChanged();
partial void OnJKIDFromChanging(int value);
partial void OnJKIDFromChanged();
partial void OnJKIDToChanging(int value);
partial void OnJKIDToChanged();
partial void OnQtyTransferChanging(int value);
partial void OnQtyTransferChanged();
partial void OnCommentsChanging(string value);
partial void OnCommentsChanged();
partial void OnModifiedChanging(System.Nullable value);
partial void OnModifiedChanged();
#endregion
public TransferLog()
{
this._Event = default(EntityRef);
this._JK = default(EntityRef);
this._JK1 = default(EntityRef);
OnCreated();
}
[Column(Storage="_EventID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int EventID
{
get
{
return this._EventID;
}
set
{
if ((this._EventID != value))
{
if (this._Event.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnEventIDChanging(value);
this.SendPropertyChanging();
this._EventID = value;
this.SendPropertyChanged("EventID");
this.OnEventIDChanged();
}
}
}
[Column(Storage="_DateTransfer", DbType="Date NOT NULL", IsPrimaryKey=true)]
public System.DateTime DateTransfer
{
get
{
return this._DateTransfer;
}
set
{
if ((this._DateTransfer != value))
{
this.OnDateTransferChanging(value);
this.SendPropertyChanging();
this._DateTransfer = value;
this.SendPropertyChanged("DateTransfer");
this.OnDateTransferChanged();
}
}
}
[Column(Storage="_JKIDFrom", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int JKIDFrom
{
get
{
return this._JKIDFrom;
}
set
{
if ((this._JKIDFrom != value))
{
if (this._JK.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnJKIDFromChanging(value);
this.SendPropertyChanging();
this._JKIDFrom = value;
this.SendPropertyChanged("JKIDFrom");
this.OnJKIDFromChanged();
}
}
}
[Column(Storage="_JKIDTo", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int JKIDTo
{
get
{
return this._JKIDTo;
}
set
{
if ((this._JKIDTo != value))
{
if (this._JK1.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnJKIDToChanging(value);
this.SendPropertyChanging();
this._JKIDTo = value;
this.SendPropertyChanged("JKIDTo");
this.OnJKIDToChanged();
}
}
}
[Column(Storage="_QtyTransfer", DbType="Int NOT NULL")]
public int QtyTransfer
{
get
{
return this._QtyTransfer;
}
set
{
if ((this._QtyTransfer != value))
{
this.OnQtyTransferChanging(value);
this.SendPropertyChanging();
this._QtyTransfer = value;
this.SendPropertyChanged("QtyTransfer");
this.OnQtyTransferChanged();
}
}
}
[Column(Storage="_Comments", DbType="VarChar(200)")]
public string Comments
{
get
{
return this._Comments;
}
set
{
if ((this._Comments != value))
{
this.OnCommentsChanging(value);
this.SendPropertyChanging();
this._Comments = value;
this.SendPropertyChanged("Comments");
this.OnCommentsChanged();
}
}
}
[Column(Storage="_Modified", DbType="DateTime")]
public System.Nullable Modified
{
get
{
return this._Modified;
}
set
{
if ((this._Modified != value))
{
this.OnModifiedChanging(value);
this.SendPropertyChanging();
this._Modified = value;
this.SendPropertyChanged("Modified");
this.OnModifiedChanged();
}
}
}
[Association(Name="Event_TransferLog", Storage="_Event", ThisKey="EventID", OtherKey="EventID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public Event Event
{
get
{
return this._Event.Entity;
}
set
{
Event previousValue = this._Event.Entity;
if (((previousValue != value)
|| (this._Event.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Event.Entity = null;
previousValue.TransferLogs.Remove(this);
}
this._Event.Entity = value;
if ((value != null))
{
value.TransferLogs.Add(this);
this._EventID = value.EventID;
}
else
{
this._EventID = default(int);
}
this.SendPropertyChanged("Event");
}
}
}
[Association(Name="JK_TransferLog", Storage="_JK", ThisKey="JKIDFrom", OtherKey="JKID", IsForeignKey=true)]
public JK JK
{
get
{
return this._JK.Entity;
}
set
{
JK previousValue = this._JK.Entity;
if (((previousValue != value)
|| (this._JK.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._JK.Entity = null;
previousValue.TransferLogs.Remove(this);
}
this._JK.Entity = value;
if ((value != null))
{
value.TransferLogs.Add(this);
this._JKIDFrom = value.JKID;
}
else
{
this._JKIDFrom = default(int);
}
this.SendPropertyChanged("JK");
}
}
}
[Association(Name="JK_TransferLog1", Storage="_JK1", ThisKey="JKIDTo", OtherKey="JKID", IsForeignKey=true)]
public JK JK1
{
get
{
return this._JK1.Entity;
}
set
{
JK previousValue = this._JK1.Entity;
if (((previousValue != value)
|| (this._JK1.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._JK1.Entity = null;
previousValue.TransferLogs1.Remove(this);
}
this._JK1.Entity = value;
if ((value != null))
{
value.TransferLogs1.Add(this);
this._JKIDTo = value.JKID;
}
else
{
this._JKIDTo = default(int);
}
this.SendPropertyChanged("JK1");
}
}
}
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.JK")]
public partial class JK : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _JKID;
private string _Name;
private EntitySet _DailySales;
private EntitySet _TransferLogs;
private EntitySet _TransferLogs1;
private EntitySet _TicketsAllocations;
private EntitySet _BankDeposits;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnJKIDChanging(int value);
partial void OnJKIDChanged();
partial void OnNameChanging(string value);
partial void OnNameChanged();
#endregion
public JK()
{
this._DailySales = new EntitySet(new Action(this.attach_DailySales), new Action(this.detach_DailySales));
this._TransferLogs = new EntitySet(new Action(this.attach_TransferLogs), new Action(this.detach_TransferLogs));
this._TransferLogs1 = new EntitySet(new Action(this.attach_TransferLogs1), new Action(this.detach_TransferLogs1));
this._TicketsAllocations = new EntitySet(new Action(this.attach_TicketsAllocations), new Action(this.detach_TicketsAllocations));
this._BankDeposits = new EntitySet(new Action(this.attach_BankDeposits), new Action(this.detach_BankDeposits));
OnCreated();
}
[Column(Storage="_JKID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int JKID
{
get
{
return this._JKID;
}
set
{
if ((this._JKID != value))
{
this.OnJKIDChanging(value);
this.SendPropertyChanging();
this._JKID = value;
this.SendPropertyChanged("JKID");
this.OnJKIDChanged();
}
}
}
[Column(Storage="_Name", DbType="VarChar(25) 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="JK_DailySale", Storage="_DailySales", ThisKey="JKID", OtherKey="JKID")]
public EntitySet DailySales
{
get
{
return this._DailySales;
}
set
{
this._DailySales.Assign(value);
}
}
[Association(Name="JK_TransferLog", Storage="_TransferLogs", ThisKey="JKID", OtherKey="JKIDFrom")]
public EntitySet TransferLogs
{
get
{
return this._TransferLogs;
}
set
{
this._TransferLogs.Assign(value);
}
}
[Association(Name="JK_TransferLog1", Storage="_TransferLogs1", ThisKey="JKID", OtherKey="JKIDTo")]
public EntitySet TransferLogs1
{
get
{
return this._TransferLogs1;
}
set
{
this._TransferLogs1.Assign(value);
}
}
[Association(Name="JK_TicketsAllocation", Storage="_TicketsAllocations", ThisKey="JKID", OtherKey="JKID")]
public EntitySet TicketsAllocations
{
get
{
return this._TicketsAllocations;
}
set
{
this._TicketsAllocations.Assign(value);
}
}
[Association(Name="JK_BankDeposit", Storage="_BankDeposits", ThisKey="JKID", OtherKey="JKID")]
public EntitySet BankDeposits
{
get
{
return this._BankDeposits;
}
set
{
this._BankDeposits.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_DailySales(DailySale entity)
{
this.SendPropertyChanging();
entity.JK = this;
}
private void detach_DailySales(DailySale entity)
{
this.SendPropertyChanging();
entity.JK = null;
}
private void attach_TransferLogs(TransferLog entity)
{
this.SendPropertyChanging();
entity.JK = this;
}
private void detach_TransferLogs(TransferLog entity)
{
this.SendPropertyChanging();
entity.JK = null;
}
private void attach_TransferLogs1(TransferLog entity)
{
this.SendPropertyChanging();
entity.JK1 = this;
}
private void detach_TransferLogs1(TransferLog entity)
{
this.SendPropertyChanging();
entity.JK1 = null;
}
private void attach_TicketsAllocations(TicketsAllocation entity)
{
this.SendPropertyChanging();
entity.JK = this;
}
private void detach_TicketsAllocations(TicketsAllocation entity)
{
this.SendPropertyChanging();
entity.JK = null;
}
private void attach_BankDeposits(BankDeposit entity)
{
this.SendPropertyChanging();
entity.JK = this;
}
private void detach_BankDeposits(BankDeposit entity)
{
this.SendPropertyChanging();
entity.JK = null;
}
}
[Table(Name="dbo.CurrentEvents")]
public partial class CurrentEvent : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _ID;
private string _EventName;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnIDChanging(int value);
partial void OnIDChanged();
partial void OnEventNameChanging(string value);
partial void OnEventNameChanged();
#endregion
public CurrentEvent()
{
OnCreated();
}
[Column(Storage="_ID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int ID
{
get
{
return this._ID;
}
set
{
if ((this._ID != value))
{
this.OnIDChanging(value);
this.SendPropertyChanging();
this._ID = value;
this.SendPropertyChanged("ID");
this.OnIDChanged();
}
}
}
[Column(Storage="_EventName", DbType="VarChar(50)")]
public string EventName
{
get
{
return this._EventName;
}
set
{
if ((this._EventName != value))
{
this.OnEventNameChanging(value);
this.SendPropertyChanging();
this._EventName = value;
this.SendPropertyChanged("EventName");
this.OnEventNameChanged();
}
}
}
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.TicketsAllocation")]
public partial class TicketsAllocation : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _JKID;
private int _EventID;
private System.Nullable _TicketsIssued;
private System.Nullable _TotalTicketsSold;
private System.Nullable _TicketsCommited;
private EntityRef _Event;
private EntityRef _JK;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnJKIDChanging(int value);
partial void OnJKIDChanged();
partial void OnEventIDChanging(int value);
partial void OnEventIDChanged();
partial void OnTicketsIssuedChanging(System.Nullable value);
partial void OnTicketsIssuedChanged();
partial void OnTotalTicketsSoldChanging(System.Nullable value);
partial void OnTotalTicketsSoldChanged();
partial void OnTicketsCommitedChanging(System.Nullable value);
partial void OnTicketsCommitedChanged();
#endregion
public TicketsAllocation()
{
this._Event = default(EntityRef);
this._JK = default(EntityRef);
OnCreated();
}
[Column(Storage="_JKID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int JKID
{
get
{
return this._JKID;
}
set
{
if ((this._JKID != value))
{
if (this._JK.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnJKIDChanging(value);
this.SendPropertyChanging();
this._JKID = value;
this.SendPropertyChanged("JKID");
this.OnJKIDChanged();
}
}
}
[Column(Storage="_EventID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int EventID
{
get
{
return this._EventID;
}
set
{
if ((this._EventID != value))
{
if (this._Event.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnEventIDChanging(value);
this.SendPropertyChanging();
this._EventID = value;
this.SendPropertyChanged("EventID");
this.OnEventIDChanged();
}
}
}
[Column(Storage="_TicketsIssued", DbType="Int")]
public System.Nullable TicketsIssued
{
get
{
return this._TicketsIssued;
}
set
{
if ((this._TicketsIssued != value))
{
this.OnTicketsIssuedChanging(value);
this.SendPropertyChanging();
this._TicketsIssued = value;
this.SendPropertyChanged("TicketsIssued");
this.OnTicketsIssuedChanged();
}
}
}
[Column(Storage="_TotalTicketsSold", DbType="Int")]
public System.Nullable TotalTicketsSold
{
get
{
return this._TotalTicketsSold;
}
set
{
if ((this._TotalTicketsSold != value))
{
this.OnTotalTicketsSoldChanging(value);
this.SendPropertyChanging();
this._TotalTicketsSold = value;
this.SendPropertyChanged("TotalTicketsSold");
this.OnTotalTicketsSoldChanged();
}
}
}
[Column(Storage="_TicketsCommited", DbType="Int")]
public System.Nullable TicketsCommited
{
get
{
return this._TicketsCommited;
}
set
{
if ((this._TicketsCommited != value))
{
this.OnTicketsCommitedChanging(value);
this.SendPropertyChanging();
this._TicketsCommited = value;
this.SendPropertyChanged("TicketsCommited");
this.OnTicketsCommitedChanged();
}
}
}
[Association(Name="Event_TicketsAllocation", Storage="_Event", ThisKey="EventID", OtherKey="EventID", IsForeignKey=true)]
public Event Event
{
get
{
return this._Event.Entity;
}
set
{
Event previousValue = this._Event.Entity;
if (((previousValue != value)
|| (this._Event.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Event.Entity = null;
previousValue.TicketsAllocations.Remove(this);
}
this._Event.Entity = value;
if ((value != null))
{
value.TicketsAllocations.Add(this);
this._EventID = value.EventID;
}
else
{
this._EventID = default(int);
}
this.SendPropertyChanged("Event");
}
}
}
[Association(Name="JK_TicketsAllocation", Storage="_JK", ThisKey="JKID", OtherKey="JKID", IsForeignKey=true)]
public JK JK
{
get
{
return this._JK.Entity;
}
set
{
JK previousValue = this._JK.Entity;
if (((previousValue != value)
|| (this._JK.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._JK.Entity = null;
previousValue.TicketsAllocations.Remove(this);
}
this._JK.Entity = value;
if ((value != null))
{
value.TicketsAllocations.Add(this);
this._JKID = value.JKID;
}
else
{
this._JKID = default(int);
}
this.SendPropertyChanged("JK");
}
}
}
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.BankDeposit")]
public partial class BankDeposit : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _JKID;
private int _EventID;
private System.DateTime _DateDeposit;
private decimal _AmountDeposit;
private string _ReferenceNumber;
private EntityRef _Event;
private EntityRef _JK;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnJKIDChanging(int value);
partial void OnJKIDChanged();
partial void OnEventIDChanging(int value);
partial void OnEventIDChanged();
partial void OnDateDepositChanging(System.DateTime value);
partial void OnDateDepositChanged();
partial void OnAmountDepositChanging(decimal value);
partial void OnAmountDepositChanged();
partial void OnReferenceNumberChanging(string value);
partial void OnReferenceNumberChanged();
#endregion
public BankDeposit()
{
this._Event = default(EntityRef);
this._JK = default(EntityRef);
OnCreated();
}
[Column(Storage="_JKID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int JKID
{
get
{
return this._JKID;
}
set
{
if ((this._JKID != value))
{
if (this._JK.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnJKIDChanging(value);
this.SendPropertyChanging();
this._JKID = value;
this.SendPropertyChanged("JKID");
this.OnJKIDChanged();
}
}
}
[Column(Storage="_EventID", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int EventID
{
get
{
return this._EventID;
}
set
{
if ((this._EventID != value))
{
if (this._Event.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnEventIDChanging(value);
this.SendPropertyChanging();
this._EventID = value;
this.SendPropertyChanged("EventID");
this.OnEventIDChanged();
}
}
}
[Column(Storage="_DateDeposit", DbType="Date NOT NULL")]
public System.DateTime DateDeposit
{
get
{
return this._DateDeposit;
}
set
{
if ((this._DateDeposit != value))
{
this.OnDateDepositChanging(value);
this.SendPropertyChanging();
this._DateDeposit = value;
this.SendPropertyChanged("DateDeposit");
this.OnDateDepositChanged();
}
}
}
[Column(Storage="_AmountDeposit", DbType="Money NOT NULL")]
public decimal AmountDeposit
{
get
{
return this._AmountDeposit;
}
set
{
if ((this._AmountDeposit != value))
{
this.OnAmountDepositChanging(value);
this.SendPropertyChanging();
this._AmountDeposit = value;
this.SendPropertyChanged("AmountDeposit");
this.OnAmountDepositChanged();
}
}
}
[Column(Storage="_ReferenceNumber", DbType="VarChar(20)")]
public string ReferenceNumber
{
get
{
return this._ReferenceNumber;
}
set
{
if ((this._ReferenceNumber != value))
{
this.OnReferenceNumberChanging(value);
this.SendPropertyChanging();
this._ReferenceNumber = value;
this.SendPropertyChanged("ReferenceNumber");
this.OnReferenceNumberChanged();
}
}
}
[Association(Name="Event_BankDeposit", Storage="_Event", ThisKey="EventID", OtherKey="EventID", IsForeignKey=true)]
public Event Event
{
get
{
return this._Event.Entity;
}
set
{
Event previousValue = this._Event.Entity;
if (((previousValue != value)
|| (this._Event.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Event.Entity = null;
previousValue.BankDeposits.Remove(this);
}
this._Event.Entity = value;
if ((value != null))
{
value.BankDeposits.Add(this);
this._EventID = value.EventID;
}
else
{
this._EventID = default(int);
}
this.SendPropertyChanged("Event");
}
}
}
[Association(Name="JK_BankDeposit", Storage="_JK", ThisKey="JKID", OtherKey="JKID", IsForeignKey=true)]
public JK JK
{
get
{
return this._JK.Entity;
}
set
{
JK previousValue = this._JK.Entity;
if (((previousValue != value)
|| (this._JK.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._JK.Entity = null;
previousValue.BankDeposits.Remove(this);
}
this._JK.Entity = value;
if ((value != null))
{
value.BankDeposits.Add(this);
this._JKID = value.JKID;
}
else
{
this._JKID = default(int);
}
this.SendPropertyChanged("JK");
}
}
}
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