Esempio n. 1
0
        public Result GetTestResult(string pid, string sheetid)
        {
            var sheet = repoOnSite.GetTestResultInfo(pid, sheetid);

            var regis = repoOnSite.GetTestRegisById(sheet.TestRegisID);

            var center = this.GetCenterData();

            var result = new Result
            {
                _id            = sheet._id,
                Title          = regis.Title,
                Firstname      = regis.FirstName,
                LastName       = regis.LastName,
                SubjectCode    = sheet.Subject.SubjectCode,
                SubjectName    = sheet.Subject.SubjectName,
                ExamNumber     = regis.ExamNumber,
                PID            = regis.PID,
                Status         = sheet.LatestStatus,
                TestCount      = sheet.TestCount,
                CorrectCount   = sheet.CorrectScore,
                InCorrectCount = sheet.InCorrectScore,
                ExamDateTime   = sheet.StartDateTime.HasValue ? sheet.StartDateTime.Value : new DateTime(),
                CenterNameTH   = center.NameTh,
            };

            return(result);
        }