Example #1
0
        protected void OnSave()
        {
            CurrentTest.Spellings = new List <Spelling>();
            foreach (var s in Spellings)
            {
                CurrentTest.Spellings.Add(s.GetItem());
            }

            if (EditMode)
            {
                _repo.UpdateTest(CurrentTest);
            }
            else
            {
                _repo.AddTest(CurrentTest);
                SpellingAdded();
            }
            Done();
        }