zoukankan      html  css  js  c++  java
  • MVCRESTSilverLight 之 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

    }

    }

     

     
     
    作者:易简.道    
     
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    数据结构学习(一)、线性表
    内容太多用省略号代替、内容不换行,鼠标移上去显示详情
    时间格式化
    51Nod--1018排序
    51Nod--1085背包问题
    51Nod--1049最大子段和
    51Nod--1051最大子矩阵和(DP入门)
    POj1852--Ants
    c# static用法
    group by用法
  • 原文地址:https://www.cnblogs.com/xyicheng/p/2361940.html
Copyright © 2011-2022 走看看