- XamlPatterns_v1.1.0.0.zip
- Controls
- Core
- docu
- Program
- Pub
- Desktop.Debug
- Itenso.Community.XamlPatterns.Controls.dll
- Itenso.Community.XamlPatterns.dll
- Desktop.Release
- Itenso.Community.XamlPatterns.Controls.dll
- Itenso.Community.XamlPatterns.dll
- Silverlight.Debug
- Itenso.Community.XamlPatterns.Controls.dll
- Itenso.Community.XamlPatterns.dll
- Silverlight.Release
- Itenso.Community.XamlPatterns.Controls.dll
- Itenso.Community.XamlPatterns.dll
- WindowsPhone.Debug
- Itenso.Community.XamlPatterns.Controls.dll
- Itenso.Community.XamlPatterns.dll
- WindowsPhone.Release
- Itenso.Community.XamlPatterns.Controls.dll
- Itenso.Community.XamlPatterns.dll
- XamlPatterns.Desktop.sln
- XamlPatterns.Desktop.suo
- XamlPatterns.Silverlight.sln
- XamlPatterns.Silverlight.suo
- XamlPatterns.WindowsPhone.sln
- XamlPatterns.WindowsPhone.suo
|
// -- FILE ------------------------------------------------------------------
// name : CustomerModel.cs
// project : Itenso Community
// created : Jani Giannoudis - 2012.05.05
// language : c#
// environment: .NET 4.0
// copyright : (c) 2004-2012 by Itenso GmbH, Switzerland
// --------------------------------------------------------------------------
using System;
namespace Itenso.Community.XamlPatterns.Program.Examples.OrderBrowser.ViewModel
{
// ------------------------------------------------------------------------
public class CustomerModel : OrderModelBase
{
// ----------------------------------------------------------------------
public CustomerModel( OrderModelBase parent ) :
base( parent )
{
LastModified = DateTime.Now;
} // CustomerModel
// ----------------------------------------------------------------------
public CustomerModel( string firstName, string lastName, string address ) :
this( null, firstName, lastName, address )
{
} // CustomerModel
// ----------------------------------------------------------------------
public override string TypeName
{
get { return "Customer"; }
} // TypeName
// ----------------------------------------------------------------------
public CustomerModel( OrderModelBase parent, string firstName, string lastName, string address ) :
this( parent )
{
FirstName = firstName;
LastName = lastName;
Address = address;
LastModified = DateTime.Now;
} // CustomerModel
// ----------------------------------------------------------------------
public string FirstName
{
get { return firstName; }
set
{
if ( value != firstName )
{
firstName = value;
NotifyPropertyChanged( "FirstName" );
}
}
} // FirstName
// ----------------------------------------------------------------------
public string LastName
{
get { return lastName; }
set
{
if ( value != lastName )
{
lastName = value;
NotifyPropertyChanged( "LastName" );
}
}
} // LastName
// ----------------------------------------------------------------------
public string FullName
{
get { return FirstName + " " + LastName; }
} // FullName
// ----------------------------------------------------------------------
public string Address
{
get { return address; }
set
{
if ( value != address )
{
address = value;
NotifyPropertyChanged( "Address" );
}
}
} // Address
// ----------------------------------------------------------------------
public DateTime LastModified
{
get { return lastModified; }
set
{
if ( value != lastModified )
{
lastModified = value;
NotifyPropertyChanged( "LastModified" );
}
}
} // LastModified
// ----------------------------------------------------------------------
public override string ToString()
{
return FullName;
} // ToString
// ----------------------------------------------------------------------
// members
private string firstName;
private string lastName;
private string address;
private DateTime lastModified;
} // class CustomerModel
} // namespace Itenso.Community.XamlPatterns.Program.Examples.OrderBrowser.ViewModel
// -- EOF -------------------------------------------------------------------
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
👨 Senior .NET Software Engineer
🚀 My Open Source Projects
-
Time Period Library 👉
GitHub
-
Payroll Engine 👉
GitHub
Feedback and contributions are welcome.