Song.ServiceImpls/TrPlanCom.cs

(开头部分) 5KB

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

using System;
using System.Collections.Generic;
using System.Text;
using Song.ServiceInterfaces;
using WeiSha.Data;
using Song.Entities;
using WeiSha.Common;
using System.Data.Common;

namespace Song.ServiceImpls
{
    public class TrPlanCom:ITrPlan
    {
        #region ITrPlan 成员

        private void addData(Song.Entities.TrPlan theme, List<Song.Entities.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;
            }
            using (DbTrans tran = Gateway.Default.BeginTrans())
            {
                try
                {
                    tran.Save<TrPlan>(theme);
                    if (groups != null)
                    {
                        foreach (Song.Entities.ExamGroup g in groups)
                        {
                            tran.Save<ExamGroup>(g);
                        }
                    }
                    tran.Commit();
                }
                catch (Exception ex)
                {
                    tran.Rollback();
                    throw ex;

                }
                finally
                {
                    tran.Close();
                }
            }
        }
        public void TrpAdd(Song.Entities.TrPlan theme, List<Song.Entities.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;
            }
            if (groups == null)
                Gateway.Default.Save<TrPlan>(theme);
            else
后面还有 105 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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