C# Class Spinnaker.Sample.WinForms.ViewModels.CustomersViewModel

This view model is a bindable collection of Customers. It is simply responsible for loading and exposing a collection of Customers which are also view models themselves. In a real application, this view model make queries against an application's data layer to load its Customers.
Inheritance: INotifyPropertyChanged
Afficher le fichier Open project: Claytonious/spinnaker

Méthodes publiques

Méthode Description
CustomersViewModel ( ) : System
Delete ( string indexArg ) : void

Delete a customer from the collection. In a real application, this method would probably also delete the customer from persistent storage.

Filter ( ) : void

Applies the current filter text against the collection. All this does is raise a PropertyChanged event, since the actual work of filtering is simply a byproduct of iterating through the collection.

LoadCustomers ( ) : void

Pretends to load a collection of customers from persistent storage like a database or a web service. Since this sample doesn't do any real persistence, this method creates a random set of customers that look like they were loaded from storage.

Private Methods

Méthode Description
GetRandomItem ( string items ) : string
GetRandomStreetName ( ) : string

Method Details

CustomersViewModel() public méthode

public CustomersViewModel ( ) : System
Résultat System

Delete() public méthode

Delete a customer from the collection. In a real application, this method would probably also delete the customer from persistent storage.
public Delete ( string indexArg ) : void
indexArg string
Résultat void

Filter() public méthode

Applies the current filter text against the collection. All this does is raise a PropertyChanged event, since the actual work of filtering is simply a byproduct of iterating through the collection.
public Filter ( ) : void
Résultat void

LoadCustomers() public méthode

Pretends to load a collection of customers from persistent storage like a database or a web service. Since this sample doesn't do any real persistence, this method creates a random set of customers that look like they were loaded from storage.
public LoadCustomers ( ) : void
Résultat void