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