#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>
//------------------------------------------------------------------------------

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;



[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="Khabari_Data")]
public partial class LSC_KhateratDataContext : System.Data.Linq.DataContext
{
	
	private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
	
  #region Extensibility Method Definitions
  partial void OnCreated();
  partial void InsertMainLink(MainLink instance);
  partial void UpdateMainLink(MainLink instance);
  partial void DeleteMainLink(MainLink instance);
  partial void InserttblKhaterehGroup(tblKhaterehGroup instance);
  partial void UpdatetblKhaterehGroup(tblKhaterehGroup instance);
  partial void DeletetblKhaterehGroup(tblKhaterehGroup instance);
  partial void InserttblMusic(tblMusic instance);
  partial void UpdatetblMusic(tblMusic instance);
  partial void DeletetblMusic(tblMusic instance);
  partial void InsertUser(User instance);
  partial void UpdateUser(User instance);
  partial void DeleteUser(User instance);
  partial void InsertUserType(UserType instance);
  partial void UpdateUserType(UserType instance);
  partial void DeleteUserType(UserType instance);
  partial void InserttblKhaterat(tblKhaterat instance);
  partial void UpdatetblKhaterat(tblKhaterat instance);
  partial void DeletetblKhaterat(tblKhaterat instance);
  partial void InserttblKhaterehType(tblKhaterehType instance);
  partial void UpdatetblKhaterehType(tblKhaterehType instance);
  partial void DeletetblKhaterehType(tblKhaterehType instance);
  partial void InserttblKhateratPrivate(tblKhateratPrivate instance);
  partial void UpdatetblKhateratPrivate(tblKhateratPrivate instance);
  partial void DeletetblKhateratPrivate(tblKhateratPrivate instance);
  partial void InserttblVote(tblVote instance);
  partial void UpdatetblVote(tblVote instance);
  partial void DeletetblVote(tblVote instance);
  #endregion
	
	public LSC_KhateratDataContext() : 
			base(global::System.Configuration.ConfigurationManager.ConnectionStrings["KhabariConnectionString"].ConnectionString, mappingSource)
	{
		OnCreated();
	}
	
	public LSC_KhateratDataContext(string connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public LSC_KhateratDataContext(System.Data.IDbConnection connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public LSC_KhateratDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public LSC_KhateratDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public System.Data.Linq.Table<MainLink> MainLinks
	{
		get
		{
			return this.GetTable<MainLink>();
		}
	}
	
	public System.Data.Linq.Table<VisitCount> VisitCounts
	{
		get
		{
			return this.GetTable<VisitCount>();
		}
	}
	
	public System.Data.Linq.Table<tblKhaterehGroup> tblKhaterehGroups
	{
		get
		{
			return this.GetTable<tblKhaterehGroup>();
		}
	}
	
	public System.Data.Linq.Table<tblMusic> tblMusics
	{
		get
		{
			return this.GetTable<tblMusic>();
		}
	}
	
	public System.Data.Linq.Table<User> Users
	{
		get
		{
			return this.GetTable<User>();
		}
	}
	
	public System.Data.Linq.Table<UserType> UserTypes
	{
		get
		{
			return this.GetTable<UserType>();
		}
	}
	
	public System.Data.Linq.Table<XtblKhateratDefault> XtblKhateratDefaults
	{
		get
		{
			return this.GetTable<XtblKhateratDefault>();
		}
	}
	
	public System.Data.Linq.Table<tblKhaterat> tblKhaterats
	{
		get
		{
			return this.GetTable<tblKhaterat>();
		}
	}
	
	public System.Data.Linq.Table<tblKhaterehType> tblKhaterehTypes
	{
		get
		{
			return this.GetTable<tblKhaterehType>();
		}
	}
	
	public System.Data.Linq.Table<XtblKhaterehGroup> XtblKhaterehGroups
	{
		get
		{
			return this.GetTable<XtblKhaterehGroup>();
		}
	}
	
	public System.Data.Linq.Table<tblKhateratPrivate> tblKhateratPrivates
	{
		get
		{
			return this.GetTable<tblKhateratPrivate>();
		}
	}
	
	public System.Data.Linq.Table<XtblKhaterehPrivate> XtblKhaterehPrivates
	{
		get
		{
			return this.GetTable<XtblKhaterehPrivate>();
		}
	}
	
	public System.Data.Linq.Table<XtblKhaterehPrivateGrd> XtblKhaterehPrivateGrds
	{
		get
		{
			return this.GetTable<XtblKhaterehPrivateGrd>();
		}
	}
	
	public System.Data.Linq.Table<tblVote> tblVotes
	{
		get
		{
			return this.GetTable<tblVote>();
		}
	}
	
	[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.SpTblArchiveSelect")]
	public ISingleResult<SpTblArchiveSelectResult> SpTblArchiveSelect()
	{
		IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())));
		return ((ISingleResult<SpTblArchiveSelectResult>)(result.ReturnValue));
	}
	
