Example #1
0
        /// <summary>
        /// 角色列表右键菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void skinContextMenuStrip_role_list_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (e.ClickedItem == null)
            {
                return;
            }
            if (skinDataGridView_role_list.CurrentRow.Index < 0)
            {
                return;
            }
            if (skinDataGridView_role_list.CurrentRow.Index > skinDataGridView_role_list.Rows.Count - 2)
            {
                return;
            }                                                                                                                          //判断是否超出列表选择
            string hash = skinDataGridView_role_list.Rows[skinDataGridView_role_list.CurrentRow.Index].Cells["hash"].Value.ToString(); //hash
            string name = skinDataGridView_role_list.Rows[skinDataGridView_role_list.CurrentRow.Index].Cells["name"].Value.ToString(); //名称

            if (e.ClickedItem.Text == "添加用户")
            {
                addUserToRole role = new addUserToRole(hash, name);
                role.ShowDialog();
                JObject job = pRole.getRoleUserList(hash);
                if (job == null)
                {
                    return;
                }
                showDataView(skinDataGridView_more, (JArray)job["result"], new string[] { "hash", "name" });//显示数据
            }
            if (e.ClickedItem.Text == "添加项目")
            {
                setProjectSetting set = new setProjectSetting(hash);
                set.ShowDialog();
            }
            if (e.ClickedItem.Text == "查看用户")
            {
                JObject job = pRole.getRoleUserList(hash);
                if (job == null)
                {
                    return;
                }
                showDataView(skinDataGridView_more, (JArray)job["result"], new string[] { "hash", "name" });//显示数据
            }
        }
Example #2
0
        /// <summary>
        /// 管理项目
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void skinButton_project_setting_Click(object sender, EventArgs e)
        {
            setProjectSetting set = new setProjectSetting();

            set.ShowDialog();
        }