Exemplo n.º 1
0
        public IHttpActionResult Delete(int id)
        {
            var service = new HumanService();

            if (!service.DeleteHuman(id))
            {
                return(InternalServerError());
            }
            return(Ok());
        }
Exemplo 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("删除失败", "提示");
         }
     }
 }