Пример #1
0
 public ActionResult Delete(int id)
 {
     try
     {
         bannerservice.DeleteBannerAsync(new EntityDto <long> {
             Id = id
         });
         return(Success());
     }
     catch (Exception e)
     {
         return(Fail());
     }
 }
Пример #2
0
        public JsonResult DelBanner(int id = 0)
        {
            bool   status = false;
            string msg    = "";

            try
            {
                if (id > 0)
                {
                    _bannerAppService.DeleteBannerAsync(new EntityDto(id));
                    status = true;
                }
            }
            catch (Exception e)
            {
                msg    = "-1";
                status = false;
            }
            return(Json(new { success = status }));
        }