Esempio n. 1
0
 /// <summary>
 /// 删除一个异常处理
 /// </summary>
 /// <param name="validationErrors">返回的错误信息</param>
 /// <param name="id">一异常处理的主键</param>
 /// <returns></returns>
 public bool Delete(ref ValidationErrors validationErrors, string id)
 {
     try
     {
         return(repository.Delete(id) == 1);
     }
     catch (Exception ex)
     {
         validationErrors.Add(ex.Message);
         ExceptionsHander.WriteExceptions(ex);
     }
     return(false);
 }
 public virtual bool Delete(ref ValidationErrors errors, string id)
 {
     try
     {
         if (m_Rep.Delete(id) == 1)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         errors.Add(ex.Message);
         ExceptionHandler.WriteException(ex);
         return(false);
     }
 }