Exemplo n.º 1
0
 public async Task <JsonResult> QTGetByID(string id)
 {
     try {
         var data = QuizTakersService.GetByID(Guid.Parse(id));
         return(Success(QuizTakersVM.MToVM(data)));
     } catch { return(Failed(MessageUtility.ServerError())); }
 }
        public static QuizTakersVM SetSubData(QuizTakers data, Guid aid)
        {
            var model = QuizTakersVM.MToVM(data);

            model.QuizInfo = QuizInfoService.SetSubData(QuizInfoService.GetByID(data.QuizInfoID, data.UserID, aid), aid);
            model.DateTime = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(data.DateTimeStorageID));
            return(model);
        }