public int Delete(CompanyML Company) { try { return(CompanyDAL.Delete(Company)); } catch (Exception ex) { throw new Exception(String.Format("{0}.Delete: {1}", core, ex)); } }
public IHttpActionResult Delete(int id) { AjaxStringResult result = new AjaxStringResult(); Company model = _CompanyDAL.Get().FirstOrDefault(o => o.Id == id); if (model != null) { _CompanyDAL.Delete(model); } result.data = "删除成功"; return(Json(result)); }
public Boolean Delete(int id) { try { if (id == 0) { throw new Exception("Invalid Parameter!"); } if (!compdal.IsExistID(id)) { throw new Exception("Record does not exist!"); } return(compdal.Delete(id)); } catch (Exception ex) { throw ex; } }
public bool DeleteCompany(Company item) { return(companyDAL.Delete(item)); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int CompanyId, int EditId) { return(dal.Delete(CompanyId, EditId)); }
public void DeleteCompany(int Id) { companyDAL.Delete(Id); }