/// <summary>
 /// 保存实体数据(新增、修改)
 /// <param name="keyValue">主键</param>
 /// <summary>
 /// <returns></returns>
 public void SaveEntity(string keyValue, dm_activity_manageEntity entity)
 {
     try
     {
         if (!string.IsNullOrEmpty(keyValue))
         {
             entity.Modify(keyValue);
             this.BaseRepository("dm_data").Update(entity);
         }
         else
         {
             dm_activity_manageEntity dm_Activity_ManageEntity = GetActivityInfo();
             if (dm_Activity_ManageEntity.IsEmpty())
             {
                 entity.Create();
                 this.BaseRepository("dm_data").Insert(entity);
             }
             else
             {
                 throw new Exception("当前存在正在进行中的任务,无法创建新的任务,请在进行中的任务结束后再来创建!");
             }
         }
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }
 /// <summary>
 /// 保存实体数据(新增、修改)
 /// <param name="keyValue">主键</param>
 /// <summary>
 /// <returns></returns>
 public void SaveEntity(string keyValue, dm_activity_manageEntity entity)
 {
     try
     {
         dm_activity_manageService.SaveEntity(keyValue, entity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowBusinessException(ex);
         }
     }
 }