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