C# 클래스 Spinnaker.Sample.WinForms.ViewModels.Customer

Represents a customer in the sample application. Since we intend to use each Customer in the view, we implement INotifyPropertyChanged so that our view can bind to Customer's properties. Even though we have lots of customers in our application, each of them is its own view model. In a real application, this Customer view model might be backed by a persistent business object that is loaded and saved with a database or fetched and stored from web services. Or you might implement INotifyPropertyChanged on that real business object itself without an intermediate "view model" representation of it.
상속: INotifyPropertyChanged
파일 보기 프로젝트 열기: Claytonious/spinnaker

공개 메소드들

메소드 설명
ClearDirty ( ) : void
Customer ( ) : System
Save ( ) : void

This would save the changes made to the Customer to a database or web service. In this sample, we don't really do any persistence, so we simply clear the IsDirty flag to pretend that the Customer has been saved.

비공개 메소드들

메소드 설명
RaisePropertyChanged ( string propName ) : void

We wrap raising property changes in a method so that we can always make this Customer dirty when one of its properties changes.

메소드 상세

ClearDirty() 공개 메소드

public ClearDirty ( ) : void
리턴 void

Customer() 공개 메소드

public Customer ( ) : System
리턴 System

Save() 공개 메소드

This would save the changes made to the Customer to a database or web service. In this sample, we don't really do any persistence, so we simply clear the IsDirty flag to pretend that the Customer has been saved.
public Save ( ) : void
리턴 void