📄 studentmanagedataset1.designer.cs
字号:
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Course", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Course", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Score", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Score", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Class", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Class", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_StudentID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "StudentID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Course", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Course", System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Score", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Score", System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Score", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Score", System.Data.DataRowVersion.Original, false, null, "", "", ""));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
private void InitConnection() {
this._connection = new System.Data.SqlClient.SqlConnection();
this._connection.ConnectionString = global::StudentManage.Properties.Settings.Default.StudentManageConnectionString;
}
[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 Class, StudentID, Course, Score\r\nFROM Score";
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(StudentManageDataSet1.ScoreDataTable 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 StudentManageDataSet1.ScoreDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
StudentManageDataSet1.ScoreDataTable dataTable = new StudentManageDataSet1.ScoreDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(StudentManageDataSet1.ScoreDataTable dataTable) {
return this.Adapter.Update(dataTable);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int Update(StudentManageDataSet1 dataSet) {
return this.Adapter.Update(dataSet, "Score");
}
[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(string Original_Class, string Original_StudentID, string Original_Course, string Original_Score) {
if ((Original_Class == null)) {
this.Adapter.DeleteCommand.Parameters[0].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[1].Value = System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[0].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Class));
}
if ((Original_StudentID == null)) {
throw new System.ArgumentNullException("Original_StudentID");
}
else {
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_StudentID));
}
if ((Original_Course == null)) {
throw new System.ArgumentNullException("Original_Course");
}
else {
this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Course));
}
if ((Original_Score == null)) {
this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[5].Value = System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_Score));
}
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 Class, string StudentID, string Course, string Score) {
if ((Class == null)) {
this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Class));
}
if ((StudentID == null)) {
throw new System.ArgumentNullException("StudentID");
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(StudentID));
}
if ((Course == null)) {
throw new System.ArgumentNullException("Course");
}
else {
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Course));
}
if ((Score == null)) {
this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Score));
}
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 Class, string StudentID, string Course, string Score, string Original_Class, string Original_StudentID, string Original_Course, string Original_Score) {
if ((Class == null)) {
this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Class));
}
if ((StudentID == null)) {
throw new System.ArgumentNullException("StudentID");
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(StudentID));
}
if ((Course == null)) {
throw new System.ArgumentNullException("Course");
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Course));
}
if ((Score == null)) {
this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Score));
}
if ((Original_Class == 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_Class));
}
if ((Original_StudentID == null)) {
throw new System.ArgumentNullException("Original_StudentID");
}
else {
this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_StudentID));
}
if ((Original_Course == null)) {
throw new System.ArgumentNullException("Original_Course");
}
else {
this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_Course));
}
if ((Original_Score == null)) {
this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[9].Value = System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Score));
}
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();
}
}
}
}
}
#pragma warning restore 1591
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -