⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guestbook.designer.cs

📁 数据库连接查询
💻 CS
字号:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.1378
//
//     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;



[System.Data.Linq.Mapping.DatabaseAttribute(Name="GuestBook")]
public partial class GuestBookDataContext : System.Data.Linq.DataContext
{
	
	private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
	
  #region Extensibility Method Definitions
  partial void OnCreated();
  partial void InserttbGuestBook(tbGuestBook instance);
  partial void UpdatetbGuestBook(tbGuestBook instance);
  partial void DeletetbGuestBook(tbGuestBook instance);
  #endregion
	
	static GuestBookDataContext()
	{
	}
	
	public GuestBookDataContext(string connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public GuestBookDataContext(System.Data.IDbConnection connection) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public GuestBookDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public GuestBookDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
			base(connection, mappingSource)
	{
		OnCreated();
	}
	
	public GuestBookDataContext() : 
			base(global::System.Configuration.ConfigurationManager.ConnectionStrings["GuestBookConnectionString"].ConnectionString, mappingSource)
	{
		OnCreated();
	}
	
	public System.Data.Linq.Table<tbGuestBook> tbGuestBooks
	{
		get
		{
			return this.GetTable<tbGuestBook>();
		}
	}
	
	[Function(Name="dbo.sendmessage")]
	public int sendmessage([Parameter(DbType="VarChar(50)")] string username, [Parameter(DbType="VarChar(500)")] string message)
	{
		IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), username, message);
		return ((int)(result.ReturnValue));
	}
	
	[Function(Name="dbo.delmessage")]
	public int delmessage([Parameter(DbType="UniqueIdentifier")] System.Nullable<System.Guid> id)
	{
		IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), id);
		return ((int)(result.ReturnValue));
	}
	
	[Function(Name="dbo.replymessage")]
	public int replymessage([Parameter(DbType="UniqueIdentifier")] System.Nullable<System.Guid> id, [Parameter(DbType="VarChar(500)")] string reply)
	{
		IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), id, reply);
		return ((int)(result.ReturnValue));
	}
	
	[Function(Name="dbo.modiusername")]
	public int modiusername([Parameter(DbType="VarChar(50)")] string oldusername, [Parameter(DbType="VarChar(50)")] string newusername)
	{
		IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), oldusername, newusername);
		return ((int)(result.ReturnValue));
	}
}

[Table(Name="dbo.tbGuestBook")]
public partial class tbGuestBook : INotifyPropertyChanging, INotifyPropertyChanged
{
	
	private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
	
	private System.Guid _ID;
	
	private string _UserName;
	
	private System.DateTime _PostTime;
	
	private string _Message;
	
	private bool _IsReplied;
	
	private string _Reply;
	
    #region Extensibility Method Definitions
    partial void OnLoaded();
    partial void OnValidate();
    partial void OnCreated();
    partial void OnIDChanging(System.Guid value);
    partial void OnIDChanged();
    partial void OnUserNameChanging(string value);
    partial void OnUserNameChanged();
    partial void OnPostTimeChanging(System.DateTime value);
    partial void OnPostTimeChanged();
    partial void OnMessageChanging(string value);
    partial void OnMessageChanged();
    partial void OnIsRepliedChanging(bool value);
    partial void OnIsRepliedChanged();
    partial void OnReplyChanging(string value);
    partial void OnReplyChanged();
    #endregion
	
	public tbGuestBook()
	{
		OnCreated();
	}
	
	[Column(Storage="_ID", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
	public System.Guid ID
	{
		get
		{
			return this._ID;
		}
		set
		{
			if ((this._ID != value))
			{
				this.OnIDChanging(value);
				this.SendPropertyChanging();
				this._ID = value;
				this.SendPropertyChanged("ID");
				this.OnIDChanged();
			}
		}
	}
	
	[Column(Storage="_UserName", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
	public string UserName
	{
		get
		{
			return this._UserName;
		}
		set
		{
			if ((this._UserName != value))
			{
				this.OnUserNameChanging(value);
				this.SendPropertyChanging();
				this._UserName = value;
				this.SendPropertyChanged("UserName");
				this.OnUserNameChanged();
			}
		}
	}
	
	[Column(Storage="_PostTime", DbType="DateTime NOT NULL")]
	public System.DateTime PostTime
	{
		get
		{
			return this._PostTime;
		}
		set
		{
			if ((this._PostTime != value))
			{
				this.OnPostTimeChanging(value);
				this.SendPropertyChanging();
				this._PostTime = value;
				this.SendPropertyChanged("PostTime");
				this.OnPostTimeChanged();
			}
		}
	}
	
	[Column(Storage="_Message", DbType="VarChar(500)")]
	public string Message
	{
		get
		{
			return this._Message;
		}
		set
		{
			if ((this._Message != value))
			{
				this.OnMessageChanging(value);
				this.SendPropertyChanging();
				this._Message = value;
				this.SendPropertyChanged("Message");
				this.OnMessageChanged();
			}
		}
	}
	
	[Column(Storage="_IsReplied", DbType="Bit NOT NULL")]
	public bool IsReplied
	{
		get
		{
			return this._IsReplied;
		}
		set
		{
			if ((this._IsReplied != value))
			{
				this.OnIsRepliedChanging(value);
				this.SendPropertyChanging();
				this._IsReplied = value;
				this.SendPropertyChanged("IsReplied");
				this.OnIsRepliedChanged();
			}
		}
	}
	
	[Column(Storage="_Reply", DbType="VarChar(500)")]
	public string Reply
	{
		get
		{
			return this._Reply;
		}
		set
		{
			if ((this._Reply != value))
			{
				this.OnReplyChanging(value);
				this.SendPropertyChanging();
				this._Reply = value;
				this.SendPropertyChanged("Reply");
				this.OnReplyChanged();
			}
		}
	}
	
	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));
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -