コード例 #1
0
        private void team_modify_button_Click(object sender, EventArgs e)
        {
            if (null == TeamProjectInfo)
            {
                Common.ErrAlert("请选择项目后再操作!");
                return;
            }
            if (team_dataGridView.SelectedRows.Count == 0)
            {
                Common.ErrAlert("请选择一行再修改!");
                return;
            }
            TeamData teamData = teamDatas.ToList()[team_dataGridView.SelectedRows[0].Index];

            if (null == teamData)
            {
                Common.ErrAlert("加载选择的班组数据发生错误!");
                return;
            }
            TeamInfoForm teamInfoForm = new TeamInfoForm(db, TeamProjectInfo, teamData, loginUser);

            if (teamInfoForm.ShowDialog() == DialogResult.OK)
            {
                TeamDataGridViewLoad();
            }
        }
コード例 #2
0
        private void team_add_button_Click(object sender, EventArgs e)
        {
            if (null == TeamProjectInfo)
            {
                Common.ErrAlert("请选择项目后再操作!");
                return;
            }
            TeamInfoForm teamInfoForm = new TeamInfoForm(db, TeamProjectInfo, null, loginUser);

            if (teamInfoForm.ShowDialog() == DialogResult.OK)
            {
                TeamDataGridViewLoad();
            }
        }