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
파일 보기 프로젝트 열기: Claytonious/spinnaker

공개 메소드들

메소드 설명
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