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

📄 dataset1.designer.cs

📁 用C#实现超市的管理
💻 CS
📖 第 1 页 / 共 5 页
字号:
            }
            if ((Original_规格型号 == null)) {
                throw new System.ArgumentNullException("Original_规格型号");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_规格型号));
            }
            if ((Original_颜色 == null)) {
                throw new System.ArgumentNullException("Original_颜色");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_颜色));
            }
            this.Adapter.DeleteCommand.Parameters[4].Value = ((double)(Original_单价));
            this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_数量));
            this.Adapter.DeleteCommand.Parameters[6].Value = ((double)(Original_总金额));
            if ((Original_商品编号 == null)) {
                throw new System.ArgumentNullException("Original_商品编号");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_商品编号));
            }
            if ((Original_生产厂商 == null)) {
                throw new System.ArgumentNullException("Original_生产厂商");
            }
            else {
                this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_生产厂商));
            }
            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 商品名称, string 单位, string 规格型号, string 颜色, double 单价, int 数量, double 总金额, string 商品编号, string 生产厂商) {
            if ((商品名称 == null)) {
                throw new System.ArgumentNullException("商品名称");
            }
            else {
                this.Adapter.InsertCommand.Parameters[0].Value = ((string)(商品名称));
            }
            if ((单位 == null)) {
                throw new System.ArgumentNullException("单位");
            }
            else {
                this.Adapter.InsertCommand.Parameters[1].Value = ((string)(单位));
            }
            if ((规格型号 == null)) {
                throw new System.ArgumentNullException("规格型号");
            }
            else {
                this.Adapter.InsertCommand.Parameters[2].Value = ((string)(规格型号));
            }
            if ((颜色 == null)) {
                throw new System.ArgumentNullException("颜色");
            }
            else {
                this.Adapter.InsertCommand.Parameters[3].Value = ((string)(颜色));
            }
            this.Adapter.InsertCommand.Parameters[4].Value = ((double)(单价));
            this.Adapter.InsertCommand.Parameters[5].Value = ((int)(数量));
            this.Adapter.InsertCommand.Parameters[6].Value = ((double)(总金额));
            if ((商品编号 == null)) {
                throw new System.ArgumentNullException("商品编号");
            }
            else {
                this.Adapter.InsertCommand.Parameters[7].Value = ((string)(商品编号));
            }
            if ((生产厂商 == null)) {
                throw new System.ArgumentNullException("生产厂商");
            }
            else {
                this.Adapter.InsertCommand.Parameters[8].Value = ((string)(生产厂商));
            }
            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 商品名称, 
                    string 单位, 
                    string 规格型号, 
                    string 颜色, 
                    double 单价, 
                    int 数量, 
                    double 总金额, 
                    string 商品编号, 
                    string 生产厂商, 
                    string Original_商品名称, 
                    string Original_单位, 
                    string Original_规格型号, 
                    string Original_颜色, 
                    double Original_单价, 
                    int Original_数量, 
                    double Original_总金额, 
                    string Original_商品编号, 
                    string Original_生产厂商) {
            if ((商品名称 == null)) {
                throw new System.ArgumentNullException("商品名称");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(商品名称));
            }
            if ((单位 == null)) {
                throw new System.ArgumentNullException("单位");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(单位));
            }
            if ((规格型号 == null)) {
                throw new System.ArgumentNullException("规格型号");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(规格型号));
            }
            if ((颜色 == null)) {
                throw new System.ArgumentNullException("颜色");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(颜色));
            }
            this.Adapter.UpdateCommand.Parameters[4].Value = ((double)(单价));
            this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(数量));
            this.Adapter.UpdateCommand.Parameters[6].Value = ((double)(总金额));
            if ((商品编号 == null)) {
                throw new System.ArgumentNullException("商品编号");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(商品编号));
            }
            if ((生产厂商 == null)) {
                throw new System.ArgumentNullException("生产厂商");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(生产厂商));
            }
            if ((Original_商品名称 == null)) {
                throw new System.ArgumentNullException("Original_商品名称");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_商品名称));
            }
            if ((Original_单位 == null)) {
                throw new System.ArgumentNullException("Original_单位");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_单位));
            }
            if ((Original_规格型号 == null)) {
                throw new System.ArgumentNullException("Original_规格型号");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_规格型号));
            }
            if ((Original_颜色 == null)) {
                throw new System.ArgumentNullException("Original_颜色");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_颜色));
            }
            this.Adapter.UpdateCommand.Parameters[13].Value = ((double)(Original_单价));
            this.Adapter.UpdateCommand.Parameters[14].Value = ((int)(Original_数量));
            this.Adapter.UpdateCommand.Parameters[15].Value = ((double)(Original_总金额));
            if ((Original_商品编号 == null)) {
                throw new System.ArgumentNullException("Original_商品编号");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_商品编号));
            }
            if ((Original_生产厂商 == null)) {
                throw new System.ArgumentNullException("Original_生产厂商");
            }
            else {
                this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_生产厂商));
            }
            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 + -