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
Показать файл Открыть проект

Открытые методы

Метод Описание
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