private int DisplayPresidentIndex() { var presidentIndex = 0; if (_presidentToDisplay != null) { presidentIndex = AllPresidents.IndexOf(_presidentToDisplay); } return(presidentIndex); }
internal void Refresh() { AllPresidents.Clear(); DataService ds = new DataService(); var presidents = ds.GetAllPresidents(); foreach (var pres in presidents) { AllPresidents.Add(pres); } }
public PresidentListViewModel() { DataService ds = new DataService(); var presidents = ds.GetAllPresidents(); foreach (var pres in presidents) { AllPresidents.Add(pres); } PresidentToDisplay = AllPresidents[0]; }