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