예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
        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);
        }