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