Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 public KettellScaleMD(KettellAnswers KettellAnswers,pBaseEntities GlobalEntities,EnumKettellType KType)
 {
     _answers = KettellAnswers;
     _ge = GlobalEntities;
     _ktype = KType;
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public KettellScaleQ1(KettellAnswers KettellAnswers, pBaseEntities GlobalEntities, EnumKettellType KType)
 {
     _answers = KettellAnswers;
     _ge      = GlobalEntities;
     _ktype   = KType;
 }