public AlertBack DeleteAppSetting([FromBody] AppSetting model, int id = 0)
        {
            AlertBack alert = new AlertBack();

            appSettingService.Delete(model);
            alert.status  = "success";
            alert.message = "Register Successfully";
            return(alert);
        }
        public IActionResult Delete(int id)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            try
            {
                AppSetting ObjAppSetting = _appSettingService.Get(id);
                _appSettingService.Delete(ObjAppSetting);

                sb.Append("Sumitted");
                return(Content(sb.ToString()));
            }
            catch (Exception ex)
            {
                sb.Append("Error :" + ex.Message);
            }

            return(Content(sb.ToString()));
        }
示例#3
0
 public IActionResult Delete(int id, string type)
 {
     _appSettingService.Delete(id);
     return(RedirectToAction("Index", new { type = type }));
 }