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

    }

    }

     

     
     
    作者:易简.道    
     
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    Ansible import_playbook 导入playbook
    Ansible Playbook 变量传递
    Ansible Notify与Handler组合
    Ansible Role
    Ansible infile模块
    Ansible When有条件的运行任务
    Ansible register捕获命令输出
    Ansible Command Shell Raw模块区别
    Ansible Facts
    Ansible Jinjia2模块
  • 原文地址:https://www.cnblogs.com/xyicheng/p/2361940.html
Copyright © 2011-2022 走看看