コード例 #1
0
        private void OnSaveSelected()
        {
            if (SelectedItem.Current.Status == Status.Normal)
            {
                SelectedItem.Current.Status = Status.Updated;
            }

            SelectedItem.Current.Save();
            SelectedItem = null;

            RaiseRefresh();
        }
コード例 #2
0
        private void OnDeleteSelected()
        {
            SelectedItem.Current.Status = Status.Deleted;
            SelectedItem.Current.Save();

            this.Countries.Remove(SelectedItem);
            SelectedItem = null;

            RaiseRefresh();
        }
コード例 #3
0
        private void OnRefresh()
        {
            SelectedItem = null;
            RaiseRefresh();

            LoadData();

            RaiseRefresh();
        }
コード例 #4
0
        private void OnAdd()
        {
            SelectedItem = new CountryViewModel(new Data.Country(), modEventAgregator);

            SelectedItem.Current.Status = Status.Added;

            this.Countries.Add(SelectedItem);

            RefreshCommands();
        }