Esempio n. 1
0
        public void OnConfirmCmd()
        {
            SparePartService srv = SimpleIoc.Default.GetInstance <SparePartService>();

            srv.Edit(SparePart);

            Messenger.Default.Send <bool>(true, "SparePartEditQuitMsg");
        }
Esempio n. 2
0
        public void GetSparePart_True()
        {
            SparePartService sparePart = new SparePartService();

            var result = sparePart.GetSparePart("Nitro");

            Assert.IsNotNull(result, "The item was found");
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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();
        }