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

    }

    }

     

     
     
    作者:易简.道    
     
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    LeetCode 128. 最长连续序列
    MySQL的information_schema
    maven项目板块的pom.xml配置
    mybatis打印SQL日志
    MySQL的时间字段转换
    mysql的csv数据导入与导出
    一致性协议
    分布式事务
    事务基本信息
    分布式系统定义及特点
  • 原文地址:https://www.cnblogs.com/xyicheng/p/2361940.html
Copyright © 2011-2022 走看看