C# Class 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.
Inheritance: INotifyPropertyChanged
Afficher le fichier Open project: Claytonious/spinnaker

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

ClearDirty() public méthode

public ClearDirty ( ) : void
Résultat void

Customer() public méthode

public Customer ( ) : System
Résultat System

Save() public méthode

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
Résultat void