	[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.sp_tblKhaterat_Insert")]
	public int sp_tblKhaterat_Insert([global::System.Data.Linq.Mapping.ParameterAttribute(Name="NewsTitle", DbType="NVarChar(100)")] string newsTitle, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="NewsGroupID", DbType="Int")] System.Nullable<int> newsGroupID, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="NewsPic", DbType="NVarChar(100)")] string newsPic, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="NText")] string newsBody, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="DateOfAdding", DbType="NVarChar(10)")] string dateOfAdding, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserName", DbType="NVarChar(50)")] string userName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="ShowPermiss", DbType="Bit")] System.Nullable<bool> showPermiss, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="ArchivedBit", DbType="Bit")] System.Nullable<bool> archivedBit, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="KhaterehTypeID", DbType="Int")] System.Nullable<int> khaterehTypeID)
	{
		IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), newsTitle, newsGroupID, newsPic, newsBody, dateOfAdding, userName, showPermiss, archivedBit, khaterehTypeID);
		return ((int)(result.ReturnValue));
	}
	
	[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.SPtblKhateratInsert")]
	public int SPtblKhateratInsert([global::System.Data.Linq.Mapping.ParameterAttribute(Name="NewsTitle", DbType="NVarChar(100)")] string newsTitle, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="NewsGroupID", DbType="Int")] System.Nullable<int> newsGroupID, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="NewsPic", DbType="NVarChar(100)")] string newsPic, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="NText")] string newsBody, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="DateOfAdding", DbType="NVarChar(10)")] string dateOfAdding, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="UserName", DbType="NVarChar(50)")] string userName, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="ShowPermiss", DbType="Bit")] System.Nullable<bool> showPermiss, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="ArchivedBit", DbType="Bit")] System.Nullable<bool> archivedBit, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="KhaterehTypeID", DbType="Int")] System.Nullable<int> khaterehTypeID)
	{
		IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), newsTitle, newsGroupID, newsPic, newsBody, dateOfAdding, userName, showPermiss, archivedBit, khaterehTypeID);
		return ((int)(result.ReturnValue));
	}
	
	[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.SpKhaterehGroupSelect")]
	public ISingleResult<SpKhaterehGroupSelectResult> SpKhaterehGroupSelect()
	{
		IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())));
		return ((ISingleResult<SpKhaterehGroupSelectResult>)(result.ReturnValue));
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.MainLinks")]
public partial class MainLink : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _linkID;
	
	private string _MainLinkDescription;
	
	private string _MainLinkLink;
	
	private System.Nullable<int> _SortingID;
	
	private System.Nullable<int> _AllowShowBita;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnlinkIDChanging(int value);
    partial void OnlinkIDChanged();
    partial void OnMainLinkDescriptionChanging(string value);
    partial void OnMainLinkDescriptionChanged();
    partial void OnMainLinkLinkChanging(string value);
    partial void OnMainLinkLinkChanged();
    partial void OnSortingIDChanging(System.Nullable<int> value);
    partial void OnSortingIDChanged();
    partial void OnAllowShowBitaChanging(System.Nullable<int> value);
    partial void OnAllowShowBitaChanged();
    #endregion
	
	public MainLink()
	{
		OnCreated();
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_linkID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int linkID
	{
		get
		{
			return this._linkID;
		}
		set
		{
			if ((this._linkID != value))
			{
				this.OnlinkIDChanging(value);
				this.SendPropertyChanging();
				this._linkID = value;
				this.SendPropertyChanged("linkID");
				this.OnlinkIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainLinkDescription", DbType="NVarChar(50)")]
	public string MainLinkDescription
	{
		get
		{
			return this._MainLinkDescription;
		}
		set
		{
			if ((this._MainLinkDescription != value))
			{
				this.OnMainLinkDescriptionChanging(value);
				this.SendPropertyChanging();
				this._MainLinkDescription = value;
				this.SendPropertyChanged("MainLinkDescription");
				this.OnMainLinkDescriptionChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainLinkLink", DbType="NVarChar(50)")]
	public string MainLinkLink
	{
		get
		{
			return this._MainLinkLink;
		}
		set
		{
			if ((this._MainLinkLink != value))
			{
				this.OnMainLinkLinkChanging(value);
				this.SendPropertyChanging();
				this._MainLinkLink = value;
				this.SendPropertyChanged("MainLinkLink");
				this.OnMainLinkLinkChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortingID", DbType="Int")]
	public System.Nullable<int> SortingID
	{
		get
		{
			return this._SortingID;
		}
		set
		{
			if ((this._SortingID != value))
			{
				this.OnSortingIDChanging(value);
				this.SendPropertyChanging();
				this._SortingID = value;
				this.SendPropertyChanged("SortingID");
				this.OnSortingIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AllowShowBita", DbType="Int")]
	public System.Nullable<int> AllowShowBita
	{
		get
		{
			return this._AllowShowBita;
		}
		set
		{
			if ((this._AllowShowBita != value))
			{
				this.OnAllowShowBitaChanging(value);
				this.SendPropertyChanging();
				this._AllowShowBita = value;
				this.SendPropertyChanged("AllowShowBita");
				this.OnAllowShowBitaChanged();
			}
		}
	}
	
	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.VisitCounts")]
public partial class VisitCount
{
	
	private System.Nullable<double> _VisitID;
	
	public VisitCount()
	{
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VisitID", DbType="Float")]
	public System.Nullable<double> VisitID
	{
		get
		{
			return this._VisitID;
		}
		set
		{
			if ((this._VisitID != value))
			{
				this._VisitID = value;
			}
		}
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblKhaterehGroup")]
public partial class tblKhaterehGroup : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _NewsGroupID;
	
	private string _NewgGroupDescription;
	
	private EntitySet<tblKhaterat> _tblKhaterats;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnNewsGroupIDChanging(int value);
    partial void OnNewsGroupIDChanged();
    partial void OnNewgGroupDescriptionChanging(string value);
    partial void OnNewgGroupDescriptionChanged();
    #endregion
	
	public tblKhaterehGroup()
	{
		this._tblKhaterats = new EntitySet<tblKhaterat>(new Action<tblKhaterat>(this.attach_tblKhaterats), new Action<tblKhaterat>(this.detach_tblKhaterats));
		OnCreated();
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsGroupID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int NewsGroupID
	{
		get
		{
			return this._NewsGroupID;
		}
		set
		{
			if ((this._NewsGroupID != value))
			{
				this.OnNewsGroupIDChanging(value);
				this.SendPropertyChanging();
				this._NewsGroupID = value;
				this.SendPropertyChanged("NewsGroupID");
				this.OnNewsGroupIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewgGroupDescription", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
	public string NewgGroupDescription
	{
		get
		{
			return this._NewgGroupDescription;
		}
		set
		{
			if ((this._NewgGroupDescription != value))
			{
				this.OnNewgGroupDescriptionChanging(value);
				this.SendPropertyChanging();
				this._NewgGroupDescription = value;
				this.SendPropertyChanged("NewgGroupDescription");
				this.OnNewgGroupDescriptionChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterehGroup_tblKhaterat", Storage="_tblKhaterats", ThisKey="NewsGroupID", OtherKey="NewsGroupID")]
	public EntitySet<tblKhaterat> tblKhaterats
	{
		get
		{
			return this._tblKhaterats;
		}
		set
		{
			this._tblKhaterats.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_tblKhaterats(tblKhaterat entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterehGroup = this;
	}
	
	private void detach_tblKhaterats(tblKhaterat entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterehGroup = null;
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblMusics")]
public partial class tblMusic : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _MusicID;
	
	private System.Nullable<int> _MusicArticleID;
	
	private string _MusicDescription;
	
	private string _KhanadehName;
	
	private string _MusicPathFile;
	
	private EntityRef<tblKhaterat> _tblKhaterat;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnMusicIDChanging(int value);
    partial void OnMusicIDChanged();
    partial void OnMusicArticleIDChanging(System.Nullable<int> value);
    partial void OnMusicArticleIDChanged();
    partial void OnMusicDescriptionChanging(string value);
    partial void OnMusicDescriptionChanged();
    partial void OnKhanadehNameChanging(string value);
    partial void OnKhanadehNameChanged();
    partial void OnMusicPathFileChanging(string value);
    partial void OnMusicPathFileChanged();
    #endregion
	
	public tblMusic()
	{
		this._tblKhaterat = default(EntityRef<tblKhaterat>);
		OnCreated();
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MusicID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int MusicID
	{
		get
		{
			return this._MusicID;
		}
		set
		{
			if ((this._MusicID != value))
			{
				this.OnMusicIDChanging(value);
				this.SendPropertyChanging();
				this._MusicID = value;
				this.SendPropertyChanged("MusicID");
				this.OnMusicIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MusicArticleID", DbType="Int")]
	public System.Nullable<int> MusicArticleID
	{
		get
		{
			return this._MusicArticleID;
		}
		set
		{
			if ((this._MusicArticleID != value))
			{
				if (this._tblKhaterat.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnMusicArticleIDChanging(value);
				this.SendPropertyChanging();
				this._MusicArticleID = value;
				this.SendPropertyChanged("MusicArticleID");
				this.OnMusicArticleIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MusicDescription", DbType="NVarChar(50)")]
	public string MusicDescription
	{
		get
		{
			return this._MusicDescription;
		}
		set
		{
			if ((this._MusicDescription != value))
			{
				this.OnMusicDescriptionChanging(value);
				this.SendPropertyChanging();
				this._MusicDescription = value;
				this.SendPropertyChanged("MusicDescription");
				this.OnMusicDescriptionChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KhanadehName", DbType="NVarChar(80)")]
	public string KhanadehName
	{
		get
		{
			return this._KhanadehName;
		}
		set
		{
			if ((this._KhanadehName != value))
			{
				this.OnKhanadehNameChanging(value);
				this.SendPropertyChanging();
				this._KhanadehName = value;
				this.SendPropertyChanged("KhanadehName");
				this.OnKhanadehNameChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MusicPathFile", DbType="NVarChar(250)")]
	public string MusicPathFile
	{
		get
		{
			return this._MusicPathFile;
		}
		set
		{
			if ((this._MusicPathFile != value))
			{
				this.OnMusicPathFileChanging(value);
				this.SendPropertyChanging();
				this._MusicPathFile = value;
				this.SendPropertyChanged("MusicPathFile");
				this.OnMusicPathFileChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterat_tblMusic", Storage="_tblKhaterat", ThisKey="MusicArticleID", OtherKey="NewsID", IsForeignKey=true, DeleteRule="CASCADE")]
	public tblKhaterat tblKhaterat
	{
		get
		{
			return this._tblKhaterat.Entity;
		}
		set
		{
			tblKhaterat previousValue = this._tblKhaterat.Entity;
			if (((previousValue != value) 
						|| (this._tblKhaterat.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._tblKhaterat.Entity = null;
					previousValue.tblMusics.Remove(this);
				}
				this._tblKhaterat.Entity = value;
				if ((value != null))
				{
					value.tblMusics.Add(this);
					this._MusicArticleID = value.NewsID;
				}
				else
				{
					this._MusicArticleID = default(Nullable<int>);
				}
				this.SendPropertyChanged("tblKhaterat");
			}
		}
	}
	
	public event PropertyChangingEventHandler PropertyChanging;
	
	public event PropertyChangedEventHandler PropertyChanged;
	
	protected virtual void SendPropertyChanging()
	{
		if ((this.PropertyChanging != null))
		{
			this.PropertyChanging(this, emptyChangingEventArgs);
		}
	}
	
	protected virtual void SendPropertyChanged(String propertyName)
	{
		if ((this.PropertyChanged != null))
		{
			this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
		}
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Users")]
public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _UerID;
	
	private string _UserName;
	
	private string _Password;
	
	private string _Name;
	
	private string _Sname;
	
	private string _Phone;
	
	private string _Fax;
	
	private string _Mobile;
	
	private string _EMail1;
	
	private string _WebSite1;
	
	private string _Shahrestan;
	
	private string _Ostan;
	
	private string _KeshVar;
	
	private string _Address;
	
	private string _RegDate1;
	
	private System.Nullable<System.DateTime> _RegTime1;
	
	private string _UserIP1;
	
	private System.Nullable<int> _UserTypeID;
	
	private string _Notes;
	
	private System.Nullable<bool> _Banded;
	
	private EntitySet<tblKhaterat> _tblKhaterats;
	
	private EntitySet<tblKhateratPrivate> _tblKhateratPrivates;
	
	private EntityRef<UserType> _UserType;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnUerIDChanging(int value);
    partial void OnUerIDChanged();
    partial void OnUserNameChanging(string value);
    partial void OnUserNameChanged();
    partial void OnPasswordChanging(string value);
    partial void OnPasswordChanged();
    partial void OnNameChanging(string value);
    partial void OnNameChanged();
    partial void OnSnameChanging(string value);
    partial void OnSnameChanged();
    partial void OnPhoneChanging(string value);
    partial void OnPhoneChanged();
    partial void OnFaxChanging(string value);
    partial void OnFaxChanged();
    partial void OnMobileChanging(string value);
    partial void OnMobileChanged();
    partial void OnEMail1Changing(string value);
    partial void OnEMail1Changed();
    partial void OnWebSite1Changing(string value);
    partial void OnWebSite1Changed();
    partial void OnShahrestanChanging(string value);
    partial void OnShahrestanChanged();
    partial void OnOstanChanging(string value);
    partial void OnOstanChanged();
    partial void OnKeshVarChanging(string value);
    partial void OnKeshVarChanged();
    partial void OnAddressChanging(string value);
    partial void OnAddressChanged();
    partial void OnRegDate1Changing(string value);
    partial void OnRegDate1Changed();
    partial void OnRegTime1Changing(System.Nullable<System.DateTime> value);
    partial void OnRegTime1Changed();
    partial void OnUserIP1Changing(string value);
    partial void OnUserIP1Changed();
    partial void OnUserTypeIDChanging(System.Nullable<int> value);
    partial void OnUserTypeIDChanged();
    partial void OnNotesChanging(string value);
    partial void OnNotesChanged();
    partial void OnBandedChanging(System.Nullable<bool> value);
    partial void OnBandedChanged();
    #endregion
	
	public User()
	{
		this._tblKhaterats = new EntitySet<tblKhaterat>(new Action<tblKhaterat>(this.attach_tblKhaterats), new Action<tblKhaterat>(this.detach_tblKhaterats));
		this._tblKhateratPrivates = new EntitySet<tblKhateratPrivate>(new Action<tblKhateratPrivate>(this.attach_tblKhateratPrivates), new Action<tblKhateratPrivate>(this.detach_tblKhateratPrivates));
		this._UserType = default(EntityRef<UserType>);
		OnCreated();
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UerID", AutoSync=AutoSync.Always, DbType="Int NOT NULL IDENTITY", IsDbGenerated=true)]
	public int UerID
	{
		get
		{
			return this._UerID;
		}
		set
		{
			if ((this._UerID != value))
			{
				this.OnUerIDChanging(value);
				this.SendPropertyChanging();
				this._UerID = value;
				this.SendPropertyChanged("UerID");
				this.OnUerIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
	public string UserName
	{
		get
		{
			return this._UserName;
		}
		set
		{
			if ((this._UserName != value))
			{
				this.OnUserNameChanging(value);
				this.SendPropertyChanging();
				this._UserName = value;
				this.SendPropertyChanged("UserName");
				this.OnUserNameChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Password", DbType="NVarChar(50)")]
	public string Password
	{
		get
		{
			return this._Password;
		}
		set
		{
			if ((this._Password != value))
			{
				this.OnPasswordChanging(value);
				this.SendPropertyChanging();
				this._Password = value;
				this.SendPropertyChanged("Password");
				this.OnPasswordChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")]
	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();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sname", DbType="NVarChar(50)")]
	public string Sname
	{
		get
		{
			return this._Sname;
		}
		set
		{
			if ((this._Sname != value))
			{
				this.OnSnameChanging(value);
				this.SendPropertyChanging();
				this._Sname = value;
				this.SendPropertyChanged("Sname");
				this.OnSnameChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Phone", DbType="NVarChar(50)")]
	public string Phone
	{
		get
		{
			return this._Phone;
		}
		set
		{
			if ((this._Phone != value))
			{
				this.OnPhoneChanging(value);
				this.SendPropertyChanging();
				this._Phone = value;
				this.SendPropertyChanged("Phone");
				this.OnPhoneChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Fax", DbType="NVarChar(50)")]
	public string Fax
	{
		get
		{
			return this._Fax;
		}
		set
		{
			if ((this._Fax != value))
			{
				this.OnFaxChanging(value);
				this.SendPropertyChanging();
				this._Fax = value;
				this.SendPropertyChanged("Fax");
				this.OnFaxChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Mobile", DbType="NVarChar(50)")]
	public string Mobile
	{
		get
		{
			return this._Mobile;
		}
		set
		{
			if ((this._Mobile != value))
			{
				this.OnMobileChanging(value);
				this.SendPropertyChanging();
				this._Mobile = value;
				this.SendPropertyChanged("Mobile");
				this.OnMobileChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EMail1", DbType="NVarChar(100)")]
	public string EMail1
	{
		get
		{
			return this._EMail1;
		}
		set
		{
			if ((this._EMail1 != value))
			{
				this.OnEMail1Changing(value);
				this.SendPropertyChanging();
				this._EMail1 = value;
				this.SendPropertyChanged("EMail1");
				this.OnEMail1Changed();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WebSite1", DbType="NVarChar(150)")]
	public string WebSite1
	{
		get
		{
			return this._WebSite1;
		}
		set
		{
			if ((this._WebSite1 != value))
			{
				this.OnWebSite1Changing(value);
				this.SendPropertyChanging();
				this._WebSite1 = value;
				this.SendPropertyChanged("WebSite1");
				this.OnWebSite1Changed();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Shahrestan", DbType="NVarChar(50)")]
	public string Shahrestan
	{
		get
		{
			return this._Shahrestan;
		}
		set
		{
			if ((this._Shahrestan != value))
			{
				this.OnShahrestanChanging(value);
				this.SendPropertyChanging();
				this._Shahrestan = value;
				this.SendPropertyChanged("Shahrestan");
				this.OnShahrestanChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Ostan", DbType="NVarChar(50)")]
	public string Ostan
	{
		get
		{
			return this._Ostan;
		}
		set
		{
			if ((this._Ostan != value))
			{
				this.OnOstanChanging(value);
				this.SendPropertyChanging();
				this._Ostan = value;
				this.SendPropertyChanged("Ostan");
				this.OnOstanChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeshVar", DbType="NVarChar(50)")]
	public string KeshVar
	{
		get
		{
			return this._KeshVar;
		}
		set
		{
			if ((this._KeshVar != value))
			{
				this.OnKeshVarChanging(value);
				this.SendPropertyChanging();
				this._KeshVar = value;
				this.SendPropertyChanged("KeshVar");
				this.OnKeshVarChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(150)")]
	public string Address
	{
		get
		{
			return this._Address;
		}
		set
		{
			if ((this._Address != value))
			{
				this.OnAddressChanging(value);
				this.SendPropertyChanging();
				this._Address = value;
				this.SendPropertyChanged("Address");
				this.OnAddressChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegDate1", DbType="NVarChar(10)")]
	public string RegDate1
	{
		get
		{
			return this._RegDate1;
		}
		set
		{
			if ((this._RegDate1 != value))
			{
				this.OnRegDate1Changing(value);
				this.SendPropertyChanging();
				this._RegDate1 = value;
				this.SendPropertyChanged("RegDate1");
				this.OnRegDate1Changed();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegTime1", DbType="DateTime")]
	public System.Nullable<System.DateTime> RegTime1
	{
		get
		{
			return this._RegTime1;
		}
		set
		{
			if ((this._RegTime1 != value))
			{
				this.OnRegTime1Changing(value);
				this.SendPropertyChanging();
				this._RegTime1 = value;
				this.SendPropertyChanged("RegTime1");
				this.OnRegTime1Changed();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserIP1", DbType="NVarChar(50)")]
	public string UserIP1
	{
		get
		{
			return this._UserIP1;
		}
		set
		{
			if ((this._UserIP1 != value))
			{
				this.OnUserIP1Changing(value);
				this.SendPropertyChanging();
				this._UserIP1 = value;
				this.SendPropertyChanged("UserIP1");
				this.OnUserIP1Changed();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserTypeID", DbType="Int")]
	public System.Nullable<int> UserTypeID
	{
		get
		{
			return this._UserTypeID;
		}
		set
		{
			if ((this._UserTypeID != value))
			{
				if (this._UserType.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="_Notes", DbType="NVarChar(50)")]
	public string Notes
	{
		get
		{
			return this._Notes;
		}
		set
		{
			if ((this._Notes != value))
			{
				this.OnNotesChanging(value);
				this.SendPropertyChanging();
				this._Notes = value;
				this.SendPropertyChanged("Notes");
				this.OnNotesChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Banded", DbType="Bit")]
	public System.Nullable<bool> Banded
	{
		get
		{
			return this._Banded;
		}
		set
		{
			if ((this._Banded != value))
			{
				this.OnBandedChanging(value);
				this.SendPropertyChanging();
				this._Banded = value;
				this.SendPropertyChanged("Banded");
				this.OnBandedChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_tblKhaterat", Storage="_tblKhaterats", ThisKey="UserName", OtherKey="UserName")]
	public EntitySet<tblKhaterat> tblKhaterats
	{
		get
		{
			return this._tblKhaterats;
		}
		set
		{
			this._tblKhaterats.Assign(value);
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_tblKhateratPrivate", Storage="_tblKhateratPrivates", ThisKey="UserName", OtherKey="UserAdmName")]
	public EntitySet<tblKhateratPrivate> tblKhateratPrivates
	{
		get
		{
			return this._tblKhateratPrivates;
		}
		set
		{
			this._tblKhateratPrivates.Assign(value);
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="UserType_User", Storage="_UserType", ThisKey="UserTypeID", OtherKey="UserTypeID", IsForeignKey=true, DeleteRule="CASCADE")]
	public UserType UserType
	{
		get
		{
			return this._UserType.Entity;
		}
		set
		{
			UserType previousValue = this._UserType.Entity;
			if (((previousValue != value) 
						|| (this._UserType.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._UserType.Entity = null;
					previousValue.Users.Remove(this);
				}
				this._UserType.Entity = value;
				if ((value != null))
				{
					value.Users.Add(this);
					this._UserTypeID = value.UserTypeID;
				}
				else
				{
					this._UserTypeID = default(Nullable<int>);
				}
				this.SendPropertyChanged("UserType");
			}
		}
	}
	
	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_tblKhaterats(tblKhaterat entity)
	{
		this.SendPropertyChanging();
		entity.User = this;
	}
	
	private void detach_tblKhaterats(tblKhaterat entity)
	{
		this.SendPropertyChanging();
		entity.User = null;
	}
	
	private void attach_tblKhateratPrivates(tblKhateratPrivate entity)
	{
		this.SendPropertyChanging();
		entity.User = this;
	}
	
	private void detach_tblKhateratPrivates(tblKhateratPrivate entity)
	{
		this.SendPropertyChanging();
		entity.User = null;
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.UserTypes")]
public partial class UserType : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _UserTypeID;
	
	private string _UserTypeDescript;
	
	private EntitySet<User> _Users;
	
    #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 OnUserTypeDescriptChanging(string value);
    partial void OnUserTypeDescriptChanged();
    #endregion
	
	public UserType()
	{
		this._Users = new EntitySet<User>(new Action<User>(this.attach_Users), new Action<User>(this.detach_Users));
		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="_UserTypeDescript", DbType="NVarChar(50)")]
	public string UserTypeDescript
	{
		get
		{
			return this._UserTypeDescript;
		}
		set
		{
			if ((this._UserTypeDescript != value))
			{
				this.OnUserTypeDescriptChanging(value);
				this.SendPropertyChanging();
				this._UserTypeDescript = value;
				this.SendPropertyChanged("UserTypeDescript");
				this.OnUserTypeDescriptChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="UserType_User", Storage="_Users", ThisKey="UserTypeID", OtherKey="UserTypeID")]
	public EntitySet<User> Users
	{
		get
		{
			return this._Users;
		}
		set
		{
			this._Users.Assign(value);
		}
	}
	
	public event PropertyChangingEventHandler PropertyChanging;
	
	public event PropertyChangedEventHandler PropertyChanged;
	
	protected virtual void SendPropertyChanging()
	{
		if ((this.PropertyChanging != null))
		{
			this.PropertyChanging(this, emptyChangingEventArgs);
		}
	}
	
	protected virtual void SendPropertyChanged(String propertyName)
	{
		if ((this.PropertyChanged != null))
		{
			this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
		}
	}
	
	private void attach_Users(User entity)
	{
		this.SendPropertyChanging();
		entity.UserType = this;
	}
	
	private void detach_Users(User entity)
	{
		this.SendPropertyChanging();
		entity.UserType = null;
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.XtblKhateratDefault")]
public partial class XtblKhateratDefault
{
	
	private int _nwsID;
	
	private string _nwsTitle;
	
	private string _nwsGroup;
	
	private string _Expr1;
	
	private string _nwsDtadd;
	
	private string _NewsPic;
	
	private string _newsBody;
	
	private string _NewsPart;
	
	private System.Nullable<bool> _ShowPermiss;
	
	public XtblKhateratDefault()
	{
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsID", AutoSync=AutoSync.Always, DbType="Int NOT NULL IDENTITY", IsDbGenerated=true)]
	public int nwsID
	{
		get
		{
			return this._nwsID;
		}
		set
		{
			if ((this._nwsID != value))
			{
				this._nwsID = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsTitle", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
	public string nwsTitle
	{
		get
		{
			return this._nwsTitle;
		}
		set
		{
			if ((this._nwsTitle != value))
			{
				this._nwsTitle = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsGroup", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
	public string nwsGroup
	{
		get
		{
			return this._nwsGroup;
		}
		set
		{
			if ((this._nwsGroup != value))
			{
				this._nwsGroup = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Expr1", DbType="NVarChar(102)")]
	public string Expr1
	{
		get
		{
			return this._Expr1;
		}
		set
		{
			if ((this._Expr1 != value))
			{
				this._Expr1 = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsDtadd", DbType="NVarChar(10)")]
	public string nwsDtadd
	{
		get
		{
			return this._nwsDtadd;
		}
		set
		{
			if ((this._nwsDtadd != value))
			{
				this._nwsDtadd = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsPic", DbType="NVarChar(100)")]
	public string NewsPic
	{
		get
		{
			return this._NewsPic;
		}
		set
		{
			if ((this._NewsPic != value))
			{
				this._NewsPic = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_newsBody", DbType="NText", UpdateCheck=UpdateCheck.Never)]
	public string newsBody
	{
		get
		{
			return this._newsBody;
		}
		set
		{
			if ((this._newsBody != value))
			{
				this._newsBody = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsPart", DbType="NVarChar(700)")]
	public string NewsPart
	{
		get
		{
			return this._NewsPart;
		}
		set
		{
			if ((this._NewsPart != value))
			{
				this._NewsPart = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShowPermiss", DbType="Bit")]
	public System.Nullable<bool> ShowPermiss
	{
		get
		{
			return this._ShowPermiss;
		}
		set
		{
			if ((this._ShowPermiss != value))
			{
				this._ShowPermiss = value;
			}
		}
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblKhaterat")]
public partial class tblKhaterat : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _NewsID;
	
	private string _NewsTitle;
	
	private System.Nullable<int> _NewsGroupID;
	
	private string _NewsPic;
	
	private string _newsBody;
	
	private string _DateOfAdding;
	
	private string _UserName;
	
	private System.Nullable<bool> _ShowPermiss;
	
	private System.Nullable<bool> _ArchivedBit;
	
	private string _ArchivedDate;
	
	private System.Nullable<int> _KhaterehTypeID;
	
	private EntitySet<tblMusic> _tblMusics;
	
	private EntitySet<tblKhateratPrivate> _tblKhateratPrivates;
	
	private EntitySet<tblVote> _tblVotes;
	
	private EntityRef<tblKhaterehGroup> _tblKhaterehGroup;
	
	private EntityRef<User> _User;
	
	private EntityRef<tblKhaterehType> _tblKhaterehType;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnNewsIDChanging(int value);
    partial void OnNewsIDChanged();
    partial void OnNewsTitleChanging(string value);
    partial void OnNewsTitleChanged();
    partial void OnNewsGroupIDChanging(System.Nullable<int> value);
    partial void OnNewsGroupIDChanged();
    partial void OnNewsPicChanging(string value);
    partial void OnNewsPicChanged();
    partial void OnnewsBodyChanging(string value);
    partial void OnnewsBodyChanged();
    partial void OnDateOfAddingChanging(string value);
    partial void OnDateOfAddingChanged();
    partial void OnUserNameChanging(string value);
    partial void OnUserNameChanged();
    partial void OnShowPermissChanging(System.Nullable<bool> value);
    partial void OnShowPermissChanged();
    partial void OnArchivedBitChanging(System.Nullable<bool> value);
    partial void OnArchivedBitChanged();
    partial void OnArchivedDateChanging(string value);
    partial void OnArchivedDateChanged();
    partial void OnKhaterehTypeIDChanging(System.Nullable<int> value);
    partial void OnKhaterehTypeIDChanged();
    #endregion
	
	public tblKhaterat()
	{
		this._tblMusics = new EntitySet<tblMusic>(new Action<tblMusic>(this.attach_tblMusics), new Action<tblMusic>(this.detach_tblMusics));
		this._tblKhateratPrivates = new EntitySet<tblKhateratPrivate>(new Action<tblKhateratPrivate>(this.attach_tblKhateratPrivates), new Action<tblKhateratPrivate>(this.detach_tblKhateratPrivates));
		this._tblVotes = new EntitySet<tblVote>(new Action<tblVote>(this.attach_tblVotes), new Action<tblVote>(this.detach_tblVotes));
		this._tblKhaterehGroup = default(EntityRef<tblKhaterehGroup>);
		this._User = default(EntityRef<User>);
		this._tblKhaterehType = default(EntityRef<tblKhaterehType>);
		OnCreated();
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsID", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
	public int NewsID
	{
		get
		{
			return this._NewsID;
		}
		set
		{
			if ((this._NewsID != value))
			{
				this.OnNewsIDChanging(value);
				this.SendPropertyChanging();
				this._NewsID = value;
				this.SendPropertyChanged("NewsID");
				this.OnNewsIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsTitle", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
	public string NewsTitle
	{
		get
		{
			return this._NewsTitle;
		}
		set
		{
			if ((this._NewsTitle != value))
			{
				this.OnNewsTitleChanging(value);
				this.SendPropertyChanging();
				this._NewsTitle = value;
				this.SendPropertyChanged("NewsTitle");
				this.OnNewsTitleChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsGroupID", DbType="Int")]
	public System.Nullable<int> NewsGroupID
	{
		get
		{
			return this._NewsGroupID;
		}
		set
		{
			if ((this._NewsGroupID != value))
			{
				if (this._tblKhaterehGroup.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnNewsGroupIDChanging(value);
				this.SendPropertyChanging();
				this._NewsGroupID = value;
				this.SendPropertyChanged("NewsGroupID");
				this.OnNewsGroupIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsPic", DbType="NVarChar(100)")]
	public string NewsPic
	{
		get
		{
			return this._NewsPic;
		}
		set
		{
			if ((this._NewsPic != value))
			{
				this.OnNewsPicChanging(value);
				this.SendPropertyChanging();
				this._NewsPic = value;
				this.SendPropertyChanged("NewsPic");
				this.OnNewsPicChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_newsBody", DbType="NText", UpdateCheck=UpdateCheck.Never)]
	public string newsBody
	{
		get
		{
			return this._newsBody;
		}
		set
		{
			if ((this._newsBody != value))
			{
				this.OnnewsBodyChanging(value);
				this.SendPropertyChanging();
				this._newsBody = value;
				this.SendPropertyChanged("newsBody");
				this.OnnewsBodyChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateOfAdding", DbType="NVarChar(10)")]
	public string DateOfAdding
	{
		get
		{
			return this._DateOfAdding;
		}
		set
		{
			if ((this._DateOfAdding != value))
			{
				this.OnDateOfAddingChanging(value);
				this.SendPropertyChanging();
				this._DateOfAdding = value;
				this.SendPropertyChanged("DateOfAdding");
				this.OnDateOfAddingChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(50)")]
	public string UserName
	{
		get
		{
			return this._UserName;
		}
		set
		{
			if ((this._UserName != value))
			{
				if (this._User.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnUserNameChanging(value);
				this.SendPropertyChanging();
				this._UserName = value;
				this.SendPropertyChanged("UserName");
				this.OnUserNameChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShowPermiss", DbType="Bit")]
	public System.Nullable<bool> ShowPermiss
	{
		get
		{
			return this._ShowPermiss;
		}
		set
		{
			if ((this._ShowPermiss != value))
			{
				this.OnShowPermissChanging(value);
				this.SendPropertyChanging();
				this._ShowPermiss = value;
				this.SendPropertyChanged("ShowPermiss");
				this.OnShowPermissChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArchivedBit", DbType="Bit")]
	public System.Nullable<bool> ArchivedBit
	{
		get
		{
			return this._ArchivedBit;
		}
		set
		{
			if ((this._ArchivedBit != value))
			{
				this.OnArchivedBitChanging(value);
				this.SendPropertyChanging();
				this._ArchivedBit = value;
				this.SendPropertyChanged("ArchivedBit");
				this.OnArchivedBitChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArchivedDate", DbType="NVarChar(10)")]
	public string ArchivedDate
	{
		get
		{
			return this._ArchivedDate;
		}
		set
		{
			if ((this._ArchivedDate != value))
			{
				this.OnArchivedDateChanging(value);
				this.SendPropertyChanging();
				this._ArchivedDate = value;
				this.SendPropertyChanged("ArchivedDate");
				this.OnArchivedDateChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KhaterehTypeID", DbType="Int")]
	public System.Nullable<int> KhaterehTypeID
	{
		get
		{
			return this._KhaterehTypeID;
		}
		set
		{
			if ((this._KhaterehTypeID != value))
			{
				if (this._tblKhaterehType.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnKhaterehTypeIDChanging(value);
				this.SendPropertyChanging();
				this._KhaterehTypeID = value;
				this.SendPropertyChanged("KhaterehTypeID");
				this.OnKhaterehTypeIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterat_tblMusic", Storage="_tblMusics", ThisKey="NewsID", OtherKey="MusicArticleID")]
	public EntitySet<tblMusic> tblMusics
	{
		get
		{
			return this._tblMusics;
		}
		set
		{
			this._tblMusics.Assign(value);
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterat_tblKhateratPrivate", Storage="_tblKhateratPrivates", ThisKey="NewsID", OtherKey="KhaterehID")]
	public EntitySet<tblKhateratPrivate> tblKhateratPrivates
	{
		get
		{
			return this._tblKhateratPrivates;
		}
		set
		{
			this._tblKhateratPrivates.Assign(value);
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterat_tblVote", Storage="_tblVotes", ThisKey="NewsID", OtherKey="newsID")]
	public EntitySet<tblVote> tblVotes
	{
		get
		{
			return this._tblVotes;
		}
		set
		{
			this._tblVotes.Assign(value);
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterehGroup_tblKhaterat", Storage="_tblKhaterehGroup", ThisKey="NewsGroupID", OtherKey="NewsGroupID", IsForeignKey=true, DeleteRule="CASCADE")]
	public tblKhaterehGroup tblKhaterehGroup
	{
		get
		{
			return this._tblKhaterehGroup.Entity;
		}
		set
		{
			tblKhaterehGroup previousValue = this._tblKhaterehGroup.Entity;
			if (((previousValue != value) 
						|| (this._tblKhaterehGroup.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._tblKhaterehGroup.Entity = null;
					previousValue.tblKhaterats.Remove(this);
				}
				this._tblKhaterehGroup.Entity = value;
				if ((value != null))
				{
					value.tblKhaterats.Add(this);
					this._NewsGroupID = value.NewsGroupID;
				}
				else
				{
					this._NewsGroupID = default(Nullable<int>);
				}
				this.SendPropertyChanged("tblKhaterehGroup");
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_tblKhaterat", Storage="_User", ThisKey="UserName", OtherKey="UserName", IsForeignKey=true, DeleteRule="CASCADE")]
	public User User
	{
		get
		{
			return this._User.Entity;
		}
		set
		{
			User previousValue = this._User.Entity;
			if (((previousValue != value) 
						|| (this._User.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._User.Entity = null;
					previousValue.tblKhaterats.Remove(this);
				}
				this._User.Entity = value;
				if ((value != null))
				{
					value.tblKhaterats.Add(this);
					this._UserName = value.UserName;
				}
				else
				{
					this._UserName = default(string);
				}
				this.SendPropertyChanged("User");
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterehType_tblKhaterat", Storage="_tblKhaterehType", ThisKey="KhaterehTypeID", OtherKey="KhaterehTypeID", IsForeignKey=true)]
	public tblKhaterehType tblKhaterehType
	{
		get
		{
			return this._tblKhaterehType.Entity;
		}
		set
		{
			tblKhaterehType previousValue = this._tblKhaterehType.Entity;
			if (((previousValue != value) 
						|| (this._tblKhaterehType.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._tblKhaterehType.Entity = null;
					previousValue.tblKhaterats.Remove(this);
				}
				this._tblKhaterehType.Entity = value;
				if ((value != null))
				{
					value.tblKhaterats.Add(this);
					this._KhaterehTypeID = value.KhaterehTypeID;
				}
				else
				{
					this._KhaterehTypeID = default(Nullable<int>);
				}
				this.SendPropertyChanged("tblKhaterehType");
			}
		}
	}
	
	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_tblMusics(tblMusic entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterat = this;
	}
	
	private void detach_tblMusics(tblMusic entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterat = null;
	}
	
	private void attach_tblKhateratPrivates(tblKhateratPrivate entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterat = this;
	}
	
	private void detach_tblKhateratPrivates(tblKhateratPrivate entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterat = null;
	}
	
	private void attach_tblVotes(tblVote entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterat = this;
	}
	
	private void detach_tblVotes(tblVote entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterat = null;
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblKhaterehType")]
public partial class tblKhaterehType : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _KhaterehTypeID;
	
	private string _KhaterehTypeDescription;
	
	private EntitySet<tblKhaterat> _tblKhaterats;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnKhaterehTypeIDChanging(int value);
    partial void OnKhaterehTypeIDChanged();
    partial void OnKhaterehTypeDescriptionChanging(string value);
    partial void OnKhaterehTypeDescriptionChanged();
    #endregion
	
	public tblKhaterehType()
	{
		this._tblKhaterats = new EntitySet<tblKhaterat>(new Action<tblKhaterat>(this.attach_tblKhaterats), new Action<tblKhaterat>(this.detach_tblKhaterats));
		OnCreated();
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KhaterehTypeID", DbType="Int NOT NULL", IsPrimaryKey=true)]
	public int KhaterehTypeID
	{
		get
		{
			return this._KhaterehTypeID;
		}
		set
		{
			if ((this._KhaterehTypeID != value))
			{
				this.OnKhaterehTypeIDChanging(value);
				this.SendPropertyChanging();
				this._KhaterehTypeID = value;
				this.SendPropertyChanged("KhaterehTypeID");
				this.OnKhaterehTypeIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KhaterehTypeDescription", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
	public string KhaterehTypeDescription
	{
		get
		{
			return this._KhaterehTypeDescription;
		}
		set
		{
			if ((this._KhaterehTypeDescription != value))
			{
				this.OnKhaterehTypeDescriptionChanging(value);
				this.SendPropertyChanging();
				this._KhaterehTypeDescription = value;
				this.SendPropertyChanged("KhaterehTypeDescription");
				this.OnKhaterehTypeDescriptionChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterehType_tblKhaterat", Storage="_tblKhaterats", ThisKey="KhaterehTypeID", OtherKey="KhaterehTypeID")]
	public EntitySet<tblKhaterat> tblKhaterats
	{
		get
		{
			return this._tblKhaterats;
		}
		set
		{
			this._tblKhaterats.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_tblKhaterats(tblKhaterat entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterehType = this;
	}
	
	private void detach_tblKhaterats(tblKhaterat entity)
	{
		this.SendPropertyChanging();
		entity.tblKhaterehType = null;
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.XtblKhaterehGroup")]
public partial class XtblKhaterehGroup
{
	
	private int _nwsID;
	
	private string _nwsGroup;
	
	private System.Nullable<int> _cntArts;
	
	public XtblKhaterehGroup()
	{
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsID", AutoSync=AutoSync.Always, DbType="Int NOT NULL IDENTITY", IsDbGenerated=true)]
	public int nwsID
	{
		get
		{
			return this._nwsID;
		}
		set
		{
			if ((this._nwsID != value))
			{
				this._nwsID = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsGroup", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
	public string nwsGroup
	{
		get
		{
			return this._nwsGroup;
		}
		set
		{
			if ((this._nwsGroup != value))
			{
				this._nwsGroup = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_cntArts", DbType="Int")]
	public System.Nullable<int> cntArts
	{
		get
		{
			return this._cntArts;
		}
		set
		{
			if ((this._cntArts != value))
			{
				this._cntArts = value;
			}
		}
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblKhateratPrivate")]
public partial class tblKhateratPrivate : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private decimal _RowID;
	
	private int _KhaterehID;
	
	private int _UserID;
	
	private string _UserAdmName;
	
	private EntityRef<tblKhaterat> _tblKhaterat;
	
	private EntityRef<User> _User;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnRowIDChanging(decimal value);
    partial void OnRowIDChanged();
    partial void OnKhaterehIDChanging(int value);
    partial void OnKhaterehIDChanged();
    partial void OnUserIDChanging(int value);
    partial void OnUserIDChanged();
    partial void OnUserAdmNameChanging(string value);
    partial void OnUserAdmNameChanged();
    #endregion
	
	public tblKhateratPrivate()
	{
		this._tblKhaterat = default(EntityRef<tblKhaterat>);
		this._User = default(EntityRef<User>);
		OnCreated();
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RowID", AutoSync=AutoSync.Always, DbType="Decimal(18,0) NOT NULL IDENTITY", IsDbGenerated=true)]
	public decimal RowID
	{
		get
		{
			return this._RowID;
		}
		set
		{
			if ((this._RowID != value))
			{
				this.OnRowIDChanging(value);
				this.SendPropertyChanging();
				this._RowID = value;
				this.SendPropertyChanged("RowID");
				this.OnRowIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KhaterehID", DbType="Int NOT NULL", IsPrimaryKey=true)]
	public int KhaterehID
	{
		get
		{
			return this._KhaterehID;
		}
		set
		{
			if ((this._KhaterehID != value))
			{
				if (this._tblKhaterat.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnKhaterehIDChanging(value);
				this.SendPropertyChanging();
				this._KhaterehID = value;
				this.SendPropertyChanged("KhaterehID");
				this.OnKhaterehIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserID", DbType="Int NOT NULL", IsPrimaryKey=true)]
	public int UserID
	{
		get
		{
			return this._UserID;
		}
		set
		{
			if ((this._UserID != value))
			{
				this.OnUserIDChanging(value);
				this.SendPropertyChanging();
				this._UserID = value;
				this.SendPropertyChanged("UserID");
				this.OnUserIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserAdmName", DbType="NVarChar(50)")]
	public string UserAdmName
	{
		get
		{
			return this._UserAdmName;
		}
		set
		{
			if ((this._UserAdmName != value))
			{
				if (this._User.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnUserAdmNameChanging(value);
				this.SendPropertyChanging();
				this._UserAdmName = value;
				this.SendPropertyChanged("UserAdmName");
				this.OnUserAdmNameChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterat_tblKhateratPrivate", Storage="_tblKhaterat", ThisKey="KhaterehID", OtherKey="NewsID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
	public tblKhaterat tblKhaterat
	{
		get
		{
			return this._tblKhaterat.Entity;
		}
		set
		{
			tblKhaterat previousValue = this._tblKhaterat.Entity;
			if (((previousValue != value) 
						|| (this._tblKhaterat.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._tblKhaterat.Entity = null;
					previousValue.tblKhateratPrivates.Remove(this);
				}
				this._tblKhaterat.Entity = value;
				if ((value != null))
				{
					value.tblKhateratPrivates.Add(this);
					this._KhaterehID = value.NewsID;
				}
				else
				{
					this._KhaterehID = default(int);
				}
				this.SendPropertyChanged("tblKhaterat");
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="User_tblKhateratPrivate", Storage="_User", ThisKey="UserAdmName", OtherKey="UserName", IsForeignKey=true)]
	public User User
	{
		get
		{
			return this._User.Entity;
		}
		set
		{
			User previousValue = this._User.Entity;
			if (((previousValue != value) 
						|| (this._User.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._User.Entity = null;
					previousValue.tblKhateratPrivates.Remove(this);
				}
				this._User.Entity = value;
				if ((value != null))
				{
					value.tblKhateratPrivates.Add(this);
					this._UserAdmName = value.UserName;
				}
				else
				{
					this._UserAdmName = default(string);
				}
				this.SendPropertyChanged("User");
			}
		}
	}
	
	public event PropertyChangingEventHandler PropertyChanging;
	
	public event PropertyChangedEventHandler PropertyChanged;
	
	protected virtual void SendPropertyChanging()
	{
		if ((this.PropertyChanging != null))
		{
			this.PropertyChanging(this, emptyChangingEventArgs);
		}
	}
	
	protected virtual void SendPropertyChanged(String propertyName)
	{
		if ((this.PropertyChanged != null))
		{
			this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
		}
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.XtblKhaterehPrivate")]
public partial class XtblKhaterehPrivate
{
	
	private decimal _RowID;
	
	private string _NewsTitle;
	
	private string _UserAdmName;
	
	private string _SharedFor;
	
	public XtblKhaterehPrivate()
	{
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RowID", AutoSync=AutoSync.Always, DbType="Decimal(18,0) NOT NULL IDENTITY", IsDbGenerated=true)]
	public decimal RowID
	{
		get
		{
			return this._RowID;
		}
		set
		{
			if ((this._RowID != value))
			{
				this._RowID = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsTitle", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
	public string NewsTitle
	{
		get
		{
			return this._NewsTitle;
		}
		set
		{
			if ((this._NewsTitle != value))
			{
				this._NewsTitle = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserAdmName", DbType="NVarChar(50)")]
	public string UserAdmName
	{
		get
		{
			return this._UserAdmName;
		}
		set
		{
			if ((this._UserAdmName != value))
			{
				this._UserAdmName = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SharedFor", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
	public string SharedFor
	{
		get
		{
			return this._SharedFor;
		}
		set
		{
			if ((this._SharedFor != value))
			{
				this._SharedFor = value;
			}
		}
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.XtblKhaterehPrivateGrd")]
public partial class XtblKhaterehPrivateGrd
{
	
	private int _nwsID;
	
	private string _nwsTitle;
	
	private string _nwsGroup;
	
	private string _Expr1;
	
	private string _nwsDtadd;
	
	private string _NewsPic;
	
	private string _newsBody;
	
	private string _NewsPart;
	
	private System.Nullable<bool> _ShowPermiss;
	
	private int _UserID;
	
	public XtblKhaterehPrivateGrd()
	{
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsID", AutoSync=AutoSync.Always, DbType="Int NOT NULL IDENTITY", IsDbGenerated=true)]
	public int nwsID
	{
		get
		{
			return this._nwsID;
		}
		set
		{
			if ((this._nwsID != value))
			{
				this._nwsID = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsTitle", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
	public string nwsTitle
	{
		get
		{
			return this._nwsTitle;
		}
		set
		{
			if ((this._nwsTitle != value))
			{
				this._nwsTitle = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsGroup", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
	public string nwsGroup
	{
		get
		{
			return this._nwsGroup;
		}
		set
		{
			if ((this._nwsGroup != value))
			{
				this._nwsGroup = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Expr1", DbType="NVarChar(102)")]
	public string Expr1
	{
		get
		{
			return this._Expr1;
		}
		set
		{
			if ((this._Expr1 != value))
			{
				this._Expr1 = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsDtadd", DbType="NVarChar(10)")]
	public string nwsDtadd
	{
		get
		{
			return this._nwsDtadd;
		}
		set
		{
			if ((this._nwsDtadd != value))
			{
				this._nwsDtadd = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsPic", DbType="NVarChar(100)")]
	public string NewsPic
	{
		get
		{
			return this._NewsPic;
		}
		set
		{
			if ((this._NewsPic != value))
			{
				this._NewsPic = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_newsBody", DbType="NText", UpdateCheck=UpdateCheck.Never)]
	public string newsBody
	{
		get
		{
			return this._newsBody;
		}
		set
		{
			if ((this._newsBody != value))
			{
				this._newsBody = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NewsPart", DbType="NVarChar(700)")]
	public string NewsPart
	{
		get
		{
			return this._NewsPart;
		}
		set
		{
			if ((this._NewsPart != value))
			{
				this._NewsPart = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ShowPermiss", DbType="Bit")]
	public System.Nullable<bool> ShowPermiss
	{
		get
		{
			return this._ShowPermiss;
		}
		set
		{
			if ((this._ShowPermiss != value))
			{
				this._ShowPermiss = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserID", DbType="Int NOT NULL")]
	public int UserID
	{
		get
		{
			return this._UserID;
		}
		set
		{
			if ((this._UserID != value))
			{
				this._UserID = value;
			}
		}
	}
}

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.tblVotes")]
public partial class tblVote : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private int _VoteID;
	
	private int _newsID;
	
	private string _SenderIP;
	
	private string _VoterNameSname;
	
	private string _VoterEmail;
	
	private string _VoteBody;
	
	private System.Nullable<bool> _allowShowBit;
	
	private string _voterWebSite;
	
	private string _DateOfVoting;
	
	private EntityRef<tblKhaterat> _tblKhaterat;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate(System.Data.Linq.ChangeAction action);
    partial void OnCreated();
    partial void OnVoteIDChanging(int value);
    partial void OnVoteIDChanged();
    partial void OnnewsIDChanging(int value);
    partial void OnnewsIDChanged();
    partial void OnSenderIPChanging(string value);
    partial void OnSenderIPChanged();
    partial void OnVoterNameSnameChanging(string value);
    partial void OnVoterNameSnameChanged();
    partial void OnVoterEmailChanging(string value);
    partial void OnVoterEmailChanged();
    partial void OnVoteBodyChanging(string value);
    partial void OnVoteBodyChanged();
    partial void OnallowShowBitChanging(System.Nullable<bool> value);
    partial void OnallowShowBitChanged();
    partial void OnvoterWebSiteChanging(string value);
    partial void OnvoterWebSiteChanged();
    partial void OnDateOfVotingChanging(string value);
    partial void OnDateOfVotingChanged();
    #endregion
	
	public tblVote()
	{
		this._tblKhaterat = default(EntityRef<tblKhaterat>);
		OnCreated();
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VoteID", AutoSync=AutoSync.Always, DbType="Int NOT NULL IDENTITY", IsDbGenerated=true)]
	public int VoteID
	{
		get
		{
			return this._VoteID;
		}
		set
		{
			if ((this._VoteID != value))
			{
				this.OnVoteIDChanging(value);
				this.SendPropertyChanging();
				this._VoteID = value;
				this.SendPropertyChanged("VoteID");
				this.OnVoteIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_newsID", DbType="Int NOT NULL", IsPrimaryKey=true)]
	public int newsID
	{
		get
		{
			return this._newsID;
		}
		set
		{
			if ((this._newsID != value))
			{
				if (this._tblKhaterat.HasLoadedOrAssignedValue)
				{
					throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
				}
				this.OnnewsIDChanging(value);
				this.SendPropertyChanging();
				this._newsID = value;
				this.SendPropertyChanged("newsID");
				this.OnnewsIDChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SenderIP", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
	public string SenderIP
	{
		get
		{
			return this._SenderIP;
		}
		set
		{
			if ((this._SenderIP != value))
			{
				this.OnSenderIPChanging(value);
				this.SendPropertyChanging();
				this._SenderIP = value;
				this.SendPropertyChanged("SenderIP");
				this.OnSenderIPChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VoterNameSname", DbType="NVarChar(80)")]
	public string VoterNameSname
	{
		get
		{
			return this._VoterNameSname;
		}
		set
		{
			if ((this._VoterNameSname != value))
			{
				this.OnVoterNameSnameChanging(value);
				this.SendPropertyChanging();
				this._VoterNameSname = value;
				this.SendPropertyChanged("VoterNameSname");
				this.OnVoterNameSnameChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VoterEmail", DbType="NVarChar(80) NOT NULL", CanBeNull=false)]
	public string VoterEmail
	{
		get
		{
			return this._VoterEmail;
		}
		set
		{
			if ((this._VoterEmail != value))
			{
				this.OnVoterEmailChanging(value);
				this.SendPropertyChanging();
				this._VoterEmail = value;
				this.SendPropertyChanged("VoterEmail");
				this.OnVoterEmailChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VoteBody", DbType="NVarChar(250)")]
	public string VoteBody
	{
		get
		{
			return this._VoteBody;
		}
		set
		{
			if ((this._VoteBody != value))
			{
				this.OnVoteBodyChanging(value);
				this.SendPropertyChanging();
				this._VoteBody = value;
				this.SendPropertyChanged("VoteBody");
				this.OnVoteBodyChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_allowShowBit", DbType="Bit")]
	public System.Nullable<bool> allowShowBit
	{
		get
		{
			return this._allowShowBit;
		}
		set
		{
			if ((this._allowShowBit != value))
			{
				this.OnallowShowBitChanging(value);
				this.SendPropertyChanging();
				this._allowShowBit = value;
				this.SendPropertyChanged("allowShowBit");
				this.OnallowShowBitChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_voterWebSite", DbType="NVarChar(150)")]
	public string voterWebSite
	{
		get
		{
			return this._voterWebSite;
		}
		set
		{
			if ((this._voterWebSite != value))
			{
				this.OnvoterWebSiteChanging(value);
				this.SendPropertyChanging();
				this._voterWebSite = value;
				this.SendPropertyChanged("voterWebSite");
				this.OnvoterWebSiteChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateOfVoting", DbType="NVarChar(10)")]
	public string DateOfVoting
	{
		get
		{
			return this._DateOfVoting;
		}
		set
		{
			if ((this._DateOfVoting != value))
			{
				this.OnDateOfVotingChanging(value);
				this.SendPropertyChanging();
				this._DateOfVoting = value;
				this.SendPropertyChanged("DateOfVoting");
				this.OnDateOfVotingChanged();
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.AssociationAttribute(Name="tblKhaterat_tblVote", Storage="_tblKhaterat", ThisKey="newsID", OtherKey="NewsID", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
	public tblKhaterat tblKhaterat
	{
		get
		{
			return this._tblKhaterat.Entity;
		}
		set
		{
			tblKhaterat previousValue = this._tblKhaterat.Entity;
			if (((previousValue != value) 
						|| (this._tblKhaterat.HasLoadedOrAssignedValue == false)))
			{
				this.SendPropertyChanging();
				if ((previousValue != null))
				{
					this._tblKhaterat.Entity = null;
					previousValue.tblVotes.Remove(this);
				}
				this._tblKhaterat.Entity = value;
				if ((value != null))
				{
					value.tblVotes.Add(this);
					this._newsID = value.NewsID;
				}
				else
				{
					this._newsID = default(int);
				}
				this.SendPropertyChanged("tblKhaterat");
			}
		}
	}
	
	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));
		}
	}
}

public partial class SpTblArchiveSelectResult
{
	
	private string _ArchivedDate;
	
	public SpTblArchiveSelectResult()
	{
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ArchivedDate", DbType="NVarChar(10)")]
	public string ArchivedDate
	{
		get
		{
			return this._ArchivedDate;
		}
		set
		{
			if ((this._ArchivedDate != value))
			{
				this._ArchivedDate = value;
			}
		}
	}
}

public partial class SpKhaterehGroupSelectResult
{
	
	private int _nwsID;
	
	private string _nwsGroup;
	
	private System.Nullable<int> _cntArts;
	
	public SpKhaterehGroupSelectResult()
	{
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsID", DbType="Int NOT NULL")]
	public int nwsID
	{
		get
		{
			return this._nwsID;
		}
		set
		{
			if ((this._nwsID != value))
			{
				this._nwsID = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_nwsGroup", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
	public string nwsGroup
	{
		get
		{
			return this._nwsGroup;
		}
		set
		{
			if ((this._nwsGroup != value))
			{
				this._nwsGroup = value;
			}
		}
	}
	
	[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_cntArts", DbType="Int")]
	public System.Nullable<int> cntArts
	{
		get
		{
			return this._cntArts;
		}
		set
		{
			if ((this._cntArts != value))
			{
				this._cntArts = value;
			}
		}
	}
}
#pragma warning restore 1591
