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