Пример #1
0
 // 公用静态方法,删除一条记录 DeleteWenZhangLiuYan
 public static bool DeleteEntity(WenZhangLiuYanBusEntity obj)
 {
     if (obj == null || obj.IsEmpty)
     {
         return false;
     }
     WenZhangLiuYanDelete exec = new WenZhangLiuYanDelete();
     try
     {
         exec.ReceiveParameter(obj);
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         obj = null;
     }
 }
Пример #2
0
 // 物理删除由主键ID指定的一条记录 DeleteWenZhangLiuYan
 public bool Delete(int ID)
 {
     WenZhangLiuYanDelete exec = new WenZhangLiuYanDelete();
     try
     {
         exec.ID = ID;
         exec.ExecNoQuery();
         return true;
     }
     catch (Exception ex)
     {
         //throw ex;
         return false;
     }
     finally
     {
         exec = null;
     }
 }