using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;namespace MyDB{/// <summary>/// Form1 的摘要说明。/// </summary>public class Form1 : System.Windows.Forms.Form{private System.Data.OleDb.OleDbCommand oleDbSelectCommand1;private System.Data.OleDb.OleDbCommand oleDbInsertCommand1;private System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;private System.Data.OleDb.OleDbCommand oleDbDeleteCommand1;private System.Data.OleDb.OleDbConnection oleDbConnection1;private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;private MyDB.CustomerDS customerDS1;private System.Data.OleDb.OleDbCommand oleDbSelectCommand2;private System.Data.OleDb.OleDbCommand oleDbInsertCommand2;private System.Data.OleDb.OleDbCommand oleDbUpdateCommand2;private System.Data.OleDb.OleDbCommand oleDbDeleteCommand2;private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter2;private MyDB.OrderDS orderDS1;private MyDB.CustomerOrderDS customerOrderDS1;private System.Windows.Forms.DataGrid dataGrid1;/// <summary>/// 必需的设计器变量。/// </summary>private System.ComponentModel.Container components = null;public Form1(){//// Windows 窗体设计器支持所必需的//InitializeComponent();//// TODO: 在 InitializeComponent 调用后添加任何构造函数代码//}/// <summary>/// 清理所有正在使用的资源。/// </summary>protected override void Dispose( bool disposing ){if( disposing ){if (components != null) {components.Dispose();}}base.Dispose( disposing );}#region Windows 窗体设计器生成的代码/// <summary>/// 设计器支持所需的方法 - 不要使用代码编辑器修改/// 此方法的内容。/// </summary>private void InitializeComponent(){this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();this.customerDS1 = new MyDB.CustomerDS();this.oleDbSelectCommand2 = new System.Data.OleDb.OleDbCommand();this.oleDbInsertCommand2 = new System.Data.OleDb.OleDbCommand();this.oleDbUpdateCommand2 = new System.Data.OleDb.OleDbCommand();this.oleDbDeleteCommand2 = new System.Data.OleDb.OleDbCommand();this.oleDbDataAdapter2 = new System.Data.OleDb.OleDbDataAdapter();this.orderDS1 = new MyDB.OrderDS();this.customerOrderDS1 = new MyDB.CustomerOrderDS();this.dataGrid1 = new System.Windows.Forms.DataGrid();((System.ComponentModel.ISupportInitialize)(this.customerDS1)).BeginInit();((System.ComponentModel.ISupportInitialize)(this.orderDS1)).BeginInit();((System.ComponentModel.ISupportInitialize)(this.customerOrderDS1)).BeginInit();((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();this.SuspendLayout();// // oleDbSelectCommand1// this.oleDbSelectCommand1.CommandText = "SELECT * FROM 客户";this.oleDbSelectCommand1.Connection = this.oleDbConnection1;// // oleDbConnection1// this.oleDbConnection1.ConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Database Password=;Data Source=""Northwind.mdb"";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False";// // oleDbInsertCommand1// this.oleDbInsertCommand1.CommandText = "INSERT INTO 客户(城市, 传真, 地区, 地址, 电话, 公司名称, 国家, 客户ID, 联系人头衔, 联系人姓名, 邮政编码) VALUES (?," " ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";this.oleDbInsertCommand1.Connection = this.oleDbConnection1;this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("城市", System.Data.OleDb.OleDbType.VarWChar, 15, "城市"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("传真", System.Data.OleDb.OleDbType.VarWChar, 24, "传真"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("地区", System.Data.OleDb.OleDbType.VarWChar, 15, "地区"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("地址", System.Data.OleDb.OleDbType.VarWChar, 60, "地址"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("电话", System.Data.OleDb.OleDbType.VarWChar, 24, "电话"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("公司名称", System.Data.OleDb.OleDbType.VarWChar, 40, "公司名称"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("国家", System.Data.OleDb.OleDbType.VarWChar, 15, "国家"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("客户ID", System.Data.OleDb.OleDbType.VarWChar, 5, "客户ID"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("联系人头衔", System.Data.OleDb.OleDbType.VarWChar, 30, "联系人头衔"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("联系人姓名", System.Data.OleDb.OleDbType.VarWChar, 30, "联系人姓名"));this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("邮政编码", System.Data.OleDb.OleDbType.VarWChar, 10, "邮政编码"));// // oleDbUpdateCommand1// this.oleDbUpdateCommand1.CommandText = @"UPDATE 客户 SET 城市 = ?, 传真 = ?, 地区 = ?, 地址 = ?, 电话 = ?, 公司名称 = ?, 国家 = ?, 客户ID = ?, 联系人头衔 = ?, 联系人姓名 = ?, 邮政编码 = ? WHERE (客户ID = ?) AND (传真 = ? OR ? IS NULL AND 传真 IS NULL) AND (公司名称 = ?) AND (国家 = ? OR ? IS NULL AND 国家 IS NULL) AND (地区 = ? OR ? IS NULL AND 地区 IS NULL) AND (地址 = ? OR ? IS NULL AND 地址 IS NULL) AND (城市 = ? OR ? IS NULL AND 城市 IS NULL) AND (电话 = ? OR ? IS NULL AND 电话 IS NULL) AND (联系人头衔 = ? OR ? IS NULL AND 联系人头衔 IS NULL) AND (联系人姓名 = ? OR ? IS NULL AND 联系人姓名 IS NULL) AND (邮政编码 = ? OR ? IS NULL AND 邮政编码 IS NULL)";this.oleDbUpdateCommand1.Connection = this.oleDbConnection1;this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("城市", System.Data.OleDb.OleDbType.VarWChar, 15, "城市"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("传真", System.Data.OleDb.OleDbType.VarWChar, 24, "传真"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("地区", System.Data.OleDb.OleDbType.VarWChar, 15, "地区"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("地址", System.Data.OleDb.OleDbType.VarWChar, 60, "地址"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("电话", System.Data.OleDb.OleDbType.VarWChar, 24, "电话"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("公司名称", System.Data.OleDb.OleDbType.VarWChar, 40, "公司名称"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("国家", System.Data.OleDb.OleDbType.VarWChar, 15, "国家"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("客户ID", System.Data.OleDb.OleDbType.VarWChar, 5, "客户ID"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("联系人头衔", System.Data.OleDb.OleDbType.VarWChar, 30, "联系人头衔"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("联系人姓名", System.Data.OleDb.OleDbType.VarWChar, 30, "联系人姓名"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("邮政编码", System.Data.OleDb.OleDbType.VarWChar, 10, "邮政编码"));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_客户ID", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "客户ID", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_传真", System.Data.OleDb.OleDbType.VarWChar, 24, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "传真", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_传真1", System.Data.OleDb.OleDbType.VarWChar, 24, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "传真", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_公司名称", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "公司名称", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_国家", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "国家", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_国家1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "国家", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_地区", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "地区", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_地区1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "地区", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_地址", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "地址", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_地址1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "地址", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_城市", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "城市", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_城市1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "城市", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电话", System.Data.OleDb.OleDbType.VarWChar, 24, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电话", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电话1", System.Data.OleDb.OleDbType.VarWChar, 24, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电话", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_联系人头衔", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "联系人头衔", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_联系人头衔1", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "联系人头衔", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_联系人姓名", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "联系人姓名", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_联系人姓名1", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "联系人姓名", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_邮政编码", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "邮政编码", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_邮政编码1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "邮政编码", System.Data.DataRowVersion.Original, null));// // oleDbDeleteCommand1// this.oleDbDeleteCommand1.CommandText = @"DELETE FROM 客户 WHERE (客户ID = ?) AND (传真 = ? OR ? IS NULL AND 传真 IS NULL) AND (公司名称 = ?) AND (国家 = ? OR ? IS NULL AND 国家 IS NULL) AND (地区 = ? OR ? IS NULL AND 地区 IS NULL) AND (地址 = ? OR ? IS NULL AND 地址 IS NULL) AND (城市 = ? OR ? IS NULL AND 城市 IS NULL) AND (电话 = ? OR ? IS NULL AND 电话 IS NULL) AND (联系人头衔 = ? OR ? IS NULL AND 联系人头衔 IS NULL) AND (联系人姓名 = ? OR ? IS NULL AND 联系人姓名 IS NULL) AND (邮政编码 = ? OR ? IS NULL AND 邮政编码 IS NULL)";this.oleDbDeleteCommand1.Connection = this.oleDbConnection1;this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_客户ID", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "客户ID", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_传真", System.Data.OleDb.OleDbType.VarWChar, 24, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "传真", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_传真1", System.Data.OleDb.OleDbType.VarWChar, 24, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "传真", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_公司名称", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "公司名称", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_国家", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "国家", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_国家1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "国家", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_地区", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "地区", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_地区1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "地区", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_地址", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "地址", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_地址1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "地址", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_城市", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "城市", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_城市1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "城市", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电话", System.Data.OleDb.OleDbType.VarWChar, 24, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电话", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电话1", System.Data.OleDb.OleDbType.VarWChar, 24, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电话", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_联系人头衔", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "联系人头衔", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_联系人头衔1", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "联系人头衔", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_联系人姓名", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "联系人姓名", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_联系人姓名1", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "联系人姓名", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_邮政编码", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "邮政编码", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_邮政编码1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "邮政编码", System.Data.DataRowVersion.Original, null));// // oleDbDataAdapter1// this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {new System.Data.Common.DataTableMapping("Table", "客户", new System.Data.Common.DataColumnMapping[] { new System.Data.Common.DataColumnMapping("城市", "城市"), new System.Data.Common.DataColumnMapping("传真", "传真"), new System.Data.Common.DataColumnMapping("地区", "地区"), new System.Data.Common.DataColumnMapping("地址", "地址"), new System.Data.Common.DataColumnMapping("电话", "电话"), new System.Data.Common.DataColumnMapping("公司名称", "公司名称"), new System.Data.Common.DataColumnMapping("国家", "国家"), new System.Data.Common.DataColumnMapping("客户ID", "客户ID"), new System.Data.Common.DataColumnMapping("联系人头衔", "联系人头衔"), new System.Data.Common.DataColumnMapping("联系人姓名", "联系人姓名"), new System.Data.Common.DataColumnMapping("邮政编码", "邮政编码")})});this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;// // customerDS1// this.customerDS1.DataSetName = "CustomerDS";this.customerDS1.Locale = new System.Globalization.CultureInfo("zh-CN");// // oleDbSelectCommand2// this.oleDbSelectCommand2.CommandText = "SELECT * FROM 订单";this.oleDbSelectCommand2.Connection = this.oleDbConnection1;// // oleDbInsertCommand2// this.oleDbInsertCommand2.CommandText = "INSERT INTO 订单(到货日期, 订购日期, 发货日期, 雇员ID, 货主城市, 货主地区, 货主地址, 货主国家, 货主名称, 货主邮政编码, 客户ID" ", 运货费, 运货商) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("到货日期", System.Data.OleDb.OleDbType.DBDate, 0, "到货日期"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("订购日期", System.Data.OleDb.OleDbType.DBDate, 0, "订购日期"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("发货日期", System.Data.OleDb.OleDbType.DBDate, 0, "发货日期"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("雇员ID", System.Data.OleDb.OleDbType.Integer, 0, "雇员ID"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主城市", System.Data.OleDb.OleDbType.VarWChar, 15, "货主城市"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主地区", System.Data.OleDb.OleDbType.VarWChar, 15, "货主地区"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主地址", System.Data.OleDb.OleDbType.VarWChar, 60, "货主地址"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主国家", System.Data.OleDb.OleDbType.VarWChar, 15, "货主国家"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主名称", System.Data.OleDb.OleDbType.VarWChar, 40, "货主名称"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主邮政编码", System.Data.OleDb.OleDbType.VarWChar, 10, "货主邮政编码"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("客户ID", System.Data.OleDb.OleDbType.VarWChar, 5, "客户ID"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("运货费", System.Data.OleDb.OleDbType.Currency, 0, "运货费"));this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("运货商", System.Data.OleDb.OleDbType.Integer, 0, "运货商"));// // oleDbUpdateCommand2// this.oleDbUpdateCommand2.CommandText = @"UPDATE 订单 SET 到货日期 = ?, 订购日期 = ?, 发货日期 = ?, 雇员ID = ?, 货主城市 = ?, 货主地区 = ?, 货主地址 = ?, 货主国家 = ?, 货主名称 = ?, 货主邮政编码 = ?, 客户ID = ?, 运货费 = ?, 运货商 = ? WHERE (订单ID = ?) AND (到货日期 = ? OR ? IS NULL AND 到货日期 IS NULL) AND (发货日期 = ? OR ? IS NULL AND 发货日期 IS NULL) AND (客户ID = ? OR ? IS NULL AND 客户ID IS NULL) AND (订购日期 = ? OR ? IS NULL AND 订购日期 IS NULL) AND (货主名称 = ? OR ? IS NULL AND 货主名称 IS NULL) AND (货主国家 = ? OR ? IS NULL AND 货主国家 IS NULL) AND (货主地区 = ? OR ? IS NULL AND 货主地区 IS NULL) AND (货主地址 = ? OR ? IS NULL AND 货主地址 IS NULL) AND (货主城市 = ? OR ? IS NULL AND 货主城市 IS NULL) AND (货主邮政编码 = ? OR ? IS NULL AND 货主邮政编码 IS NULL) AND (运货商 = ? OR ? IS NULL AND 运货商 IS NULL) AND (运货费 = ? OR ? IS NULL AND 运货费 IS NULL) AND (雇员ID = ? OR ? IS NULL AND 雇员ID IS NULL)";this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("到货日期", System.Data.OleDb.OleDbType.DBDate, 0, "到货日期"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("订购日期", System.Data.OleDb.OleDbType.DBDate, 0, "订购日期"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("发货日期", System.Data.OleDb.OleDbType.DBDate, 0, "发货日期"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("雇员ID", System.Data.OleDb.OleDbType.Integer, 0, "雇员ID"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主城市", System.Data.OleDb.OleDbType.VarWChar, 15, "货主城市"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主地区", System.Data.OleDb.OleDbType.VarWChar, 15, "货主地区"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主地址", System.Data.OleDb.OleDbType.VarWChar, 60, "货主地址"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主国家", System.Data.OleDb.OleDbType.VarWChar, 15, "货主国家"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主名称", System.Data.OleDb.OleDbType.VarWChar, 40, "货主名称"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("货主邮政编码", System.Data.OleDb.OleDbType.VarWChar, 10, "货主邮政编码"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("客户ID", System.Data.OleDb.OleDbType.VarWChar, 5, "客户ID"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("运货费", System.Data.OleDb.OleDbType.Currency, 0, "运货费"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("运货商", System.Data.OleDb.OleDbType.Integer, 0, "运货商"));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_订单ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "订单ID", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_到货日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "到货日期", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_到货日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "到货日期", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_发货日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "发货日期", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_发货日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "发货日期", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_客户ID", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "客户ID", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_客户ID1", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "客户ID", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_订购日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "订购日期", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_订购日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "订购日期", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主名称", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主名称", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主名称1", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主名称", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主国家", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主国家", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主国家1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主国家", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主地区", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主地区", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主地区1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主地区", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主地址", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主地址", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主地址1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主地址", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主城市", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主城市", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主城市1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主城市", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主邮政编码", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主邮政编码", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主邮政编码1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主邮政编码", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_运货商", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "运货商", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_运货商1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "运货商", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_运货费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "运货费", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_运货费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "运货费", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_雇员ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "雇员ID", System.Data.DataRowVersion.Original, null));this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_雇员ID1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "雇员ID", System.Data.DataRowVersion.Original, null));// // oleDbDeleteCommand2// this.oleDbDeleteCommand2.CommandText = @"DELETE FROM 订单 WHERE (订单ID = ?) AND (到货日期 = ? OR ? IS NULL AND 到货日期 IS NULL) AND (发货日期 = ? OR ? IS NULL AND 发货日期 IS NULL) AND (客户ID = ? OR ? IS NULL AND 客户ID IS NULL) AND (订购日期 = ? OR ? IS NULL AND 订购日期 IS NULL) AND (货主名称 = ? OR ? IS NULL AND 货主名称 IS NULL) AND (货主国家 = ? OR ? IS NULL AND 货主国家 IS NULL) AND (货主地区 = ? OR ? IS NULL AND 货主地区 IS NULL) AND (货主地址 = ? OR ? IS NULL AND 货主地址 IS NULL) AND (货主城市 = ? OR ? IS NULL AND 货主城市 IS NULL) AND (货主邮政编码 = ? OR ? IS NULL AND 货主邮政编码 IS NULL) AND (运货商 = ? OR ? IS NULL AND 运货商 IS NULL) AND (运货费 = ? OR ? IS NULL AND 运货费 IS NULL) AND (雇员ID = ? OR ? IS NULL AND 雇员ID IS NULL)";this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_订单ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "订单ID", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_到货日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "到货日期", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_到货日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "到货日期", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_发货日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "发货日期", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_发货日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "发货日期", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_客户ID", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "客户ID", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_客户ID1", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "客户ID", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_订购日期", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "订购日期", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_订购日期1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "订购日期", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主名称", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主名称", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主名称1", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主名称", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主国家", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主国家", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主国家1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主国家", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主地区", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主地区", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主地区1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主地区", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主地址", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主地址", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主地址1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主地址", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主城市", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主城市", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主城市1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主城市", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主邮政编码", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主邮政编码", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_货主邮政编码1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "货主邮政编码", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_运货商", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "运货商", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_运货商1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "运货商", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_运货费", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "运货费", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_运货费1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "运货费", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_雇员ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "雇员ID", System.Data.DataRowVersion.Original, null));this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_雇员ID1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "雇员ID", System.Data.DataRowVersion.Original, null));// // oleDbDataAdapter2// this.oleDbDataAdapter2.DeleteCommand = this.oleDbDeleteCommand2;this.oleDbDataAdapter2.InsertCommand = this.oleDbInsertCommand2;this.oleDbDataAdapter2.SelectCommand = this.oleDbSelectCommand2;this.oleDbDataAdapter2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {new System.Data.Common.DataTableMapping("Table", "订单", new System.Data.Common.DataColumnMapping[] { new System.Data.Common.DataColumnMapping("到货日期", "到货日期"), new System.Data.Common.DataColumnMapping("订单ID", "订单ID"), new System.Data.Common.DataColumnMapping("订购日期", "订购日期"), new System.Data.Common.DataColumnMapping("发货日期", "发货日期"), new System.Data.Common.DataColumnMapping("雇员ID", "雇员ID"), new System.Data.Common.DataColumnMapping("货主城市", "货主城市"), new System.Data.Common.DataColumnMapping("货主地区", "货主地区"), new System.Data.Common.DataColumnMapping("货主地址", "货主地址"), new System.Data.Common.DataColumnMapping("货主国家", "货主国家"), new System.Data.Common.DataColumnMapping("货主名称", "货主名称"), new System.Data.Common.DataColumnMapping("货主邮政编码", "货主邮政编码"), new System.Data.Common.DataColumnMapping("客户ID", "客户ID"), new System.Data.Common.DataColumnMapping("运货费", "运货费"), new System.Data.Common.DataColumnMapping("运货商", "运货商")})});this.oleDbDataAdapter2.UpdateCommand = this.oleDbUpdateCommand2;// // orderDS1// this.orderDS1.DataSetName = "OrderDS";this.orderDS1.Locale = new System.Globalization.CultureInfo("zh-CN");// // customerOrderDS1// this.customerOrderDS1.DataSetName = "CustomerOrderDS";this.customerOrderDS1.Locale = new System.Globalization.CultureInfo("zh-CN");// // dataGrid1// this.dataGrid1.DataMember = "";this.dataGrid1.DataSource = this.customerOrderDS1;this.dataGrid1.Dock = System.Windows.Forms.DockStyle.Fill;this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;this.dataGrid1.Location = new System.Drawing.Point(0, 0);this.dataGrid1.Name = "dataGrid1";this.dataGrid1.Size = new System.Drawing.Size(384, 262);this.dataGrid1.TabIndex = 0;// // Form1// this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);this.ClientSize = new System.Drawing.Size(384, 262);this.Controls.Add(this.dataGrid1);this.Name = "Form1";this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;this.Text = "演示直接操作主从关系表";this.Load = new System.EventHandler(this.Form1_Load);this.Closed = new System.EventHandler(this.Form1_Closed);((System.ComponentModel.ISupportInitialize)(this.customerDS1)).EndInit();((System.ComponentModel.ISupportInitialize)(this.orderDS1)).EndInit();((System.ComponentModel.ISupportInitialize)(this.customerOrderDS1)).EndInit();((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();this.ResumeLayout(false);}#endregion/// <summary>/// 应用程序的主入口点。/// </summary>[STAThread]static void Main() {Application.Run(new Form1());}private void Form1_Load(object sender, System.EventArgs e){//填充记录集this.oleDbDataAdapter1.Fill(this.customerOrderDS1,"客户");this.oleDbDataAdapter2.Fill(this.customerOrderDS1,"订单");}private void Form1_Closed(object sender, System.EventArgs e){//关闭程序//如果打开了连接,则关闭它if(this.oleDbConnection1.State==ConnectionState.Open){this.oleDbConnection1.Close();}}}}
评论