Purchase order facility UI updates

This commit is contained in:
2020-02-03 13:51:07 +00:00
committed by GitHub
parent 23ba77c1be
commit 4425f6da37
19 changed files with 9458 additions and 88 deletions

View File

@@ -1,7 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<configuration> <configuration>
<configSections>
</configSections>
<connectionStrings> <connectionStrings>
<add name="BealeEngSQLDb" connectionString="Server=SQL-Server;Database=BealeEng;User Id=BealeEng Accounts;Password=3ddmur(wjS7fpjgveevs;" providerName="System.Data.SqlClient"/> <add name="BealeEngSQLDb" connectionString="Server=SQL-Server;Database=BealeEng;User Id=BealeEng Accounts;Password=3ddmur(wjS7fpjgveevs;"
providerName="System.Data.SqlClient" />
<add name="BealeEngineering.Accounts.Properties.Settings.BealeEngConnectionString"
connectionString="Data Source=SQL-Server;Initial Catalog=BealeEng;Persist Security Info=True;User ID=&quot;BealeEng Accounts&quot;;Password=3ddmur(wjS7fpjgveevs"
providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,791 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="BealeEngDataSet" targetNamespace="http://tempuri.org/BealeEngDataSet.xsd" xmlns:mstns="http://tempuri.org/BealeEngDataSet.xsd" xmlns="http://tempuri.org/BealeEngDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:annotation>
<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections>
<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="BealeEngConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="BealeEngConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.BealeEngineering.Accounts.Properties.Settings.GlobalReference.Default.BealeEngConnectionString" Provider="System.Data.SqlClient" />
</Connections>
<Tables>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ClientPurchaseOrderTableAdapter" GeneratorDataComponentClassName="ClientPurchaseOrderTableAdapter" Name="ClientPurchaseOrder" UserDataComponentName="ClientPurchaseOrderTableAdapter">
<MainSource>
<DbSource ConnectionRef="BealeEngConnectionString (Settings)" DbObjectName="BealeEng.dbo.ClientPurchaseOrder" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ClientPurchaseOrderID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_PurchaseOrderDate" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="PurchaseOrderDate" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ClientReference" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ClientReference" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_RequestorEmail" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="RequestorEmail" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_RequestorEmail" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="RequestorEmail" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_OrderTotal" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="OrderTotal" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_OrderTotal" Precision="9" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="OrderTotal" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IsClosed" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsClosed" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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())</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@PurchaseOrderDate" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="PurchaseOrderDate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ClientReference" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ClientReference" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@RequestorEmail" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="RequestorEmail" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@OrderTotal" Precision="9" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="OrderTotal" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsClosed" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsClosed" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT ClientPurchaseOrderID, PurchaseOrderDate, ContactID, ClientReference, RequestorEmail, OrderTotal, IsClosed FROM dbo.ClientPurchaseOrder</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@PurchaseOrderDate" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="PurchaseOrderDate" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ClientReference" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ClientReference" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@RequestorEmail" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="RequestorEmail" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@OrderTotal" Precision="9" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="OrderTotal" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsClosed" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsClosed" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ClientPurchaseOrderID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_PurchaseOrderDate" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="PurchaseOrderDate" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ClientReference" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ClientReference" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_RequestorEmail" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="RequestorEmail" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_RequestorEmail" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="RequestorEmail" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_OrderTotal" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="OrderTotal" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_OrderTotal" Precision="9" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="OrderTotal" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IsClosed" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsClosed" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="ClientPurchaseOrderID" ColumnName="ClientPurchaseOrderID" DataSourceName="BealeEng.dbo.ClientPurchaseOrder" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ClientPurchaseOrderID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ClientPurchaseOrderID" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="ClientPurchaseOrderID" DataSetColumn="ClientPurchaseOrderID" />
<Mapping SourceColumn="PurchaseOrderDate" DataSetColumn="PurchaseOrderDate" />
<Mapping SourceColumn="ContactID" DataSetColumn="ContactID" />
<Mapping SourceColumn="ClientReference" DataSetColumn="ClientReference" />
<Mapping SourceColumn="RequestorEmail" DataSetColumn="RequestorEmail" />
<Mapping SourceColumn="OrderTotal" DataSetColumn="OrderTotal" />
<Mapping SourceColumn="IsClosed" DataSetColumn="IsClosed" />
</Mappings>
<Sources />
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ClientPurchaseOrderLineTableAdapter" GeneratorDataComponentClassName="ClientPurchaseOrderLineTableAdapter" Name="ClientPurchaseOrderLine" UserDataComponentName="ClientPurchaseOrderLineTableAdapter">
<MainSource>
<DbSource ConnectionRef="BealeEngConnectionString (Settings)" DbObjectName="BealeEng.dbo.ClientPurchaseOrderLine" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ClientPurchaseOrderLineID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderLineID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ClientPurchaseOrderID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_LineNumber" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="LineNumber" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ProjectJobID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectJobID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_Description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Description" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Description" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Description" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_LineNetAmount" Precision="9" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="LineNetAmount" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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())</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ClientPurchaseOrderID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@LineNumber" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="LineNumber" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ProjectJobID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectJobID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Description" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Description" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@LineNetAmount" Precision="9" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="LineNetAmount" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT ClientPurchaseOrderLineID, ClientPurchaseOrderID, LineNumber, ProjectJobID, Description, LineNetAmount FROM dbo.ClientPurchaseOrderLine</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ClientPurchaseOrderID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@LineNumber" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="LineNumber" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ProjectJobID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectJobID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Description" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Description" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@LineNetAmount" Precision="9" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="LineNetAmount" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ClientPurchaseOrderLineID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderLineID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ClientPurchaseOrderID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_LineNumber" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="LineNumber" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ProjectJobID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectJobID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_Description" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Description" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Description" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Description" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_LineNetAmount" Precision="9" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="LineNetAmount" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="ClientPurchaseOrderLineID" ColumnName="ClientPurchaseOrderLineID" DataSourceName="BealeEng.dbo.ClientPurchaseOrderLine" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ClientPurchaseOrderLineID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ClientPurchaseOrderLineID" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="ClientPurchaseOrderLineID" DataSetColumn="ClientPurchaseOrderLineID" />
<Mapping SourceColumn="ClientPurchaseOrderID" DataSetColumn="ClientPurchaseOrderID" />
<Mapping SourceColumn="LineNumber" DataSetColumn="LineNumber" />
<Mapping SourceColumn="ProjectJobID" DataSetColumn="ProjectJobID" />
<Mapping SourceColumn="Description" DataSetColumn="Description" />
<Mapping SourceColumn="LineNetAmount" DataSetColumn="LineNetAmount" />
</Mappings>
<Sources />
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ClientPurchaseOrderLineSalesInvoiceTableAdapter" GeneratorDataComponentClassName="ClientPurchaseOrderLineSalesInvoiceTableAdapter" Name="ClientPurchaseOrderLineSalesInvoice" UserDataComponentName="ClientPurchaseOrderLineSalesInvoiceTableAdapter">
<MainSource>
<DbSource ConnectionRef="BealeEngConnectionString (Settings)" DbObjectName="BealeEng.dbo.ClientPurchaseOrderLineSalesInvoice" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>DELETE FROM [dbo].[ClientPurchaseOrderLineSalesInvoice] WHERE (([ClientPurchaseOrderLineID] = @Original_ClientPurchaseOrderLineID) AND ([SaleInvoiceID] = @Original_SaleInvoiceID) AND ([IsApproved] = @Original_IsApproved))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ClientPurchaseOrderLineID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderLineID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_SaleInvoiceID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SaleInvoiceID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IsApproved" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsApproved" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>INSERT INTO [dbo].[ClientPurchaseOrderLineSalesInvoice] ([ClientPurchaseOrderLineID], [SaleInvoiceID], [IsApproved]) VALUES (@ClientPurchaseOrderLineID, @SaleInvoiceID, @IsApproved);
SELECT ClientPurchaseOrderLineID, SaleInvoiceID, IsApproved FROM ClientPurchaseOrderLineSalesInvoice WHERE (SaleInvoiceID = @SaleInvoiceID)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ClientPurchaseOrderLineID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderLineID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SaleInvoiceID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SaleInvoiceID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsApproved" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsApproved" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT ClientPurchaseOrderLineID, SaleInvoiceID, IsApproved FROM dbo.ClientPurchaseOrderLineSalesInvoice</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ClientPurchaseOrderLineID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderLineID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@SaleInvoiceID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SaleInvoiceID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsApproved" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsApproved" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ClientPurchaseOrderLineID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientPurchaseOrderLineID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_SaleInvoiceID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="SaleInvoiceID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IsApproved" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsApproved" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="ClientPurchaseOrderLineID" DataSetColumn="ClientPurchaseOrderLineID" />
<Mapping SourceColumn="SaleInvoiceID" DataSetColumn="SaleInvoiceID" />
<Mapping SourceColumn="IsApproved" DataSetColumn="IsApproved" />
</Mappings>
<Sources />
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ContactTableAdapter" GeneratorDataComponentClassName="ContactTableAdapter" Name="Contact" UserDataComponentName="ContactTableAdapter">
<MainSource>
<DbSource ConnectionRef="BealeEngConnectionString (Settings)" DbObjectName="BealeEng.dbo.Contact" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>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)))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ContactName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ContactName" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_EmailAddress" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="EmailAddress" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_EmailAddress" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="EmailAddress" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_PrimaryPersonFirstName" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="PrimaryPersonFirstName" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_PrimaryPersonFirstName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonFirstName" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_PrimaryPersonSurname" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="PrimaryPersonSurname" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_PrimaryPersonSurname" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonSurname" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_PrimaryPersonEmail" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="PrimaryPersonEmail" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_PrimaryPersonEmail" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonEmail" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressLine1" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressLine1" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressLine1" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine1" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressLine2" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressLine2" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressLine2" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine2" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressLine3" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressLine3" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressLine3" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine3" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressLine4" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressLine4" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressLine4" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine4" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressCity" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressCity" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressCity" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressCity" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressRegion" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressRegion" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressRegion" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressRegion" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressPostalCode" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressPostalCode" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressPostalCode" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressPostalCode" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressCountry" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressCountry" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressCountry" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressCountry" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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())</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ContactName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ContactName" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@EmailAddress" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="EmailAddress" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@PrimaryPersonFirstName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonFirstName" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@PrimaryPersonSurname" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonSurname" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@PrimaryPersonEmail" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonEmail" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressLine1" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressLine2" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine2" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressLine3" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine3" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressLine4" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressCity" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressCity" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressRegion" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressRegion" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressPostalCode" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressPostalCode" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressCountry" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressCountry" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT ContactID, ContactName, EmailAddress, PrimaryPersonFirstName, PrimaryPersonSurname, PrimaryPersonEmail, POAddressLine1, POAddressLine2, POAddressLine3, POAddressLine4, POAddressCity, POAddressRegion, POAddressPostalCode, POAddressCountry FROM dbo.Contact</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>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)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ContactName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ContactName" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@EmailAddress" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="EmailAddress" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@PrimaryPersonFirstName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonFirstName" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@PrimaryPersonSurname" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonSurname" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@PrimaryPersonEmail" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonEmail" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressLine1" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine1" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressLine2" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine2" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressLine3" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine3" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressLine4" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine4" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressCity" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressCity" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressRegion" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressRegion" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressPostalCode" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressPostalCode" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@POAddressCountry" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressCountry" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ContactName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ContactName" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_EmailAddress" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="EmailAddress" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_EmailAddress" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="EmailAddress" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_PrimaryPersonFirstName" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="PrimaryPersonFirstName" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_PrimaryPersonFirstName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonFirstName" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_PrimaryPersonSurname" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="PrimaryPersonSurname" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_PrimaryPersonSurname" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonSurname" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_PrimaryPersonEmail" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="PrimaryPersonEmail" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_PrimaryPersonEmail" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="PrimaryPersonEmail" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressLine1" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressLine1" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressLine1" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine1" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressLine2" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressLine2" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressLine2" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine2" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressLine3" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressLine3" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressLine3" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine3" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressLine4" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressLine4" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressLine4" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressLine4" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressCity" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressCity" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressCity" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressCity" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressRegion" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressRegion" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressRegion" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressRegion" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressPostalCode" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressPostalCode" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressPostalCode" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressPostalCode" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_POAddressCountry" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="POAddressCountry" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_POAddressCountry" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="POAddressCountry" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="ContactID" ColumnName="ContactID" DataSourceName="BealeEng.dbo.Contact" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ContactID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="ContactID" DataSetColumn="ContactID" />
<Mapping SourceColumn="ContactName" DataSetColumn="ContactName" />
<Mapping SourceColumn="EmailAddress" DataSetColumn="EmailAddress" />
<Mapping SourceColumn="PrimaryPersonFirstName" DataSetColumn="PrimaryPersonFirstName" />
<Mapping SourceColumn="PrimaryPersonSurname" DataSetColumn="PrimaryPersonSurname" />
<Mapping SourceColumn="PrimaryPersonEmail" DataSetColumn="PrimaryPersonEmail" />
<Mapping SourceColumn="POAddressLine1" DataSetColumn="POAddressLine1" />
<Mapping SourceColumn="POAddressLine2" DataSetColumn="POAddressLine2" />
<Mapping SourceColumn="POAddressLine3" DataSetColumn="POAddressLine3" />
<Mapping SourceColumn="POAddressLine4" DataSetColumn="POAddressLine4" />
<Mapping SourceColumn="POAddressCity" DataSetColumn="POAddressCity" />
<Mapping SourceColumn="POAddressRegion" DataSetColumn="POAddressRegion" />
<Mapping SourceColumn="POAddressPostalCode" DataSetColumn="POAddressPostalCode" />
<Mapping SourceColumn="POAddressCountry" DataSetColumn="POAddressCountry" />
</Mappings>
<Sources />
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ProjectTableAdapter" GeneratorDataComponentClassName="ProjectTableAdapter" Name="Project" UserDataComponentName="ProjectTableAdapter">
<MainSource>
<DbSource ConnectionRef="BealeEngConnectionString (Settings)" DbObjectName="BealeEng.dbo.Project" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ProjectID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ProjectRef" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectRef" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ProjectRef" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ProjectRef" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ProjectTitle" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ProjectTitle" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DateStart" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_DateStart" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DateEnd" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_DateEnd" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ClientName" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientName" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ClientName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ClientName" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IsArchived" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsArchived" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ProjectID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ProjectRef" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ProjectRef" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ProjectTitle" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ProjectTitle" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@DateStart" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@DateEnd" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ClientName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ClientName" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsArchived" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsArchived" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT ProjectID, ContactID, ProjectRef, ProjectTitle, DateStart, DateEnd, ClientName, IsArchived FROM dbo.Project</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ProjectID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ProjectRef" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ProjectRef" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ProjectTitle" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ProjectTitle" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@DateStart" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@DateEnd" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@ClientName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ClientName" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsArchived" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsArchived" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ProjectID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ProjectRef" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectRef" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ProjectRef" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ProjectRef" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ProjectTitle" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ProjectTitle" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DateStart" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_DateStart" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DateEnd" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_DateEnd" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ClientName" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ClientName" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_ClientName" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="ClientName" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IsArchived" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsArchived" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="ProjectID" DataSetColumn="ProjectID" />
<Mapping SourceColumn="ContactID" DataSetColumn="ContactID" />
<Mapping SourceColumn="ProjectRef" DataSetColumn="ProjectRef" />
<Mapping SourceColumn="ProjectTitle" DataSetColumn="ProjectTitle" />
<Mapping SourceColumn="DateStart" DataSetColumn="DateStart" />
<Mapping SourceColumn="DateEnd" DataSetColumn="DateEnd" />
<Mapping SourceColumn="ClientName" DataSetColumn="ClientName" />
<Mapping SourceColumn="IsArchived" DataSetColumn="IsArchived" />
</Mappings>
<Sources />
</TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ProjectJobTableAdapter" GeneratorDataComponentClassName="ProjectJobTableAdapter" Name="ProjectJob" UserDataComponentName="ProjectJobTableAdapter">
<MainSource>
<DbSource ConnectionRef="BealeEngConnectionString (Settings)" DbObjectName="BealeEng.dbo.ProjectJob" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ProjectJobID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectJobID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ProjectID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_JobNumber" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="JobNumber" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_JobTitle" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="JobTitle" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_JobTitle" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="JobTitle" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_JobDescription" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="JobDescription" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_JobDescription" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="JobDescription" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DateStart" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_DateStart" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DateEnd" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_DateEnd" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ShareBob" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ShareBob" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_ShareBob" Precision="9" ProviderType="Decimal" Scale="8" Size="0" SourceColumn="ShareBob" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ShareJohn" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ShareJohn" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_ShareJohn" Precision="9" ProviderType="Decimal" Scale="8" Size="0" SourceColumn="ShareJohn" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IsArchived" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsArchived" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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())</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ProjectID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@JobNumber" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="JobNumber" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@JobTitle" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="JobTitle" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@JobDescription" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="JobDescription" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@DateStart" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@DateEnd" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ShareBob" Precision="9" ProviderType="Decimal" Scale="8" Size="0" SourceColumn="ShareBob" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ShareJohn" Precision="9" ProviderType="Decimal" Scale="8" Size="0" SourceColumn="ShareJohn" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsArchived" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsArchived" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT ProjectJobID, ProjectID, ContactID, JobNumber, JobTitle, JobDescription, DateStart, DateEnd, ShareBob, ShareJohn, IsArchived FROM dbo.ProjectJob</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<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)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ProjectID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@JobNumber" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="JobNumber" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@JobTitle" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="JobTitle" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@JobDescription" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="JobDescription" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@DateStart" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@DateEnd" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ShareBob" Precision="9" ProviderType="Decimal" Scale="8" Size="0" SourceColumn="ShareBob" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@ShareJohn" Precision="9" ProviderType="Decimal" Scale="8" Size="0" SourceColumn="ShareJohn" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IsArchived" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsArchived" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ProjectJobID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectJobID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ProjectID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ProjectID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ContactID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ContactID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="StringFixedLength" Direction="Input" ParameterName="@Original_JobNumber" Precision="0" ProviderType="NChar" Scale="0" Size="0" SourceColumn="JobNumber" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_JobTitle" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="JobTitle" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_JobTitle" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="JobTitle" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_JobDescription" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="JobDescription" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_JobDescription" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="JobDescription" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DateStart" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_DateStart" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateStart" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_DateEnd" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@Original_DateEnd" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="DateEnd" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ShareBob" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ShareBob" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_ShareBob" Precision="9" ProviderType="Decimal" Scale="8" Size="0" SourceColumn="ShareBob" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ShareJohn" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ShareJohn" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Original_ShareJohn" Precision="9" ProviderType="Decimal" Scale="8" Size="0" SourceColumn="ShareJohn" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IsArchived" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IsArchived" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="ProjectJobID" ColumnName="ProjectJobID" DataSourceName="BealeEng.dbo.ProjectJob" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ProjectJobID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ProjectJobID" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="ProjectJobID" DataSetColumn="ProjectJobID" />
<Mapping SourceColumn="ProjectID" DataSetColumn="ProjectID" />
<Mapping SourceColumn="ContactID" DataSetColumn="ContactID" />
<Mapping SourceColumn="JobNumber" DataSetColumn="JobNumber" />
<Mapping SourceColumn="JobTitle" DataSetColumn="JobTitle" />
<Mapping SourceColumn="JobDescription" DataSetColumn="JobDescription" />
<Mapping SourceColumn="DateStart" DataSetColumn="DateStart" />
<Mapping SourceColumn="DateEnd" DataSetColumn="DateEnd" />
<Mapping SourceColumn="ShareBob" DataSetColumn="ShareBob" />
<Mapping SourceColumn="ShareJohn" DataSetColumn="ShareJohn" />
<Mapping SourceColumn="IsArchived" DataSetColumn="IsArchived" />
</Mappings>
<Sources />
</TableAdapter>
</Tables>
<Sources />
</DataSource>
</xs:appinfo>
</xs:annotation>
<xs:element name="BealeEngDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="BealeEngDataSet" msprop:Generator_UserDSName="BealeEngDataSet">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="ClientPurchaseOrder" msprop:Generator_TableClassName="ClientPurchaseOrderDataTable" msprop:Generator_TableVarName="tableClientPurchaseOrder" msprop:Generator_TablePropName="ClientPurchaseOrder" msprop:Generator_RowDeletingName="ClientPurchaseOrderRowDeleting" msprop:Generator_RowChangingName="ClientPurchaseOrderRowChanging" msprop:Generator_RowEvHandlerName="ClientPurchaseOrderRowChangeEventHandler" msprop:Generator_RowDeletedName="ClientPurchaseOrderRowDeleted" msprop:Generator_UserTableName="ClientPurchaseOrder" msprop:Generator_RowChangedName="ClientPurchaseOrderRowChanged" msprop:Generator_RowEvArgName="ClientPurchaseOrderRowChangeEvent" msprop:Generator_RowClassName="ClientPurchaseOrderRow">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientPurchaseOrderID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnClientPurchaseOrderID" msprop:Generator_ColumnPropNameInRow="ClientPurchaseOrderID" msprop:Generator_ColumnPropNameInTable="ClientPurchaseOrderIDColumn" msprop:Generator_UserColumnName="ClientPurchaseOrderID" type="xs:int" />
<xs:element name="PurchaseOrderDate" msprop:Generator_ColumnVarNameInTable="columnPurchaseOrderDate" msprop:Generator_ColumnPropNameInRow="PurchaseOrderDate" msprop:Generator_ColumnPropNameInTable="PurchaseOrderDateColumn" msprop:Generator_UserColumnName="PurchaseOrderDate" type="xs:dateTime" />
<xs:element name="ContactID" msprop:Generator_ColumnVarNameInTable="columnContactID" msprop:Generator_ColumnPropNameInRow="ContactID" msprop:Generator_ColumnPropNameInTable="ContactIDColumn" msprop:Generator_UserColumnName="ContactID" type="xs:int" />
<xs:element name="ClientReference" msprop:Generator_ColumnVarNameInTable="columnClientReference" msprop:Generator_ColumnPropNameInRow="ClientReference" msprop:Generator_ColumnPropNameInTable="ClientReferenceColumn" msprop:Generator_UserColumnName="ClientReference">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="RequestorEmail" msprop:Generator_ColumnVarNameInTable="columnRequestorEmail" msprop:Generator_ColumnPropNameInRow="RequestorEmail" msprop:Generator_ColumnPropNameInTable="RequestorEmailColumn" msprop:Generator_UserColumnName="RequestorEmail" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="150" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="OrderTotal" msprop:Generator_ColumnVarNameInTable="columnOrderTotal" msprop:Generator_ColumnPropNameInRow="OrderTotal" msprop:Generator_ColumnPropNameInTable="OrderTotalColumn" msprop:Generator_UserColumnName="OrderTotal" type="xs:decimal" minOccurs="0" />
<xs:element name="IsClosed" msprop:Generator_ColumnVarNameInTable="columnIsClosed" msprop:Generator_ColumnPropNameInRow="IsClosed" msprop:Generator_ColumnPropNameInTable="IsClosedColumn" msprop:Generator_UserColumnName="IsClosed" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ClientPurchaseOrderLine" msprop:Generator_TableClassName="ClientPurchaseOrderLineDataTable" msprop:Generator_TableVarName="tableClientPurchaseOrderLine" msprop:Generator_TablePropName="ClientPurchaseOrderLine" msprop:Generator_RowDeletingName="ClientPurchaseOrderLineRowDeleting" msprop:Generator_RowChangingName="ClientPurchaseOrderLineRowChanging" msprop:Generator_RowEvHandlerName="ClientPurchaseOrderLineRowChangeEventHandler" msprop:Generator_RowDeletedName="ClientPurchaseOrderLineRowDeleted" msprop:Generator_UserTableName="ClientPurchaseOrderLine" msprop:Generator_RowChangedName="ClientPurchaseOrderLineRowChanged" msprop:Generator_RowEvArgName="ClientPurchaseOrderLineRowChangeEvent" msprop:Generator_RowClassName="ClientPurchaseOrderLineRow">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientPurchaseOrderLineID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnClientPurchaseOrderLineID" msprop:Generator_ColumnPropNameInRow="ClientPurchaseOrderLineID" msprop:Generator_ColumnPropNameInTable="ClientPurchaseOrderLineIDColumn" msprop:Generator_UserColumnName="ClientPurchaseOrderLineID" type="xs:int" />
<xs:element name="ClientPurchaseOrderID" msprop:Generator_ColumnVarNameInTable="columnClientPurchaseOrderID" msprop:Generator_ColumnPropNameInRow="ClientPurchaseOrderID" msprop:Generator_ColumnPropNameInTable="ClientPurchaseOrderIDColumn" msprop:Generator_UserColumnName="ClientPurchaseOrderID" type="xs:int" />
<xs:element name="LineNumber" msprop:Generator_ColumnVarNameInTable="columnLineNumber" msprop:Generator_ColumnPropNameInRow="LineNumber" msprop:Generator_ColumnPropNameInTable="LineNumberColumn" msprop:Generator_UserColumnName="LineNumber" type="xs:int" />
<xs:element name="ProjectJobID" msprop:Generator_ColumnVarNameInTable="columnProjectJobID" msprop:Generator_ColumnPropNameInRow="ProjectJobID" msprop:Generator_ColumnPropNameInTable="ProjectJobIDColumn" msprop:Generator_UserColumnName="ProjectJobID" type="xs:int" />
<xs:element name="Description" msprop:Generator_ColumnVarNameInTable="columnDescription" msprop:Generator_ColumnPropNameInRow="Description" msprop:Generator_ColumnPropNameInTable="DescriptionColumn" msprop:Generator_UserColumnName="Description" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="LineNetAmount" msprop:Generator_ColumnVarNameInTable="columnLineNetAmount" msprop:Generator_ColumnPropNameInRow="LineNetAmount" msprop:Generator_ColumnPropNameInTable="LineNetAmountColumn" msprop:Generator_UserColumnName="LineNetAmount" type="xs:decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ClientPurchaseOrderLineSalesInvoice" msprop:Generator_TableClassName="ClientPurchaseOrderLineSalesInvoiceDataTable" msprop:Generator_TableVarName="tableClientPurchaseOrderLineSalesInvoice" msprop:Generator_TablePropName="ClientPurchaseOrderLineSalesInvoice" msprop:Generator_RowDeletingName="ClientPurchaseOrderLineSalesInvoiceRowDeleting" msprop:Generator_RowChangingName="ClientPurchaseOrderLineSalesInvoiceRowChanging" msprop:Generator_RowEvHandlerName="ClientPurchaseOrderLineSalesInvoiceRowChangeEventHandler" msprop:Generator_RowDeletedName="ClientPurchaseOrderLineSalesInvoiceRowDeleted" msprop:Generator_UserTableName="ClientPurchaseOrderLineSalesInvoice" msprop:Generator_RowChangedName="ClientPurchaseOrderLineSalesInvoiceRowChanged" msprop:Generator_RowEvArgName="ClientPurchaseOrderLineSalesInvoiceRowChangeEvent" msprop:Generator_RowClassName="ClientPurchaseOrderLineSalesInvoiceRow">
<xs:complexType>
<xs:sequence>
<xs:element name="ClientPurchaseOrderLineID" msprop:Generator_ColumnVarNameInTable="columnClientPurchaseOrderLineID" msprop:Generator_ColumnPropNameInRow="ClientPurchaseOrderLineID" msprop:Generator_ColumnPropNameInTable="ClientPurchaseOrderLineIDColumn" msprop:Generator_UserColumnName="ClientPurchaseOrderLineID" type="xs:int" />
<xs:element name="SaleInvoiceID" msprop:Generator_ColumnVarNameInTable="columnSaleInvoiceID" msprop:Generator_ColumnPropNameInRow="SaleInvoiceID" msprop:Generator_ColumnPropNameInTable="SaleInvoiceIDColumn" msprop:Generator_UserColumnName="SaleInvoiceID" type="xs:int" />
<xs:element name="IsApproved" msprop:Generator_ColumnVarNameInTable="columnIsApproved" msprop:Generator_ColumnPropNameInRow="IsApproved" msprop:Generator_ColumnPropNameInTable="IsApprovedColumn" msprop:Generator_UserColumnName="IsApproved" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Contact" msprop:Generator_TableClassName="ContactDataTable" msprop:Generator_TableVarName="tableContact" msprop:Generator_TablePropName="Contact" msprop:Generator_RowDeletingName="ContactRowDeleting" msprop:Generator_RowChangingName="ContactRowChanging" msprop:Generator_RowEvHandlerName="ContactRowChangeEventHandler" msprop:Generator_RowDeletedName="ContactRowDeleted" msprop:Generator_UserTableName="Contact" msprop:Generator_RowChangedName="ContactRowChanged" msprop:Generator_RowEvArgName="ContactRowChangeEvent" msprop:Generator_RowClassName="ContactRow">
<xs:complexType>
<xs:sequence>
<xs:element name="ContactID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnContactID" msprop:Generator_ColumnPropNameInRow="ContactID" msprop:Generator_ColumnPropNameInTable="ContactIDColumn" msprop:Generator_UserColumnName="ContactID" type="xs:int" />
<xs:element name="ContactName" msprop:Generator_ColumnVarNameInTable="columnContactName" msprop:Generator_ColumnPropNameInRow="ContactName" msprop:Generator_ColumnPropNameInTable="ContactNameColumn" msprop:Generator_UserColumnName="ContactName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EmailAddress" msprop:Generator_ColumnVarNameInTable="columnEmailAddress" msprop:Generator_ColumnPropNameInRow="EmailAddress" msprop:Generator_ColumnPropNameInTable="EmailAddressColumn" msprop:Generator_UserColumnName="EmailAddress" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="150" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PrimaryPersonFirstName" msprop:Generator_ColumnVarNameInTable="columnPrimaryPersonFirstName" msprop:Generator_ColumnPropNameInRow="PrimaryPersonFirstName" msprop:Generator_ColumnPropNameInTable="PrimaryPersonFirstNameColumn" msprop:Generator_UserColumnName="PrimaryPersonFirstName" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PrimaryPersonSurname" msprop:Generator_ColumnVarNameInTable="columnPrimaryPersonSurname" msprop:Generator_ColumnPropNameInRow="PrimaryPersonSurname" msprop:Generator_ColumnPropNameInTable="PrimaryPersonSurnameColumn" msprop:Generator_UserColumnName="PrimaryPersonSurname" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PrimaryPersonEmail" msprop:Generator_ColumnVarNameInTable="columnPrimaryPersonEmail" msprop:Generator_ColumnPropNameInRow="PrimaryPersonEmail" msprop:Generator_ColumnPropNameInTable="PrimaryPersonEmailColumn" msprop:Generator_UserColumnName="PrimaryPersonEmail" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="POAddressLine1" msprop:Generator_ColumnVarNameInTable="columnPOAddressLine1" msprop:Generator_ColumnPropNameInRow="POAddressLine1" msprop:Generator_ColumnPropNameInTable="POAddressLine1Column" msprop:Generator_UserColumnName="POAddressLine1" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="POAddressLine2" msprop:Generator_ColumnVarNameInTable="columnPOAddressLine2" msprop:Generator_ColumnPropNameInRow="POAddressLine2" msprop:Generator_ColumnPropNameInTable="POAddressLine2Column" msprop:Generator_UserColumnName="POAddressLine2" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="POAddressLine3" msprop:Generator_ColumnVarNameInTable="columnPOAddressLine3" msprop:Generator_ColumnPropNameInRow="POAddressLine3" msprop:Generator_ColumnPropNameInTable="POAddressLine3Column" msprop:Generator_UserColumnName="POAddressLine3" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="POAddressLine4" msprop:Generator_ColumnVarNameInTable="columnPOAddressLine4" msprop:Generator_ColumnPropNameInRow="POAddressLine4" msprop:Generator_ColumnPropNameInTable="POAddressLine4Column" msprop:Generator_UserColumnName="POAddressLine4" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="POAddressCity" msprop:Generator_ColumnVarNameInTable="columnPOAddressCity" msprop:Generator_ColumnPropNameInRow="POAddressCity" msprop:Generator_ColumnPropNameInTable="POAddressCityColumn" msprop:Generator_UserColumnName="POAddressCity" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="POAddressRegion" msprop:Generator_ColumnVarNameInTable="columnPOAddressRegion" msprop:Generator_ColumnPropNameInRow="POAddressRegion" msprop:Generator_ColumnPropNameInTable="POAddressRegionColumn" msprop:Generator_UserColumnName="POAddressRegion" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="POAddressPostalCode" msprop:Generator_ColumnVarNameInTable="columnPOAddressPostalCode" msprop:Generator_ColumnPropNameInRow="POAddressPostalCode" msprop:Generator_ColumnPropNameInTable="POAddressPostalCodeColumn" msprop:Generator_UserColumnName="POAddressPostalCode" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="POAddressCountry" msprop:Generator_ColumnVarNameInTable="columnPOAddressCountry" msprop:Generator_ColumnPropNameInRow="POAddressCountry" msprop:Generator_ColumnPropNameInTable="POAddressCountryColumn" msprop:Generator_UserColumnName="POAddressCountry" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Project" msprop:Generator_TableClassName="ProjectDataTable" msprop:Generator_TableVarName="tableProject" msprop:Generator_TablePropName="Project" msprop:Generator_RowDeletingName="ProjectRowDeleting" msprop:Generator_RowChangingName="ProjectRowChanging" msprop:Generator_RowEvHandlerName="ProjectRowChangeEventHandler" msprop:Generator_RowDeletedName="ProjectRowDeleted" msprop:Generator_UserTableName="Project" msprop:Generator_RowChangedName="ProjectRowChanged" msprop:Generator_RowEvArgName="ProjectRowChangeEvent" msprop:Generator_RowClassName="ProjectRow">
<xs:complexType>
<xs:sequence>
<xs:element name="ProjectID" msprop:Generator_ColumnVarNameInTable="columnProjectID" msprop:Generator_ColumnPropNameInRow="ProjectID" msprop:Generator_ColumnPropNameInTable="ProjectIDColumn" msprop:Generator_UserColumnName="ProjectID" type="xs:int" />
<xs:element name="ContactID" msprop:Generator_ColumnVarNameInTable="columnContactID" msprop:Generator_ColumnPropNameInRow="ContactID" msprop:Generator_ColumnPropNameInTable="ContactIDColumn" msprop:Generator_UserColumnName="ContactID" type="xs:int" />
<xs:element name="ProjectRef" msprop:Generator_ColumnVarNameInTable="columnProjectRef" msprop:Generator_ColumnPropNameInRow="ProjectRef" msprop:Generator_ColumnPropNameInTable="ProjectRefColumn" msprop:Generator_UserColumnName="ProjectRef" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="16" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ProjectTitle" msprop:Generator_ColumnVarNameInTable="columnProjectTitle" msprop:Generator_ColumnPropNameInRow="ProjectTitle" msprop:Generator_ColumnPropNameInTable="ProjectTitleColumn" msprop:Generator_UserColumnName="ProjectTitle">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DateStart" msprop:Generator_ColumnVarNameInTable="columnDateStart" msprop:Generator_ColumnPropNameInRow="DateStart" msprop:Generator_ColumnPropNameInTable="DateStartColumn" msprop:Generator_UserColumnName="DateStart" type="xs:dateTime" minOccurs="0" />
<xs:element name="DateEnd" msprop:Generator_ColumnVarNameInTable="columnDateEnd" msprop:Generator_ColumnPropNameInRow="DateEnd" msprop:Generator_ColumnPropNameInTable="DateEndColumn" msprop:Generator_UserColumnName="DateEnd" type="xs:dateTime" minOccurs="0" />
<xs:element name="ClientName" msprop:Generator_ColumnVarNameInTable="columnClientName" msprop:Generator_ColumnPropNameInRow="ClientName" msprop:Generator_ColumnPropNameInTable="ClientNameColumn" msprop:Generator_UserColumnName="ClientName" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="IsArchived" msprop:Generator_ColumnVarNameInTable="columnIsArchived" msprop:Generator_ColumnPropNameInRow="IsArchived" msprop:Generator_ColumnPropNameInTable="IsArchivedColumn" msprop:Generator_UserColumnName="IsArchived" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ProjectJob" msprop:Generator_TableClassName="ProjectJobDataTable" msprop:Generator_TableVarName="tableProjectJob" msprop:Generator_TablePropName="ProjectJob" msprop:Generator_RowDeletingName="ProjectJobRowDeleting" msprop:Generator_RowChangingName="ProjectJobRowChanging" msprop:Generator_RowEvHandlerName="ProjectJobRowChangeEventHandler" msprop:Generator_RowDeletedName="ProjectJobRowDeleted" msprop:Generator_UserTableName="ProjectJob" msprop:Generator_RowChangedName="ProjectJobRowChanged" msprop:Generator_RowEvArgName="ProjectJobRowChangeEvent" msprop:Generator_RowClassName="ProjectJobRow">
<xs:complexType>
<xs:sequence>
<xs:element name="ProjectJobID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnProjectJobID" msprop:Generator_ColumnPropNameInRow="ProjectJobID" msprop:Generator_ColumnPropNameInTable="ProjectJobIDColumn" msprop:Generator_UserColumnName="ProjectJobID" type="xs:int" />
<xs:element name="ProjectID" msprop:Generator_ColumnVarNameInTable="columnProjectID" msprop:Generator_ColumnPropNameInRow="ProjectID" msprop:Generator_ColumnPropNameInTable="ProjectIDColumn" msprop:Generator_UserColumnName="ProjectID" type="xs:int" />
<xs:element name="ContactID" msprop:Generator_ColumnVarNameInTable="columnContactID" msprop:Generator_ColumnPropNameInRow="ContactID" msprop:Generator_ColumnPropNameInTable="ContactIDColumn" msprop:Generator_UserColumnName="ContactID" type="xs:int" />
<xs:element name="JobNumber" msprop:Generator_ColumnVarNameInTable="columnJobNumber" msprop:Generator_ColumnPropNameInRow="JobNumber" msprop:Generator_ColumnPropNameInTable="JobNumberColumn" msprop:Generator_UserColumnName="JobNumber">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="7" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="JobTitle" msprop:Generator_ColumnVarNameInTable="columnJobTitle" msprop:Generator_ColumnPropNameInRow="JobTitle" msprop:Generator_ColumnPropNameInTable="JobTitleColumn" msprop:Generator_UserColumnName="JobTitle" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="250" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="JobDescription" msprop:Generator_ColumnVarNameInTable="columnJobDescription" msprop:Generator_ColumnPropNameInRow="JobDescription" msprop:Generator_ColumnPropNameInTable="JobDescriptionColumn" msprop:Generator_UserColumnName="JobDescription" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="500" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DateStart" msprop:Generator_ColumnVarNameInTable="columnDateStart" msprop:Generator_ColumnPropNameInRow="DateStart" msprop:Generator_ColumnPropNameInTable="DateStartColumn" msprop:Generator_UserColumnName="DateStart" type="xs:dateTime" minOccurs="0" />
<xs:element name="DateEnd" msprop:Generator_ColumnVarNameInTable="columnDateEnd" msprop:Generator_ColumnPropNameInRow="DateEnd" msprop:Generator_ColumnPropNameInTable="DateEndColumn" msprop:Generator_UserColumnName="DateEnd" type="xs:dateTime" minOccurs="0" />
<xs:element name="ShareBob" msprop:Generator_ColumnVarNameInTable="columnShareBob" msprop:Generator_ColumnPropNameInRow="ShareBob" msprop:Generator_ColumnPropNameInTable="ShareBobColumn" msprop:Generator_UserColumnName="ShareBob" type="xs:decimal" minOccurs="0" />
<xs:element name="ShareJohn" msprop:Generator_ColumnVarNameInTable="columnShareJohn" msprop:Generator_ColumnPropNameInRow="ShareJohn" msprop:Generator_ColumnPropNameInTable="ShareJohnColumn" msprop:Generator_UserColumnName="ShareJohn" type="xs:decimal" minOccurs="0" />
<xs:element name="IsArchived" msprop:Generator_ColumnVarNameInTable="columnIsArchived" msprop:Generator_ColumnPropNameInRow="IsArchived" msprop:Generator_ColumnPropNameInTable="IsArchivedColumn" msprop:Generator_UserColumnName="IsArchived" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:ClientPurchaseOrder" />
<xs:field xpath="mstns:ClientPurchaseOrderID" />
</xs:unique>
<xs:unique name="ClientPurchaseOrderLine_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:ClientPurchaseOrderLine" />
<xs:field xpath="mstns:ClientPurchaseOrderLineID" />
</xs:unique>
<xs:unique name="ClientPurchaseOrderLineSalesInvoice_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:ClientPurchaseOrderLineSalesInvoice" />
<xs:field xpath="mstns:SaleInvoiceID" />
</xs:unique>
<xs:unique name="Contact_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:Contact" />
<xs:field xpath="mstns:ContactID" />
</xs:unique>
<xs:unique name="Project_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:Project" />
<xs:field xpath="mstns:ProjectID" />
</xs:unique>
<xs:unique name="ProjectJob_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:ProjectJob" />
<xs:field xpath="mstns:ProjectJobID" />
</xs:unique>
</xs:element>
<xs:annotation>
<xs:appinfo>
<msdata:Relationship name="FK_ClientPurchaseOrder_Contact" msdata:parent="Contact" msdata:child="ClientPurchaseOrder" msdata:parentkey="ContactID" msdata:childkey="ContactID" msprop:Generator_UserChildTable="ClientPurchaseOrder" msprop:Generator_ChildPropName="GetClientPurchaseOrderRows" msprop:Generator_UserRelationName="FK_ClientPurchaseOrder_Contact" msprop:Generator_RelationVarName="relationFK_ClientPurchaseOrder_Contact" msprop:Generator_UserParentTable="Contact" msprop:Generator_ParentPropName="ContactRow" />
<msdata:Relationship name="FK_ClientPurchaseOrderLine_ClientPurchaseOrder" msdata:parent="ClientPurchaseOrder" msdata:child="ClientPurchaseOrderLine" msdata:parentkey="ClientPurchaseOrderID" msdata:childkey="ClientPurchaseOrderID" msprop:Generator_UserChildTable="ClientPurchaseOrderLine" msprop:Generator_ChildPropName="GetClientPurchaseOrderLineRows" msprop:Generator_UserRelationName="FK_ClientPurchaseOrderLine_ClientPurchaseOrder" msprop:Generator_ParentPropName="ClientPurchaseOrderRow" msprop:Generator_RelationVarName="relationFK_ClientPurchaseOrderLine_ClientPurchaseOrder" msprop:Generator_UserParentTable="ClientPurchaseOrder" />
<msdata:Relationship name="FK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine" msdata:parent="ClientPurchaseOrderLine" msdata:child="ClientPurchaseOrderLineSalesInvoice" msdata:parentkey="ClientPurchaseOrderLineID" msdata:childkey="ClientPurchaseOrderLineID" msprop:Generator_UserChildTable="ClientPurchaseOrderLineSalesInvoice" msprop:Generator_ChildPropName="GetClientPurchaseOrderLineSalesInvoiceRows" msprop:Generator_UserRelationName="FK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine" msprop:Generator_ParentPropName="ClientPurchaseOrderLineRow" msprop:Generator_RelationVarName="relationFK_ClientPurchaseOrderLineSalesInvoice_ClientPurchaseOrderLine" msprop:Generator_UserParentTable="ClientPurchaseOrderLine" />
<msdata:Relationship name="FK_Project_Contact" msdata:parent="Contact" msdata:child="Project" msdata:parentkey="ContactID" msdata:childkey="ContactID" msprop:Generator_UserChildTable="Project" msprop:Generator_ChildPropName="GetProjectRows" msprop:Generator_UserRelationName="FK_Project_Contact" msprop:Generator_ParentPropName="ContactRow" msprop:Generator_RelationVarName="relationFK_Project_Contact" msprop:Generator_UserParentTable="Contact" />
<msdata:Relationship name="FK_ProjectJob_Contact" msdata:parent="Contact" msdata:child="ProjectJob" msdata:parentkey="ContactID" msdata:childkey="ContactID" msprop:Generator_UserChildTable="ProjectJob" msprop:Generator_ChildPropName="GetProjectJobRows" msprop:Generator_UserRelationName="FK_ProjectJob_Contact" msprop:Generator_ParentPropName="ContactRow" msprop:Generator_RelationVarName="relationFK_ProjectJob_Contact" msprop:Generator_UserParentTable="Contact" />
<msdata:Relationship name="FK_ProjectJob_Project" msdata:parent="Project" msdata:child="ProjectJob" msdata:parentkey="ProjectID" msdata:childkey="ProjectID" msprop:Generator_UserChildTable="ProjectJob" msprop:Generator_ChildPropName="GetProjectJobRows" msprop:Generator_UserRelationName="FK_ProjectJob_Project" msprop:Generator_ParentPropName="ProjectRow" msprop:Generator_RelationVarName="relationFK_ProjectJob_Project" msprop:Generator_UserParentTable="Project" />
</xs:appinfo>
</xs:annotation>
</xs:schema>

