Example #1
0
        public TranslationStateViewModel(int p_entiti)
        {
            if (p_entiti != 0)
            {
                _allTranslation = _repo.RetrieveByEntityId(p_entiti).ToList();
            }
            else
            {
                _allTranslation = _repo.Retrieve().ToList();
            }

            AddTranslationCommand  = new RelayCommand(OnAddTranslation);
            EditTranslationCommand =
                new RelayCommand <TranslationModel>(OnEditTranslation);

            Translations =
                new ObservableCollection <TranslationModel>(_allTranslation);
        }