C# Class ViewModels.BetterListVM

This view model demonstrates simple CRUD operation on a list. In this example, we optimize the bandwidth usage by writing a little bit of javascript (see SimpleList.js) to avoid refreshing the entire list every time an item is edited or removed like what the SimpleListVM example is doing.
Inheritance: BaseVM
Show file Open project: dsuryd/dotNetify

Public Methods

Method Description
BetterListVM ( EmployeeModel model ) : System

Constructor.

Employees_get ( string iKey ) : EmployeeInfo

By convention, when VMController receives a list item from the client, it will look for the function that starts with the list property name and ends with "_get" to access the list item for the purpose of updating its value.

Private Methods

Method Description
Employee_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Event handler that gets called when an employee info's property value changed.

Method Details

BetterListVM() public method

Constructor.
public BetterListVM ( EmployeeModel model ) : System
model EmployeeModel Employee model.
return System

Employees_get() public method

By convention, when VMController receives a list item from the client, it will look for the function that starts with the list property name and ends with "_get" to access the list item for the purpose of updating its value.
public Employees_get ( string iKey ) : EmployeeInfo
iKey string List item key.
return EmployeeInfo