private void OnSaveSelected() { if (SelectedItem.Current.Status == Status.Normal) { SelectedItem.Current.Status = Status.Updated; } SelectedItem.Current.Save(); SelectedItem = null; RaiseRefresh(); }
private void OnDeleteSelected() { SelectedItem.Current.Status = Status.Deleted; SelectedItem.Current.Save(); this.Countries.Remove(SelectedItem); SelectedItem = null; RaiseRefresh(); }
private void OnRefresh() { SelectedItem = null; RaiseRefresh(); LoadData(); RaiseRefresh(); }
private void OnAdd() { SelectedItem = new CountryViewModel(new Data.Country(), modEventAgregator); SelectedItem.Current.Status = Status.Added; this.Countries.Add(SelectedItem); RefreshCommands(); }