View File

@@ -47,6 +47,11 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BealeEngDataSet.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>BealeEngDataSet.xsd</DependentUpon>
</Compile>
<Compile Include="Form1.cs"> <Compile Include="Form1.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -67,6 +72,19 @@
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
</Compile> </Compile>
<None Include="BealeEngDataSet.xsc">
<DependentUpon>BealeEngDataSet.xsd</DependentUpon>
</None>
<None Include="BealeEngDataSet.xsd">
<Generator>MSDataSetGenerator</Generator>
<LastGenOutput>BealeEngDataSet.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</None>
<None Include="BealeEngDataSet.xss">
<DependentUpon>BealeEngDataSet.xsd</DependentUpon>
</None>
<None Include="Properties\DataSources\BealeEngineering.Core.Model.Client.PurchaseOrderAllocation.datasource" />
<None Include="Properties\DataSources\Form1.datasource" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>

View File

@@ -28,34 +28,473 @@
/// </summary> /// </summary>
private void InitializeComponent() 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(); this.SuspendLayout();
// //
// btnTest // purchaseOrderAllocationBindingSource
// //
this.btnTest.Location = new System.Drawing.Point(61, 39); this.purchaseOrderAllocationBindingSource.AllowNew = false;
this.btnTest.Name = "btnTest"; this.purchaseOrderAllocationBindingSource.DataSource = typeof(BealeEngineering.Core.Model.Client.PurchaseOrderAllocation);
this.btnTest.Size = new System.Drawing.Size(139, 42); //
this.btnTest.TabIndex = 0; // tabControl1
this.btnTest.Text = "Test it!"; //
this.btnTest.UseVisualStyleBackColor = true; this.tabControl1.Controls.Add(this.tabPage1);
this.btnTest.Click += new System.EventHandler(this.button1_Click); 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 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450); this.ClientSize = new System.Drawing.Size(1151, 745);
this.Controls.Add(this.btnTest); this.Controls.Add(this.tabControl1);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "Form1"; this.Name = "Form1";
this.Text = "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.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion
private System.Windows.Forms.BindingSource purchaseOrderAllocationBindingSource;
private System.Windows.Forms.Button btnTest; 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;
} }
} }

