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

namespace CofeeShop
{
	using System.Data.Linq;
	using System.Data.Linq.Mapping;
	using System.Data;
	using System.Collections.Generic;
	using System.Reflection;
	using System.Linq;
	using System.Linq.Expressions;
	using System.ComponentModel;
	using System;
	
	
	[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="ResturantDb")]
	public partial class LSC_CofeeShopDataContext : System.Data.Linq.DataContext
	{
		
		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
		
    #region Extensibility Method Definitions
    partial void OnCreated();
    partial void InserttblLog(tblLog instance);
    partial void UpdatetblLog(tblLog instance);
    partial void DeletetblLog(tblLog instance);
    partial void InserttblFoodCategury(tblFoodCategury instance);
    partial void UpdatetblFoodCategury(tblFoodCategury instance);
    partial void DeletetblFoodCategury(tblFoodCategury instance);
    partial void InserttblFoodUnit(tblFoodUnit instance);
    partial void UpdatetblFoodUnit(tblFoodUnit instance);
    partial void DeletetblFoodUnit(tblFoodUnit instance);
    partial void InserttblFoodsDescription(tblFoodsDescription instance);
    partial void UpdatetblFoodsDescription(tblFoodsDescription instance);
    partial void DeletetblFoodsDescription(tblFoodsDescription instance);
    partial void InserttblCustomer(tblCustomer instance);
    partial void UpdatetblCustomer(tblCustomer instance);
    partial void DeletetblCustomer(tblCustomer instance);
    partial void InserttblUser(tblUser instance);
    partial void UpdatetblUser(tblUser instance);
    partial void DeletetblUser(tblUser instance);
    partial void InserttblUserType(tblUserType instance);
    partial void UpdatetblUserType(tblUserType instance);
    partial void DeletetblUserType(tblUserType instance);
    partial void InserttblFactorID(tblFactorID instance);
    partial void UpdatetblFactorID(tblFactorID instance);
    partial void DeletetblFactorID(tblFactorID instance);
    partial void InserttblFactorDetail(tblFactorDetail instance);
    partial void UpdatetblFactorDetail(tblFactorDetail instance);
    partial void DeletetblFactorDetail(tblFactorDetail instance);
    partial void InserttblMojodi(tblMojodi instance);
    partial void UpdatetblMojodi(tblMojodi instance);
    partial void DeletetblMojodi(tblMojodi instance);
    #endregion
		
		public LSC_CofeeShopDataContext() : 
				base(global::CofeeShop.Properties.Settings.Default.CofeeShopConnectionString, mappingSource)
		{
			OnCreated();
		}
		
		public LSC_CofeeShopDataContext(string connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public LSC_CofeeShopDataContext(System.Data.IDbConnection connection) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public LSC_CofeeShopDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public LSC_CofeeShopDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
				base(connection, mappingSource)
		{
			OnCreated();
		}
		
		public System.Data.Linq.Table<tblLog> tblLogs
		{
			get
			{
				return this.GetTable<tblLog>();
			}
		}
		
		public System.Data.Linq.Table<tblFoodCategury> tblFoodCateguries
		{
			get
			{
				return this.GetTable<tblFoodCategury>();
			}
		}
		
		public System.Data.Linq.Table<tblFoodUnit> tblFoodUnits
		{
			get
			{
				return this.GetTable<tblFoodUnit>();
			}
		}
		
		public System.Data.Linq.Table<tblFoodsDescription> tblFoodsDescriptions
		{
			get
			{
				return this.GetTable<tblFoodsDescription>();
			}
		}
		
		public System.Data.Linq.Table<tblCustomer> tblCustomers
		{
			get
			{
				return this.GetTable<tblCustomer>();
			}
		}
		
		public System.Data.Linq.Table<tblUser> tblUsers
		{
			get
			{
				return this.GetTable<tblUser>();
			}
		}
		
		public System.Data.Linq.Table<tblUserType> tblUserTypes
		{
			get
			{
				return this.GetTable<tblUserType>();
			}
		}
		
		public System.Data.Linq.Table<xtblMandehGaza> xtblMandehGazas
		{
			get
			{
				return this.GetTable<xtblMandehGaza>();
			}
		}
		
		public System.Data.Linq.Table<tblFactorID> tblFactorIDs
		{
			get
			{
				return this.GetTable<tblFactorID>();
			}
		}
		
		public System.Data.Linq.Table<tblFactorDetail> tblFactorDetails
		{
			get
			{
				return this.GetTable<tblFactorDetail>();
			}
		}
		
		public System.Data.Linq.Table<xtblFactorRpt> xtblFactorRpts
		{
			get
			{
				return this.GetTable<xtblFactorRpt>();
			}
		}
		
		public System.Data.Linq.Table<xtblDropFactor> xtblDropFactors
		{
			get
			{
				return this.GetTable<xtblDropFactor>();
			}
		}
		
		public System.Data.Linq.Table<xtblTotalSaleRate> xtblTotalSaleRates
		{
			get
			{
				return this.GetTable<xtblTotalSaleRate>();
			}
		}
		
		public System.Data.Linq.Table<tblMojodi> tblMojodis
		{
			get
			{
				return this.GetTable<tblMojodi>();
			}
		}
		
		public System.Data.Linq.Table<xtblFoodSelect> xtblFoodSelects
		{
			get
			{
				return this.GetTable<xtblFoodSelect>();
			}
		}
		
		public System.Data.Linq.Table<xtblMizaneForoosh> xtblMizaneForooshes
		{
			get
			{
				return this.GetTable<xtblMizaneForoosh>();
			}
		}
		
		[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.xtblTotalSaleRates_SelectAll")]
		public ISingleResult<xtblTotalSaleRates_SelectAllResult> xtblTotalSaleRates_SelectAll()
		{
			IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())));
			return ((ISingleResult<xtblTotalSaleRates_SelectAllResult>)(result.ReturnValue));
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblLogs")]
	public partial class tblLog : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private decimal _LogID;
		
		private System.DateTime _LogDateTime;
		
		private string _LogDescription;
		
		private string _UsersName;
		
		private EntityRef<tblUser> _tblUser;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnLogIDChanging(decimal value);
    partial void OnLogIDChanged();
    partial void OnLogDateTimeChanging(System.DateTime value);
    partial void OnLogDateTimeChanged();
    partial void OnLogDescriptionChanging(string value);
    partial void OnLogDescriptionChanged();
    partial void OnUsersNameChanging(string value);
    partial void OnUsersNameChanged();
    #endregion
		
		public tblLog()
		{
			this._tblUser = default(EntityRef<tblUser>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LogID", AutoSync=AutoSync.OnInsert, DbType="Decimal(18,0) NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public decimal LogID
		{
			get
			{
				return this._LogID;
			}
			set
			{
				if ((this._LogID != value))
				{
					this.OnLogIDChanging(value);
					this.SendPropertyChanging();
					this._LogID = value;
					this.SendPropertyChanged("LogID");
					this.OnLogIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LogDateTime", DbType="DateTime NOT NULL")]
		public System.DateTime LogDateTime
		{
			get
			{
				return this._LogDateTime;
			}
			set
			{
				if ((this._LogDateTime != value))
				{
					this.OnLogDateTimeChanging(value);
					this.SendPropertyChanging();
					this._LogDateTime = value;
					this.SendPropertyChanged("LogDateTime");
					this.OnLogDateTimeChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LogDescription", DbType="NVarChar(250) NOT NULL", CanBeNull=false)]
		public string LogDescription
		{
			get
			{
				return this._LogDescription;
			}
			set
			{
				if ((this._LogDescription != value))
				{
					this.OnLogDescriptionChanging(value);
					this.SendPropertyChanging();
					this._LogDescription = value;
					this.SendPropertyChanged("LogDescription");
					this.OnLogDescriptionChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsersName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string UsersName
		{
			get
			{
				return this._UsersName;
			}
			set
			{
				if ((this._UsersName != value))
				{
					if (this._tblUser.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnUsersNameChanging(value);
					this.SendPropertyChanging();
					this._UsersName = value;
					this.SendPropertyChanged("UsersName");
					this.OnUsersNameChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUser_tblLog", Storage="_tblUser", ThisKey="UsersName", OtherKey="UsersName", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblUser tblUser
		{
			get
			{
				return this._tblUser.Entity;
			}
			set
			{
				tblUser previousValue = this._tblUser.Entity;
				if (((previousValue != value) 
							|| (this._tblUser.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblUser.Entity = null;
						previousValue.tblLogs.Remove(this);
					}
					this._tblUser.Entity = value;
					if ((value != null))
					{
						value.tblLogs.Add(this);
						this._UsersName = value.UsersName;
					}
					else
					{
						this._UsersName = default(string);
					}
					this.SendPropertyChanged("tblUser");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblFoodCategury")]
	public partial class tblFoodCategury : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private decimal _FoodCateguryID;
		
		private string _FoodCateguryDescription;
		
		private EntitySet<tblFoodsDescription> _tblFoodsDescriptions;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnFoodCateguryIDChanging(decimal value);
    partial void OnFoodCateguryIDChanged();
    partial void OnFoodCateguryDescriptionChanging(string value);
    partial void OnFoodCateguryDescriptionChanged();
    #endregion
		
		public tblFoodCategury()
		{
			this._tblFoodsDescriptions = new EntitySet<tblFoodsDescription>(new Action<tblFoodsDescription>(this.attach_tblFoodsDescriptions), new Action<tblFoodsDescription>(this.detach_tblFoodsDescriptions));
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodCateguryID", AutoSync=AutoSync.OnInsert, DbType="Decimal(18,0) NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public decimal FoodCateguryID
		{
			get
			{
				return this._FoodCateguryID;
			}
			set
			{
				if ((this._FoodCateguryID != value))
				{
					this.OnFoodCateguryIDChanging(value);
					this.SendPropertyChanging();
					this._FoodCateguryID = value;
					this.SendPropertyChanged("FoodCateguryID");
					this.OnFoodCateguryIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodCateguryDescription", DbType="NVarChar(1000) NOT NULL", CanBeNull=false)]
		public string FoodCateguryDescription
		{
			get
			{
				return this._FoodCateguryDescription;
			}
			set
			{
				if ((this._FoodCateguryDescription != value))
				{
					this.OnFoodCateguryDescriptionChanging(value);
					this.SendPropertyChanging();
					this._FoodCateguryDescription = value;
					this.SendPropertyChanged("FoodCateguryDescription");
					this.OnFoodCateguryDescriptionChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFoodCategury_tblFoodsDescription", Storage="_tblFoodsDescriptions", ThisKey="FoodCateguryID", OtherKey="FoodCateguryID")]
		public EntitySet<tblFoodsDescription> tblFoodsDescriptions
		{
			get
			{
				return this._tblFoodsDescriptions;
			}
			set
			{
				this._tblFoodsDescriptions.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_tblFoodsDescriptions(tblFoodsDescription entity)
		{
			this.SendPropertyChanging();
			entity.tblFoodCategury = this;
		}
		
		private void detach_tblFoodsDescriptions(tblFoodsDescription entity)
		{
			this.SendPropertyChanging();
			entity.tblFoodCategury = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblFoodUnits")]
	public partial class tblFoodUnit : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _FoodUnitID;
		
		private string _FoodUnitDescription;
		
		private EntitySet<tblFoodsDescription> _tblFoodsDescriptions;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnFoodUnitIDChanging(int value);
    partial void OnFoodUnitIDChanged();
    partial void OnFoodUnitDescriptionChanging(string value);
    partial void OnFoodUnitDescriptionChanged();
    #endregion
		
		public tblFoodUnit()
		{
			this._tblFoodsDescriptions = new EntitySet<tblFoodsDescription>(new Action<tblFoodsDescription>(this.attach_tblFoodsDescriptions), new Action<tblFoodsDescription>(this.detach_tblFoodsDescriptions));
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodUnitID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int FoodUnitID
		{
			get
			{
				return this._FoodUnitID;
			}
			set
			{
				if ((this._FoodUnitID != value))
				{
					this.OnFoodUnitIDChanging(value);
					this.SendPropertyChanging();
					this._FoodUnitID = value;
					this.SendPropertyChanged("FoodUnitID");
					this.OnFoodUnitIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodUnitDescription", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string FoodUnitDescription
		{
			get
			{
				return this._FoodUnitDescription;
			}
			set
			{
				if ((this._FoodUnitDescription != value))
				{
					this.OnFoodUnitDescriptionChanging(value);
					this.SendPropertyChanging();
					this._FoodUnitDescription = value;
					this.SendPropertyChanged("FoodUnitDescription");
					this.OnFoodUnitDescriptionChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFoodUnit_tblFoodsDescription", Storage="_tblFoodsDescriptions", ThisKey="FoodUnitID", OtherKey="FoodUnitID")]
		public EntitySet<tblFoodsDescription> tblFoodsDescriptions
		{
			get
			{
				return this._tblFoodsDescriptions;
			}
			set
			{
				this._tblFoodsDescriptions.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_tblFoodsDescriptions(tblFoodsDescription entity)
		{
			this.SendPropertyChanging();
			entity.tblFoodUnit = this;
		}
		
		private void detach_tblFoodsDescriptions(tblFoodsDescription entity)
		{
			this.SendPropertyChanging();
			entity.tblFoodUnit = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblFoodsDescription")]
	public partial class tblFoodsDescription : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _FoodID;
		
		private string _FoodDescription;
		
		private int _FoodUnitID;
		
		private decimal _FoodCateguryID;
		
		private EntitySet<tblFactorDetail> _tblFactorDetails;
		
		private EntitySet<tblMojodi> _tblMojodis;
		
		private EntityRef<tblFoodCategury> _tblFoodCategury;
		
		private EntityRef<tblFoodUnit> _tblFoodUnit;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnFoodIDChanging(int value);
    partial void OnFoodIDChanged();
    partial void OnFoodDescriptionChanging(string value);
    partial void OnFoodDescriptionChanged();
    partial void OnFoodUnitIDChanging(int value);
    partial void OnFoodUnitIDChanged();
    partial void OnFoodCateguryIDChanging(decimal value);
    partial void OnFoodCateguryIDChanged();
    #endregion
		
		public tblFoodsDescription()
		{
			this._tblFactorDetails = new EntitySet<tblFactorDetail>(new Action<tblFactorDetail>(this.attach_tblFactorDetails), new Action<tblFactorDetail>(this.detach_tblFactorDetails));
			this._tblMojodis = new EntitySet<tblMojodi>(new Action<tblMojodi>(this.attach_tblMojodis), new Action<tblMojodi>(this.detach_tblMojodis));
			this._tblFoodCategury = default(EntityRef<tblFoodCategury>);
			this._tblFoodUnit = default(EntityRef<tblFoodUnit>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int FoodID
		{
			get
			{
				return this._FoodID;
			}
			set
			{
				if ((this._FoodID != value))
				{
					this.OnFoodIDChanging(value);
					this.SendPropertyChanging();
					this._FoodID = value;
					this.SendPropertyChanged("FoodID");
					this.OnFoodIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodDescription", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string FoodDescription
		{
			get
			{
				return this._FoodDescription;
			}
			set
			{
				if ((this._FoodDescription != value))
				{
					this.OnFoodDescriptionChanging(value);
					this.SendPropertyChanging();
					this._FoodDescription = value;
					this.SendPropertyChanged("FoodDescription");
					this.OnFoodDescriptionChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodUnitID", DbType="Int NOT NULL")]
		public int FoodUnitID
		{
			get
			{
				return this._FoodUnitID;
			}
			set
			{
				if ((this._FoodUnitID != value))
				{
					if (this._tblFoodUnit.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnFoodUnitIDChanging(value);
					this.SendPropertyChanging();
					this._FoodUnitID = value;
					this.SendPropertyChanged("FoodUnitID");
					this.OnFoodUnitIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodCateguryID", DbType="Decimal(18,0) NOT NULL")]
		public decimal FoodCateguryID
		{
			get
			{
				return this._FoodCateguryID;
			}
			set
			{
				if ((this._FoodCateguryID != value))
				{
					if (this._tblFoodCategury.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnFoodCateguryIDChanging(value);
					this.SendPropertyChanging();
					this._FoodCateguryID = value;
					this.SendPropertyChanged("FoodCateguryID");
					this.OnFoodCateguryIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFoodsDescription_tblFactorDetail", Storage="_tblFactorDetails", ThisKey="FoodID", OtherKey="FoodID")]
		public EntitySet<tblFactorDetail> tblFactorDetails
		{
			get
			{
				return this._tblFactorDetails;
			}
			set
			{
				this._tblFactorDetails.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFoodsDescription_tblMojodi", Storage="_tblMojodis", ThisKey="FoodID", OtherKey="FoodID")]
		public EntitySet<tblMojodi> tblMojodis
		{
			get
			{
				return this._tblMojodis;
			}
			set
			{
				this._tblMojodis.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFoodCategury_tblFoodsDescription", Storage="_tblFoodCategury", ThisKey="FoodCateguryID", OtherKey="FoodCateguryID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblFoodCategury tblFoodCategury
		{
			get
			{
				return this._tblFoodCategury.Entity;
			}
			set
			{
				tblFoodCategury previousValue = this._tblFoodCategury.Entity;
				if (((previousValue != value) 
							|| (this._tblFoodCategury.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblFoodCategury.Entity = null;
						previousValue.tblFoodsDescriptions.Remove(this);
					}
					this._tblFoodCategury.Entity = value;
					if ((value != null))
					{
						value.tblFoodsDescriptions.Add(this);
						this._FoodCateguryID = value.FoodCateguryID;
					}
					else
					{
						this._FoodCateguryID = default(decimal);
					}
					this.SendPropertyChanged("tblFoodCategury");
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFoodUnit_tblFoodsDescription", Storage="_tblFoodUnit", ThisKey="FoodUnitID", OtherKey="FoodUnitID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblFoodUnit tblFoodUnit
		{
			get
			{
				return this._tblFoodUnit.Entity;
			}
			set
			{
				tblFoodUnit previousValue = this._tblFoodUnit.Entity;
				if (((previousValue != value) 
							|| (this._tblFoodUnit.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblFoodUnit.Entity = null;
						previousValue.tblFoodsDescriptions.Remove(this);
					}
					this._tblFoodUnit.Entity = value;
					if ((value != null))
					{
						value.tblFoodsDescriptions.Add(this);
						this._FoodUnitID = value.FoodUnitID;
					}
					else
					{
						this._FoodUnitID = default(int);
					}
					this.SendPropertyChanged("tblFoodUnit");
				}
			}
		}
		
		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_tblFactorDetails(tblFactorDetail entity)
		{
			this.SendPropertyChanging();
			entity.tblFoodsDescription = this;
		}
		
		private void detach_tblFactorDetails(tblFactorDetail entity)
		{
			this.SendPropertyChanging();
			entity.tblFoodsDescription = null;
		}
		
		private void attach_tblMojodis(tblMojodi entity)
		{
			this.SendPropertyChanging();
			entity.tblFoodsDescription = this;
		}
		
		private void detach_tblMojodis(tblMojodi entity)
		{
			this.SendPropertyChanging();
			entity.tblFoodsDescription = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblCustomer")]
	public partial class tblCustomer : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private decimal _CustomerID;
		
		private string _CustomerName;
		
		private string _CustomerFamily;
		
		private string _DateOzviatSH;
		
		private string _CustomerTell;
		
		private string _CustomerMobail;
		
		private string _CustomerAddress;
		
		private bool _CustomerIsActive;
		
		private EntitySet<tblFactorID> _tblFactorIDs;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnCustomerIDChanging(decimal value);
    partial void OnCustomerIDChanged();
    partial void OnCustomerNameChanging(string value);
    partial void OnCustomerNameChanged();
    partial void OnCustomerFamilyChanging(string value);
    partial void OnCustomerFamilyChanged();
    partial void OnDateOzviatSHChanging(string value);
    partial void OnDateOzviatSHChanged();
    partial void OnCustomerTellChanging(string value);
    partial void OnCustomerTellChanged();
    partial void OnCustomerMobailChanging(string value);
    partial void OnCustomerMobailChanged();
    partial void OnCustomerAddressChanging(string value);
    partial void OnCustomerAddressChanged();
    partial void OnCustomerIsActiveChanging(bool value);
    partial void OnCustomerIsActiveChanged();
    #endregion
		
		public tblCustomer()
		{
			this._tblFactorIDs = new EntitySet<tblFactorID>(new Action<tblFactorID>(this.attach_tblFactorIDs), new Action<tblFactorID>(this.detach_tblFactorIDs));
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerID", AutoSync=AutoSync.OnInsert, DbType="Decimal(18,0) NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public decimal CustomerID
		{
			get
			{
				return this._CustomerID;
			}
			set
			{
				if ((this._CustomerID != value))
				{
					this.OnCustomerIDChanging(value);
					this.SendPropertyChanging();
					this._CustomerID = value;
					this.SendPropertyChanged("CustomerID");
					this.OnCustomerIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string CustomerName
		{
			get
			{
				return this._CustomerName;
			}
			set
			{
				if ((this._CustomerName != value))
				{
					this.OnCustomerNameChanging(value);
					this.SendPropertyChanging();
					this._CustomerName = value;
					this.SendPropertyChanged("CustomerName");
					this.OnCustomerNameChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerFamily", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string CustomerFamily
		{
			get
			{
				return this._CustomerFamily;
			}
			set
			{
				if ((this._CustomerFamily != value))
				{
					this.OnCustomerFamilyChanging(value);
					this.SendPropertyChanging();
					this._CustomerFamily = value;
					this.SendPropertyChanged("CustomerFamily");
					this.OnCustomerFamilyChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateOzviatSH", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
		public string DateOzviatSH
		{
			get
			{
				return this._DateOzviatSH;
			}
			set
			{
				if ((this._DateOzviatSH != value))
				{
					this.OnDateOzviatSHChanging(value);
					this.SendPropertyChanging();
					this._DateOzviatSH = value;
					this.SendPropertyChanged("DateOzviatSH");
					this.OnDateOzviatSHChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerTell", DbType="NVarChar(150) NOT NULL", CanBeNull=false)]
		public string CustomerTell
		{
			get
			{
				return this._CustomerTell;
			}
			set
			{
				if ((this._CustomerTell != value))
				{
					this.OnCustomerTellChanging(value);
					this.SendPropertyChanging();
					this._CustomerTell = value;
					this.SendPropertyChanged("CustomerTell");
					this.OnCustomerTellChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerMobail", DbType="NVarChar(150) NOT NULL", CanBeNull=false)]
		public string CustomerMobail
		{
			get
			{
				return this._CustomerMobail;
			}
			set
			{
				if ((this._CustomerMobail != value))
				{
					this.OnCustomerMobailChanging(value);
					this.SendPropertyChanging();
					this._CustomerMobail = value;
					this.SendPropertyChanged("CustomerMobail");
					this.OnCustomerMobailChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerAddress", DbType="NVarChar(300) NOT NULL", CanBeNull=false)]
		public string CustomerAddress
		{
			get
			{
				return this._CustomerAddress;
			}
			set
			{
				if ((this._CustomerAddress != value))
				{
					this.OnCustomerAddressChanging(value);
					this.SendPropertyChanging();
					this._CustomerAddress = value;
					this.SendPropertyChanged("CustomerAddress");
					this.OnCustomerAddressChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerIsActive", DbType="Bit NOT NULL")]
		public bool CustomerIsActive
		{
			get
			{
				return this._CustomerIsActive;
			}
			set
			{
				if ((this._CustomerIsActive != value))
				{
					this.OnCustomerIsActiveChanging(value);
					this.SendPropertyChanging();
					this._CustomerIsActive = value;
					this.SendPropertyChanged("CustomerIsActive");
					this.OnCustomerIsActiveChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblCustomer_tblFactorID", Storage="_tblFactorIDs", ThisKey="CustomerID", OtherKey="CustomerID")]
		public EntitySet<tblFactorID> tblFactorIDs
		{
			get
			{
				return this._tblFactorIDs;
			}
			set
			{
				this._tblFactorIDs.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_tblFactorIDs(tblFactorID entity)
		{
			this.SendPropertyChanging();
			entity.tblCustomer = this;
		}
		
		private void detach_tblFactorIDs(tblFactorID entity)
		{
			this.SendPropertyChanging();
			entity.tblCustomer = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblUsers")]
	public partial class tblUser : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _UsersID;
		
		private string _UsersName;
		
		private string _UsersPass;
		
		private string _UserFName;
		
		private string _UsersSName;
		
		private int _UserTypeID;
		
		private string _UserTell;
		
		private string _UserMobail;
		
		private bool _UserBanBit;
		
		private EntitySet<tblLog> _tblLogs;
		
		private EntityRef<tblUserType> _tblUserType;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnUsersIDChanging(int value);
    partial void OnUsersIDChanged();
    partial void OnUsersNameChanging(string value);
    partial void OnUsersNameChanged();
    partial void OnUsersPassChanging(string value);
    partial void OnUsersPassChanged();
    partial void OnUserFNameChanging(string value);
    partial void OnUserFNameChanged();
    partial void OnUsersSNameChanging(string value);
    partial void OnUsersSNameChanged();
    partial void OnUserTypeIDChanging(int value);
    partial void OnUserTypeIDChanged();
    partial void OnUserTellChanging(string value);
    partial void OnUserTellChanged();
    partial void OnUserMobailChanging(string value);
    partial void OnUserMobailChanged();
    partial void OnUserBanBitChanging(bool value);
    partial void OnUserBanBitChanged();
    #endregion
		
		public tblUser()
		{
			this._tblLogs = new EntitySet<tblLog>(new Action<tblLog>(this.attach_tblLogs), new Action<tblLog>(this.detach_tblLogs));
			this._tblUserType = default(EntityRef<tblUserType>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsersID", AutoSync=AutoSync.Always, DbType="Int NOT NULL IDENTITY", IsDbGenerated=true)]
		public int UsersID
		{
			get
			{
				return this._UsersID;
			}
			set
			{
				if ((this._UsersID != value))
				{
					this.OnUsersIDChanging(value);
					this.SendPropertyChanging();
					this._UsersID = value;
					this.SendPropertyChanged("UsersID");
					this.OnUsersIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsersName", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
		public string UsersName
		{
			get
			{
				return this._UsersName;
			}
			set
			{
				if ((this._UsersName != value))
				{
					this.OnUsersNameChanging(value);
					this.SendPropertyChanging();
					this._UsersName = value;
					this.SendPropertyChanged("UsersName");
					this.OnUsersNameChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsersPass", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string UsersPass
		{
			get
			{
				return this._UsersPass;
			}
			set
			{
				if ((this._UsersPass != value))
				{
					this.OnUsersPassChanging(value);
					this.SendPropertyChanging();
					this._UsersPass = value;
					this.SendPropertyChanged("UsersPass");
					this.OnUsersPassChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserFName", DbType="NVarChar(50)")]
		public string UserFName
		{
			get
			{
				return this._UserFName;
			}
			set
			{
				if ((this._UserFName != value))
				{
					this.OnUserFNameChanging(value);
					this.SendPropertyChanging();
					this._UserFName = value;
					this.SendPropertyChanged("UserFName");
					this.OnUserFNameChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsersSName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string UsersSName
		{
			get
			{
				return this._UsersSName;
			}
			set
			{
				if ((this._UsersSName != value))
				{
					this.OnUsersSNameChanging(value);
					this.SendPropertyChanging();
					this._UsersSName = value;
					this.SendPropertyChanged("UsersSName");
					this.OnUsersSNameChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserTypeID", DbType="Int NOT NULL")]
		public int UserTypeID
		{
			get
			{
				return this._UserTypeID;
			}
			set
			{
				if ((this._UserTypeID != value))
				{
					if (this._tblUserType.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnUserTypeIDChanging(value);
					this.SendPropertyChanging();
					this._UserTypeID = value;
					this.SendPropertyChanged("UserTypeID");
					this.OnUserTypeIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserTell", DbType="NVarChar(150)")]
		public string UserTell
		{
			get
			{
				return this._UserTell;
			}
			set
			{
				if ((this._UserTell != value))
				{
					this.OnUserTellChanging(value);
					this.SendPropertyChanging();
					this._UserTell = value;
					this.SendPropertyChanged("UserTell");
					this.OnUserTellChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserMobail", DbType="NVarChar(150)")]
		public string UserMobail
		{
			get
			{
				return this._UserMobail;
			}
			set
			{
				if ((this._UserMobail != value))
				{
					this.OnUserMobailChanging(value);
					this.SendPropertyChanging();
					this._UserMobail = value;
					this.SendPropertyChanged("UserMobail");
					this.OnUserMobailChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserBanBit", DbType="Bit NOT NULL")]
		public bool UserBanBit
		{
			get
			{
				return this._UserBanBit;
			}
			set
			{
				if ((this._UserBanBit != value))
				{
					this.OnUserBanBitChanging(value);
					this.SendPropertyChanging();
					this._UserBanBit = value;
					this.SendPropertyChanged("UserBanBit");
					this.OnUserBanBitChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUser_tblLog", Storage="_tblLogs", ThisKey="UsersName", OtherKey="UsersName")]
		public EntitySet<tblLog> tblLogs
		{
			get
			{
				return this._tblLogs;
			}
			set
			{
				this._tblLogs.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUserType_tblUser", Storage="_tblUserType", ThisKey="UserTypeID", OtherKey="UserTypeID", IsForeignKey=true)]
		public tblUserType tblUserType
		{
			get
			{
				return this._tblUserType.Entity;
			}
			set
			{
				tblUserType previousValue = this._tblUserType.Entity;
				if (((previousValue != value) 
							|| (this._tblUserType.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblUserType.Entity = null;
						previousValue.tblUsers.Remove(this);
					}
					this._tblUserType.Entity = value;
					if ((value != null))
					{
						value.tblUsers.Add(this);
						this._UserTypeID = value.UserTypeID;
					}
					else
					{
						this._UserTypeID = default(int);
					}
					this.SendPropertyChanged("tblUserType");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_tblLogs(tblLog entity)
		{
			this.SendPropertyChanging();
			entity.tblUser = this;
		}
		
		private void detach_tblLogs(tblLog entity)
		{
			this.SendPropertyChanging();
			entity.tblUser = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblUserTypes")]
	public partial class tblUserType : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _UserTypeID;
		
		private string _UsersTypeDescription;
		
		private EntitySet<tblUser> _tblUsers;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnUserTypeIDChanging(int value);
    partial void OnUserTypeIDChanged();
    partial void OnUsersTypeDescriptionChanging(string value);
    partial void OnUsersTypeDescriptionChanged();
    #endregion
		
		public tblUserType()
		{
			this._tblUsers = new EntitySet<tblUser>(new Action<tblUser>(this.attach_tblUsers), new Action<tblUser>(this.detach_tblUsers));
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserTypeID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int UserTypeID
		{
			get
			{
				return this._UserTypeID;
			}
			set
			{
				if ((this._UserTypeID != value))
				{
					this.OnUserTypeIDChanging(value);
					this.SendPropertyChanging();
					this._UserTypeID = value;
					this.SendPropertyChanged("UserTypeID");
					this.OnUserTypeIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UsersTypeDescription", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
		public string UsersTypeDescription
		{
			get
			{
				return this._UsersTypeDescription;
			}
			set
			{
				if ((this._UsersTypeDescription != value))
				{
					this.OnUsersTypeDescriptionChanging(value);
					this.SendPropertyChanging();
					this._UsersTypeDescription = value;
					this.SendPropertyChanged("UsersTypeDescription");
					this.OnUsersTypeDescriptionChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblUserType_tblUser", Storage="_tblUsers", ThisKey="UserTypeID", OtherKey="UserTypeID")]
		public EntitySet<tblUser> tblUsers
		{
			get
			{
				return this._tblUsers;
			}
			set
			{
				this._tblUsers.Assign(value);
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		
		private void attach_tblUsers(tblUser entity)
		{
			this.SendPropertyChanging();
			entity.tblUserType = this;
		}
		
		private void detach_tblUsers(tblUser entity)
		{
			this.SendPropertyChanging();
			entity.tblUserType = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.xtblMandehGaza")]
	public partial class xtblMandehGaza
	{
		
		private int _FoodsID;
		
		private System.Nullable<double> _Voroodi;
		
		private System.Nullable<double> _Khorooji;
		
		private System.Nullable<double> _MandehGaza;
		
		public xtblMandehGaza()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodsID", DbType="Int NOT NULL")]
		public int FoodsID
		{
			get
			{
				return this._FoodsID;
			}
			set
			{
				if ((this._FoodsID != value))
				{
					this._FoodsID = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Voroodi", DbType="Float")]
		public System.Nullable<double> Voroodi
		{
			get
			{
				return this._Voroodi;
			}
			set
			{
				if ((this._Voroodi != value))
				{
					this._Voroodi = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Khorooji", DbType="Float")]
		public System.Nullable<double> Khorooji
		{
			get
			{
				return this._Khorooji;
			}
			set
			{
				if ((this._Khorooji != value))
				{
					this._Khorooji = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MandehGaza", DbType="Float")]
		public System.Nullable<double> MandehGaza
		{
			get
			{
				return this._MandehGaza;
			}
			set
			{
				if ((this._MandehGaza != value))
				{
					this._MandehGaza = value;
				}
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblFactorID")]
	public partial class tblFactorID : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private int _FactorID;
		
		private string _FactorShDate;
		
		private decimal _CustomerID;
		
		private EntitySet<tblFactorDetail> _tblFactorDetails;
		
		private EntityRef<tblCustomer> _tblCustomer;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnFactorIDChanging(int value);
    partial void OnFactorIDChanged();
    partial void OnFactorShDateChanging(string value);
    partial void OnFactorShDateChanged();
    partial void OnCustomerIDChanging(decimal value);
    partial void OnCustomerIDChanged();
    #endregion
		
		public tblFactorID()
		{
			this._tblFactorDetails = new EntitySet<tblFactorDetail>(new Action<tblFactorDetail>(this.attach_tblFactorDetails), new Action<tblFactorDetail>(this.detach_tblFactorDetails));
			this._tblCustomer = default(EntityRef<tblCustomer>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactorID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public int FactorID
		{
			get
			{
				return this._FactorID;
			}
			set
			{
				if ((this._FactorID != value))
				{
					this.OnFactorIDChanging(value);
					this.SendPropertyChanging();
					this._FactorID = value;
					this.SendPropertyChanged("FactorID");
					this.OnFactorIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactorShDate", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
		public string FactorShDate
		{
			get
			{
				return this._FactorShDate;
			}
			set
			{
				if ((this._FactorShDate != value))
				{
					this.OnFactorShDateChanging(value);
					this.SendPropertyChanging();
					this._FactorShDate = value;
					this.SendPropertyChanged("FactorShDate");
					this.OnFactorShDateChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerID", DbType="Decimal(18,0) NOT NULL")]
		public decimal CustomerID
		{
			get
			{
				return this._CustomerID;
			}
			set
			{
				if ((this._CustomerID != value))
				{
					if (this._tblCustomer.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnCustomerIDChanging(value);
					this.SendPropertyChanging();
					this._CustomerID = value;
					this.SendPropertyChanged("CustomerID");
					this.OnCustomerIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFactorID_tblFactorDetail", Storage="_tblFactorDetails", ThisKey="FactorID", OtherKey="FactorID")]
		public EntitySet<tblFactorDetail> tblFactorDetails
		{
			get
			{
				return this._tblFactorDetails;
			}
			set
			{
				this._tblFactorDetails.Assign(value);
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblCustomer_tblFactorID", Storage="_tblCustomer", ThisKey="CustomerID", OtherKey="CustomerID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblCustomer tblCustomer
		{
			get
			{
				return this._tblCustomer.Entity;
			}
			set
			{
				tblCustomer previousValue = this._tblCustomer.Entity;
				if (((previousValue != value) 
							|| (this._tblCustomer.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblCustomer.Entity = null;
						previousValue.tblFactorIDs.Remove(this);
					}
					this._tblCustomer.Entity = value;
					if ((value != null))
					{
						value.tblFactorIDs.Add(this);
						this._CustomerID = value.CustomerID;
					}
					else
					{
						this._CustomerID = default(decimal);
					}
					this.SendPropertyChanged("tblCustomer");
				}
			}
		}
		
		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_tblFactorDetails(tblFactorDetail entity)
		{
			this.SendPropertyChanging();
			entity.tblFactorID = this;
		}
		
		private void detach_tblFactorDetails(tblFactorDetail entity)
		{
			this.SendPropertyChanging();
			entity.tblFactorID = null;
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblFactorDetails")]
	public partial class tblFactorDetail : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private decimal _FactorDetalID;
		
		private int _FactorID;
		
		private int _FoodID;
		
		private double _FoodQuantity;
		
		private decimal _UnitPrice;
		
		private decimal _Takhfif;
		
		private decimal _TaxRate;
		
		private EntityRef<tblFactorID> _tblFactorID;
		
		private EntityRef<tblFoodsDescription> _tblFoodsDescription;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnFactorDetalIDChanging(decimal value);
    partial void OnFactorDetalIDChanged();
    partial void OnFactorIDChanging(int value);
    partial void OnFactorIDChanged();
    partial void OnFoodIDChanging(int value);
    partial void OnFoodIDChanged();
    partial void OnFoodQuantityChanging(double value);
    partial void OnFoodQuantityChanged();
    partial void OnUnitPriceChanging(decimal value);
    partial void OnUnitPriceChanged();
    partial void OnTakhfifChanging(decimal value);
    partial void OnTakhfifChanged();
    partial void OnTaxRateChanging(decimal value);
    partial void OnTaxRateChanged();
    #endregion
		
		public tblFactorDetail()
		{
			this._tblFactorID = default(EntityRef<tblFactorID>);
			this._tblFoodsDescription = default(EntityRef<tblFoodsDescription>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactorDetalID", AutoSync=AutoSync.OnInsert, DbType="Decimal(18,0) NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
		public decimal FactorDetalID
		{
			get
			{
				return this._FactorDetalID;
			}
			set
			{
				if ((this._FactorDetalID != value))
				{
					this.OnFactorDetalIDChanging(value);
					this.SendPropertyChanging();
					this._FactorDetalID = value;
					this.SendPropertyChanged("FactorDetalID");
					this.OnFactorDetalIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactorID", DbType="Int NOT NULL")]
		public int FactorID
		{
			get
			{
				return this._FactorID;
			}
			set
			{
				if ((this._FactorID != value))
				{
					if (this._tblFactorID.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnFactorIDChanging(value);
					this.SendPropertyChanging();
					this._FactorID = value;
					this.SendPropertyChanged("FactorID");
					this.OnFactorIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodID", DbType="Int NOT NULL")]
		public int FoodID
		{
			get
			{
				return this._FoodID;
			}
			set
			{
				if ((this._FoodID != value))
				{
					if (this._tblFoodsDescription.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnFoodIDChanging(value);
					this.SendPropertyChanging();
					this._FoodID = value;
					this.SendPropertyChanged("FoodID");
					this.OnFoodIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodQuantity", DbType="Float NOT NULL")]
		public double FoodQuantity
		{
			get
			{
				return this._FoodQuantity;
			}
			set
			{
				if ((this._FoodQuantity != value))
				{
					this.OnFoodQuantityChanging(value);
					this.SendPropertyChanging();
					this._FoodQuantity = value;
					this.SendPropertyChanged("FoodQuantity");
					this.OnFoodQuantityChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitPrice", DbType="Decimal(18,0) NOT NULL")]
		public decimal UnitPrice
		{
			get
			{
				return this._UnitPrice;
			}
			set
			{
				if ((this._UnitPrice != value))
				{
					this.OnUnitPriceChanging(value);
					this.SendPropertyChanging();
					this._UnitPrice = value;
					this.SendPropertyChanged("UnitPrice");
					this.OnUnitPriceChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Takhfif", DbType="Decimal(18,0) NOT NULL")]
		public decimal Takhfif
		{
			get
			{
				return this._Takhfif;
			}
			set
			{
				if ((this._Takhfif != value))
				{
					this.OnTakhfifChanging(value);
					this.SendPropertyChanging();
					this._Takhfif = value;
					this.SendPropertyChanged("Takhfif");
					this.OnTakhfifChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaxRate", DbType="Decimal(18,0) NOT NULL")]
		public decimal TaxRate
		{
			get
			{
				return this._TaxRate;
			}
			set
			{
				if ((this._TaxRate != value))
				{
					this.OnTaxRateChanging(value);
					this.SendPropertyChanging();
					this._TaxRate = value;
					this.SendPropertyChanged("TaxRate");
					this.OnTaxRateChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFactorID_tblFactorDetail", Storage="_tblFactorID", ThisKey="FactorID", OtherKey="FactorID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblFactorID tblFactorID
		{
			get
			{
				return this._tblFactorID.Entity;
			}
			set
			{
				tblFactorID previousValue = this._tblFactorID.Entity;
				if (((previousValue != value) 
							|| (this._tblFactorID.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblFactorID.Entity = null;
						previousValue.tblFactorDetails.Remove(this);
					}
					this._tblFactorID.Entity = value;
					if ((value != null))
					{
						value.tblFactorDetails.Add(this);
						this._FactorID = value.FactorID;
					}
					else
					{
						this._FactorID = default(int);
					}
					this.SendPropertyChanged("tblFactorID");
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFoodsDescription_tblFactorDetail", Storage="_tblFoodsDescription", ThisKey="FoodID", OtherKey="FoodID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblFoodsDescription tblFoodsDescription
		{
			get
			{
				return this._tblFoodsDescription.Entity;
			}
			set
			{
				tblFoodsDescription previousValue = this._tblFoodsDescription.Entity;
				if (((previousValue != value) 
							|| (this._tblFoodsDescription.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblFoodsDescription.Entity = null;
						previousValue.tblFactorDetails.Remove(this);
					}
					this._tblFoodsDescription.Entity = value;
					if ((value != null))
					{
						value.tblFactorDetails.Add(this);
						this._FoodID = value.FoodID;
					}
					else
					{
						this._FoodID = default(int);
					}
					this.SendPropertyChanged("tblFoodsDescription");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.xtblFactorRpt")]
	public partial class xtblFactorRpt
	{
		
		private int _FactorID;
		
		private string _FactorShDate;
		
		private decimal _CustomerID;
		
		private string _NameSname;
		
		private int _FoodID;
		
		private string _FoodDescription;
		
		private double _FoodQuantity;
		
		private decimal _UnitPrice;
		
		private decimal _Takhfif;
		
		private decimal _TaxRate;
		
		public xtblFactorRpt()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactorID", DbType="Int NOT NULL")]
		public int FactorID
		{
			get
			{
				return this._FactorID;
			}
			set
			{
				if ((this._FactorID != value))
				{
					this._FactorID = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactorShDate", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
		public string FactorShDate
		{
			get
			{
				return this._FactorShDate;
			}
			set
			{
				if ((this._FactorShDate != value))
				{
					this._FactorShDate = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CustomerID", DbType="Decimal(18,0) NOT NULL")]
		public decimal CustomerID
		{
			get
			{
				return this._CustomerID;
			}
			set
			{
				if ((this._CustomerID != value))
				{
					this._CustomerID = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NameSname", DbType="NVarChar(101) NOT NULL", CanBeNull=false)]
		public string NameSname
		{
			get
			{
				return this._NameSname;
			}
			set
			{
				if ((this._NameSname != value))
				{
					this._NameSname = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodID", DbType="Int NOT NULL")]
		public int FoodID
		{
			get
			{
				return this._FoodID;
			}
			set
			{
				if ((this._FoodID != value))
				{
					this._FoodID = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodDescription", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string FoodDescription
		{
			get
			{
				return this._FoodDescription;
			}
			set
			{
				if ((this._FoodDescription != value))
				{
					this._FoodDescription = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodQuantity", DbType="Float NOT NULL")]
		public double FoodQuantity
		{
			get
			{
				return this._FoodQuantity;
			}
			set
			{
				if ((this._FoodQuantity != value))
				{
					this._FoodQuantity = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitPrice", DbType="Decimal(18,0) NOT NULL")]
		public decimal UnitPrice
		{
			get
			{
				return this._UnitPrice;
			}
			set
			{
				if ((this._UnitPrice != value))
				{
					this._UnitPrice = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Takhfif", DbType="Decimal(18,0) NOT NULL")]
		public decimal Takhfif
		{
			get
			{
				return this._Takhfif;
			}
			set
			{
				if ((this._Takhfif != value))
				{
					this._Takhfif = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaxRate", DbType="Decimal(18,0) NOT NULL")]
		public decimal TaxRate
		{
			get
			{
				return this._TaxRate;
			}
			set
			{
				if ((this._TaxRate != value))
				{
					this._TaxRate = value;
				}
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.xtblDropFactors")]
	public partial class xtblDropFactor
	{
		
		private int _FactorID;
		
		private string _NameSnameCust;
		
		public xtblDropFactor()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactorID", DbType="Int NOT NULL")]
		public int FactorID
		{
			get
			{
				return this._FactorID;
			}
			set
			{
				if ((this._FactorID != value))
				{
					this._FactorID = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NameSnameCust", DbType="NVarChar(177)")]
		public string NameSnameCust
		{
			get
			{
				return this._NameSnameCust;
			}
			set
			{
				if ((this._NameSnameCust != value))
				{
					this._NameSnameCust = value;
				}
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.xtblTotalSaleRates")]
	public partial class xtblTotalSaleRate
	{
		
		private string _FactorShDate;
		
		private System.Nullable<decimal> _TotalSaleRate;
		
		private System.Nullable<int> _QuantirySaleRate;
		
		public xtblTotalSaleRate()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactorShDate", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
		public string FactorShDate
		{
			get
			{
				return this._FactorShDate;
			}
			set
			{
				if ((this._FactorShDate != value))
				{
					this._FactorShDate = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalSaleRate", DbType="Decimal(38,0)")]
		public System.Nullable<decimal> TotalSaleRate
		{
			get
			{
				return this._TotalSaleRate;
			}
			set
			{
				if ((this._TotalSaleRate != value))
				{
					this._TotalSaleRate = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuantirySaleRate", DbType="Int")]
		public System.Nullable<int> QuantirySaleRate
		{
			get
			{
				return this._QuantirySaleRate;
			}
			set
			{
				if ((this._QuantirySaleRate != value))
				{
					this._QuantirySaleRate = value;
				}
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblMojodi")]
	public partial class tblMojodi : INotifyPropertyChanging, INotifyPropertyChanged
	{
		
		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
		
		private decimal _RowMojodi;
		
		private int _FoodID;
		
		private string _EnterDate;
		
		private double _NumberOfFood;
		
		private System.Nullable<decimal> _UnitPrice;
		
		private EntityRef<tblFoodsDescription> _tblFoodsDescription;
		
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnRowMojodiChanging(decimal value);
    partial void OnRowMojodiChanged();
    partial void OnFoodIDChanging(int value);
    partial void OnFoodIDChanged();
    partial void OnEnterDateChanging(string value);
    partial void OnEnterDateChanged();
    partial void OnNumberOfFoodChanging(double value);
    partial void OnNumberOfFoodChanged();
    partial void OnUnitPriceChanging(System.Nullable<decimal> value);
    partial void OnUnitPriceChanged();
    #endregion
		
		public tblMojodi()
		{
			this._tblFoodsDescription = default(EntityRef<tblFoodsDescription>);
			OnCreated();
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RowMojodi", AutoSync=AutoSync.Always, DbType="Decimal(18,0) NOT NULL IDENTITY", IsDbGenerated=true)]
		public decimal RowMojodi
		{
			get
			{
				return this._RowMojodi;
			}
			set
			{
				if ((this._RowMojodi != value))
				{
					this.OnRowMojodiChanging(value);
					this.SendPropertyChanging();
					this._RowMojodi = value;
					this.SendPropertyChanged("RowMojodi");
					this.OnRowMojodiChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodID", DbType="Int NOT NULL", IsPrimaryKey=true)]
		public int FoodID
		{
			get
			{
				return this._FoodID;
			}
			set
			{
				if ((this._FoodID != value))
				{
					if (this._tblFoodsDescription.HasLoadedOrAssignedValue)
					{
						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
					}
					this.OnFoodIDChanging(value);
					this.SendPropertyChanging();
					this._FoodID = value;
					this.SendPropertyChanged("FoodID");
					this.OnFoodIDChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EnterDate", DbType="NVarChar(10) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
		public string EnterDate
		{
			get
			{
				return this._EnterDate;
			}
			set
			{
				if ((this._EnterDate != value))
				{
					this.OnEnterDateChanging(value);
					this.SendPropertyChanging();
					this._EnterDate = value;
					this.SendPropertyChanged("EnterDate");
					this.OnEnterDateChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfFood", DbType="Float NOT NULL", IsPrimaryKey=true)]
		public double NumberOfFood
		{
			get
			{
				return this._NumberOfFood;
			}
			set
			{
				if ((this._NumberOfFood != value))
				{
					this.OnNumberOfFoodChanging(value);
					this.SendPropertyChanging();
					this._NumberOfFood = value;
					this.SendPropertyChanged("NumberOfFood");
					this.OnNumberOfFoodChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitPrice", DbType="Money")]
		public System.Nullable<decimal> UnitPrice
		{
			get
			{
				return this._UnitPrice;
			}
			set
			{
				if ((this._UnitPrice != value))
				{
					this.OnUnitPriceChanging(value);
					this.SendPropertyChanging();
					this._UnitPrice = value;
					this.SendPropertyChanged("UnitPrice");
					this.OnUnitPriceChanged();
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblFoodsDescription_tblMojodi", Storage="_tblFoodsDescription", ThisKey="FoodID", OtherKey="FoodID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
		public tblFoodsDescription tblFoodsDescription
		{
			get
			{
				return this._tblFoodsDescription.Entity;
			}
			set
			{
				tblFoodsDescription previousValue = this._tblFoodsDescription.Entity;
				if (((previousValue != value) 
							|| (this._tblFoodsDescription.HasLoadedOrAssignedValue == false)))
				{
					this.SendPropertyChanging();
					if ((previousValue != null))
					{
						this._tblFoodsDescription.Entity = null;
						previousValue.tblMojodis.Remove(this);
					}
					this._tblFoodsDescription.Entity = value;
					if ((value != null))
					{
						value.tblMojodis.Add(this);
						this._FoodID = value.FoodID;
					}
					else
					{
						this._FoodID = default(int);
					}
					this.SendPropertyChanged("tblFoodsDescription");
				}
			}
		}
		
		public event PropertyChangingEventHandler PropertyChanging;
		
		public event PropertyChangedEventHandler PropertyChanged;
		
		protected virtual void SendPropertyChanging()
		{
			if ((this.PropertyChanging != null))
			{
				this.PropertyChanging(this, emptyChangingEventArgs);
			}
		}
		
		protected virtual void SendPropertyChanged(String propertyName)
		{
			if ((this.PropertyChanged != null))
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.xtblFoodSelect")]
	public partial class xtblFoodSelect
	{
		
		private int _FoodID;
		
		private string _FoodDescription;
		
		private System.Nullable<decimal> _UnitPrice;
		
		private decimal _FoodCateguryID;
		
		private int _FoodUnitID;
		
		public xtblFoodSelect()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodID", DbType="Int NOT NULL")]
		public int FoodID
		{
			get
			{
				return this._FoodID;
			}
			set
			{
				if ((this._FoodID != value))
				{
					this._FoodID = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodDescription", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string FoodDescription
		{
			get
			{
				return this._FoodDescription;
			}
			set
			{
				if ((this._FoodDescription != value))
				{
					this._FoodDescription = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitPrice", DbType="Money")]
		public System.Nullable<decimal> UnitPrice
		{
			get
			{
				return this._UnitPrice;
			}
			set
			{
				if ((this._UnitPrice != value))
				{
					this._UnitPrice = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodCateguryID", DbType="Decimal(18,0) NOT NULL")]
		public decimal FoodCateguryID
		{
			get
			{
				return this._FoodCateguryID;
			}
			set
			{
				if ((this._FoodCateguryID != value))
				{
					this._FoodCateguryID = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodUnitID", DbType="Int NOT NULL")]
		public int FoodUnitID
		{
			get
			{
				return this._FoodUnitID;
			}
			set
			{
				if ((this._FoodUnitID != value))
				{
					this._FoodUnitID = value;
				}
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.xtblMizaneForoosh")]
	public partial class xtblMizaneForoosh
	{
		
		private int _FoodID;
		
		private string _FoodDescription;
		
		private System.Nullable<double> _KoleTedad;
		
		private System.Nullable<double> _TotalPrice;
		
		public xtblMizaneForoosh()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodID", DbType="Int NOT NULL")]
		public int FoodID
		{
			get
			{
				return this._FoodID;
			}
			set
			{
				if ((this._FoodID != value))
				{
					this._FoodID = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FoodDescription", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
		public string FoodDescription
		{
			get
			{
				return this._FoodDescription;
			}
			set
			{
				if ((this._FoodDescription != value))
				{
					this._FoodDescription = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KoleTedad", DbType="Float")]
		public System.Nullable<double> KoleTedad
		{
			get
			{
				return this._KoleTedad;
			}
			set
			{
				if ((this._KoleTedad != value))
				{
					this._KoleTedad = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalPrice", DbType="Float")]
		public System.Nullable<double> TotalPrice
		{
			get
			{
				return this._TotalPrice;
			}
			set
			{
				if ((this._TotalPrice != value))
				{
					this._TotalPrice = value;
				}
			}
		}
	}
	
	public partial class xtblTotalSaleRates_SelectAllResult
	{
		
		private string _FactorShDate;
		
		private System.Nullable<decimal> _TotalSaleRate;
		
		private System.Nullable<int> _QuantirySaleRate;
		
		public xtblTotalSaleRates_SelectAllResult()
		{
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FactorShDate", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
		public string FactorShDate
		{
			get
			{
				return this._FactorShDate;
			}
			set
			{
				if ((this._FactorShDate != value))
				{
					this._FactorShDate = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalSaleRate", DbType="Decimal(38,0)")]
		public System.Nullable<decimal> TotalSaleRate
		{
			get
			{
				return this._TotalSaleRate;
			}
			set
			{
				if ((this._TotalSaleRate != value))
				{
					this._TotalSaleRate = value;
				}
			}
		}
		
		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuantirySaleRate", DbType="Int")]
		public System.Nullable<int> QuantirySaleRate
		{
			get
			{
				return this._QuantirySaleRate;
			}
			set
			{
				if ((this._QuantirySaleRate != value))
				{
					this._QuantirySaleRate = value;
				}
			}
		}
	}
}
#pragma warning restore 1591
