private void BtnAnswar_Click(object sender, EventArgs e)
        {
            SimpleButton btn = sender as SimpleButton;

            if (btn.Text == _word.Turkish)
            {
                switch (_learningWord.Stage)
                {
                case 1:
                    _learningWord.TestDate = _learningWord.LearningDate.AddMonths(1);
                    _learningWord.Stage++;
                    break;

                case 2:
                    _learningWord.TestDate = _learningWord.LearningDate.AddMonths(6);
                    _learningWord.Stage++;
                    break;

                case 3:
                    _learningWord.TestDate = _learningWord.LearningDate.AddYears(1);
                    break;
                }

                _learningWordService.Update(_learningWord);
                XtraMessageBox.Show("Doğru cevap verdiniz tebrik ederiz...", "Cevap");
            }
            else
            {
                _learningWordService.Delete(_learningWord);
                XtraMessageBox.Show("Yanlış cevap verdiniz üzgünüz...", "Cevap");
            }
            NewTestingWord();
        }
示例#2
0
        private void SimpleButton2_Click(object sender, EventArgs e)
        {
            _learningWord.LearningDate = DateTime.Now;
            _learningWord.TestDate     = _learningWord.LearningDate.AddDays(7);
            _learningWord.Stage++;
            _learningWordSevice.Update(_learningWord);

            WordNewid();
        }