using Tiobon.Core.IServices; using Tiobon.Core.Model.Models; using Tiobon.Core.Services.BASE; using Tiobon.Core.IRepository.Base; using Tiobon.Core.Model; using System.Dynamic; using Newtonsoft.Json.Linq; namespace Tiobon.Core.Services { /// /// 题目 (服务) /// public class Ghre_QuestionServices : BaseServices, IGhre_QuestionServices { private readonly IBaseRepository _dal; public Ghre_QuestionServices(IBaseRepository dal) { this._dal = dal; base.BaseDal = dal; } /// /// /// /// /// public async Task> QueryFrom(long Id) { var data = new FromGhre_QuestionInput(); #region Column data.Column.Add(new FromGhre_QuestionColumn() { label = "课程名称", field = "courseID", elementType = "ApiSelect", required = true, multipleSelect = true, editable = true, dataSource = "TBParaDetail_GhrStaff_JTFS" }); data.Column.Add(new FromGhre_QuestionColumn() { label = "题目编号", field = "questionNo", elementType = "Input", required = false, multipleSelect = false, editable = false, dataSource = "", placeholder = "保存后自动生成" }); #endregion #region PageData data.PageData.questionType = new List { new FromGhre_QuestionQuestionType() { label = "单选题", type = "Single", isActive = 1 }, new FromGhre_QuestionQuestionType() { label = "多选题", type = "Multiple", isActive = 0, }, new FromGhre_QuestionQuestionType() { label = "判断题", type = "TrueOrFalse", isActive = 0, }, new FromGhre_QuestionQuestionType() { label = "填空题", type = "Completion", isActive = 0, }, new FromGhre_QuestionQuestionType() { label = "简答题", type = "ShortAnswer", isActive = 0, } }; if (Id != 0) { } #endregion return ServiceResult.OprateSuccess("查询成功!", data); } } }