示例#1
0
 /// <summary>
 /// 保存模板信息
 /// </summary>
 /// <param name="keyValue">主键</param>
 /// <param name="formRelationEntity">表单与功能信息</param>
 public void SaveEntity(string keyValue, FormRelationEntity formRelationEntity)
 {
     try
     {
         if (string.IsNullOrEmpty(keyValue))
         {
             this.BaseRepository().Insert(formRelationEntity);
         }
         else
         {
             formRelationEntity.Modify(keyValue);
             this.BaseRepository().Update(formRelationEntity);
         }
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }