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

📄 studentdataset.designer.cs

📁 本压缩包包括了VC++基础例子编程,可以为您提供方便.
💻 CS
📖 第 1 页 / 共 4 页
字号:
                }
                set {
                    this[this.tableStuInfo.stuAgeColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string stuPolity {
                get {
                    try {
                        return ((string)(this[this.tableStuInfo.stuPolityColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("表“StuInfo”中列“stuPolity”的值为 DBNull。", e);
                    }
                }
                set {
                    this[this.tableStuInfo.stuPolityColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public string stuHome {
                get {
                    try {
                        return ((string)(this[this.tableStuInfo.stuHomeColumn]));
                    }
                    catch (System.InvalidCastException e) {
                        throw new System.Data.StrongTypingException("表“StuInfo”中列“stuHome”的值为 DBNull。", e);
                    }
                }
                set {
                    this[this.tableStuInfo.stuHomeColumn] = value;
                }
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsstuNameNull() {
                return this.IsNull(this.tableStuInfo.stuNameColumn);
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public void SetstuNameNull() {
                this[this.tableStuInfo.stuNameColumn] = System.Convert.DBNull;
            }
            
            [System.Diagnostics.DebuggerNonUserCodeAttribute()]
            public bool IsstuSexNull() {
                return this.IsNull(this.tableStuInfo.stuSexColumn);
            }
            
            [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 LT12_1.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.DeleteCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.DeleteCommand.Connection = this.Connection;
            this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[StuInfo] WHERE (([stuNo] = @Original_stuNo) AND ((@IsNull_stuName = 1 AND [stuName] IS NULL) OR ([stuName] = @Original_stuName)) AND ((@IsNull_stuSex = 1 AND [stuSex] IS NULL) OR ([stuSex] = @Original_stuSex)) AND ((@IsNull_stuAge = 1 AND [stuAge] IS NULL) OR ([stuAge] = @Original_stuAge)) AND ((@IsNull_stuPolity = 1 AND [stuPolity] IS NULL) OR ([stuPolity] = @Original_stuPolity)) AND ((@IsNull_stuHome = 1 AND [stuHome] IS NULL) OR ([stuHome] = @Original_stuHome)))";
            this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuNo", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuNo", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuName", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuSex", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuSex", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuSex", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuSex", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuAge", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuAge", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuAge", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuAge", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuPolity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuPolity", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuPolity", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuPolity", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuHome", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuHome", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuHome", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuHome", 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 [dbo].[StuInfo] ([stuNo], [stuName], [stuSex], [stuAge], [stuPolity]," +
                " [stuHome]) VALUES (@stuNo, @stuName, @stuSex, @stuAge, @stuPolity, @stuHome);\r\n" +
                "SELECT stuNo, stuName, stuSex, stuAge, stuPolity, stuHome FROM StuInfo WHERE (st" +
                "uNo = @stuNo)";
            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, "", "", ""));
            this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
            this._adapter.UpdateCommand.Connection = this.Connection;
            this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[StuInfo] SET [stuNo] = @stuNo, [stuName] = @stuName, [stuSex] = @stuSex, [stuAge] = @stuAge, [stuPolity] = @stuPolity, [stuHome] = @stuHome WHERE (([stuNo] = @Original_stuNo) AND ((@IsNull_stuName = 1 AND [stuName] IS NULL) OR ([stuName] = @Original_stuName)) AND ((@IsNull_stuSex = 1 AND [stuSex] IS NULL) OR ([stuSex] = @Original_stuSex)) AND ((@IsNull_stuAge = 1 AND [stuAge] IS NULL) OR ([stuAge] = @Original_stuAge)) AND ((@IsNull_stuPolity = 1 AND [stuPolity] IS NULL) OR ([stuPolity] = @Original_stuPolity)) AND ((@IsNull_stuHome = 1 AND [stuHome] IS NULL) OR ([stuHome] = @Original_stuHome)));
SELECT stuNo, stuName, stuSex, stuAge, stuPolity, stuHome FROM StuInfo WHERE (stuNo = @stuNo)";
            this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.UpdateCommand.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.UpdateCommand.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.UpdateCommand.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.UpdateCommand.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.UpdateCommand.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.UpdateCommand.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, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuNo", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuNo", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuName", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuName", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuName", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuSex", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuSex", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuSex", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuSex", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuAge", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuAge", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuAge", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuAge", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuPolity", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuPolity", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuPolity", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuPolity", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_stuHome", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "stuHome", System.Data.DataRowVersion.Original, true, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_stuHome", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "stuHome", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitConnection() {
            this._connection = new System.Data.SqlClient.SqlConnection();
            this._connection.ConnectionString = global::LT12_1.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;

⌨️ 快捷键说明

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