コード例 #1
0
        private void btnCreateRole_Click(object sender, EventArgs e)
        {
            //弹出新建角色窗体
            frmCreateRole fcr = new frmCreateRole();

            fcr.Owner = this;
            fcr.ShowDialog();
        }
コード例 #2
0
        private void btnUpdateRole_Click(object sender, EventArgs e)
        {
            //将当前行的数据保存到一个临时对象中
            sr.Id              = Convert.ToInt32(dgvRoleSetting.CurrentRow.Cells[0].Value.ToString());
            sr.RoleName        = dgvRoleSetting.CurrentRow.Cells[1].Value.ToString();
            sr.RoleDescription = dgvRoleSetting.CurrentRow.Cells[2].Value.ToString();
            frmCreateRole fcr = new frmCreateRole();

            fcr.Owner = this;
            fcr.Text  = "修改角色";
            fcr.ShowDialog();
        }