예제 #1
0
        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());
            }
        }
예제 #2
0
 public AssignVendorToRepairViewModel(RepairViewModel repair)
 {
     this.AssignRepairToVendor = new CommandBase <object>(AssignNewRepairToVendorMethod, CanAssignNewRepairToVendor);
     this.repair = repair;
     RefreshVendorList();
 }
예제 #3
0
 public AddNoteViewModel(RepairViewModel repair)
 {
     this.CreateNewNote = new CommandBase<object>(CreateNewNoteMethod, CanCreateNewNote);
     this.repair = repair;
     this.note = new NoteViewModel();
 }
예제 #4
0
 public AssignVendorToRepairViewModel(RepairViewModel repair)
 {
     this.AssignRepairToVendor = new CommandBase<object>(AssignNewRepairToVendorMethod, CanAssignNewRepairToVendor);
     this.repair = repair;
     RefreshVendorList();
 }
예제 #5
0
 public AddNoteViewModel(RepairViewModel repair)
 {
     this.CreateNewNote = new CommandBase <object>(CreateNewNoteMethod, CanCreateNewNote);
     this.repair        = repair;
     this.note          = new NoteViewModel();
 }