internal void AddQuestion(ProfileQuestion question) { int maxQuestionNumber = GetMaxQuestionNumber(); question.CustomQuestionOrder = maxQuestionNumber + 1; AddQuestionToCollections(question); }
internal Tuple <bool, ProfileQuestion> AddImportQuestion(ProfileImportQuestion importQuestion) { ProfileCategory category; if (!dictionaryCategoriesBySubLabel.TryGetValue(importQuestion.CategorySubLabel, out category)) { category = new ProfileCategory(this); category.SubLabel = importQuestion.CategorySubLabel; category.Heading = importQuestion.Category; category.IsSelect = true; AddCategory(category); } if (!category.ContainsImportQuestion(importQuestion)) { ProfileQuestion question = new ProfileQuestion(category, RankingManger, importQuestion); category.AddQuestion(question); return(Tuple.Create(true, question)); } else { return(Tuple.Create <bool, ProfileQuestion>(false, null)); } }
private void AddQuestionToCollections(ProfileQuestion question) { ProfileQuestions.Add(question); if (question.IsCustomQuestion) { dictionaryCustomQuestions[question.CustomQuestionID] = question; } else { dictionaryDefaultQuestions[question.QuestionDefaultID] = question; } }
internal bool IsSame(ProfileQuestion question) { if (this.Comments != Comments || this.SupplementalInfo != question.SupplementalInfo || this.Question != question.Question || this.References != question.References || this.SubLabelNumber != question.SubLabelNumber || this.IsSelect != question.IsSelect || this.IsCustomQuestion != question.IsCustomQuestion) { return(false); } if (this.IsCustomQuestion && question.IsCustomQuestion) { if (this.CustomQuestionID != question.CustomQuestionID) { return(false); } } return(true); }
internal static ProfileQuestion CreateNewQuestion(ProfileCategory profileCategory, RankingManager rankingManager) { int nextSubLabelNumber = profileCategory.GetNextSubLabelNumber(); ProfileQuestion question = new ProfileQuestion(profileCategory, rankingManager) { SubFunCatLabel = profileCategory.SubFunCatLabel, SubLabelNumber = nextSubLabelNumber }; question.Weight = 10; question.CanDelete = true; question.CanEdit = true; question.CanSelect = true; question.IsCustomQuestion = true; question.CustomQuestionID = Guid.NewGuid(); question.IsSelect = true; return(question); }
internal void UpdateSubLabelNumber(ProfileQuestion profileQuestion, int value) { throw new NotImplementedException(); }
public void RemoveQuestion(ProfileQuestion profileQuestion) { ProfileQuestions.Remove(profileQuestion); }
internal bool DoesSubLabelNumberAlreadyExist(ProfileQuestion profileQuestion, int subLabelNumber) { throw new NotImplementedException(); }
public ProfileImportQuestion(ProfileQuestion questionObj) { this.QuestionObj = questionObj; }