private void Add()
        {
            var ImagePath = Imagesource?.ToString().Remove(0, 8);

            KindRepository.Insert(new Data.ApplicationDbContext.Kind {
                Price = price, Name = name, ImagePath = ImagePath, CatagoryId = (int)CatagoryId.Value
            });
            KindViewModel.raise(typeof(ListKindsViewModel), null);
        }
 private void DeleteKind(Kind obj)
 {
     KindViewModel.raise(typeof(DeleteKindViewModel), obj);
 }
Пример #3
0
 private void UpdateKind()
 {
     selectKind.CatagoryId = (int)ComboBoxItem.Value;
     repository.Update(selectKind);
     KindViewModel.raise(typeof(ListKindsViewModel), null);
 }
 private void EditKind(Kind obj)
 {
     KindViewModel.raise(typeof(EditKindViewModel), obj);
 }
Пример #5
0
        private async void DeleteKind(int obj)
        {
            await KindRepository.Delete(obj);

            KindViewModel.raise(typeof(ListKindsViewModel), null);
        }