Example #1
0
        public async Task <IActionResult> Create([FromServices] DalStoryEvent dalStoryEvent, int idStoryEvent)
        {
            ViewBag.EventForChoice = await dalStoryEvent.GetById(idStoryEvent);

            ViewBag.ListOfEvents = await dalStoryEvent.GetAll();

            return(View());
        }
Example #2
0
        public async Task <IActionResult> Delete([FromServices] DalStoryEvent dalStoryEvent, int id, int idStoryEvent)
        {
            var question = await _dalQuestion.GetById(id);

            if (question == null)
            {
                return(NotFound());
            }

            ViewBag.EventOfQuestion = await dalStoryEvent.GetById(idStoryEvent);


            return(View(question));
        }
Example #3
0
        public async Task <IActionResult> Edit([FromServices] DalStoryEvent dalStoryEvent, int idQuestion, int idStoryEvent)
        {
            Question questionToEdit = await this._dalQuestion.GetById(idQuestion);


            if (questionToEdit == null)
            {
                return(NotFound());
            }

            ViewBag.EventForQuestion = await dalStoryEvent.GetById(idStoryEvent);

            return(View(questionToEdit));
        }
Example #4
0
        // GET: Choices/Delete/5

        public async Task <IActionResult> Delete([FromServices] DalStoryEvent dalStoryEvent, int id, int idStoryEvent)
        {
            var choice = await _dalChoice.GetById(id);

            if (choice == null)
            {
                return(NotFound());
            }

            ViewBag.EventOfChoice = await dalStoryEvent.GetById(idStoryEvent);


            return(View(choice));
        }
Example #5
0
        public async Task <IActionResult> Edit([FromServices] DalStoryEvent dalStoryEvent, int idChoice, int idStoryEvent)
        {
            Choice choiceToEdit = await this._dalChoice.GetById(idChoice);

            ViewBag.EventForChoice = await dalStoryEvent.GetById(idStoryEvent);

            ViewBag.ListOfEvents = await dalStoryEvent.GetAll();

            if (choiceToEdit == null)
            {
                return(NotFound());
            }

            return(View(choiceToEdit));
        }
Example #6
0
        public async Task <IActionResult> Create([FromServices] DalStoryEvent dalStoryEvent, int idStoryEvent)
        {
            ViewBag.EventForQuestion = await dalStoryEvent.GetById(idStoryEvent);

            return(View());
        }
Example #7
0
 public StoryEventController(DalStoryEvent context)
 {
     this._dalStoryEvent = context;
 }