public static int GetMark(pBaseEntities GlobalEntities, KettellAnswers KettellAnswers, List<int> AnswersNums,EnumKettellType KType) { int m = 0; testsparam t; if (KType == EnumKettellType.CForm) { t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.KettellC); } else { t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.KettellA); } t.answersparams.Load(); for (int i = 0; i < AnswersNums.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == AnswersNums[i]); a.cellsparams.Load(); if (KettellAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "") { cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == KettellAnswers[(int)a.num - 1].SelectedCellDescription.Trim()); m += c.mark.Value; } } return m; }
public KettellScaleMD(KettellAnswers KettellAnswers,pBaseEntities GlobalEntities,EnumKettellType KType) { _answers = KettellAnswers; _ge = GlobalEntities; _ktype = KType; }
public static int GetMark(pBaseEntities GlobalEntities, KettellAnswers KettellAnswers, List <int> AnswersNums, EnumKettellType KType) { int m = 0; testsparam t; if (KType == EnumKettellType.CForm) { t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.KettellC); } else { t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.KettellA); } t.answersparams.Load(); for (int i = 0; i < AnswersNums.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == AnswersNums[i]); a.cellsparams.Load(); if (KettellAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "") { cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == KettellAnswers[(int)a.num - 1].SelectedCellDescription.Trim()); m += c.mark.Value; } } return(m); }
public KettellScaleQ1(KettellAnswers KettellAnswers, pBaseEntities GlobalEntities, EnumKettellType KType) { _answers = KettellAnswers; _ge = GlobalEntities; _ktype = KType; }