View File

@@ -8,7 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Configuration; using System.Configuration;
using BealeEngineering.Core; using BealeEngineering.Core.Data;
namespace BealeEngineering.Accounts namespace BealeEngineering.Accounts
{ {
@@ -17,13 +17,117 @@ namespace BealeEngineering.Accounts
public Form1() public Form1()
{ {
InitializeComponent(); InitializeComponent();
SqlConnectionString = ConfigurationManager.ConnectionStrings["BealeEngSQLDb"].ToString();
}
private string SqlConnectionString { get; set; }
public List<string> TableData { get; set; }
private void Form1_Load(object sender, EventArgs e)
{
UpdateTable();
button2_Click(null, null);
} }
private void button1_Click(object sender, EventArgs e) 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);
} }
} }
} }

View File

@@ -117,4 +117,10 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="purchaseOrderAllocationBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>24, 20</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>290, 20</value>
</metadata>
</root> </root>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="PurchaseOrderAllocation" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>BealeEngineering.Core.Model.Client.PurchaseOrderAllocation, BealeEngineering.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="Form1" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>BealeEngineering.Accounts.Form1, BealeEngineering.Accounts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@@ -8,23 +8,30 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace BealeEngineering.Accounts.Properties namespace BealeEngineering.Accounts.Properties {
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default public static Settings Default {
{ get {
get
{
return defaultInstance; 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"]));
}
}
} }
} }

