Beispiel #1
0
        private void SaveHuntQuestion(long questionId)
        {
            huntquestion newHuntQuestion = new huntquestion();

            newHuntQuestion.QuestionId = questionId;
            newHuntQuestion.HuntId     = currentTreasureHunt.HuntId;
            serviceClient.SaveNewHuntQuestion(newHuntQuestion);
        }
Beispiel #2
0
 /// <summary>
 /// Method that saves new huntQuestion data into the 'huntquestions' table.
 /// </summary>
 /// <param name="huntQuestion"></param>
 public void SaveNewHuntQuestion(huntquestion huntQuestion)
 {
     using (var context = new TreasureHuntEntities())
     {
         context.huntquestions.AddObject(huntQuestion);
         context.SaveChanges();
         context.ObjectStateManager.ChangeObjectState(huntQuestion, System.Data.EntityState.Added);
     }
 }
        /// <summary>
        /// Method that saves the HuntQuestion data associated with the new question into the database.
        /// </summary>
        /// <param name="questionId"></param>
        private async void SaveHuntQuestion(long questionId)
        {
            huntquestion newHuntQuestion = new huntquestion();

            newHuntQuestion.QuestionId = questionId;
            newHuntQuestion.HuntId     = currentTreasureHunt.HuntId;
            await serviceClient.SaveNewHuntQuestionAsync(newHuntQuestion);

            RefreshQuestions();
            this.NewQuestion = String.Empty;
        }
 /// <summary>
 /// Method that saves the HuntQuestion data associated with the new question into the database.
 /// </summary>
 /// <param name="questionId"></param>
 private async void SaveHuntQuestion(long questionId)
 {
     huntquestion newHuntQuestion = new huntquestion();
     newHuntQuestion.QuestionId = questionId;
     newHuntQuestion.HuntId = currentTreasureHunt.HuntId;
     await serviceClient.SaveNewHuntQuestionAsync(newHuntQuestion);
     RefreshQuestions();
     this.NewQuestion = String.Empty;
 }
 private void SaveHuntQuestion(long questionId)
 {
     huntquestion newHuntQuestion = new huntquestion();
     newHuntQuestion.QuestionId = questionId;
     newHuntQuestion.HuntId = currentTreasureHunt.HuntId;
     serviceClient.SaveNewHuntQuestion(newHuntQuestion);
 }