📄 studentmanagedataset1.designer.cs
字号:
private ScoreDataTable tableScore;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
internal ScoreRow(System.Data.DataRowBuilder rb) :
base(rb) {
this.tableScore = ((ScoreDataTable)(this.Table));
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string Class {
get {
try {
return ((string)(this[this.tableScore.ClassColumn]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("表“Score”中列“Class”的值为 DBNull。", e);
}
}
set {
this[this.tableScore.ClassColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string StudentID {
get {
return ((string)(this[this.tableScore.StudentIDColumn]));
}
set {
this[this.tableScore.StudentIDColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string Course {
get {
return ((string)(this[this.tableScore.CourseColumn]));
}
set {
this[this.tableScore.CourseColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public short Score {
get {
return ((short)(this[this.tableScore.ScoreColumn]));
}
set {
this[this.tableScore.ScoreColumn] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public string Score1 {
get {
try {
return ((string)(this[this.tableScore.Score1Column]));
}
catch (System.InvalidCastException e) {
throw new System.Data.StrongTypingException("表“Score”中列“Score1”的值为 DBNull。", e);
}
}
set {
this[this.tableScore.Score1Column] = value;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsClassNull() {
return this.IsNull(this.tableScore.ClassColumn);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetClassNull() {
this[this.tableScore.ClassColumn] = System.Convert.DBNull;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsScore1Null() {
return this.IsNull(this.tableScore.Score1Column);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void SetScore1Null() {
this[this.tableScore.Score1Column] = System.Convert.DBNull;
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class ScoreRowChangeEvent : System.EventArgs {
private ScoreRow eventRow;
private System.Data.DataRowAction eventAction;
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public ScoreRowChangeEvent(ScoreRow row, System.Data.DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public ScoreRow Row {
get {
return this.eventRow;
}
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
public System.Data.DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
namespace StudentManage.StudentManageDataSet1TableAdapters {
[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 ScoreTableAdapter : 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 ScoreTableAdapter() {
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 = "Score";
tableMapping.ColumnMappings.Add("Class", "Class");
tableMapping.ColumnMappings.Add("StudentID", "StudentID");
tableMapping.ColumnMappings.Add("Course", "Course");
tableMapping.ColumnMappings.Add("Score", "Score1");
this._adapter.TableMappings.Add(tableMapping);
this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
this._adapter.DeleteCommand.Connection = this.Connection;
this._adapter.DeleteCommand.CommandText = "DELETE FROM [Score] WHERE (((@IsNull_Class = 1 AND [Class] IS NULL) OR ([Class] =" +
" @Original_Class)) AND ([StudentID] = @Original_StudentID) AND ([Course] = @Orig" +
"inal_Course) AND ((@IsNull_Score = 1 AND [Score] IS NULL) OR ([Score] = @Origina" +
"l_Score)))";
this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
this._adapter.DeleteCommand.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.DeleteCommand.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.DeleteCommand.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.DeleteCommand.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.DeleteCommand.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.DeleteCommand.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, "", "", ""));
this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
this._adapter.InsertCommand.Connection = this.Connection;
this._adapter.InsertCommand.CommandText = "INSERT INTO [Score] ([Class], [StudentID], [Course], [Score]) VALUES (@Class, @St" +
"udentID, @Course, @Score);\r\nSELECT Class, StudentID, Course, Score FROM Score WH" +
"ERE (Course = @Course) AND (StudentID = @StudentID)";
this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Class", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StudentID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "StudentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.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.InsertCommand.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 = new System.Data.SqlClient.SqlCommand();
this._adapter.UpdateCommand.Connection = this.Connection;
this._adapter.UpdateCommand.CommandText = @"UPDATE [Score] SET [Class] = @Class, [StudentID] = @StudentID, [Course] = @Course, [Score] = @Score WHERE (((@IsNull_Class = 1 AND [Class] IS NULL) OR ([Class] = @Original_Class)) AND ([StudentID] = @Original_StudentID) AND ([Course] = @Original_Course) AND ((@IsNull_Score = 1 AND [Score] IS NULL) OR ([Score] = @Original_Score)));
SELECT Class, StudentID, Course, Score FROM Score WHERE (Course = @Course) AND (StudentID = @StudentID)";
this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Class", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Class", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@StudentID", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "StudentID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -