private void OnEdit() { var dlg = new Comenzi.EditComanda(SelectedItem.id); if (dlg.ShowDialog() == true) { RaisePropertyChanged("Items"); } }
private void OnAdd() { var dlg = new Comenzi.EditComanda(0); if (dlg.ShowDialog() == true) { RaisePropertyChanged("Items"); SelectedItem = Utils.Ctx.comenzis .OrderByDescending(p => p.id) .FirstOrDefault(); } }