public AssignVendorToRepairView(RepairViewModel repair) { InitializeComponent(); var vm = new AssignVendorToRepairViewModel(repair); this.DataContext = vm; if (vm.CloseAction == null) { vm.CloseAction = new Action(() => this.Close()); } if (vm.RefreshAction == null) { vm.RefreshAction = new Action(() => MainWindowViewModel.Instance.RefreshRepairs()); } }
public AssignVendorToRepairViewModel(RepairViewModel repair) { this.AssignRepairToVendor = new CommandBase <object>(AssignNewRepairToVendorMethod, CanAssignNewRepairToVendor); this.repair = repair; RefreshVendorList(); }
public AddNoteViewModel(RepairViewModel repair) { this.CreateNewNote = new CommandBase<object>(CreateNewNoteMethod, CanCreateNewNote); this.repair = repair; this.note = new NoteViewModel(); }
public AssignVendorToRepairViewModel(RepairViewModel repair) { this.AssignRepairToVendor = new CommandBase<object>(AssignNewRepairToVendorMethod, CanAssignNewRepairToVendor); this.repair = repair; RefreshVendorList(); }
public AddNoteViewModel(RepairViewModel repair) { this.CreateNewNote = new CommandBase <object>(CreateNewNoteMethod, CanCreateNewNote); this.repair = repair; this.note = new NoteViewModel(); }