private void DeleteReport(SPSite site, SPWeb web, string data) { try { IReportingService reportingService = ReportingService.GetInstance(site); reportingService.DeleteReport(data); } catch (Exception exception) { bErrors = true; sErrors += exception.ToString(); } }
public JsonResult Delete(string service, string report) { if (_securityService.CurrentUser.UserType != Core.Domain.UserTypes.Admin) { return(Json(new { ok = false, message = "No access." })); } bool ok = _reportingService.DeleteReport(service, report); if (ok) { return(Json(new { ok = true })); } else { return(Json(new { ok = false })); } }