📄 studentdataset.designer.cs
字号:
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetstuSexNull() {
this[this.tableStuInfo.stuSexColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsstuAgeNull() {
return this.IsNull(this.tableStuInfo.stuAgeColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetstuAgeNull() {
this[this.tableStuInfo.stuAgeColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsstuPolityNull() {
return this.IsNull(this.tableStuInfo.stuPolityColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetstuPolityNull() {
this[this.tableStuInfo.stuPolityColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsstuHomeNull() {
return this.IsNull(this.tableStuInfo.stuHomeColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetstuHomeNull() {
this[this.tableStuInfo.stuHomeColumn] = System.Convert.DBNull;
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class StuInfoRowChangeEvent : System.EventArgs {
private StuInfoRow eventRow;
private System.Data.DataRowAction eventAction;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public StuInfoRowChangeEvent(StuInfoRow row, System.Data.DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public StuInfoRow Row {
get {
return this.eventRow;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
namespace _12._4._1_2.studentDataSetTableAdapters {
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.ComponentModel.ToolboxItem(true)]
[System.ComponentModel.DataObjectAttribute(true)]
[System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public partial class StuInfoTableAdapter : System.ComponentModel.Component {
private System.Data.SqlClient.SqlDataAdapter _adapter;
private System.Data.SqlClient.SqlConnection _connection;
private System.Data.SqlClient.SqlCommand[] _commandCollection;
private bool _clearBeforeFill;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public StuInfoTableAdapter() {
this.ClearBeforeFill = true;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private System.Data.SqlClient.SqlDataAdapter Adapter {
get {
if ((this._adapter == null)) {
this.InitAdapter();
}
return this._adapter;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal System.Data.SqlClient.SqlConnection Connection {
get {
if ((this._connection == null)) {
this.InitConnection();
}
return this._connection;
}
set {
this._connection = value;
if ((this.Adapter.InsertCommand != null)) {
this.Adapter.InsertCommand.Connection = value;
}
if ((this.Adapter.DeleteCommand != null)) {
this.Adapter.DeleteCommand.Connection = value;
}
if ((this.Adapter.UpdateCommand != null)) {
this.Adapter.UpdateCommand.Connection = value;
}
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
if ((this.CommandCollection[i] != null)) {
((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
}
}
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
protected System.Data.SqlClient.SqlCommand[] 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.SqlClient.SqlDataAdapter();
System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
tableMapping.SourceTable = "Table";
tableMapping.DataSetTable = "StuInfo";
tableMapping.ColumnMappings.Add("stuNo", "stuNo");
tableMapping.ColumnMappings.Add("stuName", "stuName");
tableMapping.ColumnMappings.Add("stuSex", "stuSex");
tableMapping.ColumnMappings.Add("stuAge", "stuAge");
tableMapping.ColumnMappings.Add("stuPolity", "stuPolity");
tableMapping.ColumnMappings.Add("stuHome", "stuHome");
this._adapter.TableMappings.Add(tableMapping);
this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
this._adapter.InsertCommand.Connection = this.Connection;
this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[StuInfo] ([stuNo], [stuName], [stuSex], [stuAge], [stuPolity]," +
" [stuHome]) VALUES (@stuNo, @stuName, @stuSex, @stuAge, @stuPolity, @stuHome)";
this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@stuNo", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuNo", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@stuName", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuName", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@stuSex", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuSex", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@stuAge", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuAge", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@stuPolity", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuPolity", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@stuHome", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuHome", System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitConnection() {
this._connection = new System.Data.SqlClient.SqlConnection();
this._connection.ConnectionString = global::_12._4._1_2.Properties.Settings.Default.studentConnectionString;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitCommandCollection() {
this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT stuNo, stuName, stuSex, stuAge, stuPolity, stuHome FROM dbo.StuInfo";
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 Fill(studentDataSet.StuInfoDataTable 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 studentDataSet.StuInfoDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
studentDataSet.StuInfoDataTable dataTable = new studentDataSet.StuInfoDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(studentDataSet.StuInfoDataTable dataTable) {
return this.Adapter.Update(dataTable);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(studentDataSet dataSet) {
return this.Adapter.Update(dataSet, "StuInfo");
}
[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.Insert, true)]
public virtual int Insert(string stuNo, string stuName, string stuSex, System.Nullable<int> stuAge, string stuPolity, string stuHome) {
if ((stuNo == null)) {
throw new System.ArgumentNullException("stuNo");
}
else {
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(stuNo));
}
if ((stuName == null)) {
this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(stuName));
}
if ((stuSex == null)) {
this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(stuSex));
}
if ((stuAge.HasValue == true)) {
this.Adapter.InsertCommand.Parameters[3].Value = ((int)(stuAge.Value));
}
else {
this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
}
if ((stuPolity == null)) {
this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[4].Value = ((string)(stuPolity));
}
if ((stuHome == null)) {
this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[5].Value = ((string)(stuHome));
}
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();
}
}
}
}
}
#pragma warning restore 1591
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -