MVC-REST-SilverLight 之 RestExample.Model.Silverlight\Customer.cs

 

MVC-REST-SilverLight 之 RestExample.Model.Silverlight\Customer.cs

 

 

 

 

 

namespace RestExample.Model

{

#if SILVERLIGHT

using System.ComponentModel;

public class Customer : INotifyPropertyChanged

#else

public class Customer

#endif

{

private int _id;

public int ID

{

get { return _id; }

set

{

_id = value;

#if SILVERLIGHT

NotifyPropertyChanged("ID");

#endif

}

}

 

private string _lastName;

public string LastName

{

get { return _lastName; }

set

{

_lastName = value;

#if SILVERLIGHT

NotifyPropertyChanged("LastName");

#endif

}

}

 

private string _firstName;

public string FirstName

{

get { return _firstName; }

set

{

_firstName = value;

#if SILVERLIGHT

NotifyPropertyChanged("FirstName");

#endif

}

}

 

private decimal _balance;

public decimal Balance

{

get { return _balance; }

set

{

_balance = value;

#if SILVERLIGHT

NotifyPropertyChanged("Balance");

#endif

}

}

 

#if SILVERLIGHT

public event PropertyChangedEventHandler PropertyChanged;

protected void NotifyPropertyChanged(string propertyName)

{

if (PropertyChanged != null)

PropertyChanged(this,

new PropertyChangedEventArgs(propertyName));

}

#endif

}

}

 

你可能感兴趣的:(silverlight)