Exemple #1
0
        public JsonResult Delete(int Id)
        {
            var msg = PersonOperations.Delete(Id);

            if (msg != "המחיקה בוצעה בהצלחה")
            {
                ModelState.AddModelError("", msg);
                var data = new JsonObject {
                    result = false
                };
                return(Json(data, JsonRequestBehavior.AllowGet));
            }
            else
            {
                var data = new JsonObject {
                    result = true
                };
                return(Json(data, JsonRequestBehavior.AllowGet));
            }
        }
Exemple #2
0
 // DELETE: api/Person/5
 public void Delete(int id)
 {
     db.Delete(id);
 }