public void OnConfirmCmd() { SparePartService srv = SimpleIoc.Default.GetInstance <SparePartService>(); srv.Edit(SparePart); Messenger.Default.Send <bool>(true, "SparePartEditQuitMsg"); }
public void GetSparePart_True() { SparePartService sparePart = new SparePartService(); var result = sparePart.GetSparePart("Nitro"); Assert.IsNotNull(result, "The item was found"); }
public SparePartAddViewModel(IMapper mapper, Fanuc fanuc, SparePartService mSrv) { this._fanuc = fanuc; this._mapper = mapper; this._mSrv = mSrv; CancelCmd = new RelayCommand(OnCancelCmd); ConfirmCmd = new RelayCommand(OnConfirmCmd); }
public SparePartViewModel(IMapper mapper, Fanuc fanuc, SparePartService spSrv) { this._fanuc = fanuc; this._mapper = mapper; this._spSrv = spSrv; _AddCmd = new RelayCommand(OnAdd); _DeleteCmd = new RelayCommand(OnDelete); _EditCmd = new RelayCommand(OnEdit); SpareParts = _spSrv.GetSpareParts(); }