diff options
| author | mo khan <mo@mokhan.ca> | 2007-08-26 20:10:42 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2007-08-26 20:10:42 -0600 |
| commit | 330be9feefb6394479553be0e078b4c4df3cbff1 (patch) | |
| tree | 55618c8af0d36583cde0ea5b4b193b98815a35aa /src/app/Cmpp298.Assignment3.Dto | |
import from svntrunk
Diffstat (limited to 'src/app/Cmpp298.Assignment3.Dto')
9 files changed, 437 insertions, 0 deletions
diff --git a/src/app/Cmpp298.Assignment3.Dto/Cmpp298.Assignment3.Dto.csproj b/src/app/Cmpp298.Assignment3.Dto/Cmpp298.Assignment3.Dto.csproj new file mode 100644 index 0000000..ca9b231 --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Dto/Cmpp298.Assignment3.Dto.csproj @@ -0,0 +1,53 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{29260A8E-3F7B-4D9B-BBE3-81210F4B9E5B}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Cmpp298.Assignment3.Dto</RootNamespace>
+ <AssemblyName>Cmpp298.Assignment3.Dto</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="DisplayVendorNameDto.cs" />
+ <Compile Include="IDropDownListAdapter.cs" />
+ <Compile Include="IDropDownListItem.cs" />
+ <Compile Include="DisplayInvoiceDto.cs" />
+ <Compile Include="DropDownListItem.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="SaveInvoiceDto.cs" />
+ <Compile Include="UpdateInvoiceDto.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Dto/DisplayInvoiceDto.cs b/src/app/Cmpp298.Assignment3.Dto/DisplayInvoiceDto.cs new file mode 100644 index 0000000..60a6739 --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Dto/DisplayInvoiceDto.cs @@ -0,0 +1,68 @@ +namespace Cmpp298.Assignment3.Dto {
+ public class DisplayInvoiceDto {
+ public DisplayInvoiceDto( string invoiceId, string vendorName, string invoiceNumber, string invoiceDate, string invoiceTotal,
+ string paymentTotal, string creditTotal, string terms, string dueDate, string paymentDate ) {
+ _invoiceId = invoiceId;
+ _vendorName = vendorName;
+ _invoiceNumber = invoiceNumber;
+ _invoiceDate = invoiceDate;
+ _invoiceTotal = invoiceTotal;
+ _paymentTotal = paymentTotal;
+ _creditTotal = creditTotal;
+ _terms = terms;
+ _dueDate = dueDate;
+ _paymentDate = paymentDate;
+ }
+
+ public string InvoiceId {
+ get { return _invoiceId; }
+ }
+
+ public string VendorName {
+ get { return _vendorName; }
+ }
+
+ public string InvoiceNumber {
+ get { return _invoiceNumber; }
+ }
+
+ public string InvoiceDate {
+ get { return _invoiceDate; }
+ }
+
+ public string InvoiceTotal {
+ get { return _invoiceTotal; }
+ }
+
+ public string PaymentTotal {
+ get { return _paymentTotal; }
+ }
+
+ public string CreditTotal {
+ get { return _creditTotal; }
+ }
+
+ public string Terms {
+ get { return _terms; }
+ }
+
+ public string DueDate {
+ get { return _dueDate; }
+ }
+
+ public string PaymentDate {
+ get { return _paymentDate; }
+ }
+
+ private readonly string _invoiceId;
+ private readonly string _vendorName;
+ private readonly string _invoiceNumber;
+ private readonly string _invoiceDate;
+ private readonly string _invoiceTotal;
+ private readonly string _paymentTotal;
+ private readonly string _creditTotal;
+ private readonly string _terms;
+ private readonly string _dueDate;
+ private readonly string _paymentDate;
+ }
+}
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Dto/DisplayVendorNameDto.cs b/src/app/Cmpp298.Assignment3.Dto/DisplayVendorNameDto.cs new file mode 100644 index 0000000..8c75007 --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Dto/DisplayVendorNameDto.cs @@ -0,0 +1,19 @@ +namespace Cmpp298.Assignment3.Dto {
+ public class DisplayVendorNameDto {
+ public DisplayVendorNameDto( string vendorId, string vendorName ) {
+ _vendorId = vendorId;
+ _vendorName = vendorName;
+ }
+
+ public string VendorId {
+ get { return _vendorId; }
+ }
+
+ public string VendorName {
+ get { return _vendorName; }
+ }
+
+ private readonly string _vendorId;
+ private readonly string _vendorName;
+ }
+}
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Dto/DropDownListItem.cs b/src/app/Cmpp298.Assignment3.Dto/DropDownListItem.cs new file mode 100644 index 0000000..de35116 --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Dto/DropDownListItem.cs @@ -0,0 +1,19 @@ +namespace Cmpp298.Assignment3.Dto {
+ public class DropDownListItem : IDropDownListItem {
+ public DropDownListItem( string text, string value ) {
+ _text = text;
+ _value = value;
+ }
+
+ public string Text {
+ get { return _text; }
+ }
+
+ public string Value {
+ get { return _value; }
+ }
+
+ private readonly string _text;
+ private readonly string _value;
+ }
+}
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Dto/IDropDownListAdapter.cs b/src/app/Cmpp298.Assignment3.Dto/IDropDownListAdapter.cs new file mode 100644 index 0000000..49276c4 --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Dto/IDropDownListAdapter.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic;
+
+namespace Cmpp298.Assignment3.Dto {
+ public interface IDropDownListAdapter {
+ void BindTo( IEnumerable< IDropDownListItem > pairs );
+
+ IDropDownListItem SelectedItem { get; }
+
+ void SetSelectedItemTo( string text );
+ }
+}
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Dto/IDropDownListItem.cs b/src/app/Cmpp298.Assignment3.Dto/IDropDownListItem.cs new file mode 100644 index 0000000..7f7b61c --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Dto/IDropDownListItem.cs @@ -0,0 +1,6 @@ +namespace Cmpp298.Assignment3.Dto {
+ public interface IDropDownListItem {
+ string Text { get; }
+ string Value { get; }
+ }
+}
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Dto/Properties/AssemblyInfo.cs b/src/app/Cmpp298.Assignment3.Dto/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c2d57cf --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Dto/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Cmpp298.Assignment3.Dto")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Cmpp298.Assignment3.Dto")]
+[assembly: AssemblyCopyright("Copyright © 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("553070cd-fb1c-428a-8463-877bd5bbcbb8")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/app/Cmpp298.Assignment3.Dto/SaveInvoiceDto.cs b/src/app/Cmpp298.Assignment3.Dto/SaveInvoiceDto.cs new file mode 100644 index 0000000..be496ba --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Dto/SaveInvoiceDto.cs @@ -0,0 +1,113 @@ +namespace Cmpp298.Assignment3.Dto {
+ public class SaveInvoiceDto {
+ public SaveInvoiceDto( string vendorId, string invoiceNumber, string invoiceDate, string invoiceTotal,
+ string paymentTotal, string creditTotal, string dueDate, string paymentDate, string termsId ) {
+ _vendorId = vendorId;
+ _invoiceNumber = invoiceNumber;
+ _invoiceDate = invoiceDate;
+ _invoiceTotal = invoiceTotal;
+ _paymentTotal = paymentTotal;
+ _creditTotal = creditTotal;
+ _dueDate = dueDate;
+ _paymentDate = paymentDate;
+ _termsId = termsId;
+ }
+
+ public string VendorId {
+ get { return _vendorId; }
+ }
+
+ public string InvoiceNumber {
+ get { return _invoiceNumber; }
+ }
+
+ public string InvoiceDate {
+ get { return _invoiceDate; }
+ }
+
+ public string InvoiceTotal {
+ get { return _invoiceTotal; }
+ }
+
+ public string PaymentTotal {
+ get { return _paymentTotal; }
+ }
+
+ public string CreditTotal {
+ get { return _creditTotal; }
+ }
+
+ public string DueDate {
+ get { return _dueDate; }
+ }
+
+ public string PaymentDate {
+ get { return _paymentDate; }
+ }
+
+ public string TermsId {
+ get { return _termsId; }
+ }
+
+ public override bool Equals( object obj ) {
+ if ( this == obj ) {
+ return true;
+ }
+ SaveInvoiceDto saveInvoiceDto = obj as SaveInvoiceDto;
+ if ( saveInvoiceDto == null ) {
+ return false;
+ }
+ if ( !Equals( _vendorId, saveInvoiceDto._vendorId ) ) {
+ return false;
+ }
+ if ( !Equals( _invoiceNumber, saveInvoiceDto._invoiceNumber ) ) {
+ return false;
+ }
+ if ( !Equals( _invoiceDate, saveInvoiceDto._invoiceDate ) ) {
+ return false;
+ }
+ if ( !Equals( _invoiceTotal, saveInvoiceDto._invoiceTotal ) ) {
+ return false;
+ }
+ if ( !Equals( _paymentTotal, saveInvoiceDto._paymentTotal ) ) {
+ return false;
+ }
+ if ( !Equals( _creditTotal, saveInvoiceDto._creditTotal ) ) {
+ return false;
+ }
+ if ( !Equals( _dueDate, saveInvoiceDto._dueDate ) ) {
+ return false;
+ }
+ if ( !Equals( _paymentDate, saveInvoiceDto._paymentDate ) ) {
+ return false;
+ }
+ if ( !Equals( _termsId, saveInvoiceDto._termsId ) ) {
+ return false;
+ }
+ return true;
+ }
+
+ public override int GetHashCode( ) {
+ int result = _vendorId != null ? _vendorId.GetHashCode( ) : 0;
+ result = 29*result + ( _invoiceNumber != null ? _invoiceNumber.GetHashCode( ) : 0 );
+ result = 29*result + ( _invoiceDate != null ? _invoiceDate.GetHashCode( ) : 0 );
+ result = 29*result + ( _invoiceTotal != null ? _invoiceTotal.GetHashCode( ) : 0 );
+ result = 29*result + ( _paymentTotal != null ? _paymentTotal.GetHashCode( ) : 0 );
+ result = 29*result + ( _creditTotal != null ? _creditTotal.GetHashCode( ) : 0 );
+ result = 29*result + ( _dueDate != null ? _dueDate.GetHashCode( ) : 0 );
+ result = 29*result + ( _paymentDate != null ? _paymentDate.GetHashCode( ) : 0 );
+ result = 29*result + ( _termsId != null ? _termsId.GetHashCode( ) : 0 );
+ return result;
+ }
+
+ private readonly string _vendorId;
+ private readonly string _invoiceNumber;
+ private readonly string _invoiceDate;
+ private readonly string _invoiceTotal;
+ private readonly string _paymentTotal;
+ private readonly string _creditTotal;
+ private readonly string _dueDate;
+ private readonly string _paymentDate;
+ private readonly string _termsId;
+ }
+}
\ No newline at end of file diff --git a/src/app/Cmpp298.Assignment3.Dto/UpdateInvoiceDto.cs b/src/app/Cmpp298.Assignment3.Dto/UpdateInvoiceDto.cs new file mode 100644 index 0000000..ba4c88e --- /dev/null +++ b/src/app/Cmpp298.Assignment3.Dto/UpdateInvoiceDto.cs @@ -0,0 +1,113 @@ +namespace Cmpp298.Assignment3.Dto {
+ public class UpdateInvoiceDto {
+ public UpdateInvoiceDto( string invoiceId, string invoiceNumber, string invoiceDate, string invoiceTotal,
+ string paymentTotal, string creditTotal, string dueDate, string paymentDate, string termsId ) {
+ _invoiceId = invoiceId;
+ _invoiceNumber = invoiceNumber;
+ _invoiceDate = invoiceDate;
+ _invoiceTotal = invoiceTotal;
+ _paymentTotal = paymentTotal;
+ _creditTotal = creditTotal;
+ _dueDate = dueDate;
+ _paymentDate = paymentDate;
+ _termsId = termsId;
+ }
+
+ public string InvoiceId {
+ get { return _invoiceId; }
+ }
+
+ public string InvoiceNumber {
+ get { return _invoiceNumber; }
+ }
+
+ public string InvoiceDate {
+ get { return _invoiceDate; }
+ }
+
+ public string InvoiceTotal {
+ get { return _invoiceTotal; }
+ }
+
+ public string PaymentTotal {
+ get { return _paymentTotal; }
+ }
+
+ public string CreditTotal {
+ get { return _creditTotal; }
+ }
+
+ public string DueDate {
+ get { return _dueDate; }
+ }
+
+ public string PaymentDate {
+ get { return _paymentDate; }
+ }
+
+ public string TermsId {
+ get { return _termsId; }
+ }
+
+ public override bool Equals( object obj ) {
+ if ( this == obj ) {
+ return true;
+ }
+ UpdateInvoiceDto updateInvoiceDto = obj as UpdateInvoiceDto;
+ if ( updateInvoiceDto == null ) {
+ return false;
+ }
+ if ( !Equals( _invoiceId, updateInvoiceDto._invoiceId ) ) {
+ return false;
+ }
+ if ( !Equals( _invoiceNumber, updateInvoiceDto._invoiceNumber ) ) {
+ return false;
+ }
+ if ( !Equals( _invoiceDate, updateInvoiceDto._invoiceDate ) ) {
+ return false;
+ }
+ if ( !Equals( _invoiceTotal, updateInvoiceDto._invoiceTotal ) ) {
+ return false;
+ }
+ if ( !Equals( _paymentTotal, updateInvoiceDto._paymentTotal ) ) {
+ return false;
+ }
+ if ( !Equals( _creditTotal, updateInvoiceDto._creditTotal ) ) {
+ return false;
+ }
+ if ( !Equals( _dueDate, updateInvoiceDto._dueDate ) ) {
+ return false;
+ }
+ if ( !Equals( _paymentDate, updateInvoiceDto._paymentDate ) ) {
+ return false;
+ }
+ if ( !Equals( _termsId, updateInvoiceDto._termsId ) ) {
+ return false;
+ }
+ return true;
+ }
+
+ public override int GetHashCode( ) {
+ int result = _invoiceId != null ? _invoiceId.GetHashCode( ) : 0;
+ result = 29*result + ( _invoiceNumber != null ? _invoiceNumber.GetHashCode( ) : 0 );
+ result = 29*result + ( _invoiceDate != null ? _invoiceDate.GetHashCode( ) : 0 );
+ result = 29*result + ( _invoiceTotal != null ? _invoiceTotal.GetHashCode( ) : 0 );
+ result = 29*result + ( _paymentTotal != null ? _paymentTotal.GetHashCode( ) : 0 );
+ result = 29*result + ( _creditTotal != null ? _creditTotal.GetHashCode( ) : 0 );
+ result = 29*result + ( _dueDate != null ? _dueDate.GetHashCode( ) : 0 );
+ result = 29*result + ( _paymentDate != null ? _paymentDate.GetHashCode( ) : 0 );
+ result = 29*result + ( _termsId != null ? _termsId.GetHashCode( ) : 0 );
+ return result;
+ }
+
+ private readonly string _invoiceId;
+ private readonly string _invoiceNumber;
+ private readonly string _invoiceDate;
+ private readonly string _invoiceTotal;
+ private readonly string _paymentTotal;
+ private readonly string _creditTotal;
+ private readonly string _dueDate;
+ private readonly string _paymentDate;
+ private readonly string _termsId;
+ }
+}
\ No newline at end of file |
