public DepartmentEdit(String cv, DepartmentVM dvm) { InitializeComponent(); DepartmentEditVM DeVM = new DepartmentEditVM(cv, dvm); this.DataContext = DeVM; }
public DepartmentEditVM(String cv, DepartmentVM dvm) { this.cv = cv; this.dvm = dvm; OKCommand = new RelayCommand <FrameworkElement>((p) => { return(p != null ? true : false); }, (p) => { OKevent(p); }); CancelCommand = new RelayCommand <Window>((p) => true, (p) => { p.Close(); }); }