public IActionResult Del([FromRoute] int userId, [FromRoute] int id) { try { bool DelOk = _clientService.Del(userId, id); return(ApiControllerHelper.SendOk(this, new ApiResult <bool>(HttpStatusCode.OK, null, DelOk), HttpStatusCode.OK)); } catch (Exception ex) { return(ApiControllerHelper.SendError(this, ex)); } }
public ActionResult Delete(int id, IFormCollection collection) { if (_sessionManager.User is not null) { bool deleted = _timeLineService.Del(_sessionManager.User.Id, id); if (!deleted) { ViewBag.Message = "Error: Time Line NOT Deleted (" + id.ToString() + ")"; } return(RedirectToAction("Index", "TimeLine")); } else { return(RedirectToAction("Login", "Auth")); } }
public bool Del(int userId, int id) { return(_globalService.Del(userId, id)); }