private Question FillServiceCategoryQuestion(string locale, QuestionCategory c) { var questionsRes = new Questions(); var posibleAnswersRes = new PossibleAnswers(); Question question = questionsRes.GetLocalizedQuestion(locale, c.CategoryQuestion.Description, c.CategoryQuestion.Help, c.CategoryQuestion.QuestionId); c.CategoryQuestion.PossivbleAnswers.ForEach(pa => FillPosibleAnswer(locale, posibleAnswersRes, pa)); question.PossivbleAnswers = posibleAnswersRes.PossivbleAnswersList; return(question); }
private void FillServiceCategory(string locale, QuestionCategories categoryRes, QuestionCategory c) { var questionsRes = new Questions(); c.Questions.ForEach(q => FillServiceQuestion(locale, questionsRes, q)); ServiceModel.Questionnaire.QuestionCategory serviceCategory = categoryRes.AddItem(locale, c.CategoryQuestion .Description, c.CategoryQuestion.Help); serviceCategory.CategoryQuestion = FillServiceCategoryQuestion(locale, c); serviceCategory.Questions = questionsRes.QuestionsList; }