public string deleteGroup(PM_ACT_GROUP entity)
 {
     if (entity == null)
     {
         return("false");
     }
     else
     {
         entity.IsDeleted = true;
         try
         {
             groupBO.Update(entity);
             return("true");
         }
         catch (Exception e)
         {
             throw e;
         }
     }
 }
 public IList <PM_ACT_GROUP> getGroups(PM_ACT_GROUP entity)
 {
     if (entity == null)
     {
         return(null);
     }
     else
     {
         IList <PM_ACT_GROUP> list = new List <PM_ACT_GROUP>();
         try
         {
             list = groupBO.GetEntities(entity);
             return(list);
         }
         catch (Exception e)
         {
             throw e;
         }
     }
 }
 public PM_ACT_GROUP addGroup(PM_ACT_GROUP entity)
 {
     if (entity == null)
     {
         return(null);
     }
     else
     {
         entity.IsDeleted = false;
         entity.CreatedOn = SSGlobalConfig.Now;
         entity.UpdatedBy = entity.CreatedBy;
         entity.UpdatedOn = entity.CreatedOn;
         PM_ACT_GROUP result = new PM_ACT_GROUP();
         try
         {
             PM_ACT_GROUP qp = new PM_ACT_GROUP()
             {
                 GroupName = entity.GroupName
             };
             IList <PM_ACT_GROUP> list = groupBO.GetEntities(qp);
             if (list == null || list.Count == 0)
             {
                 result = groupBO.Insert(entity);
                 return(result);
             }
             else
             {
                 throw new Exception("新增失败:行为名称已经存在");
             }
         }
         catch (Exception e)
         {
             throw e;
         }
     }
 }