private List <VEAnswer> method_4() { List <VEAnswer> list = new List <VEAnswer>(); foreach (string item in this.listFix) { if (!this.oQuestion.SelectedValues.Contains(item)) { this.oQuestion.SelectedValues.Add(item); } } SurveyHelper.Answer = ""; for (int i = 0; i < this.oQuestion.SelectedValues.Count; i++) { VEAnswer veanswer = new VEAnswer(); veanswer.QUESTION_NAME = this.oQuestion.QuestionName + "_A" + (i + 1).ToString(); veanswer.CODE = this.oQuestion.SelectedValues[i].ToString(); list.Add(veanswer); SurveyHelper.Answer = string.Concat(new string[] { SurveyHelper.Answer, ",", veanswer.QUESTION_NAME, "=", veanswer.CODE }); } SurveyHelper.Answer = this.method_10(SurveyHelper.Answer, 1, -9999); if (this.oQuestion.FillText != "") { VEAnswer veanswer2 = new VEAnswer(); veanswer2.QUESTION_NAME = this.oQuestion.QuestionName + "_OTH"; veanswer2.CODE = this.oQuestion.FillText; list.Add(veanswer2); SurveyHelper.Answer = string.Concat(new string[] { SurveyHelper.Answer, ",", veanswer2.QUESTION_NAME, "=", this.oQuestion.FillText }); } foreach (string text in this.oQuestion.FillTexts.Keys) { VEAnswer veanswer3 = new VEAnswer(); veanswer3.QUESTION_NAME = this.oQuestion.QuestionName + "_OTH_C" + text; veanswer3.CODE = this.oQuestion.FillTexts[text]; list.Add(veanswer3); SurveyHelper.Answer = string.Concat(new string[] { SurveyHelper.Answer, ",", veanswer3.QUESTION_NAME, "=", veanswer3.CODE }); } return(list); }
public static void SurveyExtend_Remove(string string_0, string string_1, string string_2, int int_0) { VEAnswer veanswer = new VEAnswer(); veanswer.QUESTION_NAME = string_0; veanswer.CODE = string_1; veanswer.CODE_TEXT = string_2; veanswer.SEQUENCE_ID = int_0; SurveyHelper.SurveyExtend.Remove(veanswer); }
private List <VEAnswer> method_2() { List <VEAnswer> list = new List <VEAnswer>(); SurveyHelper.Answer = ""; for (int i = 0; i < this.oQuestion.SelectedValues.Count; i++) { VEAnswer veanswer = new VEAnswer(); veanswer.QUESTION_NAME = this.oQuestion.QuestionName + "_A" + (i + 1).ToString(); veanswer.CODE = this.oQuestion.SelectedValues[i].ToString(); list.Add(veanswer); SurveyHelper.Answer = string.Concat(new string[] { SurveyHelper.Answer, ",", veanswer.QUESTION_NAME, "=", veanswer.CODE }); } SurveyHelper.Answer = this.method_6(SurveyHelper.Answer, 1, -9999); if (this.oQuestion.FillText != "") { VEAnswer veanswer2 = new VEAnswer(); veanswer2.QUESTION_NAME = this.oQuestion.QuestionName + "_OTH"; veanswer2.CODE = this.oQuestion.FillText; list.Add(veanswer2); SurveyHelper.Answer = string.Concat(new string[] { SurveyHelper.Answer, ",", veanswer2.QUESTION_NAME, "=", this.oQuestion.FillText }); } return(list); }
public string ReplaceTitle(string string_0) { if (string_0 == null) { return(""); } string text = string_0; string text2 = "@["; string text3 = "]"; if (text.IndexOf(text2 + "CITY" + text3) > -1) { text = text.Replace(text2 + "CITY" + text3, SurveyHelper.SurveyCity); } if (text.IndexOf("<BR>") > -1) { text = text.Replace("<BR>", Environment.NewLine); } string text4 = text; int num = (text4.Length - text4.Replace(text2, "").Length) / 2; for (int i = 0; i < num; i++) { int num2 = text.IndexOf(text2); if (num2 > -1) { int num3 = text.IndexOf(text3); string text5 = text.Substring(num2 + 2, num3 - (num2 + 2)); if (text5.IndexOf("_CODE") > -1) { text5 = text5.Replace("_CODE", ""); using (List <VEAnswer> .Enumerator enumerator = SurveyHelper.SurveyExtend.GetEnumerator()) { while (enumerator.MoveNext()) { VEAnswer veanswer = enumerator.Current; if (veanswer.QUESTION_NAME == text5) { text = text.Replace(text2 + text5 + "_CODE" + text3, veanswer.CODE); break; } } goto IL_213; } } foreach (VEAnswer veanswer2 in SurveyHelper.SurveyExtend) { if (veanswer2.QUESTION_NAME == text5) { if (!(veanswer2.CODE_TEXT == "") && veanswer2.CODE_TEXT != null) { text = text.Replace(text2 + text5 + text3, veanswer2.CODE_TEXT); break; } text = text.Replace(text2 + text5 + text3, veanswer2.CODE); break; } } } IL_213 :; } return(text); }