コード例 #1
0
        public IActionResult DeleteNews([FromBody] Dictionary <string, object> formData)
        {
            string tt_id = "";

            if (formData.Keys.Contains("tt_id") && !string.IsNullOrEmpty(Convert.ToString(formData["tt_id"])))
            {
                tt_id = Convert.ToString(formData["tt_id"]);
            }
            _newsBusiness.Delete(tt_id);
            return(Ok());
        }
コード例 #2
0
        public ActionResult Delete(int id)
        {
            var news = _newsBusiness.GetById(id);

            System.IO.File.Delete(Server.MapPath("/Conrent/Image/News/" + news.ImageName));
            System.IO.File.Delete(Server.MapPath("/Conrent/Image/News/Thumbnail/" + news.ImageName));

            _newsBusiness.Delete(id);
            _newsBusiness.Save();
            return(RedirectToAction("Index"));
        }
コード例 #3
0
        public OperationResult Delete(string id)
        {
            var result = _service.Delete(id);

            //LogAddedIntegrationEvent eventData = new LogAddedIntegrationEvent()
            //{
            //    LogContent = "test log text",
            //    LogType = 1
            //};

            //_eventBus.Publish(eventData);


            return(result);
        }