/// <summary> /// Loads the questionaire. /// </summary> /// <param name="recordIdentification">The record identification.</param> /// <param name="theDelegate">The delegate.</param> /// <returns></returns> public UPQuestionnaire LoadQuestionaire(string recordIdentification, IQuestionnaireDelegate theDelegate) { UPQuestionnaire quest = this.cacheByRecordIdentification.ValueOrDefault(recordIdentification); if (quest != null || theDelegate == null) { return(quest); } quest = new UPQuestionnaire(recordIdentification, this); this.pendingQuestionnaires.Add(quest); quest.Load(theDelegate); return(null); }
/// <summary> /// Loads the questionaire. /// </summary> /// <param name="code">The code.</param> /// <param name="theDelegate">The delegate.</param> /// <returns></returns> public UPQuestionnaire LoadQuestionaire(int code, IQuestionnaireDelegate theDelegate) { UPQuestionnaire quest = this.cacheByCode.ValueOrDefault(code); if (quest != null || theDelegate == null) { return(quest); } quest = new UPQuestionnaire(code, this); this.pendingQuestionnaires.Add(quest); quest.Load(theDelegate); return(null); }