From 4425f6da37f9f872b8888ebbb679fd26a37122e0 Mon Sep 17 00:00:00 2001 From: Bobbie Hodgetts Date: Mon, 3 Feb 2020 13:51:07 +0000 Subject: [PATCH] Purchase order facility UI updates --- .../BealeEngineering.Accounts/App.config | 8 +- .../BealeEngDataSet.Designer.cs | 7879 +++++++++++++++++ .../BealeEngDataSet.xsc | 1 + .../BealeEngDataSet.xsd | 791 ++ .../BealeEngDataSet.xss | 1 + .../BealeEngineering.Accounts.csproj | 18 + .../Form1.Designer.cs | 465 +- .../BealeEngineering.Accounts/Form1.cs | 110 +- .../BealeEngineering.Accounts/Form1.resx | 6 + ....Client.PurchaseOrderAllocation.datasource | 10 + .../Properties/DataSources/Form1.datasource | 10 + .../Properties/Settings.Designer.cs | 33 +- .../Properties/Settings.settings | 19 +- .../BealeEngineering.Core.csproj | 2 + .../Client/ReadPurchaseOrderAllocation.cs | 90 +- .../Client/ReadSaleInvoiceAllocation.cs | 71 + .../Logic/Client/PurchaseOrderAutoAllocate.cs | 2 +- .../Model/Client/PurchaseOrderAllocation.cs | 28 + .../Test/Client/PurchaseOrder.cs | 2 +- 19 files changed, 9458 insertions(+), 88 deletions(-) create mode 100644 BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.Designer.cs create mode 100644 BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xsc create mode 100644 BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xsd create mode 100644 BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xss create mode 100644 BealeEngineering/BealeEngineering.Accounts/Properties/DataSources/BealeEngineering.Core.Model.Client.PurchaseOrderAllocation.datasource create mode 100644 BealeEngineering/BealeEngineering.Accounts/Properties/DataSources/Form1.datasource create mode 100644 BealeEngineering/BealeEngineering.Core/Data/Database/Client/ReadSaleInvoiceAllocation.cs create mode 100644 BealeEngineering/BealeEngineering.Core/Model/Client/PurchaseOrderAllocation.cs diff --git a/BealeEngineering/BealeEngineering.Accounts/App.config b/BealeEngineering/BealeEngineering.Accounts/App.config index a0f10b3..e9cb185 100644 --- a/BealeEngineering/BealeEngineering.Accounts/App.config +++ b/BealeEngineering/BealeEngineering.Accounts/App.config @@ -1,7 +1,13 @@  + + - + + diff --git a/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.Designer.cs b/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.Designer.cs new file mode 100644 index 0000000..6a69add --- /dev/null +++ b/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.Designer.cs @@ -0,0 +1,7879 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 + +namespace BealeEngineering.Accounts { + + + /// + ///Represents a strongly typed in-memory cache of data. + /// + [global::System.Serializable()] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] + [global::System.Xml.Serialization.XmlRootAttribute("BealeEngDataSet")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class BealeEngDataSet : global::System.Data.DataSet { + + private ClientPurchaseOrderDataTable tableClientPurchaseOrder; + + private ClientPurchaseOrderLineDataTable tableClientPurchaseOrderLine; + + private ClientPurchaseOrderLineSalesInvoiceDataTable tableClientPurchaseOrderLineSalesInvoice; + + private ContactDataTable tableContact; + + private ProjectDataTable tableProject; + + private ProjectJobDataTable tableProjectJob; + + private global::System.Data.DataRelation relationFK_ClientPurchaseOrder_Contact; + + private global::System.Data.DataRelation relationFK_ClientPurchaseOrderLine_ClientPurchaseOrder; + + private global::System.Data.DataRelation relationFK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine; + + private global::System.Data.DataRelation relationFK_Project_Contact; + + private global::System.Data.DataRelation relationFK_ProjectJob_Contact; + + private global::System.Data.DataRelation relationFK_ProjectJob_Project; + + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public BealeEngDataSet() { + this.BeginInit(); + this.InitClass(); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + base.Relations.CollectionChanged += schemaChangedHandler; + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected BealeEngDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context, false) { + if ((this.IsBinarySerialized(info, context) == true)) { + this.InitVars(false); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + this.Tables.CollectionChanged += schemaChangedHandler1; + this.Relations.CollectionChanged += schemaChangedHandler1; + return; + } + string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); + if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + if ((ds.Tables["ClientPurchaseOrder"] != null)) { + base.Tables.Add(new ClientPurchaseOrderDataTable(ds.Tables["ClientPurchaseOrder"])); + } + if ((ds.Tables["ClientPurchaseOrderLine"] != null)) { + base.Tables.Add(new ClientPurchaseOrderLineDataTable(ds.Tables["ClientPurchaseOrderLine"])); + } + if ((ds.Tables["ClientPurchaseOrderLineSalesInvoice"] != null)) { + base.Tables.Add(new ClientPurchaseOrderLineSalesInvoiceDataTable(ds.Tables["ClientPurchaseOrderLineSalesInvoice"])); + } + if ((ds.Tables["Contact"] != null)) { + base.Tables.Add(new ContactDataTable(ds.Tables["Contact"])); + } + if ((ds.Tables["Project"] != null)) { + base.Tables.Add(new ProjectDataTable(ds.Tables["Project"])); + } + if ((ds.Tables["ProjectJob"] != null)) { + base.Tables.Add(new ProjectJobDataTable(ds.Tables["ProjectJob"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + } + this.GetSerializationData(info, context); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + this.Relations.CollectionChanged += schemaChangedHandler; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public ClientPurchaseOrderDataTable ClientPurchaseOrder { + get { + return this.tableClientPurchaseOrder; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public ClientPurchaseOrderLineDataTable ClientPurchaseOrderLine { + get { + return this.tableClientPurchaseOrderLine; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public ClientPurchaseOrderLineSalesInvoiceDataTable ClientPurchaseOrderLineSalesInvoice { + get { + return this.tableClientPurchaseOrderLineSalesInvoice; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public ContactDataTable Contact { + get { + return this.tableContact; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public ProjectDataTable Project { + get { + return this.tableProject; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public ProjectJobDataTable ProjectJob { + get { + return this.tableProjectJob; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.BrowsableAttribute(true)] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] + public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { + get { + return this._schemaSerializationMode; + } + set { + this._schemaSerializationMode = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataTableCollection Tables { + get { + return base.Tables; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataRelationCollection Relations { + get { + return base.Relations; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void InitializeDerivedDataSet() { + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataSet Clone() { + BealeEngDataSet cln = ((BealeEngDataSet)(base.Clone())); + cln.InitVars(); + cln.SchemaSerializationMode = this.SchemaSerializationMode; + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override bool ShouldSerializeTables() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override bool ShouldSerializeRelations() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { + if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + this.Reset(); + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXml(reader); + if ((ds.Tables["ClientPurchaseOrder"] != null)) { + base.Tables.Add(new ClientPurchaseOrderDataTable(ds.Tables["ClientPurchaseOrder"])); + } + if ((ds.Tables["ClientPurchaseOrderLine"] != null)) { + base.Tables.Add(new ClientPurchaseOrderLineDataTable(ds.Tables["ClientPurchaseOrderLine"])); + } + if ((ds.Tables["ClientPurchaseOrderLineSalesInvoice"] != null)) { + base.Tables.Add(new ClientPurchaseOrderLineSalesInvoiceDataTable(ds.Tables["ClientPurchaseOrderLineSalesInvoice"])); + } + if ((ds.Tables["Contact"] != null)) { + base.Tables.Add(new ContactDataTable(ds.Tables["Contact"])); + } + if ((ds.Tables["Project"] != null)) { + base.Tables.Add(new ProjectDataTable(ds.Tables["Project"])); + } + if ((ds.Tables["ProjectJob"] != null)) { + base.Tables.Add(new ProjectJobDataTable(ds.Tables["ProjectJob"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXml(reader); + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { + global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); + this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); + stream.Position = 0; + return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.InitVars(true); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars(bool initTable) { + this.tableClientPurchaseOrder = ((ClientPurchaseOrderDataTable)(base.Tables["ClientPurchaseOrder"])); + if ((initTable == true)) { + if ((this.tableClientPurchaseOrder != null)) { + this.tableClientPurchaseOrder.InitVars(); + } + } + this.tableClientPurchaseOrderLine = ((ClientPurchaseOrderLineDataTable)(base.Tables["ClientPurchaseOrderLine"])); + if ((initTable == true)) { + if ((this.tableClientPurchaseOrderLine != null)) { + this.tableClientPurchaseOrderLine.InitVars(); + } + } + this.tableClientPurchaseOrderLineSalesInvoice = ((ClientPurchaseOrderLineSalesInvoiceDataTable)(base.Tables["ClientPurchaseOrderLineSalesInvoice"])); + if ((initTable == true)) { + if ((this.tableClientPurchaseOrderLineSalesInvoice != null)) { + this.tableClientPurchaseOrderLineSalesInvoice.InitVars(); + } + } + this.tableContact = ((ContactDataTable)(base.Tables["Contact"])); + if ((initTable == true)) { + if ((this.tableContact != null)) { + this.tableContact.InitVars(); + } + } + this.tableProject = ((ProjectDataTable)(base.Tables["Project"])); + if ((initTable == true)) { + if ((this.tableProject != null)) { + this.tableProject.InitVars(); + } + } + this.tableProjectJob = ((ProjectJobDataTable)(base.Tables["ProjectJob"])); + if ((initTable == true)) { + if ((this.tableProjectJob != null)) { + this.tableProjectJob.InitVars(); + } + } + this.relationFK_ClientPurchaseOrder_Contact = this.Relations["FK_ClientPurchaseOrder_Contact"]; + this.relationFK_ClientPurchaseOrderLine_ClientPurchaseOrder = this.Relations["FK_ClientPurchaseOrderLine_ClientPurchaseOrder"]; + this.relationFK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine = this.Relations["FK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine"]; + this.relationFK_Project_Contact = this.Relations["FK_Project_Contact"]; + this.relationFK_ProjectJob_Contact = this.Relations["FK_ProjectJob_Contact"]; + this.relationFK_ProjectJob_Project = this.Relations["FK_ProjectJob_Project"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.DataSetName = "BealeEngDataSet"; + this.Prefix = ""; + this.Namespace = "http://tempuri.org/BealeEngDataSet.xsd"; + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + this.tableClientPurchaseOrder = new ClientPurchaseOrderDataTable(); + base.Tables.Add(this.tableClientPurchaseOrder); + this.tableClientPurchaseOrderLine = new ClientPurchaseOrderLineDataTable(); + base.Tables.Add(this.tableClientPurchaseOrderLine); + this.tableClientPurchaseOrderLineSalesInvoice = new ClientPurchaseOrderLineSalesInvoiceDataTable(); + base.Tables.Add(this.tableClientPurchaseOrderLineSalesInvoice); + this.tableContact = new ContactDataTable(); + base.Tables.Add(this.tableContact); + this.tableProject = new ProjectDataTable(); + base.Tables.Add(this.tableProject); + this.tableProjectJob = new ProjectJobDataTable(); + base.Tables.Add(this.tableProjectJob); + this.relationFK_ClientPurchaseOrder_Contact = new global::System.Data.DataRelation("FK_ClientPurchaseOrder_Contact", new global::System.Data.DataColumn[] { + this.tableContact.ContactIDColumn}, new global::System.Data.DataColumn[] { + this.tableClientPurchaseOrder.ContactIDColumn}, false); + this.Relations.Add(this.relationFK_ClientPurchaseOrder_Contact); + this.relationFK_ClientPurchaseOrderLine_ClientPurchaseOrder = new global::System.Data.DataRelation("FK_ClientPurchaseOrderLine_ClientPurchaseOrder", new global::System.Data.DataColumn[] { + this.tableClientPurchaseOrder.ClientPurchaseOrderIDColumn}, new global::System.Data.DataColumn[] { + this.tableClientPurchaseOrderLine.ClientPurchaseOrderIDColumn}, false); + this.Relations.Add(this.relationFK_ClientPurchaseOrderLine_ClientPurchaseOrder); + this.relationFK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine = new global::System.Data.DataRelation("FK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine", new global::System.Data.DataColumn[] { + this.tableClientPurchaseOrderLine.ClientPurchaseOrderLineIDColumn}, new global::System.Data.DataColumn[] { + this.tableClientPurchaseOrderLineSalesInvoice.ClientPurchaseOrderLineIDColumn}, false); + this.Relations.Add(this.relationFK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine); + this.relationFK_Project_Contact = new global::System.Data.DataRelation("FK_Project_Contact", new global::System.Data.DataColumn[] { + this.tableContact.ContactIDColumn}, new global::System.Data.DataColumn[] { + this.tableProject.ContactIDColumn}, false); + this.Relations.Add(this.relationFK_Project_Contact); + this.relationFK_ProjectJob_Contact = new global::System.Data.DataRelation("FK_ProjectJob_Contact", new global::System.Data.DataColumn[] { + this.tableContact.ContactIDColumn}, new global::System.Data.DataColumn[] { + this.tableProjectJob.ContactIDColumn}, false); + this.Relations.Add(this.relationFK_ProjectJob_Contact); + this.relationFK_ProjectJob_Project = new global::System.Data.DataRelation("FK_ProjectJob_Project", new global::System.Data.DataColumn[] { + this.tableProject.ProjectIDColumn}, new global::System.Data.DataColumn[] { + this.tableProjectJob.ProjectIDColumn}, false); + this.Relations.Add(this.relationFK_ProjectJob_Project); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeClientPurchaseOrder() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeClientPurchaseOrderLine() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeClientPurchaseOrderLineSalesInvoice() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeContact() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeProject() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private bool ShouldSerializeProjectJob() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { + if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + BealeEngDataSet ds = new BealeEngDataSet(); + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); + any.Namespace = ds.Namespace; + sequence.Items.Add(any); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void ClientPurchaseOrderRowChangeEventHandler(object sender, ClientPurchaseOrderRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void ClientPurchaseOrderLineRowChangeEventHandler(object sender, ClientPurchaseOrderLineRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void ClientPurchaseOrderLineSalesInvoiceRowChangeEventHandler(object sender, ClientPurchaseOrderLineSalesInvoiceRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void ContactRowChangeEventHandler(object sender, ContactRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void ProjectRowChangeEventHandler(object sender, ProjectRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public delegate void ProjectJobRowChangeEventHandler(object sender, ProjectJobRowChangeEvent e); + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ClientPurchaseOrderDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnClientPurchaseOrderID; + + private global::System.Data.DataColumn columnPurchaseOrderDate; + + private global::System.Data.DataColumn columnContactID; + + private global::System.Data.DataColumn columnClientReference; + + private global::System.Data.DataColumn columnRequestorEmail; + + private global::System.Data.DataColumn columnOrderTotal; + + private global::System.Data.DataColumn columnIsClosed; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderDataTable() { + this.TableName = "ClientPurchaseOrder"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ClientPurchaseOrderDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected ClientPurchaseOrderDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ClientPurchaseOrderIDColumn { + get { + return this.columnClientPurchaseOrderID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PurchaseOrderDateColumn { + get { + return this.columnPurchaseOrderDate; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ContactIDColumn { + get { + return this.columnContactID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ClientReferenceColumn { + get { + return this.columnClientReference; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn RequestorEmailColumn { + get { + return this.columnRequestorEmail; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn OrderTotalColumn { + get { + return this.columnOrderTotal; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn IsClosedColumn { + get { + return this.columnIsClosed; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderRow this[int index] { + get { + return ((ClientPurchaseOrderRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderRowChangeEventHandler ClientPurchaseOrderRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderRowChangeEventHandler ClientPurchaseOrderRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderRowChangeEventHandler ClientPurchaseOrderRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderRowChangeEventHandler ClientPurchaseOrderRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddClientPurchaseOrderRow(ClientPurchaseOrderRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderRow AddClientPurchaseOrderRow(System.DateTime PurchaseOrderDate, ContactRow parentContactRowByFK_ClientPurchaseOrder_Contact, string ClientReference, string RequestorEmail, decimal OrderTotal, bool IsClosed) { + ClientPurchaseOrderRow rowClientPurchaseOrderRow = ((ClientPurchaseOrderRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + PurchaseOrderDate, + null, + ClientReference, + RequestorEmail, + OrderTotal, + IsClosed}; + if ((parentContactRowByFK_ClientPurchaseOrder_Contact != null)) { + columnValuesArray[2] = parentContactRowByFK_ClientPurchaseOrder_Contact[0]; + } + rowClientPurchaseOrderRow.ItemArray = columnValuesArray; + this.Rows.Add(rowClientPurchaseOrderRow); + return rowClientPurchaseOrderRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderRow FindByClientPurchaseOrderID(int ClientPurchaseOrderID) { + return ((ClientPurchaseOrderRow)(this.Rows.Find(new object[] { + ClientPurchaseOrderID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + ClientPurchaseOrderDataTable cln = ((ClientPurchaseOrderDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new ClientPurchaseOrderDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnClientPurchaseOrderID = base.Columns["ClientPurchaseOrderID"]; + this.columnPurchaseOrderDate = base.Columns["PurchaseOrderDate"]; + this.columnContactID = base.Columns["ContactID"]; + this.columnClientReference = base.Columns["ClientReference"]; + this.columnRequestorEmail = base.Columns["RequestorEmail"]; + this.columnOrderTotal = base.Columns["OrderTotal"]; + this.columnIsClosed = base.Columns["IsClosed"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnClientPurchaseOrderID = new global::System.Data.DataColumn("ClientPurchaseOrderID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnClientPurchaseOrderID); + this.columnPurchaseOrderDate = new global::System.Data.DataColumn("PurchaseOrderDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPurchaseOrderDate); + this.columnContactID = new global::System.Data.DataColumn("ContactID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnContactID); + this.columnClientReference = new global::System.Data.DataColumn("ClientReference", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnClientReference); + this.columnRequestorEmail = new global::System.Data.DataColumn("RequestorEmail", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnRequestorEmail); + this.columnOrderTotal = new global::System.Data.DataColumn("OrderTotal", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnOrderTotal); + this.columnIsClosed = new global::System.Data.DataColumn("IsClosed", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIsClosed); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnClientPurchaseOrderID}, true)); + this.columnClientPurchaseOrderID.AutoIncrement = true; + this.columnClientPurchaseOrderID.AutoIncrementSeed = -1; + this.columnClientPurchaseOrderID.AutoIncrementStep = -1; + this.columnClientPurchaseOrderID.AllowDBNull = false; + this.columnClientPurchaseOrderID.ReadOnly = true; + this.columnClientPurchaseOrderID.Unique = true; + this.columnPurchaseOrderDate.AllowDBNull = false; + this.columnContactID.AllowDBNull = false; + this.columnClientReference.AllowDBNull = false; + this.columnClientReference.MaxLength = 50; + this.columnRequestorEmail.MaxLength = 150; + this.columnIsClosed.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderRow NewClientPurchaseOrderRow() { + return ((ClientPurchaseOrderRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new ClientPurchaseOrderRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(ClientPurchaseOrderRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ClientPurchaseOrderRowChanged != null)) { + this.ClientPurchaseOrderRowChanged(this, new ClientPurchaseOrderRowChangeEvent(((ClientPurchaseOrderRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ClientPurchaseOrderRowChanging != null)) { + this.ClientPurchaseOrderRowChanging(this, new ClientPurchaseOrderRowChangeEvent(((ClientPurchaseOrderRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ClientPurchaseOrderRowDeleted != null)) { + this.ClientPurchaseOrderRowDeleted(this, new ClientPurchaseOrderRowChangeEvent(((ClientPurchaseOrderRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ClientPurchaseOrderRowDeleting != null)) { + this.ClientPurchaseOrderRowDeleting(this, new ClientPurchaseOrderRowChangeEvent(((ClientPurchaseOrderRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveClientPurchaseOrderRow(ClientPurchaseOrderRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + BealeEngDataSet ds = new BealeEngDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ClientPurchaseOrderDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ClientPurchaseOrderLineDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnClientPurchaseOrderLineID; + + private global::System.Data.DataColumn columnClientPurchaseOrderID; + + private global::System.Data.DataColumn columnLineNumber; + + private global::System.Data.DataColumn columnProjectJobID; + + private global::System.Data.DataColumn columnDescription; + + private global::System.Data.DataColumn columnLineNetAmount; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineDataTable() { + this.TableName = "ClientPurchaseOrderLine"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ClientPurchaseOrderLineDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected ClientPurchaseOrderLineDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ClientPurchaseOrderLineIDColumn { + get { + return this.columnClientPurchaseOrderLineID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ClientPurchaseOrderIDColumn { + get { + return this.columnClientPurchaseOrderID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn LineNumberColumn { + get { + return this.columnLineNumber; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ProjectJobIDColumn { + get { + return this.columnProjectJobID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DescriptionColumn { + get { + return this.columnDescription; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn LineNetAmountColumn { + get { + return this.columnLineNetAmount; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineRow this[int index] { + get { + return ((ClientPurchaseOrderLineRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderLineRowChangeEventHandler ClientPurchaseOrderLineRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderLineRowChangeEventHandler ClientPurchaseOrderLineRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderLineRowChangeEventHandler ClientPurchaseOrderLineRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderLineRowChangeEventHandler ClientPurchaseOrderLineRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddClientPurchaseOrderLineRow(ClientPurchaseOrderLineRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineRow AddClientPurchaseOrderLineRow(ClientPurchaseOrderRow parentClientPurchaseOrderRowByFK_ClientPurchaseOrderLine_ClientPurchaseOrder, int LineNumber, int ProjectJobID, string Description, decimal LineNetAmount) { + ClientPurchaseOrderLineRow rowClientPurchaseOrderLineRow = ((ClientPurchaseOrderLineRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + null, + LineNumber, + ProjectJobID, + Description, + LineNetAmount}; + if ((parentClientPurchaseOrderRowByFK_ClientPurchaseOrderLine_ClientPurchaseOrder != null)) { + columnValuesArray[1] = parentClientPurchaseOrderRowByFK_ClientPurchaseOrderLine_ClientPurchaseOrder[0]; + } + rowClientPurchaseOrderLineRow.ItemArray = columnValuesArray; + this.Rows.Add(rowClientPurchaseOrderLineRow); + return rowClientPurchaseOrderLineRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineRow FindByClientPurchaseOrderLineID(int ClientPurchaseOrderLineID) { + return ((ClientPurchaseOrderLineRow)(this.Rows.Find(new object[] { + ClientPurchaseOrderLineID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + ClientPurchaseOrderLineDataTable cln = ((ClientPurchaseOrderLineDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new ClientPurchaseOrderLineDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnClientPurchaseOrderLineID = base.Columns["ClientPurchaseOrderLineID"]; + this.columnClientPurchaseOrderID = base.Columns["ClientPurchaseOrderID"]; + this.columnLineNumber = base.Columns["LineNumber"]; + this.columnProjectJobID = base.Columns["ProjectJobID"]; + this.columnDescription = base.Columns["Description"]; + this.columnLineNetAmount = base.Columns["LineNetAmount"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnClientPurchaseOrderLineID = new global::System.Data.DataColumn("ClientPurchaseOrderLineID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnClientPurchaseOrderLineID); + this.columnClientPurchaseOrderID = new global::System.Data.DataColumn("ClientPurchaseOrderID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnClientPurchaseOrderID); + this.columnLineNumber = new global::System.Data.DataColumn("LineNumber", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnLineNumber); + this.columnProjectJobID = new global::System.Data.DataColumn("ProjectJobID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnProjectJobID); + this.columnDescription = new global::System.Data.DataColumn("Description", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDescription); + this.columnLineNetAmount = new global::System.Data.DataColumn("LineNetAmount", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnLineNetAmount); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnClientPurchaseOrderLineID}, true)); + this.columnClientPurchaseOrderLineID.AutoIncrement = true; + this.columnClientPurchaseOrderLineID.AutoIncrementSeed = -1; + this.columnClientPurchaseOrderLineID.AutoIncrementStep = -1; + this.columnClientPurchaseOrderLineID.AllowDBNull = false; + this.columnClientPurchaseOrderLineID.ReadOnly = true; + this.columnClientPurchaseOrderLineID.Unique = true; + this.columnClientPurchaseOrderID.AllowDBNull = false; + this.columnLineNumber.AllowDBNull = false; + this.columnProjectJobID.AllowDBNull = false; + this.columnDescription.MaxLength = 250; + this.columnLineNetAmount.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineRow NewClientPurchaseOrderLineRow() { + return ((ClientPurchaseOrderLineRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new ClientPurchaseOrderLineRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(ClientPurchaseOrderLineRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ClientPurchaseOrderLineRowChanged != null)) { + this.ClientPurchaseOrderLineRowChanged(this, new ClientPurchaseOrderLineRowChangeEvent(((ClientPurchaseOrderLineRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ClientPurchaseOrderLineRowChanging != null)) { + this.ClientPurchaseOrderLineRowChanging(this, new ClientPurchaseOrderLineRowChangeEvent(((ClientPurchaseOrderLineRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ClientPurchaseOrderLineRowDeleted != null)) { + this.ClientPurchaseOrderLineRowDeleted(this, new ClientPurchaseOrderLineRowChangeEvent(((ClientPurchaseOrderLineRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ClientPurchaseOrderLineRowDeleting != null)) { + this.ClientPurchaseOrderLineRowDeleting(this, new ClientPurchaseOrderLineRowChangeEvent(((ClientPurchaseOrderLineRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveClientPurchaseOrderLineRow(ClientPurchaseOrderLineRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + BealeEngDataSet ds = new BealeEngDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ClientPurchaseOrderLineDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ClientPurchaseOrderLineSalesInvoiceDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnClientPurchaseOrderLineID; + + private global::System.Data.DataColumn columnSaleInvoiceID; + + private global::System.Data.DataColumn columnIsApproved; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineSalesInvoiceDataTable() { + this.TableName = "ClientPurchaseOrderLineSalesInvoice"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ClientPurchaseOrderLineSalesInvoiceDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected ClientPurchaseOrderLineSalesInvoiceDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ClientPurchaseOrderLineIDColumn { + get { + return this.columnClientPurchaseOrderLineID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn SaleInvoiceIDColumn { + get { + return this.columnSaleInvoiceID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn IsApprovedColumn { + get { + return this.columnIsApproved; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineSalesInvoiceRow this[int index] { + get { + return ((ClientPurchaseOrderLineSalesInvoiceRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderLineSalesInvoiceRowChangeEventHandler ClientPurchaseOrderLineSalesInvoiceRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderLineSalesInvoiceRowChangeEventHandler ClientPurchaseOrderLineSalesInvoiceRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderLineSalesInvoiceRowChangeEventHandler ClientPurchaseOrderLineSalesInvoiceRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ClientPurchaseOrderLineSalesInvoiceRowChangeEventHandler ClientPurchaseOrderLineSalesInvoiceRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddClientPurchaseOrderLineSalesInvoiceRow(ClientPurchaseOrderLineSalesInvoiceRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineSalesInvoiceRow AddClientPurchaseOrderLineSalesInvoiceRow(ClientPurchaseOrderLineRow parentClientPurchaseOrderLineRowByFK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine, int SaleInvoiceID, bool IsApproved) { + ClientPurchaseOrderLineSalesInvoiceRow rowClientPurchaseOrderLineSalesInvoiceRow = ((ClientPurchaseOrderLineSalesInvoiceRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + SaleInvoiceID, + IsApproved}; + if ((parentClientPurchaseOrderLineRowByFK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine != null)) { + columnValuesArray[0] = parentClientPurchaseOrderLineRowByFK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine[0]; + } + rowClientPurchaseOrderLineSalesInvoiceRow.ItemArray = columnValuesArray; + this.Rows.Add(rowClientPurchaseOrderLineSalesInvoiceRow); + return rowClientPurchaseOrderLineSalesInvoiceRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineSalesInvoiceRow FindBySaleInvoiceID(int SaleInvoiceID) { + return ((ClientPurchaseOrderLineSalesInvoiceRow)(this.Rows.Find(new object[] { + SaleInvoiceID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + ClientPurchaseOrderLineSalesInvoiceDataTable cln = ((ClientPurchaseOrderLineSalesInvoiceDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new ClientPurchaseOrderLineSalesInvoiceDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnClientPurchaseOrderLineID = base.Columns["ClientPurchaseOrderLineID"]; + this.columnSaleInvoiceID = base.Columns["SaleInvoiceID"]; + this.columnIsApproved = base.Columns["IsApproved"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnClientPurchaseOrderLineID = new global::System.Data.DataColumn("ClientPurchaseOrderLineID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnClientPurchaseOrderLineID); + this.columnSaleInvoiceID = new global::System.Data.DataColumn("SaleInvoiceID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSaleInvoiceID); + this.columnIsApproved = new global::System.Data.DataColumn("IsApproved", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIsApproved); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnSaleInvoiceID}, true)); + this.columnClientPurchaseOrderLineID.AllowDBNull = false; + this.columnSaleInvoiceID.AllowDBNull = false; + this.columnSaleInvoiceID.Unique = true; + this.columnIsApproved.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineSalesInvoiceRow NewClientPurchaseOrderLineSalesInvoiceRow() { + return ((ClientPurchaseOrderLineSalesInvoiceRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new ClientPurchaseOrderLineSalesInvoiceRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(ClientPurchaseOrderLineSalesInvoiceRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ClientPurchaseOrderLineSalesInvoiceRowChanged != null)) { + this.ClientPurchaseOrderLineSalesInvoiceRowChanged(this, new ClientPurchaseOrderLineSalesInvoiceRowChangeEvent(((ClientPurchaseOrderLineSalesInvoiceRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ClientPurchaseOrderLineSalesInvoiceRowChanging != null)) { + this.ClientPurchaseOrderLineSalesInvoiceRowChanging(this, new ClientPurchaseOrderLineSalesInvoiceRowChangeEvent(((ClientPurchaseOrderLineSalesInvoiceRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ClientPurchaseOrderLineSalesInvoiceRowDeleted != null)) { + this.ClientPurchaseOrderLineSalesInvoiceRowDeleted(this, new ClientPurchaseOrderLineSalesInvoiceRowChangeEvent(((ClientPurchaseOrderLineSalesInvoiceRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ClientPurchaseOrderLineSalesInvoiceRowDeleting != null)) { + this.ClientPurchaseOrderLineSalesInvoiceRowDeleting(this, new ClientPurchaseOrderLineSalesInvoiceRowChangeEvent(((ClientPurchaseOrderLineSalesInvoiceRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveClientPurchaseOrderLineSalesInvoiceRow(ClientPurchaseOrderLineSalesInvoiceRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + BealeEngDataSet ds = new BealeEngDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ClientPurchaseOrderLineSalesInvoiceDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ContactDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnContactID; + + private global::System.Data.DataColumn columnContactName; + + private global::System.Data.DataColumn columnEmailAddress; + + private global::System.Data.DataColumn columnPrimaryPersonFirstName; + + private global::System.Data.DataColumn columnPrimaryPersonSurname; + + private global::System.Data.DataColumn columnPrimaryPersonEmail; + + private global::System.Data.DataColumn columnPOAddressLine1; + + private global::System.Data.DataColumn columnPOAddressLine2; + + private global::System.Data.DataColumn columnPOAddressLine3; + + private global::System.Data.DataColumn columnPOAddressLine4; + + private global::System.Data.DataColumn columnPOAddressCity; + + private global::System.Data.DataColumn columnPOAddressRegion; + + private global::System.Data.DataColumn columnPOAddressPostalCode; + + private global::System.Data.DataColumn columnPOAddressCountry; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactDataTable() { + this.TableName = "Contact"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ContactDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected ContactDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ContactIDColumn { + get { + return this.columnContactID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ContactNameColumn { + get { + return this.columnContactName; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn EmailAddressColumn { + get { + return this.columnEmailAddress; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PrimaryPersonFirstNameColumn { + get { + return this.columnPrimaryPersonFirstName; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PrimaryPersonSurnameColumn { + get { + return this.columnPrimaryPersonSurname; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PrimaryPersonEmailColumn { + get { + return this.columnPrimaryPersonEmail; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn POAddressLine1Column { + get { + return this.columnPOAddressLine1; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn POAddressLine2Column { + get { + return this.columnPOAddressLine2; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn POAddressLine3Column { + get { + return this.columnPOAddressLine3; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn POAddressLine4Column { + get { + return this.columnPOAddressLine4; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn POAddressCityColumn { + get { + return this.columnPOAddressCity; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn POAddressRegionColumn { + get { + return this.columnPOAddressRegion; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn POAddressPostalCodeColumn { + get { + return this.columnPOAddressPostalCode; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn POAddressCountryColumn { + get { + return this.columnPOAddressCountry; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactRow this[int index] { + get { + return ((ContactRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ContactRowChangeEventHandler ContactRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ContactRowChangeEventHandler ContactRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ContactRowChangeEventHandler ContactRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ContactRowChangeEventHandler ContactRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddContactRow(ContactRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactRow AddContactRow(string ContactName, string EmailAddress, string PrimaryPersonFirstName, string PrimaryPersonSurname, string PrimaryPersonEmail, string POAddressLine1, string POAddressLine2, string POAddressLine3, string POAddressLine4, string POAddressCity, string POAddressRegion, string POAddressPostalCode, string POAddressCountry) { + ContactRow rowContactRow = ((ContactRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + ContactName, + EmailAddress, + PrimaryPersonFirstName, + PrimaryPersonSurname, + PrimaryPersonEmail, + POAddressLine1, + POAddressLine2, + POAddressLine3, + POAddressLine4, + POAddressCity, + POAddressRegion, + POAddressPostalCode, + POAddressCountry}; + rowContactRow.ItemArray = columnValuesArray; + this.Rows.Add(rowContactRow); + return rowContactRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactRow FindByContactID(int ContactID) { + return ((ContactRow)(this.Rows.Find(new object[] { + ContactID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + ContactDataTable cln = ((ContactDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new ContactDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnContactID = base.Columns["ContactID"]; + this.columnContactName = base.Columns["ContactName"]; + this.columnEmailAddress = base.Columns["EmailAddress"]; + this.columnPrimaryPersonFirstName = base.Columns["PrimaryPersonFirstName"]; + this.columnPrimaryPersonSurname = base.Columns["PrimaryPersonSurname"]; + this.columnPrimaryPersonEmail = base.Columns["PrimaryPersonEmail"]; + this.columnPOAddressLine1 = base.Columns["POAddressLine1"]; + this.columnPOAddressLine2 = base.Columns["POAddressLine2"]; + this.columnPOAddressLine3 = base.Columns["POAddressLine3"]; + this.columnPOAddressLine4 = base.Columns["POAddressLine4"]; + this.columnPOAddressCity = base.Columns["POAddressCity"]; + this.columnPOAddressRegion = base.Columns["POAddressRegion"]; + this.columnPOAddressPostalCode = base.Columns["POAddressPostalCode"]; + this.columnPOAddressCountry = base.Columns["POAddressCountry"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnContactID = new global::System.Data.DataColumn("ContactID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnContactID); + this.columnContactName = new global::System.Data.DataColumn("ContactName", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnContactName); + this.columnEmailAddress = new global::System.Data.DataColumn("EmailAddress", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEmailAddress); + this.columnPrimaryPersonFirstName = new global::System.Data.DataColumn("PrimaryPersonFirstName", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrimaryPersonFirstName); + this.columnPrimaryPersonSurname = new global::System.Data.DataColumn("PrimaryPersonSurname", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrimaryPersonSurname); + this.columnPrimaryPersonEmail = new global::System.Data.DataColumn("PrimaryPersonEmail", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrimaryPersonEmail); + this.columnPOAddressLine1 = new global::System.Data.DataColumn("POAddressLine1", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPOAddressLine1); + this.columnPOAddressLine2 = new global::System.Data.DataColumn("POAddressLine2", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPOAddressLine2); + this.columnPOAddressLine3 = new global::System.Data.DataColumn("POAddressLine3", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPOAddressLine3); + this.columnPOAddressLine4 = new global::System.Data.DataColumn("POAddressLine4", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPOAddressLine4); + this.columnPOAddressCity = new global::System.Data.DataColumn("POAddressCity", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPOAddressCity); + this.columnPOAddressRegion = new global::System.Data.DataColumn("POAddressRegion", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPOAddressRegion); + this.columnPOAddressPostalCode = new global::System.Data.DataColumn("POAddressPostalCode", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPOAddressPostalCode); + this.columnPOAddressCountry = new global::System.Data.DataColumn("POAddressCountry", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPOAddressCountry); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnContactID}, true)); + this.columnContactID.AutoIncrement = true; + this.columnContactID.AutoIncrementSeed = -1; + this.columnContactID.AutoIncrementStep = -1; + this.columnContactID.AllowDBNull = false; + this.columnContactID.ReadOnly = true; + this.columnContactID.Unique = true; + this.columnContactName.AllowDBNull = false; + this.columnContactName.MaxLength = 100; + this.columnEmailAddress.MaxLength = 150; + this.columnPrimaryPersonFirstName.MaxLength = 100; + this.columnPrimaryPersonSurname.MaxLength = 100; + this.columnPrimaryPersonEmail.MaxLength = 100; + this.columnPOAddressLine1.MaxLength = 100; + this.columnPOAddressLine2.MaxLength = 100; + this.columnPOAddressLine3.MaxLength = 100; + this.columnPOAddressLine4.MaxLength = 100; + this.columnPOAddressCity.MaxLength = 100; + this.columnPOAddressRegion.MaxLength = 100; + this.columnPOAddressPostalCode.MaxLength = 50; + this.columnPOAddressCountry.MaxLength = 100; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactRow NewContactRow() { + return ((ContactRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new ContactRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(ContactRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ContactRowChanged != null)) { + this.ContactRowChanged(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ContactRowChanging != null)) { + this.ContactRowChanging(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ContactRowDeleted != null)) { + this.ContactRowDeleted(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ContactRowDeleting != null)) { + this.ContactRowDeleting(this, new ContactRowChangeEvent(((ContactRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveContactRow(ContactRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + BealeEngDataSet ds = new BealeEngDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ContactDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ProjectDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnProjectID; + + private global::System.Data.DataColumn columnContactID; + + private global::System.Data.DataColumn columnProjectRef; + + private global::System.Data.DataColumn columnProjectTitle; + + private global::System.Data.DataColumn columnDateStart; + + private global::System.Data.DataColumn columnDateEnd; + + private global::System.Data.DataColumn columnClientName; + + private global::System.Data.DataColumn columnIsArchived; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectDataTable() { + this.TableName = "Project"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ProjectDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected ProjectDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ProjectIDColumn { + get { + return this.columnProjectID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ContactIDColumn { + get { + return this.columnContactID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ProjectRefColumn { + get { + return this.columnProjectRef; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ProjectTitleColumn { + get { + return this.columnProjectTitle; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DateStartColumn { + get { + return this.columnDateStart; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DateEndColumn { + get { + return this.columnDateEnd; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ClientNameColumn { + get { + return this.columnClientName; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn IsArchivedColumn { + get { + return this.columnIsArchived; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectRow this[int index] { + get { + return ((ProjectRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ProjectRowChangeEventHandler ProjectRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ProjectRowChangeEventHandler ProjectRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ProjectRowChangeEventHandler ProjectRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ProjectRowChangeEventHandler ProjectRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddProjectRow(ProjectRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectRow AddProjectRow(int ProjectID, ContactRow parentContactRowByFK_Project_Contact, string ProjectRef, string ProjectTitle, System.DateTime DateStart, System.DateTime DateEnd, string ClientName, bool IsArchived) { + ProjectRow rowProjectRow = ((ProjectRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + ProjectID, + null, + ProjectRef, + ProjectTitle, + DateStart, + DateEnd, + ClientName, + IsArchived}; + if ((parentContactRowByFK_Project_Contact != null)) { + columnValuesArray[1] = parentContactRowByFK_Project_Contact[0]; + } + rowProjectRow.ItemArray = columnValuesArray; + this.Rows.Add(rowProjectRow); + return rowProjectRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectRow FindByProjectID(int ProjectID) { + return ((ProjectRow)(this.Rows.Find(new object[] { + ProjectID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + ProjectDataTable cln = ((ProjectDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new ProjectDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnProjectID = base.Columns["ProjectID"]; + this.columnContactID = base.Columns["ContactID"]; + this.columnProjectRef = base.Columns["ProjectRef"]; + this.columnProjectTitle = base.Columns["ProjectTitle"]; + this.columnDateStart = base.Columns["DateStart"]; + this.columnDateEnd = base.Columns["DateEnd"]; + this.columnClientName = base.Columns["ClientName"]; + this.columnIsArchived = base.Columns["IsArchived"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnProjectID = new global::System.Data.DataColumn("ProjectID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnProjectID); + this.columnContactID = new global::System.Data.DataColumn("ContactID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnContactID); + this.columnProjectRef = new global::System.Data.DataColumn("ProjectRef", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnProjectRef); + this.columnProjectTitle = new global::System.Data.DataColumn("ProjectTitle", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnProjectTitle); + this.columnDateStart = new global::System.Data.DataColumn("DateStart", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDateStart); + this.columnDateEnd = new global::System.Data.DataColumn("DateEnd", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDateEnd); + this.columnClientName = new global::System.Data.DataColumn("ClientName", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnClientName); + this.columnIsArchived = new global::System.Data.DataColumn("IsArchived", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIsArchived); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnProjectID}, true)); + this.columnProjectID.AllowDBNull = false; + this.columnProjectID.Unique = true; + this.columnContactID.AllowDBNull = false; + this.columnProjectRef.MaxLength = 16; + this.columnProjectTitle.AllowDBNull = false; + this.columnProjectTitle.MaxLength = 250; + this.columnClientName.MaxLength = 50; + this.columnIsArchived.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectRow NewProjectRow() { + return ((ProjectRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new ProjectRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(ProjectRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ProjectRowChanged != null)) { + this.ProjectRowChanged(this, new ProjectRowChangeEvent(((ProjectRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ProjectRowChanging != null)) { + this.ProjectRowChanging(this, new ProjectRowChangeEvent(((ProjectRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ProjectRowDeleted != null)) { + this.ProjectRowDeleted(this, new ProjectRowChangeEvent(((ProjectRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ProjectRowDeleting != null)) { + this.ProjectRowDeleting(this, new ProjectRowChangeEvent(((ProjectRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveProjectRow(ProjectRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + BealeEngDataSet ds = new BealeEngDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ProjectDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ProjectJobDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnProjectJobID; + + private global::System.Data.DataColumn columnProjectID; + + private global::System.Data.DataColumn columnContactID; + + private global::System.Data.DataColumn columnJobNumber; + + private global::System.Data.DataColumn columnJobTitle; + + private global::System.Data.DataColumn columnJobDescription; + + private global::System.Data.DataColumn columnDateStart; + + private global::System.Data.DataColumn columnDateEnd; + + private global::System.Data.DataColumn columnShareBob; + + private global::System.Data.DataColumn columnShareJohn; + + private global::System.Data.DataColumn columnIsArchived; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobDataTable() { + this.TableName = "ProjectJob"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ProjectJobDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected ProjectJobDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ProjectJobIDColumn { + get { + return this.columnProjectJobID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ProjectIDColumn { + get { + return this.columnProjectID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ContactIDColumn { + get { + return this.columnContactID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn JobNumberColumn { + get { + return this.columnJobNumber; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn JobTitleColumn { + get { + return this.columnJobTitle; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn JobDescriptionColumn { + get { + return this.columnJobDescription; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DateStartColumn { + get { + return this.columnDateStart; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn DateEndColumn { + get { + return this.columnDateEnd; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ShareBobColumn { + get { + return this.columnShareBob; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn ShareJohnColumn { + get { + return this.columnShareJohn; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn IsArchivedColumn { + get { + return this.columnIsArchived; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobRow this[int index] { + get { + return ((ProjectJobRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ProjectJobRowChangeEventHandler ProjectJobRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ProjectJobRowChangeEventHandler ProjectJobRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ProjectJobRowChangeEventHandler ProjectJobRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public event ProjectJobRowChangeEventHandler ProjectJobRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void AddProjectJobRow(ProjectJobRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobRow AddProjectJobRow(ProjectRow parentProjectRowByFK_ProjectJob_Project, ContactRow parentContactRowByFK_ProjectJob_Contact, string JobNumber, string JobTitle, string JobDescription, System.DateTime DateStart, System.DateTime DateEnd, decimal ShareBob, decimal ShareJohn, bool IsArchived) { + ProjectJobRow rowProjectJobRow = ((ProjectJobRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + null, + null, + JobNumber, + JobTitle, + JobDescription, + DateStart, + DateEnd, + ShareBob, + ShareJohn, + IsArchived}; + if ((parentProjectRowByFK_ProjectJob_Project != null)) { + columnValuesArray[1] = parentProjectRowByFK_ProjectJob_Project[0]; + } + if ((parentContactRowByFK_ProjectJob_Contact != null)) { + columnValuesArray[2] = parentContactRowByFK_ProjectJob_Contact[0]; + } + rowProjectJobRow.ItemArray = columnValuesArray; + this.Rows.Add(rowProjectJobRow); + return rowProjectJobRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobRow FindByProjectJobID(int ProjectJobID) { + return ((ProjectJobRow)(this.Rows.Find(new object[] { + ProjectJobID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public override global::System.Data.DataTable Clone() { + ProjectJobDataTable cln = ((ProjectJobDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new ProjectJobDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal void InitVars() { + this.columnProjectJobID = base.Columns["ProjectJobID"]; + this.columnProjectID = base.Columns["ProjectID"]; + this.columnContactID = base.Columns["ContactID"]; + this.columnJobNumber = base.Columns["JobNumber"]; + this.columnJobTitle = base.Columns["JobTitle"]; + this.columnJobDescription = base.Columns["JobDescription"]; + this.columnDateStart = base.Columns["DateStart"]; + this.columnDateEnd = base.Columns["DateEnd"]; + this.columnShareBob = base.Columns["ShareBob"]; + this.columnShareJohn = base.Columns["ShareJohn"]; + this.columnIsArchived = base.Columns["IsArchived"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitClass() { + this.columnProjectJobID = new global::System.Data.DataColumn("ProjectJobID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnProjectJobID); + this.columnProjectID = new global::System.Data.DataColumn("ProjectID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnProjectID); + this.columnContactID = new global::System.Data.DataColumn("ContactID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnContactID); + this.columnJobNumber = new global::System.Data.DataColumn("JobNumber", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnJobNumber); + this.columnJobTitle = new global::System.Data.DataColumn("JobTitle", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnJobTitle); + this.columnJobDescription = new global::System.Data.DataColumn("JobDescription", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnJobDescription); + this.columnDateStart = new global::System.Data.DataColumn("DateStart", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDateStart); + this.columnDateEnd = new global::System.Data.DataColumn("DateEnd", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDateEnd); + this.columnShareBob = new global::System.Data.DataColumn("ShareBob", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnShareBob); + this.columnShareJohn = new global::System.Data.DataColumn("ShareJohn", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnShareJohn); + this.columnIsArchived = new global::System.Data.DataColumn("IsArchived", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIsArchived); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnProjectJobID}, true)); + this.columnProjectJobID.AutoIncrement = true; + this.columnProjectJobID.AutoIncrementSeed = -1; + this.columnProjectJobID.AutoIncrementStep = -1; + this.columnProjectJobID.AllowDBNull = false; + this.columnProjectJobID.ReadOnly = true; + this.columnProjectJobID.Unique = true; + this.columnProjectID.AllowDBNull = false; + this.columnContactID.AllowDBNull = false; + this.columnJobNumber.AllowDBNull = false; + this.columnJobNumber.MaxLength = 7; + this.columnJobTitle.MaxLength = 250; + this.columnJobDescription.MaxLength = 500; + this.columnIsArchived.AllowDBNull = false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobRow NewProjectJobRow() { + return ((ProjectJobRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new ProjectJobRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(ProjectJobRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ProjectJobRowChanged != null)) { + this.ProjectJobRowChanged(this, new ProjectJobRowChangeEvent(((ProjectJobRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ProjectJobRowChanging != null)) { + this.ProjectJobRowChanging(this, new ProjectJobRowChangeEvent(((ProjectJobRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ProjectJobRowDeleted != null)) { + this.ProjectJobRowDeleted(this, new ProjectJobRowChangeEvent(((ProjectJobRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ProjectJobRowDeleting != null)) { + this.ProjectJobRowDeleting(this, new ProjectJobRowChangeEvent(((ProjectJobRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void RemoveProjectJobRow(ProjectJobRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + BealeEngDataSet ds = new BealeEngDataSet(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ProjectJobDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class ClientPurchaseOrderRow : global::System.Data.DataRow { + + private ClientPurchaseOrderDataTable tableClientPurchaseOrder; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ClientPurchaseOrderRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableClientPurchaseOrder = ((ClientPurchaseOrderDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ClientPurchaseOrderID { + get { + return ((int)(this[this.tableClientPurchaseOrder.ClientPurchaseOrderIDColumn])); + } + set { + this[this.tableClientPurchaseOrder.ClientPurchaseOrderIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime PurchaseOrderDate { + get { + return ((global::System.DateTime)(this[this.tableClientPurchaseOrder.PurchaseOrderDateColumn])); + } + set { + this[this.tableClientPurchaseOrder.PurchaseOrderDateColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ContactID { + get { + return ((int)(this[this.tableClientPurchaseOrder.ContactIDColumn])); + } + set { + this[this.tableClientPurchaseOrder.ContactIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string ClientReference { + get { + return ((string)(this[this.tableClientPurchaseOrder.ClientReferenceColumn])); + } + set { + this[this.tableClientPurchaseOrder.ClientReferenceColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string RequestorEmail { + get { + try { + return ((string)(this[this.tableClientPurchaseOrder.RequestorEmailColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'RequestorEmail\' in table \'ClientPurchaseOrder\' is DBNull.", e); + } + } + set { + this[this.tableClientPurchaseOrder.RequestorEmailColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public decimal OrderTotal { + get { + try { + return ((decimal)(this[this.tableClientPurchaseOrder.OrderTotalColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'OrderTotal\' in table \'ClientPurchaseOrder\' is DBNull.", e); + } + } + set { + this[this.tableClientPurchaseOrder.OrderTotalColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsClosed { + get { + return ((bool)(this[this.tableClientPurchaseOrder.IsClosedColumn])); + } + set { + this[this.tableClientPurchaseOrder.IsClosedColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactRow ContactRow { + get { + return ((ContactRow)(this.GetParentRow(this.Table.ParentRelations["FK_ClientPurchaseOrder_Contact"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_ClientPurchaseOrder_Contact"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsRequestorEmailNull() { + return this.IsNull(this.tableClientPurchaseOrder.RequestorEmailColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetRequestorEmailNull() { + this[this.tableClientPurchaseOrder.RequestorEmailColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsOrderTotalNull() { + return this.IsNull(this.tableClientPurchaseOrder.OrderTotalColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetOrderTotalNull() { + this[this.tableClientPurchaseOrder.OrderTotalColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineRow[] GetClientPurchaseOrderLineRows() { + if ((this.Table.ChildRelations["FK_ClientPurchaseOrderLine_ClientPurchaseOrder"] == null)) { + return new ClientPurchaseOrderLineRow[0]; + } + else { + return ((ClientPurchaseOrderLineRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ClientPurchaseOrderLine_ClientPurchaseOrder"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class ClientPurchaseOrderLineRow : global::System.Data.DataRow { + + private ClientPurchaseOrderLineDataTable tableClientPurchaseOrderLine; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ClientPurchaseOrderLineRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableClientPurchaseOrderLine = ((ClientPurchaseOrderLineDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ClientPurchaseOrderLineID { + get { + return ((int)(this[this.tableClientPurchaseOrderLine.ClientPurchaseOrderLineIDColumn])); + } + set { + this[this.tableClientPurchaseOrderLine.ClientPurchaseOrderLineIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ClientPurchaseOrderID { + get { + return ((int)(this[this.tableClientPurchaseOrderLine.ClientPurchaseOrderIDColumn])); + } + set { + this[this.tableClientPurchaseOrderLine.ClientPurchaseOrderIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int LineNumber { + get { + return ((int)(this[this.tableClientPurchaseOrderLine.LineNumberColumn])); + } + set { + this[this.tableClientPurchaseOrderLine.LineNumberColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ProjectJobID { + get { + return ((int)(this[this.tableClientPurchaseOrderLine.ProjectJobIDColumn])); + } + set { + this[this.tableClientPurchaseOrderLine.ProjectJobIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string Description { + get { + try { + return ((string)(this[this.tableClientPurchaseOrderLine.DescriptionColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Description\' in table \'ClientPurchaseOrderLine\' is DBNull.", e); + } + } + set { + this[this.tableClientPurchaseOrderLine.DescriptionColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public decimal LineNetAmount { + get { + return ((decimal)(this[this.tableClientPurchaseOrderLine.LineNetAmountColumn])); + } + set { + this[this.tableClientPurchaseOrderLine.LineNetAmountColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderRow ClientPurchaseOrderRow { + get { + return ((ClientPurchaseOrderRow)(this.GetParentRow(this.Table.ParentRelations["FK_ClientPurchaseOrderLine_ClientPurchaseOrder"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_ClientPurchaseOrderLine_ClientPurchaseOrder"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDescriptionNull() { + return this.IsNull(this.tableClientPurchaseOrderLine.DescriptionColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDescriptionNull() { + this[this.tableClientPurchaseOrderLine.DescriptionColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineSalesInvoiceRow[] GetClientPurchaseOrderLineSalesInvoiceRows() { + if ((this.Table.ChildRelations["FK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine"] == null)) { + return new ClientPurchaseOrderLineSalesInvoiceRow[0]; + } + else { + return ((ClientPurchaseOrderLineSalesInvoiceRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class ClientPurchaseOrderLineSalesInvoiceRow : global::System.Data.DataRow { + + private ClientPurchaseOrderLineSalesInvoiceDataTable tableClientPurchaseOrderLineSalesInvoice; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ClientPurchaseOrderLineSalesInvoiceRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableClientPurchaseOrderLineSalesInvoice = ((ClientPurchaseOrderLineSalesInvoiceDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ClientPurchaseOrderLineID { + get { + return ((int)(this[this.tableClientPurchaseOrderLineSalesInvoice.ClientPurchaseOrderLineIDColumn])); + } + set { + this[this.tableClientPurchaseOrderLineSalesInvoice.ClientPurchaseOrderLineIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int SaleInvoiceID { + get { + return ((int)(this[this.tableClientPurchaseOrderLineSalesInvoice.SaleInvoiceIDColumn])); + } + set { + this[this.tableClientPurchaseOrderLineSalesInvoice.SaleInvoiceIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsApproved { + get { + return ((bool)(this[this.tableClientPurchaseOrderLineSalesInvoice.IsApprovedColumn])); + } + set { + this[this.tableClientPurchaseOrderLineSalesInvoice.IsApprovedColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineRow ClientPurchaseOrderLineRow { + get { + return ((ClientPurchaseOrderLineRow)(this.GetParentRow(this.Table.ParentRelations["FK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine"]); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class ContactRow : global::System.Data.DataRow { + + private ContactDataTable tableContact; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ContactRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableContact = ((ContactDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ContactID { + get { + return ((int)(this[this.tableContact.ContactIDColumn])); + } + set { + this[this.tableContact.ContactIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string ContactName { + get { + return ((string)(this[this.tableContact.ContactNameColumn])); + } + set { + this[this.tableContact.ContactNameColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string EmailAddress { + get { + try { + return ((string)(this[this.tableContact.EmailAddressColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'EmailAddress\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.EmailAddressColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string PrimaryPersonFirstName { + get { + try { + return ((string)(this[this.tableContact.PrimaryPersonFirstNameColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrimaryPersonFirstName\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.PrimaryPersonFirstNameColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string PrimaryPersonSurname { + get { + try { + return ((string)(this[this.tableContact.PrimaryPersonSurnameColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrimaryPersonSurname\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.PrimaryPersonSurnameColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string PrimaryPersonEmail { + get { + try { + return ((string)(this[this.tableContact.PrimaryPersonEmailColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrimaryPersonEmail\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.PrimaryPersonEmailColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string POAddressLine1 { + get { + try { + return ((string)(this[this.tableContact.POAddressLine1Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'POAddressLine1\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.POAddressLine1Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string POAddressLine2 { + get { + try { + return ((string)(this[this.tableContact.POAddressLine2Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'POAddressLine2\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.POAddressLine2Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string POAddressLine3 { + get { + try { + return ((string)(this[this.tableContact.POAddressLine3Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'POAddressLine3\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.POAddressLine3Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string POAddressLine4 { + get { + try { + return ((string)(this[this.tableContact.POAddressLine4Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'POAddressLine4\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.POAddressLine4Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string POAddressCity { + get { + try { + return ((string)(this[this.tableContact.POAddressCityColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'POAddressCity\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.POAddressCityColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string POAddressRegion { + get { + try { + return ((string)(this[this.tableContact.POAddressRegionColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'POAddressRegion\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.POAddressRegionColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string POAddressPostalCode { + get { + try { + return ((string)(this[this.tableContact.POAddressPostalCodeColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'POAddressPostalCode\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.POAddressPostalCodeColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string POAddressCountry { + get { + try { + return ((string)(this[this.tableContact.POAddressCountryColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'POAddressCountry\' in table \'Contact\' is DBNull.", e); + } + } + set { + this[this.tableContact.POAddressCountryColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsEmailAddressNull() { + return this.IsNull(this.tableContact.EmailAddressColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetEmailAddressNull() { + this[this.tableContact.EmailAddressColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPrimaryPersonFirstNameNull() { + return this.IsNull(this.tableContact.PrimaryPersonFirstNameColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPrimaryPersonFirstNameNull() { + this[this.tableContact.PrimaryPersonFirstNameColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPrimaryPersonSurnameNull() { + return this.IsNull(this.tableContact.PrimaryPersonSurnameColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPrimaryPersonSurnameNull() { + this[this.tableContact.PrimaryPersonSurnameColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPrimaryPersonEmailNull() { + return this.IsNull(this.tableContact.PrimaryPersonEmailColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPrimaryPersonEmailNull() { + this[this.tableContact.PrimaryPersonEmailColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPOAddressLine1Null() { + return this.IsNull(this.tableContact.POAddressLine1Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPOAddressLine1Null() { + this[this.tableContact.POAddressLine1Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPOAddressLine2Null() { + return this.IsNull(this.tableContact.POAddressLine2Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPOAddressLine2Null() { + this[this.tableContact.POAddressLine2Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPOAddressLine3Null() { + return this.IsNull(this.tableContact.POAddressLine3Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPOAddressLine3Null() { + this[this.tableContact.POAddressLine3Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPOAddressLine4Null() { + return this.IsNull(this.tableContact.POAddressLine4Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPOAddressLine4Null() { + this[this.tableContact.POAddressLine4Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPOAddressCityNull() { + return this.IsNull(this.tableContact.POAddressCityColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPOAddressCityNull() { + this[this.tableContact.POAddressCityColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPOAddressRegionNull() { + return this.IsNull(this.tableContact.POAddressRegionColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPOAddressRegionNull() { + this[this.tableContact.POAddressRegionColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPOAddressPostalCodeNull() { + return this.IsNull(this.tableContact.POAddressPostalCodeColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPOAddressPostalCodeNull() { + this[this.tableContact.POAddressPostalCodeColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsPOAddressCountryNull() { + return this.IsNull(this.tableContact.POAddressCountryColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetPOAddressCountryNull() { + this[this.tableContact.POAddressCountryColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderRow[] GetClientPurchaseOrderRows() { + if ((this.Table.ChildRelations["FK_ClientPurchaseOrder_Contact"] == null)) { + return new ClientPurchaseOrderRow[0]; + } + else { + return ((ClientPurchaseOrderRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ClientPurchaseOrder_Contact"]))); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectRow[] GetProjectRows() { + if ((this.Table.ChildRelations["FK_Project_Contact"] == null)) { + return new ProjectRow[0]; + } + else { + return ((ProjectRow[])(base.GetChildRows(this.Table.ChildRelations["FK_Project_Contact"]))); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobRow[] GetProjectJobRows() { + if ((this.Table.ChildRelations["FK_ProjectJob_Contact"] == null)) { + return new ProjectJobRow[0]; + } + else { + return ((ProjectJobRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProjectJob_Contact"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class ProjectRow : global::System.Data.DataRow { + + private ProjectDataTable tableProject; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ProjectRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableProject = ((ProjectDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ProjectID { + get { + return ((int)(this[this.tableProject.ProjectIDColumn])); + } + set { + this[this.tableProject.ProjectIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ContactID { + get { + return ((int)(this[this.tableProject.ContactIDColumn])); + } + set { + this[this.tableProject.ContactIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string ProjectRef { + get { + try { + return ((string)(this[this.tableProject.ProjectRefColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ProjectRef\' in table \'Project\' is DBNull.", e); + } + } + set { + this[this.tableProject.ProjectRefColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string ProjectTitle { + get { + return ((string)(this[this.tableProject.ProjectTitleColumn])); + } + set { + this[this.tableProject.ProjectTitleColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime DateStart { + get { + try { + return ((global::System.DateTime)(this[this.tableProject.DateStartColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'DateStart\' in table \'Project\' is DBNull.", e); + } + } + set { + this[this.tableProject.DateStartColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime DateEnd { + get { + try { + return ((global::System.DateTime)(this[this.tableProject.DateEndColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'DateEnd\' in table \'Project\' is DBNull.", e); + } + } + set { + this[this.tableProject.DateEndColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string ClientName { + get { + try { + return ((string)(this[this.tableProject.ClientNameColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ClientName\' in table \'Project\' is DBNull.", e); + } + } + set { + this[this.tableProject.ClientNameColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsArchived { + get { + return ((bool)(this[this.tableProject.IsArchivedColumn])); + } + set { + this[this.tableProject.IsArchivedColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactRow ContactRow { + get { + return ((ContactRow)(this.GetParentRow(this.Table.ParentRelations["FK_Project_Contact"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_Project_Contact"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsProjectRefNull() { + return this.IsNull(this.tableProject.ProjectRefColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetProjectRefNull() { + this[this.tableProject.ProjectRefColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDateStartNull() { + return this.IsNull(this.tableProject.DateStartColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDateStartNull() { + this[this.tableProject.DateStartColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDateEndNull() { + return this.IsNull(this.tableProject.DateEndColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDateEndNull() { + this[this.tableProject.DateEndColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsClientNameNull() { + return this.IsNull(this.tableProject.ClientNameColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetClientNameNull() { + this[this.tableProject.ClientNameColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobRow[] GetProjectJobRows() { + if ((this.Table.ChildRelations["FK_ProjectJob_Project"] == null)) { + return new ProjectJobRow[0]; + } + else { + return ((ProjectJobRow[])(base.GetChildRows(this.Table.ChildRelations["FK_ProjectJob_Project"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class ProjectJobRow : global::System.Data.DataRow { + + private ProjectJobDataTable tableProjectJob; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal ProjectJobRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableProjectJob = ((ProjectJobDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ProjectJobID { + get { + return ((int)(this[this.tableProjectJob.ProjectJobIDColumn])); + } + set { + this[this.tableProjectJob.ProjectJobIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ProjectID { + get { + return ((int)(this[this.tableProjectJob.ProjectIDColumn])); + } + set { + this[this.tableProjectJob.ProjectIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int ContactID { + get { + return ((int)(this[this.tableProjectJob.ContactIDColumn])); + } + set { + this[this.tableProjectJob.ContactIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string JobNumber { + get { + return ((string)(this[this.tableProjectJob.JobNumberColumn])); + } + set { + this[this.tableProjectJob.JobNumberColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string JobTitle { + get { + try { + return ((string)(this[this.tableProjectJob.JobTitleColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'JobTitle\' in table \'ProjectJob\' is DBNull.", e); + } + } + set { + this[this.tableProjectJob.JobTitleColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string JobDescription { + get { + try { + return ((string)(this[this.tableProjectJob.JobDescriptionColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'JobDescription\' in table \'ProjectJob\' is DBNull.", e); + } + } + set { + this[this.tableProjectJob.JobDescriptionColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime DateStart { + get { + try { + return ((global::System.DateTime)(this[this.tableProjectJob.DateStartColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'DateStart\' in table \'ProjectJob\' is DBNull.", e); + } + } + set { + this[this.tableProjectJob.DateStartColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public System.DateTime DateEnd { + get { + try { + return ((global::System.DateTime)(this[this.tableProjectJob.DateEndColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'DateEnd\' in table \'ProjectJob\' is DBNull.", e); + } + } + set { + this[this.tableProjectJob.DateEndColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public decimal ShareBob { + get { + try { + return ((decimal)(this[this.tableProjectJob.ShareBobColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ShareBob\' in table \'ProjectJob\' is DBNull.", e); + } + } + set { + this[this.tableProjectJob.ShareBobColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public decimal ShareJohn { + get { + try { + return ((decimal)(this[this.tableProjectJob.ShareJohnColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ShareJohn\' in table \'ProjectJob\' is DBNull.", e); + } + } + set { + this[this.tableProjectJob.ShareJohnColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsArchived { + get { + return ((bool)(this[this.tableProjectJob.IsArchivedColumn])); + } + set { + this[this.tableProjectJob.IsArchivedColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactRow ContactRow { + get { + return ((ContactRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProjectJob_Contact"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_ProjectJob_Contact"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectRow ProjectRow { + get { + return ((ProjectRow)(this.GetParentRow(this.Table.ParentRelations["FK_ProjectJob_Project"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_ProjectJob_Project"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsJobTitleNull() { + return this.IsNull(this.tableProjectJob.JobTitleColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetJobTitleNull() { + this[this.tableProjectJob.JobTitleColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsJobDescriptionNull() { + return this.IsNull(this.tableProjectJob.JobDescriptionColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetJobDescriptionNull() { + this[this.tableProjectJob.JobDescriptionColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDateStartNull() { + return this.IsNull(this.tableProjectJob.DateStartColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDateStartNull() { + this[this.tableProjectJob.DateStartColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsDateEndNull() { + return this.IsNull(this.tableProjectJob.DateEndColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetDateEndNull() { + this[this.tableProjectJob.DateEndColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsShareBobNull() { + return this.IsNull(this.tableProjectJob.ShareBobColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetShareBobNull() { + this[this.tableProjectJob.ShareBobColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool IsShareJohnNull() { + return this.IsNull(this.tableProjectJob.ShareJohnColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public void SetShareJohnNull() { + this[this.tableProjectJob.ShareJohnColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class ClientPurchaseOrderRowChangeEvent : global::System.EventArgs { + + private ClientPurchaseOrderRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderRowChangeEvent(ClientPurchaseOrderRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class ClientPurchaseOrderLineRowChangeEvent : global::System.EventArgs { + + private ClientPurchaseOrderLineRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineRowChangeEvent(ClientPurchaseOrderLineRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class ClientPurchaseOrderLineSalesInvoiceRowChangeEvent : global::System.EventArgs { + + private ClientPurchaseOrderLineSalesInvoiceRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineSalesInvoiceRowChangeEvent(ClientPurchaseOrderLineSalesInvoiceRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineSalesInvoiceRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class ContactRowChangeEvent : global::System.EventArgs { + + private ContactRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactRowChangeEvent(ContactRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class ProjectRowChangeEvent : global::System.EventArgs { + + private ProjectRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectRowChangeEvent(ProjectRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public class ProjectJobRowChangeEvent : global::System.EventArgs { + + private ProjectJobRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobRowChangeEvent(ProjectJobRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + } +} +namespace BealeEngineering.Accounts.BealeEngDataSetTableAdapters { + + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class ClientPurchaseOrderTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "ClientPurchaseOrder"; + tableMapping.ColumnMappings.Add("ClientPurchaseOrderID", "ClientPurchaseOrderID"); + tableMapping.ColumnMappings.Add("PurchaseOrderDate", "PurchaseOrderDate"); + tableMapping.ColumnMappings.Add("ContactID", "ContactID"); + tableMapping.ColumnMappings.Add("ClientReference", "ClientReference"); + tableMapping.ColumnMappings.Add("RequestorEmail", "RequestorEmail"); + tableMapping.ColumnMappings.Add("OrderTotal", "OrderTotal"); + tableMapping.ColumnMappings.Add("IsClosed", "IsClosed"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[ClientPurchaseOrder] WHERE (([ClientPurchaseOrderID] = @Original_ClientPurchaseOrderID) AND ([PurchaseOrderDate] = @Original_PurchaseOrderDate) AND ([ContactID] = @Original_ContactID) AND ([ClientReference] = @Original_ClientReference) AND ((@IsNull_RequestorEmail = 1 AND [RequestorEmail] IS NULL) OR ([RequestorEmail] = @Original_RequestorEmail)) AND ((@IsNull_OrderTotal = 1 AND [OrderTotal] IS NULL) OR ([OrderTotal] = @Original_OrderTotal)) AND ([IsClosed] = @Original_IsClosed))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientPurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientReference", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientReference", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_RequestorEmail", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RequestorEmail", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RequestorEmail", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RequestorEmail", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_OrderTotal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderTotal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderTotal", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "OrderTotal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsClosed", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsClosed", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[ClientPurchaseOrder] ([PurchaseOrderDate], [ContactID], [ClientReference], [RequestorEmail], [OrderTotal], [IsClosed]) VALUES (@PurchaseOrderDate, @ContactID, @ClientReference, @RequestorEmail, @OrderTotal, @IsClosed); +SELECT ClientPurchaseOrderID, PurchaseOrderDate, ContactID, ClientReference, RequestorEmail, OrderTotal, IsClosed FROM ClientPurchaseOrder WHERE (ClientPurchaseOrderID = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PurchaseOrderDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientReference", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientReference", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RequestorEmail", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RequestorEmail", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderTotal", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "OrderTotal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsClosed", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsClosed", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[ClientPurchaseOrder] SET [PurchaseOrderDate] = @PurchaseOrderDate, [ContactID] = @ContactID, [ClientReference] = @ClientReference, [RequestorEmail] = @RequestorEmail, [OrderTotal] = @OrderTotal, [IsClosed] = @IsClosed WHERE (([ClientPurchaseOrderID] = @Original_ClientPurchaseOrderID) AND ([PurchaseOrderDate] = @Original_PurchaseOrderDate) AND ([ContactID] = @Original_ContactID) AND ([ClientReference] = @Original_ClientReference) AND ((@IsNull_RequestorEmail = 1 AND [RequestorEmail] IS NULL) OR ([RequestorEmail] = @Original_RequestorEmail)) AND ((@IsNull_OrderTotal = 1 AND [OrderTotal] IS NULL) OR ([OrderTotal] = @Original_OrderTotal)) AND ([IsClosed] = @Original_IsClosed)); +SELECT ClientPurchaseOrderID, PurchaseOrderDate, ContactID, ClientReference, RequestorEmail, OrderTotal, IsClosed FROM ClientPurchaseOrder WHERE (ClientPurchaseOrderID = @ClientPurchaseOrderID)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PurchaseOrderDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientReference", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientReference", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RequestorEmail", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RequestorEmail", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@OrderTotal", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "OrderTotal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsClosed", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsClosed", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientPurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PurchaseOrderDate", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PurchaseOrderDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientReference", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientReference", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_RequestorEmail", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RequestorEmail", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RequestorEmail", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RequestorEmail", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_OrderTotal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "OrderTotal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_OrderTotal", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "OrderTotal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsClosed", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsClosed", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientPurchaseOrderID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::BealeEngineering.Accounts.Properties.Settings.Default.BealeEngConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT ClientPurchaseOrderID, PurchaseOrderDate, ContactID, ClientReference, Requ" + + "estorEmail, OrderTotal, IsClosed FROM dbo.ClientPurchaseOrder"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(BealeEngDataSet.ClientPurchaseOrderDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual BealeEngDataSet.ClientPurchaseOrderDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + BealeEngDataSet.ClientPurchaseOrderDataTable dataTable = new BealeEngDataSet.ClientPurchaseOrderDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet.ClientPurchaseOrderDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet dataSet) { + return this.Adapter.Update(dataSet, "ClientPurchaseOrder"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_ClientPurchaseOrderID, System.DateTime Original_PurchaseOrderDate, int Original_ContactID, string Original_ClientReference, string Original_RequestorEmail, global::System.Nullable Original_OrderTotal, bool Original_IsClosed) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ClientPurchaseOrderID)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_PurchaseOrderDate)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ContactID)); + if ((Original_ClientReference == null)) { + throw new global::System.ArgumentNullException("Original_ClientReference"); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_ClientReference)); + } + if ((Original_RequestorEmail == null)) { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_RequestorEmail)); + } + if ((Original_OrderTotal.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[7].Value = ((decimal)(Original_OrderTotal.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value; + } + this.Adapter.DeleteCommand.Parameters[8].Value = ((bool)(Original_IsClosed)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(System.DateTime PurchaseOrderDate, int ContactID, string ClientReference, string RequestorEmail, global::System.Nullable OrderTotal, bool IsClosed) { + this.Adapter.InsertCommand.Parameters[0].Value = ((System.DateTime)(PurchaseOrderDate)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ContactID)); + if ((ClientReference == null)) { + throw new global::System.ArgumentNullException("ClientReference"); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ClientReference)); + } + if ((RequestorEmail == null)) { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(RequestorEmail)); + } + if ((OrderTotal.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(OrderTotal.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + this.Adapter.InsertCommand.Parameters[5].Value = ((bool)(IsClosed)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(System.DateTime PurchaseOrderDate, int ContactID, string ClientReference, string RequestorEmail, global::System.Nullable OrderTotal, bool IsClosed, int Original_ClientPurchaseOrderID, System.DateTime Original_PurchaseOrderDate, int Original_ContactID, string Original_ClientReference, string Original_RequestorEmail, global::System.Nullable Original_OrderTotal, bool Original_IsClosed, int ClientPurchaseOrderID) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((System.DateTime)(PurchaseOrderDate)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ContactID)); + if ((ClientReference == null)) { + throw new global::System.ArgumentNullException("ClientReference"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ClientReference)); + } + if ((RequestorEmail == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(RequestorEmail)); + } + if ((OrderTotal.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(OrderTotal.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[5].Value = ((bool)(IsClosed)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_ClientPurchaseOrderID)); + this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_PurchaseOrderDate)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ContactID)); + if ((Original_ClientReference == null)) { + throw new global::System.ArgumentNullException("Original_ClientReference"); + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_ClientReference)); + } + if ((Original_RequestorEmail == null)) { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_RequestorEmail)); + } + if ((Original_OrderTotal.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((decimal)(Original_OrderTotal.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[14].Value = ((bool)(Original_IsClosed)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(ClientPurchaseOrderID)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(System.DateTime PurchaseOrderDate, int ContactID, string ClientReference, string RequestorEmail, global::System.Nullable OrderTotal, bool IsClosed, int Original_ClientPurchaseOrderID, System.DateTime Original_PurchaseOrderDate, int Original_ContactID, string Original_ClientReference, string Original_RequestorEmail, global::System.Nullable Original_OrderTotal, bool Original_IsClosed) { + return this.Update(PurchaseOrderDate, ContactID, ClientReference, RequestorEmail, OrderTotal, IsClosed, Original_ClientPurchaseOrderID, Original_PurchaseOrderDate, Original_ContactID, Original_ClientReference, Original_RequestorEmail, Original_OrderTotal, Original_IsClosed, Original_ClientPurchaseOrderID); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class ClientPurchaseOrderLineTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "ClientPurchaseOrderLine"; + tableMapping.ColumnMappings.Add("ClientPurchaseOrderLineID", "ClientPurchaseOrderLineID"); + tableMapping.ColumnMappings.Add("ClientPurchaseOrderID", "ClientPurchaseOrderID"); + tableMapping.ColumnMappings.Add("LineNumber", "LineNumber"); + tableMapping.ColumnMappings.Add("ProjectJobID", "ProjectJobID"); + tableMapping.ColumnMappings.Add("Description", "Description"); + tableMapping.ColumnMappings.Add("LineNetAmount", "LineNetAmount"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[ClientPurchaseOrderLine] WHERE (([ClientPurchaseOrderLineID] = @Original_ClientPurchaseOrderLineID) AND ([ClientPurchaseOrderID] = @Original_ClientPurchaseOrderID) AND ([LineNumber] = @Original_LineNumber) AND ([ProjectJobID] = @Original_ProjectJobID) AND ((@IsNull_Description = 1 AND [Description] IS NULL) OR ([Description] = @Original_Description)) AND ([LineNetAmount] = @Original_LineNetAmount))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientPurchaseOrderLineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderLineID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientPurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LineNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LineNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectJobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectJobID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Description", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Description", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LineNetAmount", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "LineNetAmount", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[ClientPurchaseOrderLine] ([ClientPurchaseOrderID], [LineNumber], [ProjectJobID], [Description], [LineNetAmount]) VALUES (@ClientPurchaseOrderID, @LineNumber, @ProjectJobID, @Description, @LineNetAmount); +SELECT ClientPurchaseOrderLineID, ClientPurchaseOrderID, LineNumber, ProjectJobID, Description, LineNetAmount FROM ClientPurchaseOrderLine WHERE (ClientPurchaseOrderLineID = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientPurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LineNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LineNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectJobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectJobID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LineNetAmount", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "LineNetAmount", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[ClientPurchaseOrderLine] SET [ClientPurchaseOrderID] = @ClientPurchaseOrderID, [LineNumber] = @LineNumber, [ProjectJobID] = @ProjectJobID, [Description] = @Description, [LineNetAmount] = @LineNetAmount WHERE (([ClientPurchaseOrderLineID] = @Original_ClientPurchaseOrderLineID) AND ([ClientPurchaseOrderID] = @Original_ClientPurchaseOrderID) AND ([LineNumber] = @Original_LineNumber) AND ([ProjectJobID] = @Original_ProjectJobID) AND ((@IsNull_Description = 1 AND [Description] IS NULL) OR ([Description] = @Original_Description)) AND ([LineNetAmount] = @Original_LineNetAmount)); +SELECT ClientPurchaseOrderLineID, ClientPurchaseOrderID, LineNumber, ProjectJobID, Description, LineNetAmount FROM ClientPurchaseOrderLine WHERE (ClientPurchaseOrderLineID = @ClientPurchaseOrderLineID)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientPurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LineNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LineNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectJobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectJobID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@LineNetAmount", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "LineNetAmount", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientPurchaseOrderLineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderLineID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientPurchaseOrderID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LineNumber", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "LineNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectJobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectJobID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Description", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Description", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_LineNetAmount", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 2, "LineNetAmount", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientPurchaseOrderLineID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderLineID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::BealeEngineering.Accounts.Properties.Settings.Default.BealeEngConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT ClientPurchaseOrderLineID, ClientPurchaseOrderID, LineNumber, ProjectJobID" + + ", Description, LineNetAmount FROM dbo.ClientPurchaseOrderLine"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(BealeEngDataSet.ClientPurchaseOrderLineDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual BealeEngDataSet.ClientPurchaseOrderLineDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + BealeEngDataSet.ClientPurchaseOrderLineDataTable dataTable = new BealeEngDataSet.ClientPurchaseOrderLineDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet.ClientPurchaseOrderLineDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet dataSet) { + return this.Adapter.Update(dataSet, "ClientPurchaseOrderLine"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_ClientPurchaseOrderLineID, int Original_ClientPurchaseOrderID, int Original_LineNumber, int Original_ProjectJobID, string Original_Description, decimal Original_LineNetAmount) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ClientPurchaseOrderLineID)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ClientPurchaseOrderID)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_LineNumber)); + this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_ProjectJobID)); + if ((Original_Description == null)) { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_Description)); + } + this.Adapter.DeleteCommand.Parameters[6].Value = ((decimal)(Original_LineNetAmount)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int ClientPurchaseOrderID, int LineNumber, int ProjectJobID, string Description, decimal LineNetAmount) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ClientPurchaseOrderID)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(LineNumber)); + this.Adapter.InsertCommand.Parameters[2].Value = ((int)(ProjectJobID)); + if ((Description == null)) { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Description)); + } + this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(LineNetAmount)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int ClientPurchaseOrderID, int LineNumber, int ProjectJobID, string Description, decimal LineNetAmount, int Original_ClientPurchaseOrderLineID, int Original_ClientPurchaseOrderID, int Original_LineNumber, int Original_ProjectJobID, string Original_Description, decimal Original_LineNetAmount, int ClientPurchaseOrderLineID) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ClientPurchaseOrderID)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(LineNumber)); + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(ProjectJobID)); + if ((Description == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Description)); + } + this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(LineNetAmount)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ClientPurchaseOrderLineID)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_ClientPurchaseOrderID)); + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_LineNumber)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ProjectJobID)); + if ((Original_Description == null)) { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Description)); + } + this.Adapter.UpdateCommand.Parameters[11].Value = ((decimal)(Original_LineNetAmount)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(ClientPurchaseOrderLineID)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int ClientPurchaseOrderID, int LineNumber, int ProjectJobID, string Description, decimal LineNetAmount, int Original_ClientPurchaseOrderLineID, int Original_ClientPurchaseOrderID, int Original_LineNumber, int Original_ProjectJobID, string Original_Description, decimal Original_LineNetAmount) { + return this.Update(ClientPurchaseOrderID, LineNumber, ProjectJobID, Description, LineNetAmount, Original_ClientPurchaseOrderLineID, Original_ClientPurchaseOrderID, Original_LineNumber, Original_ProjectJobID, Original_Description, Original_LineNetAmount, Original_ClientPurchaseOrderLineID); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class ClientPurchaseOrderLineSalesInvoiceTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ClientPurchaseOrderLineSalesInvoiceTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "ClientPurchaseOrderLineSalesInvoice"; + tableMapping.ColumnMappings.Add("ClientPurchaseOrderLineID", "ClientPurchaseOrderLineID"); + tableMapping.ColumnMappings.Add("SaleInvoiceID", "SaleInvoiceID"); + tableMapping.ColumnMappings.Add("IsApproved", "IsApproved"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[ClientPurchaseOrderLineSalesInvoice] WHERE (([ClientPurchaseOr" + + "derLineID] = @Original_ClientPurchaseOrderLineID) AND ([SaleInvoiceID] = @Origin" + + "al_SaleInvoiceID) AND ([IsApproved] = @Original_IsApproved))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientPurchaseOrderLineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderLineID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SaleInvoiceID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleInvoiceID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsApproved", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsApproved", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[ClientPurchaseOrderLineSalesInvoice] ([ClientPurchaseOrderLineID], [SaleInvoiceID], [IsApproved]) VALUES (@ClientPurchaseOrderLineID, @SaleInvoiceID, @IsApproved); +SELECT ClientPurchaseOrderLineID, SaleInvoiceID, IsApproved FROM ClientPurchaseOrderLineSalesInvoice WHERE (SaleInvoiceID = @SaleInvoiceID)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientPurchaseOrderLineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderLineID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SaleInvoiceID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleInvoiceID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsApproved", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsApproved", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[ClientPurchaseOrderLineSalesInvoice] SET [ClientPurchaseOrderLineID] = @ClientPurchaseOrderLineID, [SaleInvoiceID] = @SaleInvoiceID, [IsApproved] = @IsApproved WHERE (([ClientPurchaseOrderLineID] = @Original_ClientPurchaseOrderLineID) AND ([SaleInvoiceID] = @Original_SaleInvoiceID) AND ([IsApproved] = @Original_IsApproved)); +SELECT ClientPurchaseOrderLineID, SaleInvoiceID, IsApproved FROM ClientPurchaseOrderLineSalesInvoice WHERE (SaleInvoiceID = @SaleInvoiceID)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientPurchaseOrderLineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderLineID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SaleInvoiceID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleInvoiceID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsApproved", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsApproved", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientPurchaseOrderLineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientPurchaseOrderLineID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SaleInvoiceID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SaleInvoiceID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsApproved", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsApproved", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::BealeEngineering.Accounts.Properties.Settings.Default.BealeEngConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT ClientPurchaseOrderLineID, SaleInvoiceID, IsApproved FROM dbo.ClientPurcha" + + "seOrderLineSalesInvoice"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(BealeEngDataSet.ClientPurchaseOrderLineSalesInvoiceDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual BealeEngDataSet.ClientPurchaseOrderLineSalesInvoiceDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + BealeEngDataSet.ClientPurchaseOrderLineSalesInvoiceDataTable dataTable = new BealeEngDataSet.ClientPurchaseOrderLineSalesInvoiceDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet.ClientPurchaseOrderLineSalesInvoiceDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet dataSet) { + return this.Adapter.Update(dataSet, "ClientPurchaseOrderLineSalesInvoice"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_ClientPurchaseOrderLineID, int Original_SaleInvoiceID, bool Original_IsApproved) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ClientPurchaseOrderLineID)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_SaleInvoiceID)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((bool)(Original_IsApproved)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int ClientPurchaseOrderLineID, int SaleInvoiceID, bool IsApproved) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ClientPurchaseOrderLineID)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(SaleInvoiceID)); + this.Adapter.InsertCommand.Parameters[2].Value = ((bool)(IsApproved)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int ClientPurchaseOrderLineID, int SaleInvoiceID, bool IsApproved, int Original_ClientPurchaseOrderLineID, int Original_SaleInvoiceID, bool Original_IsApproved) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ClientPurchaseOrderLineID)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(SaleInvoiceID)); + this.Adapter.UpdateCommand.Parameters[2].Value = ((bool)(IsApproved)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ClientPurchaseOrderLineID)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_SaleInvoiceID)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((bool)(Original_IsApproved)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int ClientPurchaseOrderLineID, bool IsApproved, int Original_ClientPurchaseOrderLineID, int Original_SaleInvoiceID, bool Original_IsApproved) { + return this.Update(ClientPurchaseOrderLineID, Original_SaleInvoiceID, IsApproved, Original_ClientPurchaseOrderLineID, Original_SaleInvoiceID, Original_IsApproved); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class ContactTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ContactTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "Contact"; + tableMapping.ColumnMappings.Add("ContactID", "ContactID"); + tableMapping.ColumnMappings.Add("ContactName", "ContactName"); + tableMapping.ColumnMappings.Add("EmailAddress", "EmailAddress"); + tableMapping.ColumnMappings.Add("PrimaryPersonFirstName", "PrimaryPersonFirstName"); + tableMapping.ColumnMappings.Add("PrimaryPersonSurname", "PrimaryPersonSurname"); + tableMapping.ColumnMappings.Add("PrimaryPersonEmail", "PrimaryPersonEmail"); + tableMapping.ColumnMappings.Add("POAddressLine1", "POAddressLine1"); + tableMapping.ColumnMappings.Add("POAddressLine2", "POAddressLine2"); + tableMapping.ColumnMappings.Add("POAddressLine3", "POAddressLine3"); + tableMapping.ColumnMappings.Add("POAddressLine4", "POAddressLine4"); + tableMapping.ColumnMappings.Add("POAddressCity", "POAddressCity"); + tableMapping.ColumnMappings.Add("POAddressRegion", "POAddressRegion"); + tableMapping.ColumnMappings.Add("POAddressPostalCode", "POAddressPostalCode"); + tableMapping.ColumnMappings.Add("POAddressCountry", "POAddressCountry"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Contact] WHERE (([ContactID] = @Original_ContactID) AND ([Cont" + + "actName] = @Original_ContactName) AND ((@IsNull_EmailAddress = 1 AND [EmailAddre" + + "ss] IS NULL) OR ([EmailAddress] = @Original_EmailAddress)) AND ((@IsNull_Primary" + + "PersonFirstName = 1 AND [PrimaryPersonFirstName] IS NULL) OR ([PrimaryPersonFirs" + + "tName] = @Original_PrimaryPersonFirstName)) AND ((@IsNull_PrimaryPersonSurname =" + + " 1 AND [PrimaryPersonSurname] IS NULL) OR ([PrimaryPersonSurname] = @Original_Pr" + + "imaryPersonSurname)) AND ((@IsNull_PrimaryPersonEmail = 1 AND [PrimaryPersonEmai" + + "l] IS NULL) OR ([PrimaryPersonEmail] = @Original_PrimaryPersonEmail)) AND ((@IsN" + + "ull_POAddressLine1 = 1 AND [POAddressLine1] IS NULL) OR ([POAddressLine1] = @Ori" + + "ginal_POAddressLine1)) AND ((@IsNull_POAddressLine2 = 1 AND [POAddressLine2] IS " + + "NULL) OR ([POAddressLine2] = @Original_POAddressLine2)) AND ((@IsNull_POAddressL" + + "ine3 = 1 AND [POAddressLine3] IS NULL) OR ([POAddressLine3] = @Original_POAddres" + + "sLine3)) AND ((@IsNull_POAddressLine4 = 1 AND [POAddressLine4] IS NULL) OR ([POA" + + "ddressLine4] = @Original_POAddressLine4)) AND ((@IsNull_POAddressCity = 1 AND [P" + + "OAddressCity] IS NULL) OR ([POAddressCity] = @Original_POAddressCity)) AND ((@Is" + + "Null_POAddressRegion = 1 AND [POAddressRegion] IS NULL) OR ([POAddressRegion] = " + + "@Original_POAddressRegion)) AND ((@IsNull_POAddressPostalCode = 1 AND [POAddress" + + "PostalCode] IS NULL) OR ([POAddressPostalCode] = @Original_POAddressPostalCode))" + + " AND ((@IsNull_POAddressCountry = 1 AND [POAddressCountry] IS NULL) OR ([POAddre" + + "ssCountry] = @Original_POAddressCountry)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_EmailAddress", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EmailAddress", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrimaryPersonFirstName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonFirstName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrimaryPersonFirstName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonFirstName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrimaryPersonSurname", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonSurname", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrimaryPersonSurname", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonSurname", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrimaryPersonEmail", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonEmail", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrimaryPersonEmail", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonEmail", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressLine1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine1", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressLine1", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine1", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressLine2", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine2", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressLine2", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine2", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressLine3", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine3", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressLine3", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine3", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressLine4", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine4", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressLine4", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine4", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressCity", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCity", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressCity", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCity", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressRegion", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressRegion", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressRegion", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressRegion", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressPostalCode", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressPostalCode", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressPostalCode", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressPostalCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressCountry", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCountry", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressCountry", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCountry", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Contact] ([ContactName], [EmailAddress], [PrimaryPersonFirstName], [PrimaryPersonSurname], [PrimaryPersonEmail], [POAddressLine1], [POAddressLine2], [POAddressLine3], [POAddressLine4], [POAddressCity], [POAddressRegion], [POAddressPostalCode], [POAddressCountry]) VALUES (@ContactName, @EmailAddress, @PrimaryPersonFirstName, @PrimaryPersonSurname, @PrimaryPersonEmail, @POAddressLine1, @POAddressLine2, @POAddressLine3, @POAddressLine4, @POAddressCity, @POAddressRegion, @POAddressPostalCode, @POAddressCountry); +SELECT ContactID, ContactName, EmailAddress, PrimaryPersonFirstName, PrimaryPersonSurname, PrimaryPersonEmail, POAddressLine1, POAddressLine2, POAddressLine3, POAddressLine4, POAddressCity, POAddressRegion, POAddressPostalCode, POAddressCountry FROM Contact WHERE (ContactID = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContactName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EmailAddress", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrimaryPersonFirstName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonFirstName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrimaryPersonSurname", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonSurname", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrimaryPersonEmail", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonEmail", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressLine1", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine1", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressLine2", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine2", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressLine3", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine3", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressLine4", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine4", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressCity", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCity", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressRegion", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressRegion", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressPostalCode", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressPostalCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressCountry", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCountry", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Contact] SET [ContactName] = @ContactName, [EmailAddress] = @EmailA" + + "ddress, [PrimaryPersonFirstName] = @PrimaryPersonFirstName, [PrimaryPersonSurnam" + + "e] = @PrimaryPersonSurname, [PrimaryPersonEmail] = @PrimaryPersonEmail, [POAddre" + + "ssLine1] = @POAddressLine1, [POAddressLine2] = @POAddressLine2, [POAddressLine3]" + + " = @POAddressLine3, [POAddressLine4] = @POAddressLine4, [POAddressCity] = @POAdd" + + "ressCity, [POAddressRegion] = @POAddressRegion, [POAddressPostalCode] = @POAddre" + + "ssPostalCode, [POAddressCountry] = @POAddressCountry WHERE (([ContactID] = @Orig" + + "inal_ContactID) AND ([ContactName] = @Original_ContactName) AND ((@IsNull_EmailA" + + "ddress = 1 AND [EmailAddress] IS NULL) OR ([EmailAddress] = @Original_EmailAddre" + + "ss)) AND ((@IsNull_PrimaryPersonFirstName = 1 AND [PrimaryPersonFirstName] IS NU" + + "LL) OR ([PrimaryPersonFirstName] = @Original_PrimaryPersonFirstName)) AND ((@IsN" + + "ull_PrimaryPersonSurname = 1 AND [PrimaryPersonSurname] IS NULL) OR ([PrimaryPer" + + "sonSurname] = @Original_PrimaryPersonSurname)) AND ((@IsNull_PrimaryPersonEmail " + + "= 1 AND [PrimaryPersonEmail] IS NULL) OR ([PrimaryPersonEmail] = @Original_Prima" + + "ryPersonEmail)) AND ((@IsNull_POAddressLine1 = 1 AND [POAddressLine1] IS NULL) O" + + "R ([POAddressLine1] = @Original_POAddressLine1)) AND ((@IsNull_POAddressLine2 = " + + "1 AND [POAddressLine2] IS NULL) OR ([POAddressLine2] = @Original_POAddressLine2)" + + ") AND ((@IsNull_POAddressLine3 = 1 AND [POAddressLine3] IS NULL) OR ([POAddressL" + + "ine3] = @Original_POAddressLine3)) AND ((@IsNull_POAddressLine4 = 1 AND [POAddre" + + "ssLine4] IS NULL) OR ([POAddressLine4] = @Original_POAddressLine4)) AND ((@IsNul" + + "l_POAddressCity = 1 AND [POAddressCity] IS NULL) OR ([POAddressCity] = @Original" + + "_POAddressCity)) AND ((@IsNull_POAddressRegion = 1 AND [POAddressRegion] IS NULL" + + ") OR ([POAddressRegion] = @Original_POAddressRegion)) AND ((@IsNull_POAddressPos" + + "talCode = 1 AND [POAddressPostalCode] IS NULL) OR ([POAddressPostalCode] = @Orig" + + "inal_POAddressPostalCode)) AND ((@IsNull_POAddressCountry = 1 AND [POAddressCoun" + + "try] IS NULL) OR ([POAddressCountry] = @Original_POAddressCountry)));\r\nSELECT Co" + + "ntactID, ContactName, EmailAddress, PrimaryPersonFirstName, PrimaryPersonSurname" + + ", PrimaryPersonEmail, POAddressLine1, POAddressLine2, POAddressLine3, POAddressL" + + "ine4, POAddressCity, POAddressRegion, POAddressPostalCode, POAddressCountry FROM" + + " Contact WHERE (ContactID = @ContactID)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContactName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@EmailAddress", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrimaryPersonFirstName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonFirstName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrimaryPersonSurname", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonSurname", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrimaryPersonEmail", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonEmail", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressLine1", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine1", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressLine2", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine2", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressLine3", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine3", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressLine4", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine4", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressCity", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCity", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressRegion", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressRegion", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressPostalCode", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressPostalCode", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@POAddressCountry", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCountry", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_EmailAddress", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_EmailAddress", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "EmailAddress", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrimaryPersonFirstName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonFirstName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrimaryPersonFirstName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonFirstName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrimaryPersonSurname", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonSurname", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrimaryPersonSurname", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonSurname", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrimaryPersonEmail", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonEmail", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrimaryPersonEmail", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrimaryPersonEmail", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressLine1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine1", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressLine1", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine1", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressLine2", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine2", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressLine2", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine2", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressLine3", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine3", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressLine3", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine3", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressLine4", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine4", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressLine4", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressLine4", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressCity", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCity", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressCity", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCity", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressRegion", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressRegion", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressRegion", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressRegion", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressPostalCode", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressPostalCode", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressPostalCode", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressPostalCode", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_POAddressCountry", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCountry", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_POAddressCountry", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "POAddressCountry", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContactID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::BealeEngineering.Accounts.Properties.Settings.Default.BealeEngConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = @"SELECT ContactID, ContactName, EmailAddress, PrimaryPersonFirstName, PrimaryPersonSurname, PrimaryPersonEmail, POAddressLine1, POAddressLine2, POAddressLine3, POAddressLine4, POAddressCity, POAddressRegion, POAddressPostalCode, POAddressCountry FROM dbo.Contact"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(BealeEngDataSet.ContactDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual BealeEngDataSet.ContactDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + BealeEngDataSet.ContactDataTable dataTable = new BealeEngDataSet.ContactDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet.ContactDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet dataSet) { + return this.Adapter.Update(dataSet, "Contact"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_ContactID, string Original_ContactName, string Original_EmailAddress, string Original_PrimaryPersonFirstName, string Original_PrimaryPersonSurname, string Original_PrimaryPersonEmail, string Original_POAddressLine1, string Original_POAddressLine2, string Original_POAddressLine3, string Original_POAddressLine4, string Original_POAddressCity, string Original_POAddressRegion, string Original_POAddressPostalCode, string Original_POAddressCountry) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ContactID)); + if ((Original_ContactName == null)) { + throw new global::System.ArgumentNullException("Original_ContactName"); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_ContactName)); + } + if ((Original_EmailAddress == null)) { + this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_EmailAddress)); + } + if ((Original_PrimaryPersonFirstName == null)) { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_PrimaryPersonFirstName)); + } + if ((Original_PrimaryPersonSurname == null)) { + this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_PrimaryPersonSurname)); + } + if ((Original_PrimaryPersonEmail == null)) { + this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[9].Value = ((string)(Original_PrimaryPersonEmail)); + } + if ((Original_POAddressLine1 == null)) { + this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[11].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[11].Value = ((string)(Original_POAddressLine1)); + } + if ((Original_POAddressLine2 == null)) { + this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[13].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[13].Value = ((string)(Original_POAddressLine2)); + } + if ((Original_POAddressLine3 == null)) { + this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[15].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[15].Value = ((string)(Original_POAddressLine3)); + } + if ((Original_POAddressLine4 == null)) { + this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[17].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[17].Value = ((string)(Original_POAddressLine4)); + } + if ((Original_POAddressCity == null)) { + this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[19].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[19].Value = ((string)(Original_POAddressCity)); + } + if ((Original_POAddressRegion == null)) { + this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[21].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[21].Value = ((string)(Original_POAddressRegion)); + } + if ((Original_POAddressPostalCode == null)) { + this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[23].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[23].Value = ((string)(Original_POAddressPostalCode)); + } + if ((Original_POAddressCountry == null)) { + this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[25].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[25].Value = ((string)(Original_POAddressCountry)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(string ContactName, string EmailAddress, string PrimaryPersonFirstName, string PrimaryPersonSurname, string PrimaryPersonEmail, string POAddressLine1, string POAddressLine2, string POAddressLine3, string POAddressLine4, string POAddressCity, string POAddressRegion, string POAddressPostalCode, string POAddressCountry) { + if ((ContactName == null)) { + throw new global::System.ArgumentNullException("ContactName"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(ContactName)); + } + if ((EmailAddress == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(EmailAddress)); + } + if ((PrimaryPersonFirstName == null)) { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(PrimaryPersonFirstName)); + } + if ((PrimaryPersonSurname == null)) { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(PrimaryPersonSurname)); + } + if ((PrimaryPersonEmail == null)) { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = ((string)(PrimaryPersonEmail)); + } + if ((POAddressLine1 == null)) { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = ((string)(POAddressLine1)); + } + if ((POAddressLine2 == null)) { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(POAddressLine2)); + } + if ((POAddressLine3 == null)) { + this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[7].Value = ((string)(POAddressLine3)); + } + if ((POAddressLine4 == null)) { + this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[8].Value = ((string)(POAddressLine4)); + } + if ((POAddressCity == null)) { + this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[9].Value = ((string)(POAddressCity)); + } + if ((POAddressRegion == null)) { + this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[10].Value = ((string)(POAddressRegion)); + } + if ((POAddressPostalCode == null)) { + this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[11].Value = ((string)(POAddressPostalCode)); + } + if ((POAddressCountry == null)) { + this.Adapter.InsertCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[12].Value = ((string)(POAddressCountry)); + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + string ContactName, + string EmailAddress, + string PrimaryPersonFirstName, + string PrimaryPersonSurname, + string PrimaryPersonEmail, + string POAddressLine1, + string POAddressLine2, + string POAddressLine3, + string POAddressLine4, + string POAddressCity, + string POAddressRegion, + string POAddressPostalCode, + string POAddressCountry, + int Original_ContactID, + string Original_ContactName, + string Original_EmailAddress, + string Original_PrimaryPersonFirstName, + string Original_PrimaryPersonSurname, + string Original_PrimaryPersonEmail, + string Original_POAddressLine1, + string Original_POAddressLine2, + string Original_POAddressLine3, + string Original_POAddressLine4, + string Original_POAddressCity, + string Original_POAddressRegion, + string Original_POAddressPostalCode, + string Original_POAddressCountry, + int ContactID) { + if ((ContactName == null)) { + throw new global::System.ArgumentNullException("ContactName"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(ContactName)); + } + if ((EmailAddress == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(EmailAddress)); + } + if ((PrimaryPersonFirstName == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(PrimaryPersonFirstName)); + } + if ((PrimaryPersonSurname == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(PrimaryPersonSurname)); + } + if ((PrimaryPersonEmail == null)) { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(PrimaryPersonEmail)); + } + if ((POAddressLine1 == null)) { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(POAddressLine1)); + } + if ((POAddressLine2 == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(POAddressLine2)); + } + if ((POAddressLine3 == null)) { + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(POAddressLine3)); + } + if ((POAddressLine4 == null)) { + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(POAddressLine4)); + } + if ((POAddressCity == null)) { + this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(POAddressCity)); + } + if ((POAddressRegion == null)) { + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(POAddressRegion)); + } + if ((POAddressPostalCode == null)) { + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(POAddressPostalCode)); + } + if ((POAddressCountry == null)) { + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(POAddressCountry)); + } + this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Original_ContactID)); + if ((Original_ContactName == null)) { + throw new global::System.ArgumentNullException("Original_ContactName"); + } + else { + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_ContactName)); + } + if ((Original_EmailAddress == null)) { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_EmailAddress)); + } + if ((Original_PrimaryPersonFirstName == null)) { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_PrimaryPersonFirstName)); + } + if ((Original_PrimaryPersonSurname == null)) { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_PrimaryPersonSurname)); + } + if ((Original_PrimaryPersonEmail == null)) { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_PrimaryPersonEmail)); + } + if ((Original_POAddressLine1 == null)) { + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_POAddressLine1)); + } + if ((Original_POAddressLine2 == null)) { + this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[26].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[25].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[26].Value = ((string)(Original_POAddressLine2)); + } + if ((Original_POAddressLine3 == null)) { + this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[28].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[27].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_POAddressLine3)); + } + if ((Original_POAddressLine4 == null)) { + this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[30].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[30].Value = ((string)(Original_POAddressLine4)); + } + if ((Original_POAddressCity == null)) { + this.Adapter.UpdateCommand.Parameters[31].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[32].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[31].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[32].Value = ((string)(Original_POAddressCity)); + } + if ((Original_POAddressRegion == null)) { + this.Adapter.UpdateCommand.Parameters[33].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[34].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[33].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[34].Value = ((string)(Original_POAddressRegion)); + } + if ((Original_POAddressPostalCode == null)) { + this.Adapter.UpdateCommand.Parameters[35].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[36].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[35].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[36].Value = ((string)(Original_POAddressPostalCode)); + } + if ((Original_POAddressCountry == null)) { + this.Adapter.UpdateCommand.Parameters[37].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[38].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[37].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[38].Value = ((string)(Original_POAddressCountry)); + } + this.Adapter.UpdateCommand.Parameters[39].Value = ((int)(ContactID)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + string ContactName, + string EmailAddress, + string PrimaryPersonFirstName, + string PrimaryPersonSurname, + string PrimaryPersonEmail, + string POAddressLine1, + string POAddressLine2, + string POAddressLine3, + string POAddressLine4, + string POAddressCity, + string POAddressRegion, + string POAddressPostalCode, + string POAddressCountry, + int Original_ContactID, + string Original_ContactName, + string Original_EmailAddress, + string Original_PrimaryPersonFirstName, + string Original_PrimaryPersonSurname, + string Original_PrimaryPersonEmail, + string Original_POAddressLine1, + string Original_POAddressLine2, + string Original_POAddressLine3, + string Original_POAddressLine4, + string Original_POAddressCity, + string Original_POAddressRegion, + string Original_POAddressPostalCode, + string Original_POAddressCountry) { + return this.Update(ContactName, EmailAddress, PrimaryPersonFirstName, PrimaryPersonSurname, PrimaryPersonEmail, POAddressLine1, POAddressLine2, POAddressLine3, POAddressLine4, POAddressCity, POAddressRegion, POAddressPostalCode, POAddressCountry, Original_ContactID, Original_ContactName, Original_EmailAddress, Original_PrimaryPersonFirstName, Original_PrimaryPersonSurname, Original_PrimaryPersonEmail, Original_POAddressLine1, Original_POAddressLine2, Original_POAddressLine3, Original_POAddressLine4, Original_POAddressCity, Original_POAddressRegion, Original_POAddressPostalCode, Original_POAddressCountry, Original_ContactID); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class ProjectTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "Project"; + tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); + tableMapping.ColumnMappings.Add("ContactID", "ContactID"); + tableMapping.ColumnMappings.Add("ProjectRef", "ProjectRef"); + tableMapping.ColumnMappings.Add("ProjectTitle", "ProjectTitle"); + tableMapping.ColumnMappings.Add("DateStart", "DateStart"); + tableMapping.ColumnMappings.Add("DateEnd", "DateEnd"); + tableMapping.ColumnMappings.Add("ClientName", "ClientName"); + tableMapping.ColumnMappings.Add("IsArchived", "IsArchived"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Project] WHERE (([ProjectID] = @Original_ProjectID) AND ([ContactID] = @Original_ContactID) AND ((@IsNull_ProjectRef = 1 AND [ProjectRef] IS NULL) OR ([ProjectRef] = @Original_ProjectRef)) AND ([ProjectTitle] = @Original_ProjectTitle) AND ((@IsNull_DateStart = 1 AND [DateStart] IS NULL) OR ([DateStart] = @Original_DateStart)) AND ((@IsNull_DateEnd = 1 AND [DateEnd] IS NULL) OR ([DateEnd] = @Original_DateEnd)) AND ((@IsNull_ClientName = 1 AND [ClientName] IS NULL) OR ([ClientName] = @Original_ClientName)) AND ([IsArchived] = @Original_IsArchived))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProjectRef", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectRef", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectRef", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectRef", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectTitle", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectTitle", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DateStart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DateStart", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DateEnd", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DateEnd", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ClientName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsArchived", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsArchived", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Project] ([ProjectID], [ContactID], [ProjectRef], [ProjectTitle], [DateStart], [DateEnd], [ClientName], [IsArchived]) VALUES (@ProjectID, @ContactID, @ProjectRef, @ProjectTitle, @DateStart, @DateEnd, @ClientName, @IsArchived); +SELECT ProjectID, ContactID, ProjectRef, ProjectTitle, DateStart, DateEnd, ClientName, IsArchived FROM Project WHERE (ProjectID = @ProjectID)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectRef", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectRef", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectTitle", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectTitle", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateStart", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateEnd", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsArchived", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsArchived", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Project] SET [ProjectID] = @ProjectID, [ContactID] = @ContactID, [ProjectRef] = @ProjectRef, [ProjectTitle] = @ProjectTitle, [DateStart] = @DateStart, [DateEnd] = @DateEnd, [ClientName] = @ClientName, [IsArchived] = @IsArchived WHERE (([ProjectID] = @Original_ProjectID) AND ([ContactID] = @Original_ContactID) AND ((@IsNull_ProjectRef = 1 AND [ProjectRef] IS NULL) OR ([ProjectRef] = @Original_ProjectRef)) AND ([ProjectTitle] = @Original_ProjectTitle) AND ((@IsNull_DateStart = 1 AND [DateStart] IS NULL) OR ([DateStart] = @Original_DateStart)) AND ((@IsNull_DateEnd = 1 AND [DateEnd] IS NULL) OR ([DateEnd] = @Original_DateEnd)) AND ((@IsNull_ClientName = 1 AND [ClientName] IS NULL) OR ([ClientName] = @Original_ClientName)) AND ([IsArchived] = @Original_IsArchived)); +SELECT ProjectID, ContactID, ProjectRef, ProjectTitle, DateStart, DateEnd, ClientName, IsArchived FROM Project WHERE (ProjectID = @ProjectID)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectRef", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectRef", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectTitle", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectTitle", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateStart", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateEnd", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ClientName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsArchived", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsArchived", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProjectRef", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectRef", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectRef", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectRef", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectTitle", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectTitle", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DateStart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DateStart", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DateEnd", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DateEnd", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ClientName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ClientName", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ClientName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsArchived", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsArchived", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::BealeEngineering.Accounts.Properties.Settings.Default.BealeEngConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT ProjectID, ContactID, ProjectRef, ProjectTitle, DateStart, DateEnd, Client" + + "Name, IsArchived FROM dbo.Project"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(BealeEngDataSet.ProjectDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual BealeEngDataSet.ProjectDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + BealeEngDataSet.ProjectDataTable dataTable = new BealeEngDataSet.ProjectDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet.ProjectDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet dataSet) { + return this.Adapter.Update(dataSet, "Project"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_ProjectID, int Original_ContactID, string Original_ProjectRef, string Original_ProjectTitle, global::System.Nullable Original_DateStart, global::System.Nullable Original_DateEnd, string Original_ClientName, bool Original_IsArchived) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProjectID)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ContactID)); + if ((Original_ProjectRef == null)) { + this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_ProjectRef)); + } + if ((Original_ProjectTitle == null)) { + throw new global::System.ArgumentNullException("Original_ProjectTitle"); + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_ProjectTitle)); + } + if ((Original_DateStart.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_DateStart.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_DateEnd.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_DateEnd.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + if ((Original_ClientName == null)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_ClientName)); + } + this.Adapter.DeleteCommand.Parameters[11].Value = ((bool)(Original_IsArchived)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int ProjectID, int ContactID, string ProjectRef, string ProjectTitle, global::System.Nullable DateStart, global::System.Nullable DateEnd, string ClientName, bool IsArchived) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProjectID)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ContactID)); + if ((ProjectRef == null)) { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(ProjectRef)); + } + if ((ProjectTitle == null)) { + throw new global::System.ArgumentNullException("ProjectTitle"); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(ProjectTitle)); + } + if ((DateStart.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(DateStart.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((DateEnd.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(DateEnd.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((ClientName == null)) { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(ClientName)); + } + this.Adapter.InsertCommand.Parameters[7].Value = ((bool)(IsArchived)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + int ProjectID, + int ContactID, + string ProjectRef, + string ProjectTitle, + global::System.Nullable DateStart, + global::System.Nullable DateEnd, + string ClientName, + bool IsArchived, + int Original_ProjectID, + int Original_ContactID, + string Original_ProjectRef, + string Original_ProjectTitle, + global::System.Nullable Original_DateStart, + global::System.Nullable Original_DateEnd, + string Original_ClientName, + bool Original_IsArchived) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProjectID)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ContactID)); + if ((ProjectRef == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(ProjectRef)); + } + if ((ProjectTitle == null)) { + throw new global::System.ArgumentNullException("ProjectTitle"); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(ProjectTitle)); + } + if ((DateStart.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(DateStart.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((DateEnd.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(DateEnd.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((ClientName == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(ClientName)); + } + this.Adapter.UpdateCommand.Parameters[7].Value = ((bool)(IsArchived)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_ProjectID)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_ContactID)); + if ((Original_ProjectRef == null)) { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_ProjectRef)); + } + if ((Original_ProjectTitle == null)) { + throw new global::System.ArgumentNullException("Original_ProjectTitle"); + } + else { + this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_ProjectTitle)); + } + if ((Original_DateStart.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((System.DateTime)(Original_DateStart.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + } + if ((Original_DateEnd.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((System.DateTime)(Original_DateEnd.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; + } + if ((Original_ClientName == null)) { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_ClientName)); + } + this.Adapter.UpdateCommand.Parameters[19].Value = ((bool)(Original_IsArchived)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(int ContactID, string ProjectRef, string ProjectTitle, global::System.Nullable DateStart, global::System.Nullable DateEnd, string ClientName, bool IsArchived, int Original_ProjectID, int Original_ContactID, string Original_ProjectRef, string Original_ProjectTitle, global::System.Nullable Original_DateStart, global::System.Nullable Original_DateEnd, string Original_ClientName, bool Original_IsArchived) { + return this.Update(Original_ProjectID, ContactID, ProjectRef, ProjectTitle, DateStart, DateEnd, ClientName, IsArchived, Original_ProjectID, Original_ContactID, Original_ProjectRef, Original_ProjectTitle, Original_DateStart, Original_DateEnd, Original_ClientName, Original_IsArchived); + } + } + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class ProjectJobTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public ProjectJobTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "ProjectJob"; + tableMapping.ColumnMappings.Add("ProjectJobID", "ProjectJobID"); + tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); + tableMapping.ColumnMappings.Add("ContactID", "ContactID"); + tableMapping.ColumnMappings.Add("JobNumber", "JobNumber"); + tableMapping.ColumnMappings.Add("JobTitle", "JobTitle"); + tableMapping.ColumnMappings.Add("JobDescription", "JobDescription"); + tableMapping.ColumnMappings.Add("DateStart", "DateStart"); + tableMapping.ColumnMappings.Add("DateEnd", "DateEnd"); + tableMapping.ColumnMappings.Add("ShareBob", "ShareBob"); + tableMapping.ColumnMappings.Add("ShareJohn", "ShareJohn"); + tableMapping.ColumnMappings.Add("IsArchived", "IsArchived"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[ProjectJob] WHERE (([ProjectJobID] = @Original_ProjectJobID) AND ([ProjectID] = @Original_ProjectID) AND ([ContactID] = @Original_ContactID) AND ([JobNumber] = @Original_JobNumber) AND ((@IsNull_JobTitle = 1 AND [JobTitle] IS NULL) OR ([JobTitle] = @Original_JobTitle)) AND ((@IsNull_JobDescription = 1 AND [JobDescription] IS NULL) OR ([JobDescription] = @Original_JobDescription)) AND ((@IsNull_DateStart = 1 AND [DateStart] IS NULL) OR ([DateStart] = @Original_DateStart)) AND ((@IsNull_DateEnd = 1 AND [DateEnd] IS NULL) OR ([DateEnd] = @Original_DateEnd)) AND ((@IsNull_ShareBob = 1 AND [ShareBob] IS NULL) OR ([ShareBob] = @Original_ShareBob)) AND ((@IsNull_ShareJohn = 1 AND [ShareJohn] IS NULL) OR ([ShareJohn] = @Original_ShareJohn)) AND ([IsArchived] = @Original_IsArchived))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectJobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectJobID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_JobNumber", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_JobTitle", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobTitle", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_JobTitle", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobTitle", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_JobDescription", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobDescription", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_JobDescription", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobDescription", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DateStart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DateStart", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DateEnd", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DateEnd", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ShareBob", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ShareBob", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ShareBob", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 8, "ShareBob", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ShareJohn", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ShareJohn", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ShareJohn", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 8, "ShareJohn", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsArchived", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsArchived", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[ProjectJob] ([ProjectID], [ContactID], [JobNumber], [JobTitle], [JobDescription], [DateStart], [DateEnd], [ShareBob], [ShareJohn], [IsArchived]) VALUES (@ProjectID, @ContactID, @JobNumber, @JobTitle, @JobDescription, @DateStart, @DateEnd, @ShareBob, @ShareJohn, @IsArchived); +SELECT ProjectJobID, ProjectID, ContactID, JobNumber, JobTitle, JobDescription, DateStart, DateEnd, ShareBob, ShareJohn, IsArchived FROM ProjectJob WHERE (ProjectJobID = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobNumber", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobTitle", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobTitle", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobDescription", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobDescription", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateStart", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateEnd", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShareBob", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 8, "ShareBob", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShareJohn", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 8, "ShareJohn", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsArchived", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsArchived", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[ProjectJob] SET [ProjectID] = @ProjectID, [ContactID] = @ContactID, [JobNumber] = @JobNumber, [JobTitle] = @JobTitle, [JobDescription] = @JobDescription, [DateStart] = @DateStart, [DateEnd] = @DateEnd, [ShareBob] = @ShareBob, [ShareJohn] = @ShareJohn, [IsArchived] = @IsArchived WHERE (([ProjectJobID] = @Original_ProjectJobID) AND ([ProjectID] = @Original_ProjectID) AND ([ContactID] = @Original_ContactID) AND ([JobNumber] = @Original_JobNumber) AND ((@IsNull_JobTitle = 1 AND [JobTitle] IS NULL) OR ([JobTitle] = @Original_JobTitle)) AND ((@IsNull_JobDescription = 1 AND [JobDescription] IS NULL) OR ([JobDescription] = @Original_JobDescription)) AND ((@IsNull_DateStart = 1 AND [DateStart] IS NULL) OR ([DateStart] = @Original_DateStart)) AND ((@IsNull_DateEnd = 1 AND [DateEnd] IS NULL) OR ([DateEnd] = @Original_DateEnd)) AND ((@IsNull_ShareBob = 1 AND [ShareBob] IS NULL) OR ([ShareBob] = @Original_ShareBob)) AND ((@IsNull_ShareJohn = 1 AND [ShareJohn] IS NULL) OR ([ShareJohn] = @Original_ShareJohn)) AND ([IsArchived] = @Original_IsArchived)); +SELECT ProjectJobID, ProjectID, ContactID, JobNumber, JobTitle, JobDescription, DateStart, DateEnd, ShareBob, ShareJohn, IsArchived FROM ProjectJob WHERE (ProjectJobID = @ProjectJobID)"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobNumber", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobNumber", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobTitle", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobTitle", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@JobDescription", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobDescription", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateStart", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DateEnd", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShareBob", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 8, "ShareBob", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShareJohn", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 8, "ShareJohn", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsArchived", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsArchived", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectJobID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectJobID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProjectID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContactID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContactID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_JobNumber", global::System.Data.SqlDbType.NChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobNumber", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_JobTitle", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobTitle", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_JobTitle", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobTitle", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_JobDescription", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobDescription", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_JobDescription", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "JobDescription", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DateStart", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DateStart", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateStart", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DateEnd", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DateEnd", global::System.Data.SqlDbType.Date, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DateEnd", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ShareBob", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ShareBob", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ShareBob", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 8, "ShareBob", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ShareJohn", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ShareJohn", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ShareJohn", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 9, 8, "ShareJohn", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IsArchived", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IsArchived", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProjectJobID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ProjectJobID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitConnection() { + this._connection = new global::System.Data.SqlClient.SqlConnection(); + this._connection.ConnectionString = global::BealeEngineering.Accounts.Properties.Settings.Default.BealeEngConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT ProjectJobID, ProjectID, ContactID, JobNumber, JobTitle, JobDescription, D" + + "ateStart, DateEnd, ShareBob, ShareJohn, IsArchived FROM dbo.ProjectJob"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(BealeEngDataSet.ProjectJobDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual BealeEngDataSet.ProjectJobDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + BealeEngDataSet.ProjectJobDataTable dataTable = new BealeEngDataSet.ProjectJobDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet.ProjectJobDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(BealeEngDataSet dataSet) { + return this.Adapter.Update(dataSet, "ProjectJob"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int Original_ProjectJobID, int Original_ProjectID, int Original_ContactID, string Original_JobNumber, string Original_JobTitle, string Original_JobDescription, global::System.Nullable Original_DateStart, global::System.Nullable Original_DateEnd, global::System.Nullable Original_ShareBob, global::System.Nullable Original_ShareJohn, bool Original_IsArchived) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProjectJobID)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ProjectID)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_ContactID)); + if ((Original_JobNumber == null)) { + throw new global::System.ArgumentNullException("Original_JobNumber"); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_JobNumber)); + } + if ((Original_JobTitle == null)) { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((string)(Original_JobTitle)); + } + if ((Original_JobDescription == null)) { + this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[7].Value = ((string)(Original_JobDescription)); + } + if ((Original_DateStart.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[9].Value = ((System.DateTime)(Original_DateStart.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value; + } + if ((Original_DateEnd.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[11].Value = ((System.DateTime)(Original_DateEnd.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[11].Value = global::System.DBNull.Value; + } + if ((Original_ShareBob.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[13].Value = ((decimal)(Original_ShareBob.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((Original_ShareJohn.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[15].Value = ((decimal)(Original_ShareJohn.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[15].Value = global::System.DBNull.Value; + } + this.Adapter.DeleteCommand.Parameters[16].Value = ((bool)(Original_IsArchived)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(int ProjectID, int ContactID, string JobNumber, string JobTitle, string JobDescription, global::System.Nullable DateStart, global::System.Nullable DateEnd, global::System.Nullable ShareBob, global::System.Nullable ShareJohn, bool IsArchived) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ProjectID)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ContactID)); + if ((JobNumber == null)) { + throw new global::System.ArgumentNullException("JobNumber"); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(JobNumber)); + } + if ((JobTitle == null)) { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(JobTitle)); + } + if ((JobDescription == null)) { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = ((string)(JobDescription)); + } + if ((DateStart.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((System.DateTime)(DateStart.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((DateEnd.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(DateEnd.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((ShareBob.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[7].Value = ((decimal)(ShareBob.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; + } + if ((ShareJohn.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[8].Value = ((decimal)(ShareJohn.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; + } + this.Adapter.InsertCommand.Parameters[9].Value = ((bool)(IsArchived)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + int ProjectID, + int ContactID, + string JobNumber, + string JobTitle, + string JobDescription, + global::System.Nullable DateStart, + global::System.Nullable DateEnd, + global::System.Nullable ShareBob, + global::System.Nullable ShareJohn, + bool IsArchived, + int Original_ProjectJobID, + int Original_ProjectID, + int Original_ContactID, + string Original_JobNumber, + string Original_JobTitle, + string Original_JobDescription, + global::System.Nullable Original_DateStart, + global::System.Nullable Original_DateEnd, + global::System.Nullable Original_ShareBob, + global::System.Nullable Original_ShareJohn, + bool Original_IsArchived, + int ProjectJobID) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(ProjectID)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ContactID)); + if ((JobNumber == null)) { + throw new global::System.ArgumentNullException("JobNumber"); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(JobNumber)); + } + if ((JobTitle == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(JobTitle)); + } + if ((JobDescription == null)) { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(JobDescription)); + } + if ((DateStart.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((System.DateTime)(DateStart.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((DateEnd.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(DateEnd.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((ShareBob.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[7].Value = ((decimal)(ShareBob.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + if ((ShareJohn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[8].Value = ((decimal)(ShareJohn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[9].Value = ((bool)(IsArchived)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_ProjectJobID)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_ProjectID)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(Original_ContactID)); + if ((Original_JobNumber == null)) { + throw new global::System.ArgumentNullException("Original_JobNumber"); + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_JobNumber)); + } + if ((Original_JobTitle == null)) { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_JobTitle)); + } + if ((Original_JobDescription == null)) { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_JobDescription)); + } + if ((Original_DateStart.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((System.DateTime)(Original_DateStart.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; + } + if ((Original_DateEnd.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[21].Value = ((System.DateTime)(Original_DateEnd.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; + } + if ((Original_ShareBob.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[23].Value = ((decimal)(Original_ShareBob.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value; + } + if ((Original_ShareJohn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[25].Value = ((decimal)(Original_ShareJohn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[25].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[26].Value = ((bool)(Original_IsArchived)); + this.Adapter.UpdateCommand.Parameters[27].Value = ((int)(ProjectJobID)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + int ProjectID, + int ContactID, + string JobNumber, + string JobTitle, + string JobDescription, + global::System.Nullable DateStart, + global::System.Nullable DateEnd, + global::System.Nullable ShareBob, + global::System.Nullable ShareJohn, + bool IsArchived, + int Original_ProjectJobID, + int Original_ProjectID, + int Original_ContactID, + string Original_JobNumber, + string Original_JobTitle, + string Original_JobDescription, + global::System.Nullable Original_DateStart, + global::System.Nullable Original_DateEnd, + global::System.Nullable Original_ShareBob, + global::System.Nullable Original_ShareJohn, + bool Original_IsArchived) { + return this.Update(ProjectID, ContactID, JobNumber, JobTitle, JobDescription, DateStart, DateEnd, ShareBob, ShareJohn, IsArchived, Original_ProjectJobID, Original_ProjectID, Original_ContactID, Original_JobNumber, Original_JobTitle, Original_JobDescription, Original_DateStart, Original_DateEnd, Original_ShareBob, Original_ShareJohn, Original_IsArchived, Original_ProjectJobID); + } + } + + /// + ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" + + "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")] + public partial class TableAdapterManager : global::System.ComponentModel.Component { + + private UpdateOrderOption _updateOrder; + + private ClientPurchaseOrderTableAdapter _clientPurchaseOrderTableAdapter; + + private ClientPurchaseOrderLineTableAdapter _clientPurchaseOrderLineTableAdapter; + + private ClientPurchaseOrderLineSalesInvoiceTableAdapter _clientPurchaseOrderLineSalesInvoiceTableAdapter; + + private ContactTableAdapter _contactTableAdapter; + + private ProjectTableAdapter _projectTableAdapter; + + private ProjectJobTableAdapter _projectJobTableAdapter; + + private bool _backupDataSetBeforeUpdate; + + private global::System.Data.IDbConnection _connection; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public UpdateOrderOption UpdateOrder { + get { + return this._updateOrder; + } + set { + this._updateOrder = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public ClientPurchaseOrderTableAdapter ClientPurchaseOrderTableAdapter { + get { + return this._clientPurchaseOrderTableAdapter; + } + set { + this._clientPurchaseOrderTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public ClientPurchaseOrderLineTableAdapter ClientPurchaseOrderLineTableAdapter { + get { + return this._clientPurchaseOrderLineTableAdapter; + } + set { + this._clientPurchaseOrderLineTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public ClientPurchaseOrderLineSalesInvoiceTableAdapter ClientPurchaseOrderLineSalesInvoiceTableAdapter { + get { + return this._clientPurchaseOrderLineSalesInvoiceTableAdapter; + } + set { + this._clientPurchaseOrderLineSalesInvoiceTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public ContactTableAdapter ContactTableAdapter { + get { + return this._contactTableAdapter; + } + set { + this._contactTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public ProjectTableAdapter ProjectTableAdapter { + get { + return this._projectTableAdapter; + } + set { + this._projectTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + + "a", "System.Drawing.Design.UITypeEditor")] + public ProjectJobTableAdapter ProjectJobTableAdapter { + get { + return this._projectJobTableAdapter; + } + set { + this._projectJobTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public bool BackupDataSetBeforeUpdate { + get { + return this._backupDataSetBeforeUpdate; + } + set { + this._backupDataSetBeforeUpdate = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public global::System.Data.IDbConnection Connection { + get { + if ((this._connection != null)) { + return this._connection; + } + if (((this._clientPurchaseOrderTableAdapter != null) + && (this._clientPurchaseOrderTableAdapter.Connection != null))) { + return this._clientPurchaseOrderTableAdapter.Connection; + } + if (((this._clientPurchaseOrderLineTableAdapter != null) + && (this._clientPurchaseOrderLineTableAdapter.Connection != null))) { + return this._clientPurchaseOrderLineTableAdapter.Connection; + } + if (((this._clientPurchaseOrderLineSalesInvoiceTableAdapter != null) + && (this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Connection != null))) { + return this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Connection; + } + if (((this._contactTableAdapter != null) + && (this._contactTableAdapter.Connection != null))) { + return this._contactTableAdapter.Connection; + } + if (((this._projectTableAdapter != null) + && (this._projectTableAdapter.Connection != null))) { + return this._projectTableAdapter.Connection; + } + if (((this._projectJobTableAdapter != null) + && (this._projectJobTableAdapter.Connection != null))) { + return this._projectJobTableAdapter.Connection; + } + return null; + } + set { + this._connection = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int TableAdapterInstanceCount { + get { + int count = 0; + if ((this._clientPurchaseOrderTableAdapter != null)) { + count = (count + 1); + } + if ((this._clientPurchaseOrderLineTableAdapter != null)) { + count = (count + 1); + } + if ((this._clientPurchaseOrderLineSalesInvoiceTableAdapter != null)) { + count = (count + 1); + } + if ((this._contactTableAdapter != null)) { + count = (count + 1); + } + if ((this._projectTableAdapter != null)) { + count = (count + 1); + } + if ((this._projectJobTableAdapter != null)) { + count = (count + 1); + } + return count; + } + } + + /// + ///Update rows in top-down order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private int UpdateUpdatedRows(BealeEngDataSet dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._contactTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Contact.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._contactTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._clientPurchaseOrderTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ClientPurchaseOrder.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._clientPurchaseOrderTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._clientPurchaseOrderLineTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ClientPurchaseOrderLine.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._clientPurchaseOrderLineTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._projectTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Project.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._projectTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._clientPurchaseOrderLineSalesInvoiceTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ClientPurchaseOrderLineSalesInvoice.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._projectJobTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ProjectJob.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._projectJobTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + return result; + } + + /// + ///Insert rows in top-down order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private int UpdateInsertedRows(BealeEngDataSet dataSet, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._contactTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Contact.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._contactTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._clientPurchaseOrderTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ClientPurchaseOrder.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._clientPurchaseOrderTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._clientPurchaseOrderLineTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ClientPurchaseOrderLine.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._clientPurchaseOrderLineTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._projectTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Project.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._projectTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._clientPurchaseOrderLineSalesInvoiceTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ClientPurchaseOrderLineSalesInvoice.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._projectJobTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ProjectJob.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._projectJobTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + return result; + } + + /// + ///Delete rows in bottom-up order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private int UpdateDeletedRows(BealeEngDataSet dataSet, global::System.Collections.Generic.List allChangedRows) { + int result = 0; + if ((this._projectJobTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ProjectJob.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._projectJobTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._clientPurchaseOrderLineSalesInvoiceTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ClientPurchaseOrderLineSalesInvoice.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._projectTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Project.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._projectTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._clientPurchaseOrderLineTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ClientPurchaseOrderLine.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._clientPurchaseOrderLineTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._clientPurchaseOrderTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ClientPurchaseOrder.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._clientPurchaseOrderTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._contactTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Contact.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._contactTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + return result; + } + + /// + ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List allAddedRows) { + if (((updatedRows == null) + || (updatedRows.Length < 1))) { + return updatedRows; + } + if (((allAddedRows == null) + || (allAddedRows.Count < 1))) { + return updatedRows; + } + global::System.Collections.Generic.List realUpdatedRows = new global::System.Collections.Generic.List(); + for (int i = 0; (i < updatedRows.Length); i = (i + 1)) { + global::System.Data.DataRow row = updatedRows[i]; + if ((allAddedRows.Contains(row) == false)) { + realUpdatedRows.Add(row); + } + } + return realUpdatedRows.ToArray(); + } + + /// + ///Update all changes to the dataset. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public virtual int UpdateAll(BealeEngDataSet dataSet) { + if ((dataSet == null)) { + throw new global::System.ArgumentNullException("dataSet"); + } + if ((dataSet.HasChanges() == false)) { + return 0; + } + if (((this._clientPurchaseOrderTableAdapter != null) + && (this.MatchTableAdapterConnection(this._clientPurchaseOrderTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._clientPurchaseOrderLineTableAdapter != null) + && (this.MatchTableAdapterConnection(this._clientPurchaseOrderLineTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._clientPurchaseOrderLineSalesInvoiceTableAdapter != null) + && (this.MatchTableAdapterConnection(this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._contactTableAdapter != null) + && (this.MatchTableAdapterConnection(this._contactTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._projectTableAdapter != null) + && (this.MatchTableAdapterConnection(this._projectTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._projectJobTableAdapter != null) + && (this.MatchTableAdapterConnection(this._projectJobTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + global::System.Data.IDbConnection workConnection = this.Connection; + if ((workConnection == null)) { + throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" + + "ger TableAdapter property to a valid TableAdapter instance."); + } + bool workConnOpened = false; + if (((workConnection.State & global::System.Data.ConnectionState.Broken) + == global::System.Data.ConnectionState.Broken)) { + workConnection.Close(); + } + if ((workConnection.State == global::System.Data.ConnectionState.Closed)) { + workConnection.Open(); + workConnOpened = true; + } + global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction(); + if ((workTransaction == null)) { + throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" + + "ctions or the current state is not allowing the transaction to begin."); + } + global::System.Collections.Generic.List allChangedRows = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List allAddedRows = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.Dictionary revertConnections = new global::System.Collections.Generic.Dictionary(); + int result = 0; + global::System.Data.DataSet backupDataSet = null; + if (this.BackupDataSetBeforeUpdate) { + backupDataSet = new global::System.Data.DataSet(); + backupDataSet.Merge(dataSet); + } + try { + // ---- Prepare for update ----------- + // + if ((this._clientPurchaseOrderTableAdapter != null)) { + revertConnections.Add(this._clientPurchaseOrderTableAdapter, this._clientPurchaseOrderTableAdapter.Connection); + this._clientPurchaseOrderTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._clientPurchaseOrderTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._clientPurchaseOrderTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._clientPurchaseOrderTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._clientPurchaseOrderTableAdapter.Adapter); + } + } + if ((this._clientPurchaseOrderLineTableAdapter != null)) { + revertConnections.Add(this._clientPurchaseOrderLineTableAdapter, this._clientPurchaseOrderLineTableAdapter.Connection); + this._clientPurchaseOrderLineTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._clientPurchaseOrderLineTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._clientPurchaseOrderLineTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._clientPurchaseOrderLineTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._clientPurchaseOrderLineTableAdapter.Adapter); + } + } + if ((this._clientPurchaseOrderLineSalesInvoiceTableAdapter != null)) { + revertConnections.Add(this._clientPurchaseOrderLineSalesInvoiceTableAdapter, this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Connection); + this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Adapter); + } + } + if ((this._contactTableAdapter != null)) { + revertConnections.Add(this._contactTableAdapter, this._contactTableAdapter.Connection); + this._contactTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._contactTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._contactTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._contactTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._contactTableAdapter.Adapter); + } + } + if ((this._projectTableAdapter != null)) { + revertConnections.Add(this._projectTableAdapter, this._projectTableAdapter.Connection); + this._projectTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._projectTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._projectTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._projectTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._projectTableAdapter.Adapter); + } + } + if ((this._projectJobTableAdapter != null)) { + revertConnections.Add(this._projectJobTableAdapter, this._projectJobTableAdapter.Connection); + this._projectJobTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); + this._projectJobTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); + if (this._projectJobTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._projectJobTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._projectJobTableAdapter.Adapter); + } + } + // + //---- Perform updates ----------- + // + if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) { + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + } + else { + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + } + result = (result + this.UpdateDeletedRows(dataSet, allChangedRows)); + // + //---- Commit updates ----------- + // + workTransaction.Commit(); + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + if ((0 < allChangedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count]; + allChangedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + } + catch (global::System.Exception ex) { + workTransaction.Rollback(); + // ---- Restore the dataset ----------- + if (this.BackupDataSetBeforeUpdate) { + global::System.Diagnostics.Debug.Assert((backupDataSet != null)); + dataSet.Clear(); + dataSet.Merge(backupDataSet); + } + else { + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + row.SetAdded(); + } + } + } + throw ex; + } + finally { + if (workConnOpened) { + workConnection.Close(); + } + if ((this._clientPurchaseOrderTableAdapter != null)) { + this._clientPurchaseOrderTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._clientPurchaseOrderTableAdapter])); + this._clientPurchaseOrderTableAdapter.Transaction = null; + } + if ((this._clientPurchaseOrderLineTableAdapter != null)) { + this._clientPurchaseOrderLineTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._clientPurchaseOrderLineTableAdapter])); + this._clientPurchaseOrderLineTableAdapter.Transaction = null; + } + if ((this._clientPurchaseOrderLineSalesInvoiceTableAdapter != null)) { + this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._clientPurchaseOrderLineSalesInvoiceTableAdapter])); + this._clientPurchaseOrderLineSalesInvoiceTableAdapter.Transaction = null; + } + if ((this._contactTableAdapter != null)) { + this._contactTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._contactTableAdapter])); + this._contactTableAdapter.Transaction = null; + } + if ((this._projectTableAdapter != null)) { + this._projectTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._projectTableAdapter])); + this._projectTableAdapter.Transaction = null; + } + if ((this._projectJobTableAdapter != null)) { + this._projectJobTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._projectJobTableAdapter])); + this._projectJobTableAdapter.Transaction = null; + } + if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { + global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; + adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); + for (int i = 0; (i < adapters.Length); i = (i + 1)) { + global::System.Data.Common.DataAdapter adapter = adapters[i]; + adapter.AcceptChangesDuringUpdate = true; + } + } + } + return result; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) { + global::System.Array.Sort(rows, new SelfReferenceComparer(relation, childFirst)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) { + if ((this._connection != null)) { + return true; + } + if (((this.Connection == null) + || (inputConnection == null))) { + return true; + } + if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) { + return true; + } + return false; + } + + /// + ///Update Order Option + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public enum UpdateOrderOption { + + InsertUpdateDelete = 0, + + UpdateInsertDelete = 1, + } + + /// + ///Used to sort self-referenced table's rows + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer { + + private global::System.Data.DataRelation _relation; + + private int _childFirst; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) { + this._relation = relation; + if (childFirst) { + this._childFirst = -1; + } + else { + this._childFirst = 1; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) { + global::System.Diagnostics.Debug.Assert((row != null)); + global::System.Data.DataRow root = row; + distance = 0; + + global::System.Collections.Generic.IDictionary traversedRows = new global::System.Collections.Generic.Dictionary(); + traversedRows[row] = row; + + global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + for ( + ; ((parent != null) + && (traversedRows.ContainsKey(parent) == false)); + ) { + distance = (distance + 1); + root = parent; + traversedRows[parent] = parent; + parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + } + + if ((distance == 0)) { + traversedRows.Clear(); + traversedRows[row] = row; + parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); + for ( + ; ((parent != null) + && (traversedRows.ContainsKey(parent) == false)); + ) { + distance = (distance + 1); + root = parent; + traversedRows[parent] = parent; + parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); + } + } + + return root; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) { + if (object.ReferenceEquals(row1, row2)) { + return 0; + } + if ((row1 == null)) { + return -1; + } + if ((row2 == null)) { + return 1; + } + + int distance1 = 0; + global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1); + + int distance2 = 0; + global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2); + + if (object.ReferenceEquals(root1, root2)) { + return (this._childFirst * distance1.CompareTo(distance2)); + } + else { + global::System.Diagnostics.Debug.Assert(((root1.Table != null) + && (root2.Table != null))); + if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) { + return -1; + } + else { + return 1; + } + } + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xsc b/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xsc new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xsc @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xsd b/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xsd new file mode 100644 index 0000000..8594dd9 --- /dev/null +++ b/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xsd @@ -0,0 +1,791 @@ + + + + + + + + + + + + + + + DELETE FROM [dbo].[ClientPurchaseOrder] WHERE (([ClientPurchaseOrderID] = @Original_ClientPurchaseOrderID) AND ([PurchaseOrderDate] = @Original_PurchaseOrderDate) AND ([ContactID] = @Original_ContactID) AND ([ClientReference] = @Original_ClientReference) AND ((@IsNull_RequestorEmail = 1 AND [RequestorEmail] IS NULL) OR ([RequestorEmail] = @Original_RequestorEmail)) AND ((@IsNull_OrderTotal = 1 AND [OrderTotal] IS NULL) OR ([OrderTotal] = @Original_OrderTotal)) AND ([IsClosed] = @Original_IsClosed)) + + + + + + + + + + + + + + + + INSERT INTO [dbo].[ClientPurchaseOrder] ([PurchaseOrderDate], [ContactID], [ClientReference], [RequestorEmail], [OrderTotal], [IsClosed]) VALUES (@PurchaseOrderDate, @ContactID, @ClientReference, @RequestorEmail, @OrderTotal, @IsClosed); +SELECT ClientPurchaseOrderID, PurchaseOrderDate, ContactID, ClientReference, RequestorEmail, OrderTotal, IsClosed FROM ClientPurchaseOrder WHERE (ClientPurchaseOrderID = SCOPE_IDENTITY()) + + + + + + + + + + + + + SELECT ClientPurchaseOrderID, PurchaseOrderDate, ContactID, ClientReference, RequestorEmail, OrderTotal, IsClosed FROM dbo.ClientPurchaseOrder + + + + + + UPDATE [dbo].[ClientPurchaseOrder] SET [PurchaseOrderDate] = @PurchaseOrderDate, [ContactID] = @ContactID, [ClientReference] = @ClientReference, [RequestorEmail] = @RequestorEmail, [OrderTotal] = @OrderTotal, [IsClosed] = @IsClosed WHERE (([ClientPurchaseOrderID] = @Original_ClientPurchaseOrderID) AND ([PurchaseOrderDate] = @Original_PurchaseOrderDate) AND ([ContactID] = @Original_ContactID) AND ([ClientReference] = @Original_ClientReference) AND ((@IsNull_RequestorEmail = 1 AND [RequestorEmail] IS NULL) OR ([RequestorEmail] = @Original_RequestorEmail)) AND ((@IsNull_OrderTotal = 1 AND [OrderTotal] IS NULL) OR ([OrderTotal] = @Original_OrderTotal)) AND ([IsClosed] = @Original_IsClosed)); +SELECT ClientPurchaseOrderID, PurchaseOrderDate, ContactID, ClientReference, RequestorEmail, OrderTotal, IsClosed FROM ClientPurchaseOrder WHERE (ClientPurchaseOrderID = @ClientPurchaseOrderID) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [dbo].[ClientPurchaseOrderLine] WHERE (([ClientPurchaseOrderLineID] = @Original_ClientPurchaseOrderLineID) AND ([ClientPurchaseOrderID] = @Original_ClientPurchaseOrderID) AND ([LineNumber] = @Original_LineNumber) AND ([ProjectJobID] = @Original_ProjectJobID) AND ((@IsNull_Description = 1 AND [Description] IS NULL) OR ([Description] = @Original_Description)) AND ([LineNetAmount] = @Original_LineNetAmount)) + + + + + + + + + + + + + + INSERT INTO [dbo].[ClientPurchaseOrderLine] ([ClientPurchaseOrderID], [LineNumber], [ProjectJobID], [Description], [LineNetAmount]) VALUES (@ClientPurchaseOrderID, @LineNumber, @ProjectJobID, @Description, @LineNetAmount); +SELECT ClientPurchaseOrderLineID, ClientPurchaseOrderID, LineNumber, ProjectJobID, Description, LineNetAmount FROM ClientPurchaseOrderLine WHERE (ClientPurchaseOrderLineID = SCOPE_IDENTITY()) + + + + + + + + + + + + SELECT ClientPurchaseOrderLineID, ClientPurchaseOrderID, LineNumber, ProjectJobID, Description, LineNetAmount FROM dbo.ClientPurchaseOrderLine + + + + + + UPDATE [dbo].[ClientPurchaseOrderLine] SET [ClientPurchaseOrderID] = @ClientPurchaseOrderID, [LineNumber] = @LineNumber, [ProjectJobID] = @ProjectJobID, [Description] = @Description, [LineNetAmount] = @LineNetAmount WHERE (([ClientPurchaseOrderLineID] = @Original_ClientPurchaseOrderLineID) AND ([ClientPurchaseOrderID] = @Original_ClientPurchaseOrderID) AND ([LineNumber] = @Original_LineNumber) AND ([ProjectJobID] = @Original_ProjectJobID) AND ((@IsNull_Description = 1 AND [Description] IS NULL) OR ([Description] = @Original_Description)) AND ([LineNetAmount] = @Original_LineNetAmount)); +SELECT ClientPurchaseOrderLineID, ClientPurchaseOrderID, LineNumber, ProjectJobID, Description, LineNetAmount FROM ClientPurchaseOrderLine WHERE (ClientPurchaseOrderLineID = @ClientPurchaseOrderLineID) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [dbo].[ClientPurchaseOrderLineSalesInvoice] WHERE (([ClientPurchaseOrderLineID] = @Original_ClientPurchaseOrderLineID) AND ([SaleInvoiceID] = @Original_SaleInvoiceID) AND ([IsApproved] = @Original_IsApproved)) + + + + + + + + + + INSERT INTO [dbo].[ClientPurchaseOrderLineSalesInvoice] ([ClientPurchaseOrderLineID], [SaleInvoiceID], [IsApproved]) VALUES (@ClientPurchaseOrderLineID, @SaleInvoiceID, @IsApproved); +SELECT ClientPurchaseOrderLineID, SaleInvoiceID, IsApproved FROM ClientPurchaseOrderLineSalesInvoice WHERE (SaleInvoiceID = @SaleInvoiceID) + + + + + + + + + + SELECT ClientPurchaseOrderLineID, SaleInvoiceID, IsApproved FROM dbo.ClientPurchaseOrderLineSalesInvoice + + + + + + UPDATE [dbo].[ClientPurchaseOrderLineSalesInvoice] SET [ClientPurchaseOrderLineID] = @ClientPurchaseOrderLineID, [SaleInvoiceID] = @SaleInvoiceID, [IsApproved] = @IsApproved WHERE (([ClientPurchaseOrderLineID] = @Original_ClientPurchaseOrderLineID) AND ([SaleInvoiceID] = @Original_SaleInvoiceID) AND ([IsApproved] = @Original_IsApproved)); +SELECT ClientPurchaseOrderLineID, SaleInvoiceID, IsApproved FROM ClientPurchaseOrderLineSalesInvoice WHERE (SaleInvoiceID = @SaleInvoiceID) + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [dbo].[Contact] WHERE (([ContactID] = @Original_ContactID) AND ([ContactName] = @Original_ContactName) AND ((@IsNull_EmailAddress = 1 AND [EmailAddress] IS NULL) OR ([EmailAddress] = @Original_EmailAddress)) AND ((@IsNull_PrimaryPersonFirstName = 1 AND [PrimaryPersonFirstName] IS NULL) OR ([PrimaryPersonFirstName] = @Original_PrimaryPersonFirstName)) AND ((@IsNull_PrimaryPersonSurname = 1 AND [PrimaryPersonSurname] IS NULL) OR ([PrimaryPersonSurname] = @Original_PrimaryPersonSurname)) AND ((@IsNull_PrimaryPersonEmail = 1 AND [PrimaryPersonEmail] IS NULL) OR ([PrimaryPersonEmail] = @Original_PrimaryPersonEmail)) AND ((@IsNull_POAddressLine1 = 1 AND [POAddressLine1] IS NULL) OR ([POAddressLine1] = @Original_POAddressLine1)) AND ((@IsNull_POAddressLine2 = 1 AND [POAddressLine2] IS NULL) OR ([POAddressLine2] = @Original_POAddressLine2)) AND ((@IsNull_POAddressLine3 = 1 AND [POAddressLine3] IS NULL) OR ([POAddressLine3] = @Original_POAddressLine3)) AND ((@IsNull_POAddressLine4 = 1 AND [POAddressLine4] IS NULL) OR ([POAddressLine4] = @Original_POAddressLine4)) AND ((@IsNull_POAddressCity = 1 AND [POAddressCity] IS NULL) OR ([POAddressCity] = @Original_POAddressCity)) AND ((@IsNull_POAddressRegion = 1 AND [POAddressRegion] IS NULL) OR ([POAddressRegion] = @Original_POAddressRegion)) AND ((@IsNull_POAddressPostalCode = 1 AND [POAddressPostalCode] IS NULL) OR ([POAddressPostalCode] = @Original_POAddressPostalCode)) AND ((@IsNull_POAddressCountry = 1 AND [POAddressCountry] IS NULL) OR ([POAddressCountry] = @Original_POAddressCountry))) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO [dbo].[Contact] ([ContactName], [EmailAddress], [PrimaryPersonFirstName], [PrimaryPersonSurname], [PrimaryPersonEmail], [POAddressLine1], [POAddressLine2], [POAddressLine3], [POAddressLine4], [POAddressCity], [POAddressRegion], [POAddressPostalCode], [POAddressCountry]) VALUES (@ContactName, @EmailAddress, @PrimaryPersonFirstName, @PrimaryPersonSurname, @PrimaryPersonEmail, @POAddressLine1, @POAddressLine2, @POAddressLine3, @POAddressLine4, @POAddressCity, @POAddressRegion, @POAddressPostalCode, @POAddressCountry); +SELECT ContactID, ContactName, EmailAddress, PrimaryPersonFirstName, PrimaryPersonSurname, PrimaryPersonEmail, POAddressLine1, POAddressLine2, POAddressLine3, POAddressLine4, POAddressCity, POAddressRegion, POAddressPostalCode, POAddressCountry FROM Contact WHERE (ContactID = SCOPE_IDENTITY()) + + + + + + + + + + + + + + + + + + + + SELECT ContactID, ContactName, EmailAddress, PrimaryPersonFirstName, PrimaryPersonSurname, PrimaryPersonEmail, POAddressLine1, POAddressLine2, POAddressLine3, POAddressLine4, POAddressCity, POAddressRegion, POAddressPostalCode, POAddressCountry FROM dbo.Contact + + + + + + UPDATE [dbo].[Contact] SET [ContactName] = @ContactName, [EmailAddress] = @EmailAddress, [PrimaryPersonFirstName] = @PrimaryPersonFirstName, [PrimaryPersonSurname] = @PrimaryPersonSurname, [PrimaryPersonEmail] = @PrimaryPersonEmail, [POAddressLine1] = @POAddressLine1, [POAddressLine2] = @POAddressLine2, [POAddressLine3] = @POAddressLine3, [POAddressLine4] = @POAddressLine4, [POAddressCity] = @POAddressCity, [POAddressRegion] = @POAddressRegion, [POAddressPostalCode] = @POAddressPostalCode, [POAddressCountry] = @POAddressCountry WHERE (([ContactID] = @Original_ContactID) AND ([ContactName] = @Original_ContactName) AND ((@IsNull_EmailAddress = 1 AND [EmailAddress] IS NULL) OR ([EmailAddress] = @Original_EmailAddress)) AND ((@IsNull_PrimaryPersonFirstName = 1 AND [PrimaryPersonFirstName] IS NULL) OR ([PrimaryPersonFirstName] = @Original_PrimaryPersonFirstName)) AND ((@IsNull_PrimaryPersonSurname = 1 AND [PrimaryPersonSurname] IS NULL) OR ([PrimaryPersonSurname] = @Original_PrimaryPersonSurname)) AND ((@IsNull_PrimaryPersonEmail = 1 AND [PrimaryPersonEmail] IS NULL) OR ([PrimaryPersonEmail] = @Original_PrimaryPersonEmail)) AND ((@IsNull_POAddressLine1 = 1 AND [POAddressLine1] IS NULL) OR ([POAddressLine1] = @Original_POAddressLine1)) AND ((@IsNull_POAddressLine2 = 1 AND [POAddressLine2] IS NULL) OR ([POAddressLine2] = @Original_POAddressLine2)) AND ((@IsNull_POAddressLine3 = 1 AND [POAddressLine3] IS NULL) OR ([POAddressLine3] = @Original_POAddressLine3)) AND ((@IsNull_POAddressLine4 = 1 AND [POAddressLine4] IS NULL) OR ([POAddressLine4] = @Original_POAddressLine4)) AND ((@IsNull_POAddressCity = 1 AND [POAddressCity] IS NULL) OR ([POAddressCity] = @Original_POAddressCity)) AND ((@IsNull_POAddressRegion = 1 AND [POAddressRegion] IS NULL) OR ([POAddressRegion] = @Original_POAddressRegion)) AND ((@IsNull_POAddressPostalCode = 1 AND [POAddressPostalCode] IS NULL) OR ([POAddressPostalCode] = @Original_POAddressPostalCode)) AND ((@IsNull_POAddressCountry = 1 AND [POAddressCountry] IS NULL) OR ([POAddressCountry] = @Original_POAddressCountry))); +SELECT ContactID, ContactName, EmailAddress, PrimaryPersonFirstName, PrimaryPersonSurname, PrimaryPersonEmail, POAddressLine1, POAddressLine2, POAddressLine3, POAddressLine4, POAddressCity, POAddressRegion, POAddressPostalCode, POAddressCountry FROM Contact WHERE (ContactID = @ContactID) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [dbo].[Project] WHERE (([ProjectID] = @Original_ProjectID) AND ([ContactID] = @Original_ContactID) AND ((@IsNull_ProjectRef = 1 AND [ProjectRef] IS NULL) OR ([ProjectRef] = @Original_ProjectRef)) AND ([ProjectTitle] = @Original_ProjectTitle) AND ((@IsNull_DateStart = 1 AND [DateStart] IS NULL) OR ([DateStart] = @Original_DateStart)) AND ((@IsNull_DateEnd = 1 AND [DateEnd] IS NULL) OR ([DateEnd] = @Original_DateEnd)) AND ((@IsNull_ClientName = 1 AND [ClientName] IS NULL) OR ([ClientName] = @Original_ClientName)) AND ([IsArchived] = @Original_IsArchived)) + + + + + + + + + + + + + + + + + + + INSERT INTO [dbo].[Project] ([ProjectID], [ContactID], [ProjectRef], [ProjectTitle], [DateStart], [DateEnd], [ClientName], [IsArchived]) VALUES (@ProjectID, @ContactID, @ProjectRef, @ProjectTitle, @DateStart, @DateEnd, @ClientName, @IsArchived); +SELECT ProjectID, ContactID, ProjectRef, ProjectTitle, DateStart, DateEnd, ClientName, IsArchived FROM Project WHERE (ProjectID = @ProjectID) + + + + + + + + + + + + + + + SELECT ProjectID, ContactID, ProjectRef, ProjectTitle, DateStart, DateEnd, ClientName, IsArchived FROM dbo.Project + + + + + + UPDATE [dbo].[Project] SET [ProjectID] = @ProjectID, [ContactID] = @ContactID, [ProjectRef] = @ProjectRef, [ProjectTitle] = @ProjectTitle, [DateStart] = @DateStart, [DateEnd] = @DateEnd, [ClientName] = @ClientName, [IsArchived] = @IsArchived WHERE (([ProjectID] = @Original_ProjectID) AND ([ContactID] = @Original_ContactID) AND ((@IsNull_ProjectRef = 1 AND [ProjectRef] IS NULL) OR ([ProjectRef] = @Original_ProjectRef)) AND ([ProjectTitle] = @Original_ProjectTitle) AND ((@IsNull_DateStart = 1 AND [DateStart] IS NULL) OR ([DateStart] = @Original_DateStart)) AND ((@IsNull_DateEnd = 1 AND [DateEnd] IS NULL) OR ([DateEnd] = @Original_DateEnd)) AND ((@IsNull_ClientName = 1 AND [ClientName] IS NULL) OR ([ClientName] = @Original_ClientName)) AND ([IsArchived] = @Original_IsArchived)); +SELECT ProjectID, ContactID, ProjectRef, ProjectTitle, DateStart, DateEnd, ClientName, IsArchived FROM Project WHERE (ProjectID = @ProjectID) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [dbo].[ProjectJob] WHERE (([ProjectJobID] = @Original_ProjectJobID) AND ([ProjectID] = @Original_ProjectID) AND ([ContactID] = @Original_ContactID) AND ([JobNumber] = @Original_JobNumber) AND ((@IsNull_JobTitle = 1 AND [JobTitle] IS NULL) OR ([JobTitle] = @Original_JobTitle)) AND ((@IsNull_JobDescription = 1 AND [JobDescription] IS NULL) OR ([JobDescription] = @Original_JobDescription)) AND ((@IsNull_DateStart = 1 AND [DateStart] IS NULL) OR ([DateStart] = @Original_DateStart)) AND ((@IsNull_DateEnd = 1 AND [DateEnd] IS NULL) OR ([DateEnd] = @Original_DateEnd)) AND ((@IsNull_ShareBob = 1 AND [ShareBob] IS NULL) OR ([ShareBob] = @Original_ShareBob)) AND ((@IsNull_ShareJohn = 1 AND [ShareJohn] IS NULL) OR ([ShareJohn] = @Original_ShareJohn)) AND ([IsArchived] = @Original_IsArchived)) + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO [dbo].[ProjectJob] ([ProjectID], [ContactID], [JobNumber], [JobTitle], [JobDescription], [DateStart], [DateEnd], [ShareBob], [ShareJohn], [IsArchived]) VALUES (@ProjectID, @ContactID, @JobNumber, @JobTitle, @JobDescription, @DateStart, @DateEnd, @ShareBob, @ShareJohn, @IsArchived); +SELECT ProjectJobID, ProjectID, ContactID, JobNumber, JobTitle, JobDescription, DateStart, DateEnd, ShareBob, ShareJohn, IsArchived FROM ProjectJob WHERE (ProjectJobID = SCOPE_IDENTITY()) + + + + + + + + + + + + + + + + + SELECT ProjectJobID, ProjectID, ContactID, JobNumber, JobTitle, JobDescription, DateStart, DateEnd, ShareBob, ShareJohn, IsArchived FROM dbo.ProjectJob + + + + + + UPDATE [dbo].[ProjectJob] SET [ProjectID] = @ProjectID, [ContactID] = @ContactID, [JobNumber] = @JobNumber, [JobTitle] = @JobTitle, [JobDescription] = @JobDescription, [DateStart] = @DateStart, [DateEnd] = @DateEnd, [ShareBob] = @ShareBob, [ShareJohn] = @ShareJohn, [IsArchived] = @IsArchived WHERE (([ProjectJobID] = @Original_ProjectJobID) AND ([ProjectID] = @Original_ProjectID) AND ([ContactID] = @Original_ContactID) AND ([JobNumber] = @Original_JobNumber) AND ((@IsNull_JobTitle = 1 AND [JobTitle] IS NULL) OR ([JobTitle] = @Original_JobTitle)) AND ((@IsNull_JobDescription = 1 AND [JobDescription] IS NULL) OR ([JobDescription] = @Original_JobDescription)) AND ((@IsNull_DateStart = 1 AND [DateStart] IS NULL) OR ([DateStart] = @Original_DateStart)) AND ((@IsNull_DateEnd = 1 AND [DateEnd] IS NULL) OR ([DateEnd] = @Original_DateEnd)) AND ((@IsNull_ShareBob = 1 AND [ShareBob] IS NULL) OR ([ShareBob] = @Original_ShareBob)) AND ((@IsNull_ShareJohn = 1 AND [ShareJohn] IS NULL) OR ([ShareJohn] = @Original_ShareJohn)) AND ([IsArchived] = @Original_IsArchived)); +SELECT ProjectJobID, ProjectID, ContactID, JobNumber, JobTitle, JobDescription, DateStart, DateEnd, ShareBob, ShareJohn, IsArchived FROM ProjectJob WHERE (ProjectJobID = @ProjectJobID) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xss b/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xss new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/BealeEngineering/BealeEngineering.Accounts/BealeEngDataSet.xss @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/BealeEngineering/BealeEngineering.Accounts/BealeEngineering.Accounts.csproj b/BealeEngineering/BealeEngineering.Accounts/BealeEngineering.Accounts.csproj index 33499df..216656d 100644 --- a/BealeEngineering/BealeEngineering.Accounts/BealeEngineering.Accounts.csproj +++ b/BealeEngineering/BealeEngineering.Accounts/BealeEngineering.Accounts.csproj @@ -47,6 +47,11 @@ + + True + True + BealeEngDataSet.xsd + Form @@ -67,6 +72,19 @@ True Resources.resx + + BealeEngDataSet.xsd + + + MSDataSetGenerator + BealeEngDataSet.Designer.cs + Designer + + + BealeEngDataSet.xsd + + + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/BealeEngineering/BealeEngineering.Accounts/Form1.Designer.cs b/BealeEngineering/BealeEngineering.Accounts/Form1.Designer.cs index d98a3a8..eec3bab 100644 --- a/BealeEngineering/BealeEngineering.Accounts/Form1.Designer.cs +++ b/BealeEngineering/BealeEngineering.Accounts/Form1.Designer.cs @@ -28,34 +28,473 @@ /// private void InitializeComponent() { - this.btnTest = new System.Windows.Forms.Button(); + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + this.purchaseOrderAllocationBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.txtUnallocatedCount = new System.Windows.Forms.TextBox(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.contactNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.projectTitleDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.purchaseOrderDateDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.purchaseOrderReferenceDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.purchaseOrderLineNumberDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.purchaseOrderLineDescriptionDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.jobNumberDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.invoicedAmountDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.jobTitleDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.jobDescriptionDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.xeroInvoiceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.testToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.testItToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + ((System.ComponentModel.ISupportInitialize)(this.purchaseOrderAllocationBindingSource)).BeginInit(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.tabPage2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.SuspendLayout(); + this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // - // btnTest + // purchaseOrderAllocationBindingSource // - this.btnTest.Location = new System.Drawing.Point(61, 39); - this.btnTest.Name = "btnTest"; - this.btnTest.Size = new System.Drawing.Size(139, 42); - this.btnTest.TabIndex = 0; - this.btnTest.Text = "Test it!"; - this.btnTest.UseVisualStyleBackColor = true; - this.btnTest.Click += new System.EventHandler(this.button1_Click); + this.purchaseOrderAllocationBindingSource.AllowNew = false; + this.purchaseOrderAllocationBindingSource.DataSource = typeof(BealeEngineering.Core.Model.Client.PurchaseOrderAllocation); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 24); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(1151, 721); + this.tabControl1.TabIndex = 5; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.splitContainer3); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(1143, 695); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Client Purchase Order"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.Location = new System.Drawing.Point(3, 3); + this.splitContainer3.Name = "splitContainer3"; + this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.button2); + this.splitContainer3.Panel1.Controls.Add(this.button1); + this.splitContainer3.Panel1.Controls.Add(this.label1); + this.splitContainer3.Panel1.Controls.Add(this.label2); + this.splitContainer3.Panel1.Controls.Add(this.textBox1); + this.splitContainer3.Panel1.Controls.Add(this.txtUnallocatedCount); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.dataGridView1); + this.splitContainer3.Panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer3_Panel2_Paint); + this.splitContainer3.Size = new System.Drawing.Size(1137, 689); + this.splitContainer3.SplitterDistance = 93; + this.splitContainer3.TabIndex = 0; + // + // button2 + // + this.button2.Location = new System.Drawing.Point(197, 56); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(76, 20); + this.button2.TabIndex = 9; + this.button2.Text = "Refresh"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button1 + // + this.button1.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.button1.Location = new System.Drawing.Point(1048, 56); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 20); + this.button1.TabIndex = 4; + this.button1.Text = "Refresh"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(16, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(84, 13); + this.label1.TabIndex = 6; + this.label1.Text = "Last Xero Import"; + this.label1.Click += new System.EventHandler(this.label1_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(16, 56); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(107, 13); + this.label2.TabIndex = 8; + this.label2.Text = "Unallocated Invoices"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(138, 18); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(135, 20); + this.textBox1.TabIndex = 5; + // + // txtUnallocatedCount + // + this.txtUnallocatedCount.Enabled = false; + this.txtUnallocatedCount.Location = new System.Drawing.Point(138, 56); + this.txtUnallocatedCount.Name = "txtUnallocatedCount"; + this.txtUnallocatedCount.Size = new System.Drawing.Size(53, 20); + this.txtUnallocatedCount.TabIndex = 7; + this.txtUnallocatedCount.TextChanged += new System.EventHandler(this.txtUnallocatedCount_TextChanged); + // + // dataGridView1 + // + this.dataGridView1.AllowUserToAddRows = false; + this.dataGridView1.AllowUserToDeleteRows = false; + this.dataGridView1.AllowUserToOrderColumns = true; + this.dataGridView1.AutoGenerateColumns = false; + this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.contactNameDataGridViewTextBoxColumn, + this.projectTitleDataGridViewTextBoxColumn, + this.purchaseOrderDateDataGridViewTextBoxColumn, + this.purchaseOrderReferenceDataGridViewTextBoxColumn, + this.purchaseOrderLineNumberDataGridViewTextBoxColumn, + this.purchaseOrderLineDescriptionDataGridViewTextBoxColumn, + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn, + this.jobNumberDataGridViewTextBoxColumn, + this.invoicedAmountDataGridViewTextBoxColumn, + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn, + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn, + this.jobTitleDataGridViewTextBoxColumn, + this.jobDescriptionDataGridViewTextBoxColumn}); + this.dataGridView1.DataSource = this.purchaseOrderAllocationBindingSource; + this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataGridView1.Location = new System.Drawing.Point(0, 0); + this.dataGridView1.MultiSelect = false; + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.ReadOnly = true; + this.dataGridView1.RowHeadersVisible = false; + this.dataGridView1.Size = new System.Drawing.Size(1137, 592); + this.dataGridView1.TabIndex = 2; + this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); + this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick); + // + // contactNameDataGridViewTextBoxColumn + // + this.contactNameDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.contactNameDataGridViewTextBoxColumn.DataPropertyName = "ContactName"; + this.contactNameDataGridViewTextBoxColumn.FillWeight = 150F; + this.contactNameDataGridViewTextBoxColumn.HeaderText = "Client"; + this.contactNameDataGridViewTextBoxColumn.Name = "contactNameDataGridViewTextBoxColumn"; + this.contactNameDataGridViewTextBoxColumn.ReadOnly = true; + // + // projectTitleDataGridViewTextBoxColumn + // + this.projectTitleDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.projectTitleDataGridViewTextBoxColumn.DataPropertyName = "ProjectTitle"; + this.projectTitleDataGridViewTextBoxColumn.FillWeight = 200F; + this.projectTitleDataGridViewTextBoxColumn.HeaderText = "Project"; + this.projectTitleDataGridViewTextBoxColumn.Name = "projectTitleDataGridViewTextBoxColumn"; + this.projectTitleDataGridViewTextBoxColumn.ReadOnly = true; + // + // purchaseOrderDateDataGridViewTextBoxColumn + // + this.purchaseOrderDateDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.purchaseOrderDateDataGridViewTextBoxColumn.DataPropertyName = "PurchaseOrderDate"; + this.purchaseOrderDateDataGridViewTextBoxColumn.FillWeight = 30.59646F; + this.purchaseOrderDateDataGridViewTextBoxColumn.HeaderText = "PO Date"; + this.purchaseOrderDateDataGridViewTextBoxColumn.MinimumWidth = 80; + this.purchaseOrderDateDataGridViewTextBoxColumn.Name = "purchaseOrderDateDataGridViewTextBoxColumn"; + this.purchaseOrderDateDataGridViewTextBoxColumn.ReadOnly = true; + // + // purchaseOrderReferenceDataGridViewTextBoxColumn + // + this.purchaseOrderReferenceDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.purchaseOrderReferenceDataGridViewTextBoxColumn.DataPropertyName = "PurchaseOrderReference"; + this.purchaseOrderReferenceDataGridViewTextBoxColumn.FillWeight = 30.59646F; + this.purchaseOrderReferenceDataGridViewTextBoxColumn.HeaderText = "PO Number"; + this.purchaseOrderReferenceDataGridViewTextBoxColumn.MinimumWidth = 100; + this.purchaseOrderReferenceDataGridViewTextBoxColumn.Name = "purchaseOrderReferenceDataGridViewTextBoxColumn"; + this.purchaseOrderReferenceDataGridViewTextBoxColumn.ReadOnly = true; + // + // purchaseOrderLineNumberDataGridViewTextBoxColumn + // + this.purchaseOrderLineNumberDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.purchaseOrderLineNumberDataGridViewTextBoxColumn.DataPropertyName = "PurchaseOrderLineNumber"; + this.purchaseOrderLineNumberDataGridViewTextBoxColumn.FillWeight = 30.59646F; + this.purchaseOrderLineNumberDataGridViewTextBoxColumn.HeaderText = "Line No."; + this.purchaseOrderLineNumberDataGridViewTextBoxColumn.MinimumWidth = 50; + this.purchaseOrderLineNumberDataGridViewTextBoxColumn.Name = "purchaseOrderLineNumberDataGridViewTextBoxColumn"; + this.purchaseOrderLineNumberDataGridViewTextBoxColumn.ReadOnly = true; + // + // purchaseOrderLineDescriptionDataGridViewTextBoxColumn + // + this.purchaseOrderLineDescriptionDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.purchaseOrderLineDescriptionDataGridViewTextBoxColumn.DataPropertyName = "PurchaseOrderLineDescription"; + this.purchaseOrderLineDescriptionDataGridViewTextBoxColumn.FillWeight = 300F; + this.purchaseOrderLineDescriptionDataGridViewTextBoxColumn.HeaderText = "Description"; + this.purchaseOrderLineDescriptionDataGridViewTextBoxColumn.Name = "purchaseOrderLineDescriptionDataGridViewTextBoxColumn"; + this.purchaseOrderLineDescriptionDataGridViewTextBoxColumn.ReadOnly = true; + // + // purchaseOrderLineNetAmountDataGridViewTextBoxColumn + // + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn.DataPropertyName = "PurchaseOrderLineNetAmount"; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle1.Format = "C2"; + dataGridViewCellStyle1.NullValue = null; + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1; + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn.FillWeight = 50F; + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn.HeaderText = "Line Amount"; + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn.MinimumWidth = 80; + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn.Name = "purchaseOrderLineNetAmountDataGridViewTextBoxColumn"; + this.purchaseOrderLineNetAmountDataGridViewTextBoxColumn.ReadOnly = true; + // + // jobNumberDataGridViewTextBoxColumn + // + this.jobNumberDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.jobNumberDataGridViewTextBoxColumn.DataPropertyName = "JobNumber"; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle2.Format = "C2"; + dataGridViewCellStyle2.NullValue = null; + this.jobNumberDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2; + this.jobNumberDataGridViewTextBoxColumn.FillWeight = 30.59646F; + this.jobNumberDataGridViewTextBoxColumn.HeaderText = "Job Number"; + this.jobNumberDataGridViewTextBoxColumn.MinimumWidth = 80; + this.jobNumberDataGridViewTextBoxColumn.Name = "jobNumberDataGridViewTextBoxColumn"; + this.jobNumberDataGridViewTextBoxColumn.ReadOnly = true; + // + // invoicedAmountDataGridViewTextBoxColumn + // + this.invoicedAmountDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.invoicedAmountDataGridViewTextBoxColumn.DataPropertyName = "InvoicedAmount"; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle3.Format = "C2"; + dataGridViewCellStyle3.NullValue = null; + this.invoicedAmountDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle3; + this.invoicedAmountDataGridViewTextBoxColumn.FillWeight = 50F; + this.invoicedAmountDataGridViewTextBoxColumn.HeaderText = "Invoiced"; + this.invoicedAmountDataGridViewTextBoxColumn.MinimumWidth = 80; + this.invoicedAmountDataGridViewTextBoxColumn.Name = "invoicedAmountDataGridViewTextBoxColumn"; + this.invoicedAmountDataGridViewTextBoxColumn.ReadOnly = true; + // + // purchaseOrderLineFacilityDataGridViewTextBoxColumn + // + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn.DataPropertyName = "PurchaseOrderLineFacility"; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle4.Format = "C2"; + dataGridViewCellStyle4.NullValue = null; + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle4; + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn.FillWeight = 50F; + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn.HeaderText = "Facility"; + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn.MinimumWidth = 80; + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn.Name = "purchaseOrderLineFacilityDataGridViewTextBoxColumn"; + this.purchaseOrderLineFacilityDataGridViewTextBoxColumn.ReadOnly = true; + // + // purchaseOrderIsClosedDataGridViewCheckBoxColumn + // + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn.DataPropertyName = "PurchaseOrderIsClosed"; + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn.FillWeight = 30.59646F; + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn.HeaderText = "Archived"; + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn.MinimumWidth = 50; + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn.Name = "purchaseOrderIsClosedDataGridViewCheckBoxColumn"; + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn.ReadOnly = true; + this.purchaseOrderIsClosedDataGridViewCheckBoxColumn.Width = 60; + // + // jobTitleDataGridViewTextBoxColumn + // + this.jobTitleDataGridViewTextBoxColumn.DataPropertyName = "JobTitle"; + this.jobTitleDataGridViewTextBoxColumn.HeaderText = "JobTitle"; + this.jobTitleDataGridViewTextBoxColumn.Name = "jobTitleDataGridViewTextBoxColumn"; + this.jobTitleDataGridViewTextBoxColumn.ReadOnly = true; + this.jobTitleDataGridViewTextBoxColumn.Visible = false; + // + // jobDescriptionDataGridViewTextBoxColumn + // + this.jobDescriptionDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.jobDescriptionDataGridViewTextBoxColumn.DataPropertyName = "JobDescription"; + this.jobDescriptionDataGridViewTextBoxColumn.FillWeight = 300F; + this.jobDescriptionDataGridViewTextBoxColumn.HeaderText = "Description"; + this.jobDescriptionDataGridViewTextBoxColumn.Name = "jobDescriptionDataGridViewTextBoxColumn"; + this.jobDescriptionDataGridViewTextBoxColumn.ReadOnly = true; + this.jobDescriptionDataGridViewTextBoxColumn.Visible = false; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.splitContainer2); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(1143, 695); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer2.Location = new System.Drawing.Point(3, 3); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + this.splitContainer2.Size = new System.Drawing.Size(1137, 689); + this.splitContainer2.SplitterDistance = 100; + this.splitContainer2.TabIndex = 0; + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.importToolStripMenuItem, + this.testToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(1151, 24); + this.menuStrip1.TabIndex = 6; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "File"; + // + // importToolStripMenuItem + // + this.importToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.xeroInvoiceToolStripMenuItem}); + this.importToolStripMenuItem.Name = "importToolStripMenuItem"; + this.importToolStripMenuItem.Size = new System.Drawing.Size(55, 20); + this.importToolStripMenuItem.Text = "Import"; + // + // xeroInvoiceToolStripMenuItem + // + this.xeroInvoiceToolStripMenuItem.Name = "xeroInvoiceToolStripMenuItem"; + this.xeroInvoiceToolStripMenuItem.Size = new System.Drawing.Size(139, 22); + this.xeroInvoiceToolStripMenuItem.Text = "Xero Invoice"; + // + // testToolStripMenuItem + // + this.testToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.testItToolStripMenuItem}); + this.testToolStripMenuItem.Name = "testToolStripMenuItem"; + this.testToolStripMenuItem.Size = new System.Drawing.Size(39, 20); + this.testToolStripMenuItem.Text = "Test"; + // + // testItToolStripMenuItem + // + this.testItToolStripMenuItem.Name = "testItToolStripMenuItem"; + this.testItToolStripMenuItem.Size = new System.Drawing.Size(107, 22); + this.testItToolStripMenuItem.Text = "Test it!"; + this.testItToolStripMenuItem.Click += new System.EventHandler(this.testItToolStripMenuItem_Click); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Controls.Add(this.btnTest); + this.ClientSize = new System.Drawing.Size(1151, 745); + this.Controls.Add(this.tabControl1); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; this.Name = "Form1"; this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + ((System.ComponentModel.ISupportInitialize)(this.purchaseOrderAllocationBindingSource)).EndInit(); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel1.PerformLayout(); + this.splitContainer3.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.tabPage2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion - - private System.Windows.Forms.Button btnTest; + private System.Windows.Forms.BindingSource purchaseOrderAllocationBindingSource; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox txtUnallocatedCount; + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem xeroInvoiceToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem testToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem testItToolStripMenuItem; + private System.Windows.Forms.DataGridViewTextBoxColumn contactNameDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn projectTitleDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn purchaseOrderDateDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn purchaseOrderReferenceDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn purchaseOrderLineNumberDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn purchaseOrderLineDescriptionDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn purchaseOrderLineNetAmountDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn jobNumberDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn invoicedAmountDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn purchaseOrderLineFacilityDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewCheckBoxColumn purchaseOrderIsClosedDataGridViewCheckBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn jobTitleDataGridViewTextBoxColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn jobDescriptionDataGridViewTextBoxColumn; } } diff --git a/BealeEngineering/BealeEngineering.Accounts/Form1.cs b/BealeEngineering/BealeEngineering.Accounts/Form1.cs index b166419..983c2ed 100644 --- a/BealeEngineering/BealeEngineering.Accounts/Form1.cs +++ b/BealeEngineering/BealeEngineering.Accounts/Form1.cs @@ -8,7 +8,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Configuration; -using BealeEngineering.Core; +using BealeEngineering.Core.Data; namespace BealeEngineering.Accounts { @@ -17,13 +17,117 @@ namespace BealeEngineering.Accounts public Form1() { InitializeComponent(); + SqlConnectionString = ConfigurationManager.ConnectionStrings["BealeEngSQLDb"].ToString(); + } + + private string SqlConnectionString { get; set; } + public List TableData { get; set; } + + private void Form1_Load(object sender, EventArgs e) + { + UpdateTable(); + button2_Click(null, null); } private void button1_Click(object sender, EventArgs e) { - string conString = ConfigurationManager.ConnectionStrings["BealeEngSQLDb"].ToString(); + UpdateTable(); + } + + private void UpdateTable() + { + var readData = new Core.Data.Database.Client.ReadPurchaseOrderAllocation(SqlConnectionString); + var data = readData.Read(); + + //dataGridView1.Rows.AddRange() + purchaseOrderAllocationBindingSource.DataSource = data; + //dataGridView1.DataSource = data; + + // high light over invoiced lines + for (var i = 0; i < dataGridView1.Rows.Count; i++) + { + decimal facility = (decimal)dataGridView1[9, i].Value; + if (facility == 0) + { + // code to grey out line + dataGridView1.Rows[i].DefaultCellStyle.ForeColor = Color.Gray; + dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.White; + } + else if (facility < 0) + { + // red line + dataGridView1.Rows[i].DefaultCellStyle.ForeColor = Color.Red; + dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.White; + } + else + { + // default + dataGridView1.Rows[i].DefaultCellStyle.ForeColor = Color.Black; + dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.White; + } + } + } + + private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + string poNumber = dataGridView1.Rows[e.RowIndex].Cells[6].Value.ToString(); + bool multiPoLine = false; + for (var i = 0; i < dataGridView1.Rows.Count; i++ ) + { + if (i == e.RowIndex) { continue; } + else if (dataGridView1.Rows[i].Cells[6].Value.ToString() == poNumber) + { + multiPoLine = true; + break; + } + } + if (multiPoLine) + { + poNumber = poNumber + "-" + dataGridView1.Rows[e.RowIndex].Cells[7].Value.ToString().PadLeft(3, '0'); + } + + var dataIndexNo = dataGridView1.Rows[e.RowIndex].Index.ToString(); + string cellValue = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString(); + + Clipboard.SetText(poNumber); + + MessageBox.Show(poNumber); + } + + private void label1_Click(object sender, EventArgs e) + { + + } + + private void button2_Click(object sender, EventArgs e) + { + var dataRead = new Core.Data.Database.Client.ReadSaleInvoiceAllocation(SqlConnectionString); + txtUnallocatedCount.Text = dataRead.GetUnallocatedInvoiceCount().ToString(); + } + + private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e) + { + + } + + private void splitContainer3_Panel2_Paint(object sender, PaintEventArgs e) + { + + } + + private void testItToolStripMenuItem_Click(object sender, EventArgs e) + { + var inst = new Core.Test.Autoexec(SqlConnectionString); + } + + private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + + } + + private void txtUnallocatedCount_TextChanged(object sender, EventArgs e) + { - var inst = new Core.Test.Autoexec(conString); } } } diff --git a/BealeEngineering/BealeEngineering.Accounts/Form1.resx b/BealeEngineering/BealeEngineering.Accounts/Form1.resx index 1af7de1..192dcc1 100644 --- a/BealeEngineering/BealeEngineering.Accounts/Form1.resx +++ b/BealeEngineering/BealeEngineering.Accounts/Form1.resx @@ -117,4 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 24, 20 + + + 290, 20 + \ No newline at end of file diff --git a/BealeEngineering/BealeEngineering.Accounts/Properties/DataSources/BealeEngineering.Core.Model.Client.PurchaseOrderAllocation.datasource b/BealeEngineering/BealeEngineering.Accounts/Properties/DataSources/BealeEngineering.Core.Model.Client.PurchaseOrderAllocation.datasource new file mode 100644 index 0000000..0c5eeef --- /dev/null +++ b/BealeEngineering/BealeEngineering.Accounts/Properties/DataSources/BealeEngineering.Core.Model.Client.PurchaseOrderAllocation.datasource @@ -0,0 +1,10 @@ + + + + BealeEngineering.Core.Model.Client.PurchaseOrderAllocation, BealeEngineering.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BealeEngineering/BealeEngineering.Accounts/Properties/DataSources/Form1.datasource b/BealeEngineering/BealeEngineering.Accounts/Properties/DataSources/Form1.datasource new file mode 100644 index 0000000..488681b --- /dev/null +++ b/BealeEngineering/BealeEngineering.Accounts/Properties/DataSources/Form1.datasource @@ -0,0 +1,10 @@ + + + + BealeEngineering.Accounts.Form1, BealeEngineering.Accounts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/BealeEngineering/BealeEngineering.Accounts/Properties/Settings.Designer.cs b/BealeEngineering/BealeEngineering.Accounts/Properties/Settings.Designer.cs index 032928b..353759c 100644 --- a/BealeEngineering/BealeEngineering.Accounts/Properties/Settings.Designer.cs +++ b/BealeEngineering/BealeEngineering.Accounts/Properties/Settings.Designer.cs @@ -8,23 +8,30 @@ // //------------------------------------------------------------------------------ -namespace BealeEngineering.Accounts.Properties -{ - - +namespace BealeEngineering.Accounts.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=SQL-Server;Initial Catalog=BealeEng;Persist Security Info=True;User I" + + "D=\"BealeEng Accounts\";Password=3ddmur(wjS7fpjgveevs")] + public string BealeEngConnectionString { + get { + return ((string)(this["BealeEngConnectionString"])); + } + } } } diff --git a/BealeEngineering/BealeEngineering.Accounts/Properties/Settings.settings b/BealeEngineering/BealeEngineering.Accounts/Properties/Settings.settings index 3964565..8b3dfdf 100644 --- a/BealeEngineering/BealeEngineering.Accounts/Properties/Settings.settings +++ b/BealeEngineering/BealeEngineering.Accounts/Properties/Settings.settings @@ -1,7 +1,14 @@  - - - - - - + + + + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConnectionString>Data Source=SQL-Server;Initial Catalog=BealeEng;Persist Security Info=True;User ID="BealeEng Accounts";Password=3ddmur(wjS7fpjgveevs</ConnectionString> + <ProviderName>System.Data.SqlClient</ProviderName> +</SerializableConnectionString> + Data Source=SQL-Server;Initial Catalog=BealeEng;Persist Security Info=True;User ID="BealeEng Accounts";Password=3ddmur(wjS7fpjgveevs + + + \ No newline at end of file diff --git a/BealeEngineering/BealeEngineering.Core/BealeEngineering.Core.csproj b/BealeEngineering/BealeEngineering.Core/BealeEngineering.Core.csproj index 7472117..a150bed 100644 --- a/BealeEngineering/BealeEngineering.Core/BealeEngineering.Core.csproj +++ b/BealeEngineering/BealeEngineering.Core/BealeEngineering.Core.csproj @@ -63,9 +63,11 @@ + + diff --git a/BealeEngineering/BealeEngineering.Core/Data/Database/Client/ReadPurchaseOrderAllocation.cs b/BealeEngineering/BealeEngineering.Core/Data/Database/Client/ReadPurchaseOrderAllocation.cs index d40c3f2..cebdf66 100644 --- a/BealeEngineering/BealeEngineering.Core/Data/Database/Client/ReadPurchaseOrderAllocation.cs +++ b/BealeEngineering/BealeEngineering.Core/Data/Database/Client/ReadPurchaseOrderAllocation.cs @@ -4,68 +4,58 @@ using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; +using Dapper; namespace BealeEngineering.Core.Data.Database.Client { public class ReadPurchaseOrderAllocation : Connection - { - public ReadPurchaseOrderAllocation(string sqlConnectionString) : base(sqlConnectionString) - { + { + public ReadPurchaseOrderAllocation(string sqlConnectionString) : base(sqlConnectionString) + { - } - public int GetUnallocatedInvoiceCount() + } + public bool IncludeClosed { get; set; } = false; + public List Read() { + // build the sql string and dapper parameters + string sqlString = @" + SELECT ClientPurchaseOrder.PurchaseOrderDate + ,ProjectJob.JobNumber + ,Contact.ContactName + ,Project.ProjectTitle + ,ProjectJob.JobTitle + ,ProjectJob.JobDescription + ,ClientPurchaseOrder.ClientReference AS PurchaseOrderReference + ,ClientPurchaseOrderLine.LineNumber AS PurchaseOrderLineNumber + ,ClientPurchaseOrderLine.Description AS PurchaseOrderLineDescription + ,ClientPurchaseOrderLine.LineNetAmount AS PurchaseOrderLineNetAmount + ,ClientPurchaseOrder.IsClosed AS PurchaseOrderIsClosed + ,ISNULL(derivedtbl_1.InvoicedAmount, 0) AS InvoicedAmount + FROM ProjectJob + INNER JOIN Project ON ProjectJob.ProjectID = Project.ProjectID + INNER JOIN ClientPurchaseOrder + INNER JOIN ClientPurchaseOrderLine ON ClientPurchaseOrder.ClientPurchaseOrderID = ClientPurchaseOrderLine.ClientPurchaseOrderID + INNER JOIN Contact ON ClientPurchaseOrder.ContactID = Contact.ContactID ON ProjectJob.ProjectJobID = ClientPurchaseOrderLine.ProjectJobID LEFT OUTER JOIN ( + SELECT SUM(ISNULL(SaleInvoice.InvoiceTotal, 0) - ISNULL(SaleInvoice.TaxTotal, 0)) AS InvoicedAmount + ,ClientPurchaseOrderLineSalesInvoice.ClientPurchaseOrderLineID + FROM ClientPurchaseOrderLineSalesInvoice + LEFT OUTER JOIN SaleInvoice ON ClientPurchaseOrderLineSalesInvoice.SaleInvoiceID = SaleInvoice.SaleInvoiceID + GROUP BY ClientPurchaseOrderLineSalesInvoice.ClientPurchaseOrderLineID + ) AS derivedtbl_1 ON ClientPurchaseOrderLine.ClientPurchaseOrderLineID = derivedtbl_1.ClientPurchaseOrderLineID + WHERE (ClientPurchaseOrder.IsClosed = 0 OR ClientPurchaseOrder.IsClosed = @returnClosed) + ORDER BY ClientPurchaseOrder.PurchaseOrderDate + ,ProjectJob.JobNumber"; + // make the call using (SqlConnection conn = new SqlConnection(sqlConnectionString)) { conn.Open(); + var parameters = new DynamicParameters(); + parameters.Add("@returnClosed", IncludeClosed); - using (SqlCommand cmd = new SqlCommand(@" - SELECT Count(SaleInvoice.SaleInvoiceID) AS CountOfSaleInvoiceID - FROM SaleInvoice - LEFT OUTER JOIN ClientPurchaseOrderLineSalesInvoice ON SaleInvoice.SaleInvoiceID = ClientPurchaseOrderLineSalesInvoice.SaleInvoiceID - WHERE (ClientPurchaseOrderLineSalesInvoice.SaleInvoiceID IS NULL) - AND (SaleInvoice.Reference IS NOT NULL) - ", conn)) - { - object obj = cmd.ExecuteScalar(); - - return (int)obj; - } + var purchaseOrders = conn.Query(sqlString, parameters).ToList(); + return purchaseOrders; } - } - public List GetUnallocatedInvoice() - { - using (SqlConnection conn = new SqlConnection(sqlConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = new SqlCommand(@" - SELECT SaleInvoice.SaleInvoiceNumber - FROM SaleInvoice - LEFT OUTER JOIN ClientPurchaseOrderLineSalesInvoice ON SaleInvoice.SaleInvoiceID = ClientPurchaseOrderLineSalesInvoice.SaleInvoiceID - WHERE (ClientPurchaseOrderLineSalesInvoice.SaleInvoiceID IS NULL) - AND (SaleInvoice.Reference IS NOT NULL) - ", conn)) - { - using (SqlDataReader reader = cmd.ExecuteReader()) - { - if (!reader.HasRows) - { - // do nothing - return null; - } - else - { - var returnList = new List(); - while (reader.Read()) - { - returnList.Add(reader.GetString(0)); - } - return returnList; - } - } - } - } } } } diff --git a/BealeEngineering/BealeEngineering.Core/Data/Database/Client/ReadSaleInvoiceAllocation.cs b/BealeEngineering/BealeEngineering.Core/Data/Database/Client/ReadSaleInvoiceAllocation.cs new file mode 100644 index 0000000..d69d178 --- /dev/null +++ b/BealeEngineering/BealeEngineering.Core/Data/Database/Client/ReadSaleInvoiceAllocation.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BealeEngineering.Core.Data.Database.Client +{ + public class ReadSaleInvoiceAllocation : Connection + { + public ReadSaleInvoiceAllocation(string sqlConnectionString) : base(sqlConnectionString) + { + + } + public int GetUnallocatedInvoiceCount() + { + using (SqlConnection conn = new SqlConnection(sqlConnectionString)) + { + conn.Open(); + + using (SqlCommand cmd = new SqlCommand(@" + SELECT Count(SaleInvoice.SaleInvoiceID) AS CountOfSaleInvoiceID + FROM SaleInvoice + LEFT OUTER JOIN ClientPurchaseOrderLineSalesInvoice ON SaleInvoice.SaleInvoiceID = ClientPurchaseOrderLineSalesInvoice.SaleInvoiceID + WHERE (ClientPurchaseOrderLineSalesInvoice.SaleInvoiceID IS NULL) + AND (SaleInvoice.Reference IS NOT NULL) + ", conn)) + { + object obj = cmd.ExecuteScalar(); + + return (int)obj; + } + } + } + public List GetUnallocatedInvoice() + { + using (SqlConnection conn = new SqlConnection(sqlConnectionString)) + { + conn.Open(); + + using (SqlCommand cmd = new SqlCommand(@" + SELECT SaleInvoice.SaleInvoiceNumber + FROM SaleInvoice + LEFT OUTER JOIN ClientPurchaseOrderLineSalesInvoice ON SaleInvoice.SaleInvoiceID = ClientPurchaseOrderLineSalesInvoice.SaleInvoiceID + WHERE (ClientPurchaseOrderLineSalesInvoice.SaleInvoiceID IS NULL) + AND (SaleInvoice.Reference IS NOT NULL) + ", conn)) + { + using (SqlDataReader reader = cmd.ExecuteReader()) + { + if (!reader.HasRows) + { + // do nothing + return null; + } + else + { + var returnList = new List(); + while (reader.Read()) + { + returnList.Add(reader.GetString(0)); + } + return returnList; + } + } + } + } + } + } +} diff --git a/BealeEngineering/BealeEngineering.Core/Logic/Client/PurchaseOrderAutoAllocate.cs b/BealeEngineering/BealeEngineering.Core/Logic/Client/PurchaseOrderAutoAllocate.cs index f265e70..cbf4eba 100644 --- a/BealeEngineering/BealeEngineering.Core/Logic/Client/PurchaseOrderAutoAllocate.cs +++ b/BealeEngineering/BealeEngineering.Core/Logic/Client/PurchaseOrderAutoAllocate.cs @@ -27,7 +27,7 @@ namespace BealeEngineering.Core.Logic.Client Init(); // get list of unallocated invoices - var poAlloInstance = new Data.Database.Client.ReadPurchaseOrderAllocation(SqlConnectionString); + var poAlloInstance = new Data.Database.Client.ReadSaleInvoiceAllocation(SqlConnectionString); var invoiceNumberList = poAlloInstance.GetUnallocatedInvoice(); // nothing to allocate diff --git a/BealeEngineering/BealeEngineering.Core/Model/Client/PurchaseOrderAllocation.cs b/BealeEngineering/BealeEngineering.Core/Model/Client/PurchaseOrderAllocation.cs new file mode 100644 index 0000000..cf81dad --- /dev/null +++ b/BealeEngineering/BealeEngineering.Core/Model/Client/PurchaseOrderAllocation.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BealeEngineering.Core.Model.Client +{ + public class PurchaseOrderAllocation + { + public DateTime PurchaseOrderDate { get; set; } + public string JobNumber { get; set; } + public string ContactName { get; set; } + public string ProjectTitle { get; set; } + public string JobTitle { get; set; } + public string JobDescription { get; set; } + public string PurchaseOrderReference { get; set; } + public int PurchaseOrderLineNumber { get; set; } + public string PurchaseOrderLineDescription { get; set; } + public decimal PurchaseOrderLineNetAmount { get; set; } + public decimal InvoicedAmount { get; set; } + public decimal PurchaseOrderLineFacility + { + get { return PurchaseOrderLineNetAmount - InvoicedAmount; } + } + public bool PurchaseOrderIsClosed { get; set; } + } +} diff --git a/BealeEngineering/BealeEngineering.Core/Test/Client/PurchaseOrder.cs b/BealeEngineering/BealeEngineering.Core/Test/Client/PurchaseOrder.cs index b824491..16cfb6b 100644 --- a/BealeEngineering/BealeEngineering.Core/Test/Client/PurchaseOrder.cs +++ b/BealeEngineering/BealeEngineering.Core/Test/Client/PurchaseOrder.cs @@ -31,7 +31,7 @@ namespace BealeEngineering.Core.Test.Client } public void GetUnallocatedPo() { - var readPoAllo = new Data.Database.Client.ReadPurchaseOrderAllocation(SqlConnectionString); + var readPoAllo = new Data.Database.Client.ReadSaleInvoiceAllocation(SqlConnectionString); var test = readPoAllo.GetUnallocatedInvoice(); } }