public ActionResult DeleteConfirmed(int id)
        {
            ServiceType serviceType = Service.GetById(id);

            Service.Delete(serviceType);
            return(RedirectToAction("Index"));
        }
 private void btnXoa_Click(object sender, EventArgs e)
 {
     if (DialogResult.OK == XtraMessageBox.Show("Bạn muốn xóa dịch vụ ra khỏi hệ thống ?", "Xác nhận", MessageBoxButtons.OKCancel))
     {
         bool rs = serviceType.Delete(_PartnerID);
         if (rs)
         {
             serviceType = new ServiceTypeService();
             gridDataControl.DataSource = serviceType.GetList(_TourID);
         }
         else
         {
             XtraMessageBox.Show("Không tìm thấy thông tin");
         }
     }
 }
        public ActionResult Delete(int id)
        {
            var result = ServiceTypeService.Delete(id);

            if (!result)
            {
                TempData["Error"] = "Something went wrong";
            }
            return(RedirectToAction("List"));
        }