private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Incentive Details-Delete") == false) { MessageBox.Show("You don't have Rights to Incentive Details-Delete"); return; } if (grdIncDetView.FocusedRowHandle >= 0) { if (MessageBox.Show("Do You Want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes) { i_IncId = Convert.ToInt32(grdIncDetView.GetFocusedRowCellValue("IncentiveId").ToString()); IncentiveDL.DeleteIncDet(i_IncId); grdIncDetView.DeleteRow(grdIncDetView.FocusedRowHandle); } } }
public static void DeleteIncDet(int argId) { IncentiveDL.DeleteIncDet(argId); }