Song.ServiceImpls/ExaminationCom.cs

(开头部分) 46KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

using WeiSha.Common;
using Song.Entities;

using WeiSha.Data;
using Song.ServiceInterfaces;
using System.Data.Common;
using System.Xml;



namespace Song.ServiceImpls
{
    public class ExaminationCom : IExamination
    {

        public int ExamAdd(Examination entity)
        {
            entity.Exam_CrtTime = DateTime.Now;
            //当前考试的创建人
            entity.Th_ID = Extend.LoginState.Teacher.CurrentUser.Th_ID;
            entity.Th_Name = Extend.LoginState.Teacher.CurrentUser.Th_Name;
            //
            Song.Entities.Organization org = Business.Do<IOrganization>().OrganCurrent();
            if (org != null)
            {
                entity.Org_ID = org.Org_ID;
                entity.Org_Name = org.Org_Name;
            }
            return Gateway.Default.Save<Examination>(entity);
        }

        public void ExamAdd(Examination theme, List<Examination> items, List<ExamGroup> groups)
        {
            Song.Entities.Organization org = Business.Do<IOrganization>().OrganCurrent();
            if (org != null)
            {
                theme.Org_ID = org.Org_ID;
                theme.Org_Name = org.Org_Name;
            }
            theme.Exam_CrtTime = DateTime.Now;
            //当前考试的创建人
            if (Extend.LoginState.Teacher.CurrentUser != null)
            {
                theme.Th_ID = Extend.LoginState.Teacher.CurrentUser.Th_ID;
                theme.Th_Name = Extend.LoginState.Teacher.CurrentUser.Th_Name;
            }
            using (DbTrans tran = Gateway.Default.BeginTrans())
            {
                try
                {                   
                    if (items != null)
                    {
                        //考试主题时间
                        DateTime examDate = DateTime.MaxValue;
                        foreach (Song.Entities.Examination it in items)
后面还有 993 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。