Esempio n. 1
0
 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();
     }
 }
Esempio n. 2
0
        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 }));
            }
        }