public IHttpActionResult Delete(int id)
        {
            var service = new HumanService();

            if (!service.DeleteHuman(id))
            {
                return(InternalServerError());
            }
            return(Ok());
        }
Esempio n. 2
0
 public void DeleteInfo(HumanEnt ent)
 {
     if (MessageBox.Show("确定删除人员" + ent.Name + "?", "提示", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
     {
         if (HumanService.DeleteHuman(ent.ID))
         {
             MessageBox.Show("删除成功", "提示");
             HumanList.Remove(ent);
         }
         else
         {
             MessageBox.Show("删除失败", "提示");
         }
     }
 }