// 删除函数
        private void Delete(int Index)
        {
            OKWindow okWindow = new OKWindow("删除数据", "确实要删除这条数据吗?");

            okWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            okWindow.ShowDialog();
            if (okWindow.Ret == true)
            {
                equipmentDao.Delete(Index);
            }
            SelectAllEquipment();
            UpdateViewData();
        }
 public ActionResult Delete(int id)
 {
     _equipmentDao.Delete(_equipmentDao.GetById(id));
     return(RedirectToAction("Index"));
 }