public Boolean Delete(string strusergroupcode) { try { if (strusergroupcode == null) { throw new Exception("Invalid Parameter!"); } if (!compdal.IsExistID(strusergroupcode)) { throw new Exception("Record does not exist!"); } var record = GetByID(strusergroupcode); return(compdal.Delete(record)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 删除 /// </summary> /// <param name="Id">主键Id</param> /// <returns>bool值,判断是否操作成功</returns> public bool Delete(int Id) { return(dal.Delete(Id)); }
protected override bool Delete() { return(dao.Delete(dt)); }