?? accessblog.designer.cs
字號:
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected System.Data.OleDb.OleDbCommand[] CommandCollection {
get {
if ((this._commandCollection == null)) {
this.InitCommandCollection();
}
return this._commandCollection;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool ClearBeforeFill {
get {
return this._clearBeforeFill;
}
set {
this._clearBeforeFill = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitAdapter() {
this._adapter = new System.Data.OleDb.OleDbDataAdapter();
System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
tableMapping.SourceTable = "Table";
tableMapping.DataSetTable = "blogNote";
tableMapping.ColumnMappings.Add("id", "id");
tableMapping.ColumnMappings.Add("pic", "pic");
tableMapping.ColumnMappings.Add("picText", "picText");
tableMapping.ColumnMappings.Add("content", "content");
this._adapter.TableMappings.Add(tableMapping);
this._adapter.DeleteCommand = new System.Data.OleDb.OleDbCommand();
this._adapter.DeleteCommand.Connection = this.Connection;
this._adapter.DeleteCommand.CommandText = "DELETE FROM `blogNote` WHERE ((`id` = ?) AND ((? = 1 AND `pic` IS NULL) OR (`pic`" +
" = ?)) AND ((? = 1 AND `picText` IS NULL) OR (`picText` = ?)))";
this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_id", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "id", System.Data.DataRowVersion.Original, false, null));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_pic", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "pic", System.Data.DataRowVersion.Original, true, null));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_pic", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "pic", System.Data.DataRowVersion.Original, false, null));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_picText", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "picText", System.Data.DataRowVersion.Original, true, null));
this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_picText", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "picText", System.Data.DataRowVersion.Original, false, null));
this._adapter.InsertCommand = new System.Data.OleDb.OleDbCommand();
this._adapter.InsertCommand.Connection = this.Connection;
this._adapter.InsertCommand.CommandText = "INSERT INTO `blogNote` (`pic`, `picText`, `content`) VALUES (?, ?, ?)";
this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("pic", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "pic", System.Data.DataRowVersion.Current, false, null));
this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("picText", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "picText", System.Data.DataRowVersion.Current, false, null));
this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("content", System.Data.OleDb.OleDbType.LongVarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "content", System.Data.DataRowVersion.Current, false, null));
this._adapter.UpdateCommand = new System.Data.OleDb.OleDbCommand();
this._adapter.UpdateCommand.Connection = this.Connection;
this._adapter.UpdateCommand.CommandText = "UPDATE `blogNote` SET `pic` = ?, `picText` = ?, `content` = ? WHERE ((`id` = ?) A" +
"ND ((? = 1 AND `pic` IS NULL) OR (`pic` = ?)) AND ((? = 1 AND `picText` IS NULL)" +
" OR (`picText` = ?)))";
this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("pic", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "pic", System.Data.DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("picText", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "picText", System.Data.DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("content", System.Data.OleDb.OleDbType.LongVarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "content", System.Data.DataRowVersion.Current, false, null));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_id", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "id", System.Data.DataRowVersion.Original, false, null));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_pic", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "pic", System.Data.DataRowVersion.Original, true, null));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_pic", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "pic", System.Data.DataRowVersion.Original, false, null));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_picText", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "picText", System.Data.DataRowVersion.Original, true, null));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_picText", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "picText", System.Data.DataRowVersion.Original, false, null));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitConnection() {
this._connection = new System.Data.OleDb.OleDbConnection();
this._connection.ConnectionString = global::DALDataSet.Properties.Settings.Default.myPageConnectionString;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
this._commandCollection = new System.Data.OleDb.OleDbCommand[1];
this._commandCollection[0] = new System.Data.OleDb.OleDbCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT id, pic, picText, content\r\nFROM blogNote\r\nORDER BY id DESC";
this._commandCollection[0].CommandType = System.Data.CommandType.Text;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
public virtual int SetData(AccessBlog.blogNoteDataTable dataTable) {
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
}
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
public virtual AccessBlog.blogNoteDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
AccessBlog.blogNoteDataTable dataTable = new AccessBlog.blogNoteDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(AccessBlog.blogNoteDataTable dataTable) {
return this.Adapter.Update(dataTable);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(AccessBlog dataSet) {
return this.Adapter.Update(dataSet, "blogNote");
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(System.Data.DataRow dataRow) {
return this.Adapter.Update(new System.Data.DataRow[] {
dataRow});
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(System.Data.DataRow[] dataRows) {
return this.Adapter.Update(dataRows);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
public virtual int Delete(int Original_id, string Original_pic, string Original_picText) {
this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_id));
if ((Original_pic == null)) {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_pic));
}
if ((Original_picText == null)) {
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_picText));
}
System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.DeleteCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.DeleteCommand.Connection.Close();
}
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
public virtual int Insert(string pic, string picText, string content) {
if ((pic == null)) {
this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(pic));
}
if ((picText == null)) {
this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(picText));
}
if ((content == null)) {
this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(content));
}
System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.InsertCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.InsertCommand.Connection.Close();
}
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
public virtual int Update(string pic, string picText, string content, int Original_id, string Original_pic, string Original_picText) {
if ((pic == null)) {
this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(pic));
}
if ((picText == null)) {
this.Adapter.UpdateCommand.Parameters[1].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(picText));
}
if ((content == null)) {
this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(content));
}
this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_id));
if ((Original_pic == null)) {
this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_pic));
}
if ((Original_picText == null)) {
this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_picText));
}
System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.UpdateCommand.Connection.Open();
}
try {
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
return returnValue;
}
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.UpdateCommand.Connection.Close();
}
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -