private void DeleteServiceParam(object param) { ServiceStoreServiceParams selectedItem = (ServiceStoreServiceParams)((DataGrid)param).SelectedItem; MessageBoxResult messageBoxResult = MessageBox.Show("Valóban törli?", "Törlés megerősítése", MessageBoxButton.YesNo, MessageBoxImage.Question); if (messageBoxResult == MessageBoxResult.Yes) { ServiceStoreServiceParamsList.Remove(selectedItem); ServiceStoreServiceParamsDal.LogicalDelete(selectedItem); } }
private void AddServiceParam() { ServiceStoreServiceParams newParam = new ServiceStoreServiceParams() { ServiceStore1 = SelectedServiceStore }; SelectedServiceStore.ServiceStoreServiceParams1.Add(newParam); ServiceStoreServiceParamEditWindow editWindow = new ServiceStoreServiceParamEditWindow(SelectedServiceStore, newParam) { Owner = this.SourceWindow }; SwitchWindows(editWindow, true); this.ServiceStoreServiceParamsList = ReloadServiceParams(); NotifyPropertyChanged("ServiceStoreServiceParamsList"); }
public ServiceStoreServiceParamEditWindow(ServiceStore serviceStore, ServiceStoreServiceParams param) { InitializeComponent(); this.DataContext = new ServiceStoreServiceParamEditViewModel(this, serviceStore, param); }