Beispiel #1
0
        private void AddNewQuestionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddNewQuestion form = new AddNewQuestion();

            form.ShowDialog();

            using (ForumContainer container = new ForumContainer())
            {
                toolStripQuestionListBox.Items.AddRange(
                    QuestIdentification.questIdentifications(container.QuestionSet
                                                             .Where(y => y.LanguageLanguageId == this.language.LanguageId))
                    .Select(x => x.text).ToArray());
            }
        }
Beispiel #2
0
        public ActionResult AddNewQuestion()
        {
            var model = new AddNewQuestion();

            model.ChaptersList = new SelectList(new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "Chapter 1", Value = "1"
                },
                new SelectListItem {
                    Text = "Chapter 2", Value = "2"
                },
                new SelectListItem {
                    Text = "Chapter 3", Value = "3"
                },
                new SelectListItem {
                    Text = "Chapter 4", Value = "4"
                },
                new SelectListItem {
                    Text = "Chapter 5", Value = "4"
                },
                new SelectListItem {
                    Text = "Chapter 6", Value = "4"
                },
                new SelectListItem {
                    Text = "Chapter 7", Value = "4"
                },
            }, "Value", "Text");

            model.SectionList = new SelectList(new List <SelectListItem>
            {
                new SelectListItem {
                    Text = "section 1", Value = "1"
                },
                new SelectListItem {
                    Text = "section 2", Value = "2"
                },
                new SelectListItem {
                    Text = "section 3", Value = "3"
                },
                new SelectListItem {
                    Text = "section 4", Value = "4"
                },
            }, "Value", "Text");
            return(View("Add_New_Question", model));
        }
Beispiel #3
0
        /// <summary>
        /// Добавление нового вопроса
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddNewQuestion_Click(object sender, EventArgs e)
        {
            AddNewQuestion addNeQuestion = new AddNewQuestion();

            addNeQuestion.ShowDialog();
        }
Beispiel #4
0
 public ActionResult AddNewQuestion(AddNewQuestion que)
 {
     return(RedirectToAction("AddNewQuestion"));
 }