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

📄 dataset1.designer.cs

📁 用C#实现超市的管理
💻 CS
📖 第 1 页 / 共 5 页
字号:
    [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 NewTianjspTableAdapter : 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 NewTianjspTableAdapter() {
            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 = "NewTianjsp";
            tableMapping.ColumnMappings.Add("商品名称", "商品名称");
            tableMapping.ColumnMappings.Add("单位", "单位");
            tableMapping.ColumnMappings.Add("规格型号", "规格型号");
            tableMapping.ColumnMappings.Add("颜色", "颜色");
            tableMapping.ColumnMappings.Add("单价", "单价");
            tableMapping.ColumnMappings.Add("数量", "数量");
            tableMapping.ColumnMappings.Add("总金额", "总金额");
            tableMapping.ColumnMappings.Add("商品编号", "商品编号");
            tableMapping.ColumnMappings.Add("生产厂商", "生产厂商");
            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].[NewTianjsp] WHERE (([商品名称] = @Original_商品名称) AND ([单位] = @Original_单位) AND ([规格型号] = @Original_规格型号) AND ([颜色] = @Original_颜色) AND ([单价] = @Original_单价) AND ([数量] = @Original_数量) AND ([总金额] = @Original_总金额) AND ([商品编号] = @Original_商品编号) AND ([生产厂商] = @Original_生产厂商))";
            this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_商品名称", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "商品名称", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单位", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "单位", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_规格型号", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "规格型号", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_颜色", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "颜色", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单价", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "单价", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_数量", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "数量", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_总金额", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "总金额", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_商品编号", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "商品编号", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_生产厂商", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "生产厂商", 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].[NewTianjsp] ([商品名称], [单位], [规格型号], [颜色], [单价], [数量], [总金额], [商" +
                "品编号], [生产厂商]) VALUES (@商品名称, @单位, @规格型号, @颜色, @单价, @数量, @总金额, @商品编号, @生产厂商);\r\nSE" +
                "LECT 商品名称, 单位, 规格型号, 颜色, 单价, 数量, 总金额, 商品编号, 生产厂商 FROM NewTianjsp WHERE (商品编号 = @" +
                "商品编号)";
            this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@商品名称", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "商品名称", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "单位", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@规格型号", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "规格型号", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@颜色", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "颜色", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单价", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "单价", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@数量", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "数量", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@总金额", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "总金额", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@商品编号", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "商品编号", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@生产厂商", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "生产厂商", 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].[NewTianjsp] SET [商品名称] = @商品名称, [单位] = @单位, [规格型号] = @规格型号, [颜色] = @颜色, [单价] = @单价, [数量] = @数量, [总金额] = @总金额, [商品编号] = @商品编号, [生产厂商] = @生产厂商 WHERE (([商品名称] = @Original_商品名称) AND ([单位] = @Original_单位) AND ([规格型号] = @Original_规格型号) AND ([颜色] = @Original_颜色) AND ([单价] = @Original_单价) AND ([数量] = @Original_数量) AND ([总金额] = @Original_总金额) AND ([商品编号] = @Original_商品编号) AND ([生产厂商] = @Original_生产厂商));
SELECT 商品名称, 单位, 规格型号, 颜色, 单价, 数量, 总金额, 商品编号, 生产厂商 FROM NewTianjsp WHERE (商品编号 = @商品编号)";
            this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@商品名称", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "商品名称", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单位", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "单位", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@规格型号", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "规格型号", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@颜色", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "颜色", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@单价", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "单价", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@数量", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "数量", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@总金额", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "总金额", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@商品编号", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "商品编号", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@生产厂商", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "生产厂商", System.Data.DataRowVersion.Current, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_商品名称", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "商品名称", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单位", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "单位", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_规格型号", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "规格型号", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_颜色", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "颜色", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_单价", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "单价", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_数量", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "数量", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_总金额", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "总金额", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_商品编号", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "商品编号", System.Data.DataRowVersion.Original, false, null, "", "", ""));
            this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_生产厂商", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "生产厂商", System.Data.DataRowVersion.Original, false, null, "", "", ""));
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitConnection() {
            this._connection = new System.Data.SqlClient.SqlConnection();
            this._connection.ConnectionString = global::Myproject.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 商品名称, 单位, 规格型号, 颜色, 单价, 数量, 总金额, 商品编号, 生产厂商 FROM dbo.NewTianjsp";
            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(DataSet1.NewTianjspDataTable 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 DataSet1.NewTianjspDataTable GetData() {
            this.Adapter.SelectCommand = this.CommandCollection[0];
            DataSet1.NewTianjspDataTable dataTable = new DataSet1.NewTianjspDataTable();
            this.Adapter.Fill(dataTable);
            return dataTable;
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(DataSet1.NewTianjspDataTable dataTable) {
            return this.Adapter.Update(dataTable);
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
        public virtual int Update(DataSet1 dataSet) {
            return this.Adapter.Update(dataSet, "NewTianjsp");
        }
        
        [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_商品名称, string Original_单位, string Original_规格型号, string Original_颜色, double Original_单价, int Original_数量, double Original_总金额, string Original_商品编号, string Original_生产厂商) {
            if ((Original_商品名称 == null)) {
                throw new System.ArgumentNullException("Original_商品名称");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_商品名称));
            }
            if ((Original_单位 == null)) {
                throw new System.ArgumentNullException("Original_单位");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_单位));

⌨️ 快捷键说明

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