Beispiel #1
0
        private void sbtnDelete_Click(object sender, EventArgs e)
        {
            var selectList = GetChectedNodeData(this.tlMenus);

            if (selectList.Count == 0)
            {
                XtraMessageBox.Show("please select deleted rows!", "提示", MessageBoxButtons.OK);
                return;
            }
            if (DialogResult.OK == XtraMessageBox.Show("deleting these rows ?", "waring", MessageBoxButtons.OKCancel))
            {
                int resDeleteUserRoles = _bll.DeleteMenus(selectList.Select(p => p.ID).ToList());
                if (resDeleteUserRoles > 0)
                {
                    XtraMessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK);
                    RequestGridData();
                    GetParentMenus();
                }
                else
                {
                    XtraMessageBox.Show("删除失败!", "提示", MessageBoxButtons.OK);
                }
            }
        }