Beispiel #1
0
 public void DelByIds(string ids)
 {
     try
     {
         if (!string.IsNullOrEmpty(ids))
         {
             var    idsArray = ids.Split(',');
             long[] arri     = idsArray.StrToLongArray();
             _sysmenuRepository.BeginTran();
             _sysmenuRepository.DeleteById(idsArray);
             _sysmenurefoperateRepository.Delete(s => arri.Contains(s.menu_id));
             _sysroleauthorizeRepository.Delete(s => arri.Contains(s.menu_id) || arri.Contains(s.menu_pid));
             _sysmenuRepository.CommitTran();
         }
     }
     catch (Exception ex)
     {
         _sysmenuRepository.RollbackTran();
         throw ex;
     }
 }