private void EditStudent(object obj) { AddOrEditWindow addOrEditWindow = new AddOrEditWindow(); addOrEditWindow.Show(); var addOrEditViewModel = (addOrEditWindow.DataContext as AddOrEditViewModel); addOrEditViewModel.CurrentOperatorEntity = SelectOperatorEntity; addOrEditViewModel.IsAdd = false; addOrEditViewModel.OperatorDal = OperatorDal; }
private void AddStuddent(object obj) { AddOrEditWindow addOrEditWindow = new AddOrEditWindow(); addOrEditWindow.Show(); var addOrEditViewModel = (addOrEditWindow.DataContext as AddOrEditViewModel); addOrEditViewModel.CurrentOperatorEntity = new Operator(); addOrEditViewModel.IsAdd = true; addOrEditViewModel.OperatorDal = OperatorDal; }
private void ButtonEdit_OnClick(object sender, RoutedEventArgs e) { var fe = sender as FrameworkElement; if (fe != null) { var editWindow = new AddOrEditWindow { Pid = int.Parse(fe.Uid) }; editWindow.ShowDialog(); } _allProducts = ProductTable.SelectAllProducts(); FillRadGridView(null, null); }