XtraExtension.Confirm

if (XtraExtension.Confirm("请确认是否要删除当前记录?") == DialogResult.OK)
            {
                var model = gridView1.GetRow(gridView1.FocusedRowHandle) as Department;
                if (model != null)
                {
                    _departmentEntityBll.DeleteByKey(model.Id);
                    RefreshData();
                }
            }

你可能感兴趣的:(confirm)