using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace Northwind
{
	/// <summary>
	/// Summary description for frmOrders.
	/// </summary>
	public class frmOrders : frmBaseForm
	{
		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.OleDbCommand oleDbSelectCommand2;
		private System.Data.OleDb.OleDbCommand oleDbInsertCommand2;
		private System.Data.OleDb.OleDbCommand oleDbUpdateCommand2;
		private System.Data.OleDb.OleDbCommand oleDbDeleteCommand2;
		private System.Data.OleDb.OleDbConnection oleDbConnection1;
		private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;
		private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter2;
		private Northwind.dsOrdersOrderDetails objdsOrders;
		private System.Windows.Forms.Button btnLoad;
		private System.Windows.Forms.Button btnUpdate;
		private System.Windows.Forms.Button btnCancelAll;
		private System.Windows.Forms.Label lblOrderID;
		private System.Windows.Forms.Label lblCustomerID;
		private System.Windows.Forms.Label lblEmployeeID;
		private System.Windows.Forms.Label lblOrderDate;
		private System.Windows.Forms.Label lblRequiredDate;
		private System.Windows.Forms.Label lblShippedDate;
		private System.Windows.Forms.Label lblShipVia;
		private System.Windows.Forms.TextBox editOrderID;
		private System.Windows.Forms.TextBox editCustomerID;
		private System.Windows.Forms.TextBox editEmployeeID;
		private System.Windows.Forms.TextBox editOrderDate;
		private System.Windows.Forms.TextBox editRequiredDate;
		private System.Windows.Forms.TextBox editShippedDate;
		private System.Windows.Forms.TextBox editShipVia;
		private System.Windows.Forms.Label lblFreight;
		private System.Windows.Forms.Label lblShipName;
		private System.Windows.Forms.Label lblShipAddress;
		private System.Windows.Forms.Label lblShipCity;
		private System.Windows.Forms.Label lblShipRegion;
		private System.Windows.Forms.Label lblShipPostalCode;
		private System.Windows.Forms.Label lblShipCountry;
		private System.Windows.Forms.TextBox editFreight;
		private System.Windows.Forms.TextBox editShipName;
		private System.Windows.Forms.TextBox editShipAddress;
		private System.Windows.Forms.TextBox editShipCity;
		private System.Windows.Forms.TextBox editShipRegion;
		private System.Windows.Forms.TextBox editShipPostalCode;
		private System.Windows.Forms.TextBox editShipCountry;
		private System.Windows.Forms.Button btnNavFirst;
		private System.Windows.Forms.Button btnNavPrev;
		private System.Windows.Forms.Label lblNavLocation;
		private System.Windows.Forms.Button btnNavNext;
		private System.Windows.Forms.Button btnLast;
		private System.Windows.Forms.Button btnAdd;
		private System.Windows.Forms.Button btnDelete;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.DataGrid grdOrder_Details;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmOrders()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmOrders));
			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.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.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
			this.oleDbDataAdapter2 = new System.Data.OleDb.OleDbDataAdapter();
			this.objdsOrders = new Northwind.dsOrdersOrderDetails();
			this.btnLoad = new System.Windows.Forms.Button();
			this.btnUpdate = new System.Windows.Forms.Button();
			this.btnCancelAll = new System.Windows.Forms.Button();
			this.lblOrderID = new System.Windows.Forms.Label();
			this.lblCustomerID = new System.Windows.Forms.Label();
			this.lblEmployeeID = new System.Windows.Forms.Label();
			this.lblOrderDate = new System.Windows.Forms.Label();
			this.lblRequiredDate = new System.Windows.Forms.Label();
			this.lblShippedDate = new System.Windows.Forms.Label();
			this.lblShipVia = new System.Windows.Forms.Label();
			this.editOrderID = new System.Windows.Forms.TextBox();
			this.editCustomerID = new System.Windows.Forms.TextBox();
			this.editEmployeeID = new System.Windows.Forms.TextBox();
			this.editOrderDate = new System.Windows.Forms.TextBox();
			this.editRequiredDate = new System.Windows.Forms.TextBox();
			this.editShippedDate = new System.Windows.Forms.TextBox();
			this.editShipVia = new System.Windows.Forms.TextBox();
			this.lblFreight = new System.Windows.Forms.Label();
			this.lblShipName = new System.Windows.Forms.Label();
			this.lblShipAddress = new System.Windows.Forms.Label();
			this.lblShipCity = new System.Windows.Forms.Label();
			this.lblShipRegion = new System.Windows.Forms.Label();
			this.lblShipPostalCode = new System.Windows.Forms.Label();
			this.lblShipCountry = new System.Windows.Forms.Label();
			this.editFreight = new System.Windows.Forms.TextBox();
			this.editShipName = new System.Windows.Forms.TextBox();
			this.editShipAddress = new System.Windows.Forms.TextBox();
			this.editShipCity = new System.Windows.Forms.TextBox();
			this.editShipRegion = new System.Windows.Forms.TextBox();
			this.editShipPostalCode = new System.Windows.Forms.TextBox();
			this.editShipCountry = new System.Windows.Forms.TextBox();
			this.btnNavFirst = new System.Windows.Forms.Button();
			this.btnNavPrev = new System.Windows.Forms.Button();
			this.lblNavLocation = new System.Windows.Forms.Label();
			this.btnNavNext = new System.Windows.Forms.Button();
			this.btnLast = new System.Windows.Forms.Button();
			this.btnAdd = new System.Windows.Forms.Button();
			this.btnDelete = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.grdOrder_Details = new System.Windows.Forms.DataGrid();
			((System.ComponentModel.ISupportInitialize)(this.objdsOrders)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.grdOrder_Details)).BeginInit();
			this.SuspendLayout();
			// 
			// miFOpen
			// 
			this.miFOpen.Text = "&Load";
			this.miFOpen.Click += new System.EventHandler(this.miFOpen_Click);
			// 
			// miFNew
			// 
			this.miFNew.Text = "&Add";
			this.miFNew.Click += new System.EventHandler(this.miFNew_Click);
			// 
			// ilImages
			// 
			this.ilImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilImages.ImageStream")));
			// 
			// tbToolBar
			// 
			this.tbToolBar.Name = "tbToolBar";
			this.tbToolBar.Size = new System.Drawing.Size(441, 28);
			this.tbToolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tbToolBar_ButtonClick);
			// 
			// tbbOpen
			// 
			this.tbbOpen.ToolTipText = "Load";
			// 
			// tbbNew
			// 
			this.tbbNew.ToolTipText = "Add";
			// 
			// oleDbSelectCommand1
			// 
			this.oleDbSelectCommand1.CommandText = "SELECT OrderID, ProductID, UnitPrice, Quantity, Discount FROM [Order Details]";
			this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
			// 
			// oleDbConnection1
			// 
			this.oleDbConnection1.ConnectionString = @"Integrated Security=SSPI;Packet Size=4096;Data Source=""(local)"";Tag with column collation when possible=False;Initial Catalog=Northwind;Use Procedure for Prepare=1;Auto Translate=True;Persist Security Info=False;Provider=""SQLOLEDB.1"";Workstation ID=TEXANCUDA;Use Encryption for Data=False";
			// 
			// oleDbInsertCommand1
			// 
			this.oleDbInsertCommand1.CommandText = "INSERT INTO [Order Details] (OrderID, ProductID, UnitPrice, Quantity, Discount) V" +
				"ALUES (?, ?, ?, ?, ?); SELECT OrderID, ProductID, UnitPrice, Quantity, Discount " +
				"FROM [Order Details] WHERE (OrderID = ?) AND (ProductID = ?)";
			this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
			this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("OrderID", System.Data.OleDb.OleDbType.Integer, 4, "OrderID"));
			this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("ProductID", System.Data.OleDb.OleDbType.Integer, 4, "ProductID"));
			this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("UnitPrice", System.Data.OleDb.OleDbType.Currency, 8, "UnitPrice"));
			this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Quantity", System.Data.OleDb.OleDbType.SmallInt, 2, "Quantity"));
			this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Discount", System.Data.OleDb.OleDbType.Single, 4, "Discount"));
			this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Select_OrderID", System.Data.OleDb.OleDbType.Integer, 4, "OrderID"));
			this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Select_ProductID", System.Data.OleDb.OleDbType.Integer, 4, "ProductID"));
			// 
			// oleDbUpdateCommand1
			// 
			this.oleDbUpdateCommand1.CommandText = @"UPDATE [Order Details] SET OrderID = ?, ProductID = ?, UnitPrice = ?, Quantity = ?, Discount = ? WHERE (OrderID = ?) AND (ProductID = ?) AND (Discount = ?) AND (Quantity = ?) AND (UnitPrice = ?); SELECT OrderID, ProductID, UnitPrice, Quantity, Discount FROM [Order Details] WHERE (OrderID = ?) AND (ProductID = ?)";
			this.oleDbUpdateCommand1.Connection = this.oleDbConnection1;
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("OrderID", System.Data.OleDb.OleDbType.Integer, 4, "OrderID"));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("ProductID", System.Data.OleDb.OleDbType.Integer, 4, "ProductID"));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("UnitPrice", System.Data.OleDb.OleDbType.Currency, 8, "UnitPrice"));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Quantity", System.Data.OleDb.OleDbType.SmallInt, 2, "Quantity"));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Discount", System.Data.OleDb.OleDbType.Single, 4, "Discount"));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OrderID", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrderID", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ProductID", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductID", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Discount", System.Data.OleDb.OleDbType.Single, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Discount", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Quantity", System.Data.OleDb.OleDbType.SmallInt, 2, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Quantity", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_UnitPrice", System.Data.OleDb.OleDbType.Currency, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "UnitPrice", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Select_OrderID", System.Data.OleDb.OleDbType.Integer, 4, "OrderID"));
			this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Select_ProductID", System.Data.OleDb.OleDbType.Integer, 4, "ProductID"));
			// 
			// oleDbDeleteCommand1
			// 
			this.oleDbDeleteCommand1.CommandText = "DELETE FROM [Order Details] WHERE (OrderID = ?) AND (ProductID = ?) AND (Discount" +
				" = ?) AND (Quantity = ?) AND (UnitPrice = ?)";
			this.oleDbDeleteCommand1.Connection = this.oleDbConnection1;
			this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OrderID", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrderID", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ProductID", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ProductID", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Discount", System.Data.OleDb.OleDbType.Single, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Discount", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Quantity", System.Data.OleDb.OleDbType.SmallInt, 2, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Quantity", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_UnitPrice", System.Data.OleDb.OleDbType.Currency, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "UnitPrice", System.Data.DataRowVersion.Original, null));
			// 
			// oleDbSelectCommand2
			// 
			this.oleDbSelectCommand2.CommandText = "SELECT OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, Shi" +
				"pVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, Ship" +
				"Country FROM Orders";
			this.oleDbSelectCommand2.Connection = this.oleDbConnection1;
			// 
			// oleDbInsertCommand2
			// 
			this.oleDbInsertCommand2.CommandText = @"INSERT INTO Orders(CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); SELECT OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry FROM Orders WHERE (OrderID = @@IDENTITY)";
			this.oleDbInsertCommand2.Connection = this.oleDbConnection1;
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("CustomerID", System.Data.OleDb.OleDbType.VarWChar, 5, "CustomerID"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("EmployeeID", System.Data.OleDb.OleDbType.Integer, 4, "EmployeeID"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("OrderDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, "OrderDate"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("RequiredDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, "RequiredDate"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShippedDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, "ShippedDate"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipVia", System.Data.OleDb.OleDbType.Integer, 4, "ShipVia"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Freight", System.Data.OleDb.OleDbType.Currency, 8, "Freight"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipName", System.Data.OleDb.OleDbType.VarWChar, 40, "ShipName"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipAddress", System.Data.OleDb.OleDbType.VarWChar, 60, "ShipAddress"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipCity", System.Data.OleDb.OleDbType.VarWChar, 15, "ShipCity"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipRegion", System.Data.OleDb.OleDbType.VarWChar, 15, "ShipRegion"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipPostalCode", System.Data.OleDb.OleDbType.VarWChar, 10, "ShipPostalCode"));
			this.oleDbInsertCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipCountry", System.Data.OleDb.OleDbType.VarWChar, 15, "ShipCountry"));
			// 
			// oleDbUpdateCommand2
			// 
			this.oleDbUpdateCommand2.CommandText = @"UPDATE Orders SET CustomerID = ?, EmployeeID = ?, OrderDate = ?, RequiredDate = ?, ShippedDate = ?, ShipVia = ?, Freight = ?, ShipName = ?, ShipAddress = ?, ShipCity = ?, ShipRegion = ?, ShipPostalCode = ?, ShipCountry = ? WHERE (OrderID = ?) AND (CustomerID = ? OR ? IS NULL AND CustomerID IS NULL) AND (EmployeeID = ? OR ? IS NULL AND EmployeeID IS NULL) AND (Freight = ? OR ? IS NULL AND Freight IS NULL) AND (OrderDate = ? OR ? IS NULL AND OrderDate IS NULL) AND (RequiredDate = ? OR ? IS NULL AND RequiredDate IS NULL) AND (ShipAddress = ? OR ? IS NULL AND ShipAddress IS NULL) AND (ShipCity = ? OR ? IS NULL AND ShipCity IS NULL) AND (ShipCountry = ? OR ? IS NULL AND ShipCountry IS NULL) AND (ShipName = ? OR ? IS NULL AND ShipName IS NULL) AND (ShipPostalCode = ? OR ? IS NULL AND ShipPostalCode IS NULL) AND (ShipRegion = ? OR ? IS NULL AND ShipRegion IS NULL) AND (ShipVia = ? OR ? IS NULL AND ShipVia IS NULL) AND (ShippedDate = ? OR ? IS NULL AND ShippedDate IS NULL); SELECT OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry FROM Orders WHERE (OrderID = ?)";
			this.oleDbUpdateCommand2.Connection = this.oleDbConnection1;
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("CustomerID", System.Data.OleDb.OleDbType.VarWChar, 5, "CustomerID"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("EmployeeID", System.Data.OleDb.OleDbType.Integer, 4, "EmployeeID"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("OrderDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, "OrderDate"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("RequiredDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, "RequiredDate"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShippedDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, "ShippedDate"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipVia", System.Data.OleDb.OleDbType.Integer, 4, "ShipVia"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Freight", System.Data.OleDb.OleDbType.Currency, 8, "Freight"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipName", System.Data.OleDb.OleDbType.VarWChar, 40, "ShipName"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipAddress", System.Data.OleDb.OleDbType.VarWChar, 60, "ShipAddress"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipCity", System.Data.OleDb.OleDbType.VarWChar, 15, "ShipCity"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipRegion", System.Data.OleDb.OleDbType.VarWChar, 15, "ShipRegion"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipPostalCode", System.Data.OleDb.OleDbType.VarWChar, 10, "ShipPostalCode"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("ShipCountry", System.Data.OleDb.OleDbType.VarWChar, 15, "ShipCountry"));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OrderID", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrderID", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CustomerID", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "CustomerID", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CustomerID1", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "CustomerID", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_EmployeeID", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "EmployeeID", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_EmployeeID1", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "EmployeeID", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Freight", System.Data.OleDb.OleDbType.Currency, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Freight", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Freight1", System.Data.OleDb.OleDbType.Currency, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Freight", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OrderDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrderDate", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OrderDate1", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrderDate", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_RequiredDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "RequiredDate", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_RequiredDate1", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "RequiredDate", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipAddress", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipAddress", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipAddress1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipAddress", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipCity", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipCity", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipCity1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipCity", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipCountry", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipCountry", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipCountry1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipCountry", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipName", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipName", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipName1", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipName", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipPostalCode", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipPostalCode", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipPostalCode1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipPostalCode", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipRegion", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipRegion", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipRegion1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipRegion", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipVia", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipVia", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipVia1", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipVia", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShippedDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShippedDate", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShippedDate1", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShippedDate", System.Data.DataRowVersion.Original, null));
			this.oleDbUpdateCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Select_OrderID", System.Data.OleDb.OleDbType.Integer, 4, "OrderID"));
			// 
			// oleDbDeleteCommand2
			// 
			this.oleDbDeleteCommand2.CommandText = @"DELETE FROM Orders WHERE (OrderID = ?) AND (CustomerID = ? OR ? IS NULL AND CustomerID IS NULL) AND (EmployeeID = ? OR ? IS NULL AND EmployeeID IS NULL) AND (Freight = ? OR ? IS NULL AND Freight IS NULL) AND (OrderDate = ? OR ? IS NULL AND OrderDate IS NULL) AND (RequiredDate = ? OR ? IS NULL AND RequiredDate IS NULL) AND (ShipAddress = ? OR ? IS NULL AND ShipAddress IS NULL) AND (ShipCity = ? OR ? IS NULL AND ShipCity IS NULL) AND (ShipCountry = ? OR ? IS NULL AND ShipCountry IS NULL) AND (ShipName = ? OR ? IS NULL AND ShipName IS NULL) AND (ShipPostalCode = ? OR ? IS NULL AND ShipPostalCode IS NULL) AND (ShipRegion = ? OR ? IS NULL AND ShipRegion IS NULL) AND (ShipVia = ? OR ? IS NULL AND ShipVia IS NULL) AND (ShippedDate = ? OR ? IS NULL AND ShippedDate IS NULL)";
			this.oleDbDeleteCommand2.Connection = this.oleDbConnection1;
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OrderID", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrderID", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CustomerID", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "CustomerID", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_CustomerID1", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "CustomerID", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_EmployeeID", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "EmployeeID", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_EmployeeID1", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "EmployeeID", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Freight", System.Data.OleDb.OleDbType.Currency, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Freight", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_Freight1", System.Data.OleDb.OleDbType.Currency, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Freight", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OrderDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrderDate", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OrderDate1", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrderDate", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_RequiredDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "RequiredDate", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_RequiredDate1", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "RequiredDate", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipAddress", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipAddress", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipAddress1", System.Data.OleDb.OleDbType.VarWChar, 60, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipAddress", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipCity", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipCity", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipCity1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipCity", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipCountry", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipCountry", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipCountry1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipCountry", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipName", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipName", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipName1", System.Data.OleDb.OleDbType.VarWChar, 40, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipName", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipPostalCode", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipPostalCode", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipPostalCode1", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipPostalCode", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipRegion", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipRegion", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipRegion1", System.Data.OleDb.OleDbType.VarWChar, 15, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipRegion", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipVia", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipVia", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShipVia1", System.Data.OleDb.OleDbType.Integer, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShipVia", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShippedDate", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShippedDate", System.Data.DataRowVersion.Original, null));
			this.oleDbDeleteCommand2.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ShippedDate1", System.Data.OleDb.OleDbType.DBTimeStamp, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ShippedDate", 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", "Order Details", new System.Data.Common.DataColumnMapping[] {
																																																						 new System.Data.Common.DataColumnMapping("OrderID", "OrderID"),
																																																						 new System.Data.Common.DataColumnMapping("ProductID", "ProductID"),
																																																						 new System.Data.Common.DataColumnMapping("UnitPrice", "UnitPrice"),
																																																						 new System.Data.Common.DataColumnMapping("Quantity", "Quantity"),
																																																						 new System.Data.Common.DataColumnMapping("Discount", "Discount")})});
			this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
			// 
			// 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", "Orders", new System.Data.Common.DataColumnMapping[] {
																																																				  new System.Data.Common.DataColumnMapping("OrderID", "OrderID"),
																																																				  new System.Data.Common.DataColumnMapping("CustomerID", "CustomerID"),
																																																				  new System.Data.Common.DataColumnMapping("EmployeeID", "EmployeeID"),
																																																				  new System.Data.Common.DataColumnMapping("OrderDate", "OrderDate"),
																																																				  new System.Data.Common.DataColumnMapping("RequiredDate", "RequiredDate"),
																																																				  new System.Data.Common.DataColumnMapping("ShippedDate", "ShippedDate"),
																																																				  new System.Data.Common.DataColumnMapping("ShipVia", "ShipVia"),
																																																				  new System.Data.Common.DataColumnMapping("Freight", "Freight"),
																																																				  new System.Data.Common.DataColumnMapping("ShipName", "ShipName"),
																																																				  new System.Data.Common.DataColumnMapping("ShipAddress", "ShipAddress"),
																																																				  new System.Data.Common.DataColumnMapping("ShipCity", "ShipCity"),
																																																				  new System.Data.Common.DataColumnMapping("ShipRegion", "ShipRegion"),
																																																				  new System.Data.Common.DataColumnMapping("ShipPostalCode", "ShipPostalCode"),
																																																				  new System.Data.Common.DataColumnMapping("ShipCountry", "ShipCountry")})});
			this.oleDbDataAdapter2.UpdateCommand = this.oleDbUpdateCommand2;
			// 
			// objdsOrders
			// 
			this.objdsOrders.DataSetName = "dsOrders";
			this.objdsOrders.Locale = new System.Globalization.CultureInfo("en-US");
			// 
			// btnLoad
			// 
			this.btnLoad.Location = new System.Drawing.Point(13, 35);
			this.btnLoad.Name = "btnLoad";
			this.btnLoad.Size = new System.Drawing.Size(75, 22);
			this.btnLoad.TabIndex = 0;
			this.btnLoad.Text = "&Load";
			this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
			// 
			// btnUpdate
			// 
			this.btnUpdate.Location = new System.Drawing.Point(280, 43);
			this.btnUpdate.Name = "btnUpdate";
			this.btnUpdate.TabIndex = 1;
			this.btnUpdate.Text = "&Update";
			this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);
			// 
			// btnCancelAll
			// 
			this.btnCancelAll.Location = new System.Drawing.Point(365, 43);
			this.btnCancelAll.Name = "btnCancelAll";
			this.btnCancelAll.TabIndex = 2;
			this.btnCancelAll.Text = "Ca&ncel All";
			this.btnCancelAll.Click += new System.EventHandler(this.btnCancelAll_Click);
			// 
			// lblOrderID
			// 
			this.lblOrderID.Location = new System.Drawing.Point(10, 76);
			this.lblOrderID.Name = "lblOrderID";
			this.lblOrderID.TabIndex = 3;
			this.lblOrderID.Text = "OrderID";
			// 
			// lblCustomerID
			// 
			this.lblCustomerID.Location = new System.Drawing.Point(10, 109);
			this.lblCustomerID.Name = "lblCustomerID";
			this.lblCustomerID.TabIndex = 4;
			this.lblCustomerID.Text = "CustomerID";
			// 
			// lblEmployeeID
			// 
			this.lblEmployeeID.Location = new System.Drawing.Point(10, 142);
			this.lblEmployeeID.Name = "lblEmployeeID";
			this.lblEmployeeID.TabIndex = 5;
			this.lblEmployeeID.Text = "EmployeeID";
			// 
			// lblOrderDate
			// 
			this.lblOrderDate.Location = new System.Drawing.Point(10, 175);
			this.lblOrderDate.Name = "lblOrderDate";
			this.lblOrderDate.TabIndex = 6;
			this.lblOrderDate.Text = "OrderDate";
			// 
			// lblRequiredDate
			// 
			this.lblRequiredDate.Location = new System.Drawing.Point(10, 208);
			this.lblRequiredDate.Name = "lblRequiredDate";
			this.lblRequiredDate.TabIndex = 7;
			this.lblRequiredDate.Text = "RequiredDate";
			// 
			// lblShippedDate
			// 
			this.lblShippedDate.Location = new System.Drawing.Point(10, 241);
			this.lblShippedDate.Name = "lblShippedDate";
			this.lblShippedDate.TabIndex = 8;
			this.lblShippedDate.Text = "ShippedDate";
			// 
			// lblShipVia
			// 
			this.lblShipVia.Location = new System.Drawing.Point(10, 274);
			this.lblShipVia.Name = "lblShipVia";
			this.lblShipVia.TabIndex = 9;
			this.lblShipVia.Text = "ShipVia";
			// 
			// editOrderID
			// 
			this.editOrderID.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.OrderID"));
			this.editOrderID.Location = new System.Drawing.Point(120, 76);
			this.editOrderID.Name = "editOrderID";
			this.editOrderID.TabIndex = 10;
			this.editOrderID.Text = "";
			// 
			// editCustomerID
			// 
			this.editCustomerID.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.CustomerID"));
			this.editCustomerID.Location = new System.Drawing.Point(120, 109);
			this.editCustomerID.Name = "editCustomerID";
			this.editCustomerID.TabIndex = 11;
			this.editCustomerID.Text = "";
			// 
			// editEmployeeID
			// 
			this.editEmployeeID.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.EmployeeID"));
			this.editEmployeeID.Location = new System.Drawing.Point(120, 142);
			this.editEmployeeID.Name = "editEmployeeID";
			this.editEmployeeID.TabIndex = 12;
			this.editEmployeeID.Text = "";
			// 
			// editOrderDate
			// 
			this.editOrderDate.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.OrderDate"));
			this.editOrderDate.Location = new System.Drawing.Point(120, 175);
			this.editOrderDate.Name = "editOrderDate";
			this.editOrderDate.TabIndex = 13;
			this.editOrderDate.Text = "";
			// 
			// editRequiredDate
			// 
			this.editRequiredDate.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.RequiredDate"));
			this.editRequiredDate.Location = new System.Drawing.Point(120, 208);
			this.editRequiredDate.Name = "editRequiredDate";
			this.editRequiredDate.TabIndex = 14;
			this.editRequiredDate.Text = "";
			// 
			// editShippedDate
			// 
			this.editShippedDate.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.ShippedDate"));
			this.editShippedDate.Location = new System.Drawing.Point(120, 241);
			this.editShippedDate.Name = "editShippedDate";
			this.editShippedDate.TabIndex = 15;
			this.editShippedDate.Text = "";
			// 
			// editShipVia
			// 
			this.editShipVia.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.ShipVia"));
			this.editShipVia.Location = new System.Drawing.Point(120, 274);
			this.editShipVia.Name = "editShipVia";
			this.editShipVia.TabIndex = 16;
			this.editShipVia.Text = "";
			// 
			// lblFreight
			// 
			this.lblFreight.Location = new System.Drawing.Point(230, 76);
			this.lblFreight.Name = "lblFreight";
			this.lblFreight.TabIndex = 17;
			this.lblFreight.Text = "Freight";
			// 
			// lblShipName
			// 
			this.lblShipName.Location = new System.Drawing.Point(230, 109);
			this.lblShipName.Name = "lblShipName";
			this.lblShipName.TabIndex = 18;
			this.lblShipName.Text = "ShipName";
			// 
			// lblShipAddress
			// 
			this.lblShipAddress.Location = new System.Drawing.Point(230, 142);
			this.lblShipAddress.Name = "lblShipAddress";
			this.lblShipAddress.TabIndex = 19;
			this.lblShipAddress.Text = "ShipAddress";
			// 
			// lblShipCity
			// 
			this.lblShipCity.Location = new System.Drawing.Point(230, 175);
			this.lblShipCity.Name = "lblShipCity";
			this.lblShipCity.TabIndex = 20;
			this.lblShipCity.Text = "ShipCity";
			// 
			// lblShipRegion
			// 
			this.lblShipRegion.Location = new System.Drawing.Point(230, 208);
			this.lblShipRegion.Name = "lblShipRegion";
			this.lblShipRegion.TabIndex = 21;
			this.lblShipRegion.Text = "ShipRegion";
			// 
			// lblShipPostalCode
			// 
			this.lblShipPostalCode.Location = new System.Drawing.Point(230, 241);
			this.lblShipPostalCode.Name = "lblShipPostalCode";
			this.lblShipPostalCode.TabIndex = 22;
			this.lblShipPostalCode.Text = "ShipPostalCode";
			// 
			// lblShipCountry
			// 
			this.lblShipCountry.Location = new System.Drawing.Point(230, 274);
			this.lblShipCountry.Name = "lblShipCountry";
			this.lblShipCountry.TabIndex = 23;
			this.lblShipCountry.Text = "ShipCountry";
			// 
			// editFreight
			// 
			this.editFreight.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.Freight"));
			this.editFreight.Location = new System.Drawing.Point(340, 76);
			this.editFreight.Name = "editFreight";
			this.editFreight.TabIndex = 24;
			this.editFreight.Text = "";
			// 
			// editShipName
			// 
			this.editShipName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.ShipName"));
			this.editShipName.Location = new System.Drawing.Point(340, 109);
			this.editShipName.Name = "editShipName";
			this.editShipName.TabIndex = 25;
			this.editShipName.Text = "";
			// 
			// editShipAddress
			// 
			this.editShipAddress.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.ShipAddress"));
			this.editShipAddress.Location = new System.Drawing.Point(340, 142);
			this.editShipAddress.Name = "editShipAddress";
			this.editShipAddress.TabIndex = 26;
			this.editShipAddress.Text = "";
			// 
			// editShipCity
			// 
			this.editShipCity.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.ShipCity"));
			this.editShipCity.Location = new System.Drawing.Point(340, 175);
			this.editShipCity.Name = "editShipCity";
			this.editShipCity.TabIndex = 27;
			this.editShipCity.Text = "";
			// 
			// editShipRegion
			// 
			this.editShipRegion.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.ShipRegion"));
			this.editShipRegion.Location = new System.Drawing.Point(340, 208);
			this.editShipRegion.Name = "editShipRegion";
			this.editShipRegion.TabIndex = 28;
			this.editShipRegion.Text = "";
			// 
			// editShipPostalCode
			// 
			this.editShipPostalCode.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.ShipPostalCode"));
			this.editShipPostalCode.Location = new System.Drawing.Point(340, 241);
			this.editShipPostalCode.Name = "editShipPostalCode";
			this.editShipPostalCode.TabIndex = 29;
			this.editShipPostalCode.Text = "";
			// 
			// editShipCountry
			// 
			this.editShipCountry.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objdsOrders, "Orders.ShipCountry"));
			this.editShipCountry.Location = new System.Drawing.Point(340, 274);
			this.editShipCountry.Name = "editShipCountry";
			this.editShipCountry.TabIndex = 30;
			this.editShipCountry.Text = "";
			// 
			// btnNavFirst
			// 
			this.btnNavFirst.Location = new System.Drawing.Point(195, 307);
			this.btnNavFirst.Name = "btnNavFirst";
			this.btnNavFirst.Size = new System.Drawing.Size(40, 23);
			this.btnNavFirst.TabIndex = 31;
			this.btnNavFirst.Text = "<<";
			this.btnNavFirst.Click += new System.EventHandler(this.btnNavFirst_Click);
			// 
			// btnNavPrev
			// 
			this.btnNavPrev.Location = new System.Drawing.Point(235, 307);
			this.btnNavPrev.Name = "btnNavPrev";
			this.btnNavPrev.Size = new System.Drawing.Size(35, 23);
			this.btnNavPrev.TabIndex = 32;
			this.btnNavPrev.Text = "<";
			this.btnNavPrev.Click += new System.EventHandler(this.btnNavPrev_Click);
			// 
			// lblNavLocation
			// 
			this.lblNavLocation.BackColor = System.Drawing.Color.White;
			this.lblNavLocation.Location = new System.Drawing.Point(270, 307);
			this.lblNavLocation.Name = "lblNavLocation";
			this.lblNavLocation.Size = new System.Drawing.Size(95, 23);
			this.lblNavLocation.TabIndex = 33;
			this.lblNavLocation.Text = "No Records";
			this.lblNavLocation.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// btnNavNext
			// 
			this.btnNavNext.Location = new System.Drawing.Point(365, 307);
			this.btnNavNext.Name = "btnNavNext";
			this.btnNavNext.Size = new System.Drawing.Size(35, 23);
			this.btnNavNext.TabIndex = 34;
			this.btnNavNext.Text = ">";
			this.btnNavNext.Click += new System.EventHandler(this.btnNavNext_Click);
			// 
			// btnLast
			// 
			this.btnLast.Location = new System.Drawing.Point(400, 307);
			this.btnLast.Name = "btnLast";
			this.btnLast.Size = new System.Drawing.Size(40, 23);
			this.btnLast.TabIndex = 35;
			this.btnLast.Text = ">>";
			this.btnLast.Click += new System.EventHandler(this.btnLast_Click);
			// 
			// btnAdd
			// 
			this.btnAdd.Location = new System.Drawing.Point(195, 340);
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.TabIndex = 36;
			this.btnAdd.Text = "&Add";
			this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
			// 
			// btnDelete
			// 
			this.btnDelete.Location = new System.Drawing.Point(280, 340);
			this.btnDelete.Name = "btnDelete";
			this.btnDelete.TabIndex = 37;
			this.btnDelete.Text = "&Delete";
			this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
			// 
			// btnCancel
			// 
			this.btnCancel.Location = new System.Drawing.Point(365, 340);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.TabIndex = 38;
			this.btnCancel.Text = "&Cancel";
			this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			// 
			// grdOrder_Details
			// 
			this.grdOrder_Details.AllowNavigation = false;
			this.grdOrder_Details.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.grdOrder_Details.DataMember = "";
			this.grdOrder_Details.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.grdOrder_Details.Location = new System.Drawing.Point(7, 367);
			this.grdOrder_Details.Name = "grdOrder_Details";
			this.grdOrder_Details.Size = new System.Drawing.Size(430, 125);
			this.grdOrder_Details.TabIndex = 39;
			this.grdOrder_Details.Navigate += new System.Windows.Forms.NavigateEventHandler(this.grdOrder_Details_Navigate);
			// 
			// frmOrders
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(441, 516);
			this.Controls.Add(this.btnLoad);
			this.Controls.Add(this.btnUpdate);
			this.Controls.Add(this.btnCancelAll);
			this.Controls.Add(this.lblOrderID);
			this.Controls.Add(this.lblCustomerID);
			this.Controls.Add(this.lblEmployeeID);
			this.Controls.Add(this.lblOrderDate);
			this.Controls.Add(this.lblRequiredDate);
			this.Controls.Add(this.lblShippedDate);
			this.Controls.Add(this.lblShipVia);
			this.Controls.Add(this.editOrderID);
			this.Controls.Add(this.editCustomerID);
			this.Controls.Add(this.editEmployeeID);
			this.Controls.Add(this.editOrderDate);
			this.Controls.Add(this.editRequiredDate);
			this.Controls.Add(this.editShippedDate);
			this.Controls.Add(this.editShipVia);
			this.Controls.Add(this.lblFreight);
			this.Controls.Add(this.lblShipName);
			this.Controls.Add(this.lblShipAddress);
			this.Controls.Add(this.lblShipCity);
			this.Controls.Add(this.lblShipRegion);
			this.Controls.Add(this.lblShipPostalCode);
			this.Controls.Add(this.lblShipCountry);
			this.Controls.Add(this.editFreight);
			this.Controls.Add(this.editShipName);
			this.Controls.Add(this.editShipAddress);
			this.Controls.Add(this.editShipCity);
			this.Controls.Add(this.editShipRegion);
			this.Controls.Add(this.editShipPostalCode);
			this.Controls.Add(this.editShipCountry);
			this.Controls.Add(this.btnNavFirst);
			this.Controls.Add(this.btnNavPrev);
			this.Controls.Add(this.lblNavLocation);
			this.Controls.Add(this.btnNavNext);
			this.Controls.Add(this.btnLast);
			this.Controls.Add(this.btnAdd);
			this.Controls.Add(this.btnDelete);
			this.Controls.Add(this.btnCancel);
			this.Controls.Add(this.grdOrder_Details);
			this.Name = "frmOrders";
			this.Text = "Orders";
			this.Controls.SetChildIndex(this.grdOrder_Details, 0);
			this.Controls.SetChildIndex(this.btnCancel, 0);
			this.Controls.SetChildIndex(this.btnDelete, 0);
			this.Controls.SetChildIndex(this.btnAdd, 0);
			this.Controls.SetChildIndex(this.btnLast, 0);
			this.Controls.SetChildIndex(this.btnNavNext, 0);
			this.Controls.SetChildIndex(this.lblNavLocation, 0);
			this.Controls.SetChildIndex(this.btnNavPrev, 0);
			this.Controls.SetChildIndex(this.btnNavFirst, 0);
			this.Controls.SetChildIndex(this.editShipCountry, 0);
			this.Controls.SetChildIndex(this.editShipPostalCode, 0);
			this.Controls.SetChildIndex(this.editShipRegion, 0);
			this.Controls.SetChildIndex(this.editShipCity, 0);
			this.Controls.SetChildIndex(this.editShipAddress, 0);
			this.Controls.SetChildIndex(this.editShipName, 0);
			this.Controls.SetChildIndex(this.editFreight, 0);
			this.Controls.SetChildIndex(this.lblShipCountry, 0);
			this.Controls.SetChildIndex(this.lblShipPostalCode, 0);
			this.Controls.SetChildIndex(this.lblShipRegion, 0);
			this.Controls.SetChildIndex(this.lblShipCity, 0);
			this.Controls.SetChildIndex(this.lblShipAddress, 0);
			this.Controls.SetChildIndex(this.lblShipName, 0);
			this.Controls.SetChildIndex(this.lblFreight, 0);
			this.Controls.SetChildIndex(this.editShipVia, 0);
			this.Controls.SetChildIndex(this.editShippedDate, 0);
			this.Controls.SetChildIndex(this.editRequiredDate, 0);
			this.Controls.SetChildIndex(this.editOrderDate, 0);
			this.Controls.SetChildIndex(this.editEmployeeID, 0);
			this.Controls.SetChildIndex(this.editCustomerID, 0);
			this.Controls.SetChildIndex(this.editOrderID, 0);
			this.Controls.SetChildIndex(this.lblShipVia, 0);
			this.Controls.SetChildIndex(this.lblShippedDate, 0);
			this.Controls.SetChildIndex(this.lblRequiredDate, 0);
			this.Controls.SetChildIndex(this.lblOrderDate, 0);
			this.Controls.SetChildIndex(this.lblEmployeeID, 0);
			this.Controls.SetChildIndex(this.lblCustomerID, 0);
			this.Controls.SetChildIndex(this.lblOrderID, 0);
			this.Controls.SetChildIndex(this.btnCancelAll, 0);
			this.Controls.SetChildIndex(this.btnUpdate, 0);
			this.Controls.SetChildIndex(this.btnLoad, 0);
			this.Controls.SetChildIndex(this.tbToolBar, 0);
			((System.ComponentModel.ISupportInitialize)(this.objdsOrders)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.grdOrder_Details)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		public void FillDataSet(Northwind.dsOrders dataSet)
		{
			// Turn off constraint checking before the dataset is filled.
			// This allows the adapters to fill the dataset without concern
			// for dependencies between the tables.
			dataSet.EnforceConstraints = false;
			try 
			{
				// Open the connection.
				this.oleDbConnection1.Open();
				// Attempt to fill the dataset through the OleDbDataAdapter1.
				this.oleDbDataAdapter1.Fill(dataSet);
				this.oleDbDataAdapter2.Fill(dataSet);
			}
			catch (System.Exception fillException) 
			{
				// Add your error handling code here.
				throw fillException;
			}
			finally 
			{
				// Turn constraint checking back on.
				dataSet.EnforceConstraints = true;
				// Close the connection whether or not the exception was thrown.
				this.oleDbConnection1.Close();
			}

		}

		public void UpdateDataSource(Northwind.dsOrders ChangedRows)
		{
			try 
			{
				// The data source only needs to be updated if there are changes pending.
				if ((ChangedRows != null)) 
				{
					// Open the connection.
					this.oleDbConnection1.Open();
					// Attempt to update the data source.
					oleDbDataAdapter1.Update(ChangedRows);
					oleDbDataAdapter2.Update(ChangedRows);
				}
			}
			catch (System.Exception updateException) 
			{
				// Add your error handling code here.
				throw updateException;
			}
			finally 
			{
				// Close the connection whether or not the exception was thrown.
				this.oleDbConnection1.Close();
			}

		}

		public void LoadDataSet()
		{
			// Create a new dataset to hold the records returned from the call to FillDataSet.
			// A temporary dataset is used because filling the existing dataset would
			// require the databindings to be rebound.
			Northwind.dsOrders objDataSetTemp;
			objDataSetTemp = new Northwind.dsOrders();
			try 
			{
				// Attempt to fill the temporary dataset.
				this.FillDataSet(objDataSetTemp);
			}
			catch (System.Exception eFillDataSet) 
			{
				// Add your error handling code here.
				throw eFillDataSet;
			}
			try 
			{
				grdOrder_Details.DataSource = null;
				// Empty the old records from the dataset.
				objdsOrders.Clear();
				// Merge the records into the main dataset.
				objdsOrders.Merge(objDataSetTemp);
				grdOrder_Details.SetDataBinding(objdsOrders, "Orders.relOrdersOrderDetails");
			}
			catch (System.Exception eLoadMerge) 
			{
				// Add your error handling code here.
				throw eLoadMerge;
			}

		}

		public void UpdateDataSet()
		{
			// Create a new dataset to hold the changes that have been made to the main dataset.
			Northwind.dsOrders objDataSetChanges = new Northwind.dsOrders();
			// Stop any current edits.
			this.BindingContext[objdsOrders,"Orders"].EndCurrentEdit();
			this.BindingContext[objdsOrders,"Order Details"].EndCurrentEdit();
			// Get the changes that have been made to the main dataset.
			objDataSetChanges = ((Northwind.dsOrders)(objdsOrders.GetChanges()));
			// Check to see if any changes have been made.
			if ((objDataSetChanges != null)) 
			{
				try 
				{
					// There are changes that need to be made, so attempt to update the datasource by
					// calling the update method and passing the dataset and any parameters.
					this.UpdateDataSource(objDataSetChanges);
					objdsOrders.Merge(objDataSetChanges);
					objdsOrders.AcceptChanges();
				}
				catch (System.Exception eUpdate) 
				{
					// Add your error handling code here.
					throw eUpdate;
				}
				// Add your code to check the returned dataset for any errors that may have been
				// pushed into the row object's error.
			}

		}

		private void btnCancelAll_Click(object sender, System.EventArgs e)
		{
			this.objdsOrders.RejectChanges();

		}

		private void objdsOrders_PositionChanged()
		{
			this.lblNavLocation.Text = ((((this.BindingContext[objdsOrders,"Orders"].Position + 1)).ToString() + " of  ") 
				+ this.BindingContext[objdsOrders,"Orders"].Count.ToString());

		}

		private void btnNavNext_Click(object sender, System.EventArgs e)
		{
			this.BindingContext[objdsOrders,"Orders"].Position = (this.BindingContext[objdsOrders,"Orders"].Position + 1);
			this.objdsOrders_PositionChanged();

		}

		private void btnNavPrev_Click(object sender, System.EventArgs e)
		{
			this.BindingContext[objdsOrders,"Orders"].Position = (this.BindingContext[objdsOrders,"Orders"].Position - 1);
			this.objdsOrders_PositionChanged();

		}

		private void btnLast_Click(object sender, System.EventArgs e)
		{
			this.BindingContext[objdsOrders,"Orders"].Position = (this.objdsOrders.Tables["Orders"].Rows.Count - 1);
			this.objdsOrders_PositionChanged();

		}

		private void btnNavFirst_Click(object sender, System.EventArgs e)
		{
			this.BindingContext[objdsOrders,"Orders"].Position = 0;
			this.objdsOrders_PositionChanged();

		}

		private void btnLoad_Click(object sender, System.EventArgs e)
		{
			try 
			{
				// Attempt to load the dataset.
				this.LoadDataSet();
			}
			catch (System.Exception eLoad) 
			{
				// Add your error handling code here.
				// Display error message, if any.
				System.Windows.Forms.MessageBox.Show(eLoad.Message);
			}
			this.objdsOrders_PositionChanged();

		}

		private void btnUpdate_Click(object sender, System.EventArgs e)
		{
			try 
			{
				// Attempt to update the datasource.
				this.UpdateDataSet();
			}
			catch (System.Exception eUpdate) 
			{
				// Add your error handling code here.
				// Display error message, if any.
				System.Windows.Forms.MessageBox.Show(eUpdate.Message);
			}
			this.objdsOrders_PositionChanged();

		}

		private void btnAdd_Click(object sender, System.EventArgs e)
		{
			try 
			{
				// Clear out the current edits
				this.BindingContext[objdsOrders,"Orders"].EndCurrentEdit();
				this.BindingContext[objdsOrders,"Orders"].AddNew();
			}
			catch (System.Exception eEndEdit) 
			{
				System.Windows.Forms.MessageBox.Show(eEndEdit.Message);
			}
			this.objdsOrders_PositionChanged();

		}

		private void btnDelete_Click(object sender, System.EventArgs e)
		{
			if ((this.BindingContext[objdsOrders,"Orders"].Count > 0)) 
			{
				this.BindingContext[objdsOrders,"Orders"].RemoveAt(this.BindingContext[objdsOrders,"Orders"].Position);
				this.objdsOrders_PositionChanged();
			}

		}

		private void btnCancel_Click(object sender, System.EventArgs e)
		{
			this.BindingContext[objdsOrders,"Orders"].CancelCurrentEdit();
			this.objdsOrders_PositionChanged();

		}

		private void miFOpen_Click(object sender, System.EventArgs e)
		{
			btnLoad_Click(sender, e);
		}

		private void miFNew_Click(object sender, System.EventArgs e)
		{
			btnAdd_Click(sender, e);
		}

		private void tbToolBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
		{
			if(e.Button.Equals(tbbOpen))
				btnLoad_Click(sender,e);
			else
				btnAdd_Click(sender,e);
		}

		private void grdOrder_Details_Navigate(object sender, System.Windows.Forms.NavigateEventArgs ne)
		{
		
		}
	}
}
