LabExercise.cs 1.73 KB
using log4net;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace AIAHTML5.API.Models
{
    public class LabExercise
    {

        public int userId { get; set; }
        public string labExerciseIdentifier { get; set; }
        public int lastQuestion { get; set; }
        public int totalQuestions { get; set; }
        public List<LabEcerciseDetails> labExercise;


        internal int insertLabExerciseAttempt(LabExercise le, DataTable labExeciseQuizAttemptedData)
          {
              ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
              logger.Debug("inside insertLabExerciseAttempt for UserId =" + le.userId + ",labExerciseIdentifier= " + le.labExerciseIdentifier + ",LastQuestion= " + le.lastQuestion + "TotalQuestions =" + le.totalQuestions);
           

              int result = 0;

              DBModel objModel = new DBModel();

              result = objModel.SaveLabExerciseAttempt(le, labExeciseQuizAttemptedData);

              return result;
          }

        internal LabExercise GetLabExercise(int userId, string labExIdentifier)
        {
            DBModel objModel = new DBModel();

            LabExercise le = objModel.GetLabExercise(userId, labExIdentifier);

            return le;
            
        }

         
    }

    public class LabEcerciseDetails
    {

        public int MaxScore { get; set; }
        public string UserAnswers { get; set; }
        public int QuestionNo { get; set; }
        public string CorrectAnswers { get; set; }
        public string DragItems { get; set; }
        public int Score { get; set; }
        //public string StateObject { get; set; }
    }
}