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

📄 cry.designer.cs

📁 c#实现对水晶报表的开发和调用实例。对初学者有着很好的帮助。
💻 CS
📖 第 1 页 / 共 4 页
字号:
                    return this.eventAction;
                }
            }
        }
    }
}
namespace WindowsApplication1.cryTableAdapters {
    
    
    [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 CourseInfoTableAdapter : System.ComponentModel.Component {
        
        private System.Data.OleDb.OleDbDataAdapter _adapter;
        
        private System.Data.OleDb.OleDbConnection _connection;
        
        private System.Data.OleDb.OleDbCommand[] _commandCollection;
        
        private bool _clearBeforeFill;
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public CourseInfoTableAdapter() {
            this.ClearBeforeFill = true;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private System.Data.OleDb.OleDbDataAdapter Adapter {
            get {
                if ((this._adapter == null)) {
                    this.InitAdapter();
                }
                return this._adapter;
            }
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        internal System.Data.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(this.CommandCollection[i])).Connection = value;
                    }
                }
            }
        }
        
        [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 = "CourseInfo";
            tableMapping.ColumnMappings.Add("courseinfoid", "courseinfoid");
            tableMapping.ColumnMappings.Add("coursename", "coursename");
            tableMapping.ColumnMappings.Add("jobtablename", "jobtablename");
            tableMapping.ColumnMappings.Add("checktablename", "checktablename");
            tableMapping.ColumnMappings.Add("uploadtype", "uploadtype");
            tableMapping.ColumnMappings.Add("uploadbyte", "uploadbyte");
            tableMapping.ColumnMappings.Add("comment", "comment");
            tableMapping.ColumnMappings.Add("active", "active");
            this._adapter.TableMappings.Add(tableMapping);
            this._adapter.InsertCommand = new System.Data.OleDb.OleDbCommand();
            this._adapter.InsertCommand.Connection = this.Connection;
            this._adapter.InsertCommand.CommandText = "INSERT INTO `CourseInfo` (`courseinfoid`, `coursename`, `jobtablename`, `checktab" +
                "lename`, `uploadtype`, `uploadbyte`, `comment`, `active`) VALUES (?, ?, ?, ?, ?," +
                " ?, ?, ?)";
            this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("courseinfoid", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "courseinfoid", System.Data.DataRowVersion.Current, false, null));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("coursename", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "coursename", System.Data.DataRowVersion.Current, false, null));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("jobtablename", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "jobtablename", System.Data.DataRowVersion.Current, false, null));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("checktablename", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "checktablename", System.Data.DataRowVersion.Current, false, null));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("uploadtype", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "uploadtype", System.Data.DataRowVersion.Current, false, null));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("uploadbyte", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "uploadbyte", System.Data.DataRowVersion.Current, false, null));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("comment", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "comment", System.Data.DataRowVersion.Current, false, null));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("active", System.Data.OleDb.OleDbType.Boolean, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "active", System.Data.DataRowVersion.Current, false, null));
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitConnection() {
            this._connection = new System.Data.OleDb.OleDbConnection();
            this._connection.ConnectionString = global::WindowsApplication1.Properties.Settings.Default.BatchProcessStudentWorkConnectionString;
        }
        
        [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 courseinfoid, coursename, jobtablename, checktablename, uploadtype, upload" +
                "byte, comment, active FROM CourseInfo";
            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(cry.CourseInfoDataTable 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 cry.CourseInfoDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            cry.CourseInfoDataTable dataTable = new cry.CourseInfoDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(cry.CourseInfoDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(cry dataSet) {
            return this.Adapter.Update(dataSet, "CourseInfo");
        }
        
        [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 courseinfoid, string coursename, string jobtablename, string checktablename, string uploadtype, System.Nullable<int> uploadbyte, string comment, bool active) {
            if ((courseinfoid == null)) {
                this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(courseinfoid));
            }
            if ((coursename == null)) {
                this.Adapter.InsertCommand.Parameters[1].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(coursename));
            }
            if ((jobtablename == null)) {
                this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(jobtablename));
            }
            if ((checktablename == null)) {
                this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(checktablename));
            }
            if ((uploadtype == null)) {
                this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[4].Value = ((string)(uploadtype));
            }
            if ((uploadbyte.HasValue == true)) {
                this.Adapter.InsertCommand.Parameters[5].Value = ((int)(uploadbyte.Value));
            }
            else {
                this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
            }
            if ((comment == null)) {
                this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
            }
            else {
                this.Adapter.InsertCommand.Parameters[6].Value = ((string)(comment));
            }
            this.Adapter.InsertCommand.Parameters[7].Value = ((bool)(active));
            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 + -