public ActionResult Delete(string[] ids) { try { if (ids.Length != 0) { var staticContents = from id in ids select _staticContentService.GetById(int.Parse(id)); _staticContentService.BatchDelete(staticContents); ////Check and delete logo exists //string str1 = string.Format("{0}", item.FileName.NonAccent()); //if (System.IO.File.Exists(str)) // System.IO.File.Delete(str); //Delete localize for (var i = 0; i < ids.Length; i++) { var ieLocalizedProperty = _localizedPropertyService.GetByEntityId(int.Parse(ids[i])); _localizedPropertyService.BatchDelete(ieLocalizedProperty); } } } catch (Exception ex) { ExtentionUtils.Log(Concat("StaticContent.Delete: ", ex.Message)); } return(RedirectToAction("Index")); }
public ActionResult ContentDetail(int id) { var staticContent = _staticContentService.GetById(id); if (staticContent == null) { return HttpNotFound(); } return PartialView(staticContent); }