View File

@@ -1,7 +1,14 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="BealeEngineering.Accounts.Properties" GeneratedClassName="Settings">
<Profiles> <Profiles />
<Profile Name="(Default)" /> <Settings>
</Profiles> <Setting Name="BealeEngConnectionString" Type="(Connection string)" Scope="Application">
<Settings /> <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=SQL-Server;Initial Catalog=BealeEng;Persist Security Info=True;User ID="BealeEng Accounts";Password=3ddmur(wjS7fpjgveevs&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SQL-Server;Initial Catalog=BealeEng;Persist Security Info=True;User ID="BealeEng Accounts";Password=3ddmur(wjS7fpjgveevs</Value>
</Setting>
</Settings>
</SettingsFile> </SettingsFile>

View File

@@ -63,9 +63,11 @@
<Compile Include="Data\Database\Client\CreatePurchaseOrderAllocation.cs" /> <Compile Include="Data\Database\Client\CreatePurchaseOrderAllocation.cs" />
<Compile Include="Data\Database\Client\ReadPurchaseOrder.cs" /> <Compile Include="Data\Database\Client\ReadPurchaseOrder.cs" />
<Compile Include="Data\Database\Client\ReadPurchaseOrderAllocation.cs" /> <Compile Include="Data\Database\Client\ReadPurchaseOrderAllocation.cs" />
<Compile Include="Data\Database\Client\ReadSaleInvoiceAllocation.cs" />
<Compile Include="Data\Database\Contact\UpdateContact.cs" /> <Compile Include="Data\Database\Contact\UpdateContact.cs" />
<Compile Include="Data\Database\Sale\CreateInvoice.cs" /> <Compile Include="Data\Database\Sale\CreateInvoice.cs" />
<Compile Include="Data\Database\Sale\UpdateInvoice.cs" /> <Compile Include="Data\Database\Sale\UpdateInvoice.cs" />
<Compile Include="Model\Client\PurchaseOrderAllocation.cs" />
<Compile Include="Model\Contact\Address.cs" /> <Compile Include="Model\Contact\Address.cs" />
<Compile Include="Data\Database\Contact\CreateContact.cs" /> <Compile Include="Data\Database\Contact\CreateContact.cs" />
<Compile Include="Data\Database\Sale\ReadInvoice.cs" /> <Compile Include="Data\Database\Sale\ReadInvoice.cs" />

View File

@@ -4,6 +4,7 @@ using System.Data.SqlClient;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Dapper;
namespace BealeEngineering.Core.Data.Database.Client namespace BealeEngineering.Core.Data.Database.Client
{ {
@@ -13,59 +14,48 @@ namespace BealeEngineering.Core.Data.Database.Client
{ {
} }
public int GetUnallocatedInvoiceCount() public bool IncludeClosed { get; set; } = false;
public List<Model.Client.PurchaseOrderAllocation> 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)) using (SqlConnection conn = new SqlConnection(sqlConnectionString))
{ {
conn.Open(); conn.Open();
var parameters = new DynamicParameters();
parameters.Add("@returnClosed", IncludeClosed);
using (SqlCommand cmd = new SqlCommand(@" var purchaseOrders = conn.Query<Model.Client.PurchaseOrderAllocation>(sqlString, parameters).ToList();
SELECT Count(SaleInvoice.SaleInvoiceID) AS CountOfSaleInvoiceID return purchaseOrders;
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<string> 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<string>();
while (reader.Read())
{
returnList.Add(reader.GetString(0));
}
return returnList;
}
}
}
}
} }
} }
} }

View File

@@ -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<string> 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<string>();
while (reader.Read())
{
returnList.Add(reader.GetString(0));
}
return returnList;
}
}
}
}
}
}
}

View File

@@ -27,7 +27,7 @@ namespace BealeEngineering.Core.Logic.Client
Init(); Init();
// get list of unallocated invoices // 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(); var invoiceNumberList = poAlloInstance.GetUnallocatedInvoice();
// nothing to allocate // nothing to allocate

View File

@@ -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; }
}
}

View File

@@ -31,7 +31,7 @@ namespace BealeEngineering.Core.Test.Client
} }
public void GetUnallocatedPo() public void GetUnallocatedPo()
{ {
var readPoAllo = new Data.Database.Client.ReadPurchaseOrderAllocation(SqlConnectionString); var readPoAllo = new Data.Database.Client.ReadSaleInvoiceAllocation(SqlConnectionString);
var test = readPoAllo.GetUnallocatedInvoice(); var test = readPoAllo.GetUnallocatedInvoice();
} }
} }