Exemplo n.º 1
0
        private void ClickNewBelief(object o)
        {
            EditBeliefWindow beliefDialog = new EditBeliefWindow();

            beliefDialog.BeliefValue = "";
            beliefDialog.ShowDialog();
            if (beliefDialog.DialogResult == true)
            {
                BeliefDTO belief = new BeliefDTO()
                {
                    Belief  = beliefDialog.BeliefValue,
                    TopicId = SelectedTopic.Id
                };
                long newId = BibleBeliefsRepository.CreateBelief(belief);
                Beliefs = BibleBeliefsRepository.GetBeliefs(SelectedTopic.Id);
                var b = Beliefs.Single(s => s.Id == newId);
                if (b != null)
                {
                    SelectedBelief = b;
                }
            }
        }