コード例 #1
0
        protected override void tbcDelete_Commanded(object sender, EventArgs e)
        {
            GetSelectNode();

            if (m_CurrentNode == null)
            {
                return;
            }

            string message = string.Format("确定要删除[{0}]吗?", (m_CurrentNode as Dictionary).Name);

            if ((m_CurrentNode as Dictionary).ParentID == 0)
            {
                message += "删除将删除此数据项的子项!";
            }

            if (MsgHelper.ShowQuestionMsgBox(message) == DialogResult.Yes)
            {
                if ((m_CurrentNode as Dictionary).Delete())
                {
                    MsgHelper.ShowInformationMsgBox("删除功能成功!");
                    m_CurrentNode = null;
                    BindGridData();
                }
                else
                {
                    MsgHelper.ShowInformationMsgBox("删除功能失败!");
                }
            }
        }
コード例 #2
0
ファイル: DetailForm.cs プロジェクト: randianb/DownLoadDemo
 private void tbcCancel_Commanded(object sender, EventArgs e)
 {
     if (MsgHelper.ShowQuestionMsgBox("你要取消本次操作吗?") == DialogResult.Yes)
     {
         this.DialogResult = DialogResult.OK;
     }
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: randianb/DownLoadDemo
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (MsgHelper.ShowQuestionMsgBox("确定要关闭系统吗?") == DialogResult.No)
     {
         e.Cancel = true;
         return;
     }
 }
コード例 #4
0
        protected override void tbcDelete_Commanded(object sender, EventArgs e)
        {
            GetSelectNode();

            if (m_CurrentNode == null)
            {
                return;
            }

            if (MsgHelper.ShowQuestionMsgBox(string.Format("确定要删除[{0}]吗?删除将删除版本和角色的功能模块!", (m_CurrentNode as Module).Name)) == DialogResult.Yes)
            {
                if ((m_CurrentNode as Module).Delete())
                {
                    MsgHelper.ShowInformationMsgBox("删除功能成功!");
                    m_CurrentNode = null;
                    BindGridData();
                }
                else
                {
                    MsgHelper.ShowInformationMsgBox("删除功能失败!");
                }
            }
        }