public ImportantPartWindowViewModel(ChildWindow aChildWndow, ImportantPartWindowState aImportantPartWindowState, ImportantPartEntity aImportantPartEntity) { childWindow = aChildWndow; WindowState = aImportantPartWindowState; ImportantPartEntity = aImportantPartEntity; Title = "生产令号:" + aImportantPartEntity.ManufactureNumber; OnOk = new DelegateCommand(OnOkCommand); OnCancel = new DelegateCommand(OnCancelCommand); }
public ImportantPartWindow(ImportantPartWindowState aImportantPartWindowState, ImportantPartEntity aImportantPartEntity) { InitializeComponent(); this.DataContext = new ImportantPartWindowViewModel(this, aImportantPartWindowState, aImportantPartEntity); }