public ActionResult Delete(string DepIds)
        {
            bool   isOk   = depLogic.Delete(DepIds);
            string result = (isOk == true ? "ok" : "no");

            return(Json(result));
        }
Esempio n. 2
0
 public ActionResult <bool> Delete(int?Id)
 {
     if (Id.HasValue)
     {
         try
         {
             bool resultat = _logic.Delete((int)Id);
             return(resultat);
         }
         catch (Exception ex)
         {
             return(null);
         }
     }
     else
     {
         return(BadRequest("id invalide"));
     }
 }