C# Класс 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.
Наследование: INotifyPropertyChanged
Показать файл Открыть проект

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

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

Приватные методы

Метод Описание
GetRandomItem ( string items ) : string
GetRandomStreetName ( ) : string

Описание методов

CustomersViewModel() публичный Метод

public CustomersViewModel ( ) : System
Результат System

Delete() публичный Метод

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
Результат void

Filter() публичный Метод

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
Результат void

LoadCustomers() публичный Метод

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
Результат void