private void btnClickDelete_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (DialogResult.OK == XtraMessageBox.Show("Xác nhận xóa dữ liệu ?", "Thông báo", MessageBoxButtons.OKCancel))
     {
         int id = int.Parse(gridViewData.GetFocusedRowCellValue("ID").ToString());
         objService.Delete(id);
         loadDataGroup();
     }
 }
        public IHttpActionResult DeleteWeapon(int id)
        {
            try
            {
                Staff staff = service.GetBuyId(id);
                if (staff == null)
                {
                    return(NotFound());
                }

                service.Delete(id);

                return(Ok(new StaffDto(staff)));
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TestDelete()
        {
            var target = new StaffService();

            Assert.IsTrue(target.Delete());
        }
 public ActionResult DeleteConfirmed(int id)
 {
     _staffService.Delete(id);
     return(RedirectToAction("Index"));
 }
 public void TestDelete()
 {
     var target = new StaffService();
     Assert.IsTrue(target.Delete());
 }