コード例 #1
0
        private void UpdateJobList()
        {
            KryptonDataGridViewComboBoxColumn comboboxColumn = (KryptonDataGridViewComboBoxColumn)dgvDetail.Columns[9];

            comboboxColumn.Items.Clear();
            JobDict.Clear();

            //项目的负责人和成员
            string projectA = "项目负责人";

            //string projectB = "项目-成员";
            ((KryptonDataGridViewComboBoxColumn)dgvDetail.Columns[9]).Items.Add(projectA);
            //((KryptonDataGridViewComboBoxColumn)dgvDetail.Columns[9]).Items.Add(projectB);
            JobDict.Add(projectA, MainForm.Instance.ProjectObj);
            //JobDict.Add(projectB, MainForm.Instance.ProjectObj);

            List <Project> ketiList = ConnectionManager.Context.table("Project").where ("ParentID='" + MainForm.Instance.ProjectObj.ID + "'").select("*").getList <Project>(new Project());

            if (ketiList != null)
            {
                foreach (Project proj in ketiList)
                {
                    projectA = proj.Name + "负责人";
                    string projectB = proj.Name + "成员";
                    ((KryptonDataGridViewComboBoxColumn)dgvDetail.Columns[9]).Items.Add(projectA);
                    ((KryptonDataGridViewComboBoxColumn)dgvDetail.Columns[9]).Items.Add(projectB);
                    JobDict[projectA] = proj;
                    JobDict[projectB] = proj;
                }
            }
        }
コード例 #2
0
        private void UpdateJobList()
        {
            JobDict.Clear();

            //项目的负责人和成员
            string projectA = "项目负责人";

            JobDict.Add(projectA, PublicReporterLib.PluginLoader.getLocalPluginRoot <PluginRoot>().projectObj);

            List <Project> ketiList = ConnectionManager.Context.table("Project").where ("ParentID='" + PublicReporterLib.PluginLoader.getLocalPluginRoot <PluginRoot>().projectObj.ID + "'").select("*").getList <Project>(new Project());

            if (ketiList != null)
            {
                foreach (Project proj in ketiList)
                {
                    projectA = proj.Name + "负责人";
                    string projectB = proj.Name + "成员";
                    JobDict[projectA] = proj;
                    JobDict[projectB] = proj;
                }
            }
        }