示例#1
0
        private void 新增NToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddGroupFrm addFrm = new AddGroupFrm();

            addFrm.Text = "新增用户组";
            addFrm.ShowDialog();
            refreshDataGridView();
        }
示例#2
0
        private void 修改MToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (null == dataGridViewGroup.CurrentRow)
            {
                return;
            }
            int index = dataGridViewGroup.CurrentRow.Index;

            if (Parameter.SUPER_ADMISTRATOR.Equals(dataGridViewGroup.Rows[index].Cells["name"].Value.ToString()))
            {
                MessageBox.Show(Parameter.SUPER_ADMISTRATOR + "不允许修改!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            AddGroupFrm addFrm = new AddGroupFrm();

            addFrm.setGroupId(int.Parse(dataGridViewGroup.Rows[index].Cells["Id"].Value.ToString()));
            addFrm.setGroupName(dataGridViewGroup.Rows[index].Cells["name"].Value.ToString());
            addFrm.Text = "修改用户组信息";
            addFrm.ShowDialog();
            refreshDataGridView();
        }