public IHttpActionResult Delete(int id) { var government = _governmentService.GetGovernmentUnitById(id); if (government == null) { return(NotFound()); } _governmentService.DeleteGovernmentUnit(government); //活动日志 _accountUserActivityService.InsertActivity("DeleteGovernment", "删除名为 {0} 的单位,及其所属单位", government.Name); _accountUserService.DeleteGovernmentUsers(government); //活动日志 _accountUserActivityService.InsertActivity("DeleteGovernmentAccountUsers", "删除名为 {0} 的单位下的所有账户", government.Name); //通知 //SuccessNotification(_localizationService.GetResource("Admin.Catalog.Categories.Deleted")); return(Ok()); }