Exemplo n.º 1
0
 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));
     }
 }
Exemplo n.º 2
0
 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"));
     }
 }
Exemplo n.º 3
0
 public bool Del(int userId, int id)
 {
     return(_globalService.Del(userId, id));
 }