예제 #1
0
        private void memberLB_SelectedIndexChanged(object sender, EventArgs e)
        {
            currentLB.Items.Clear();
            if (memberLB.SelectedItem != null)
            {
                string   s = memberLB.GetItemText(memberLB.SelectedItem);
                string   firstname, lastname;
                string[] substrings = s.Split(' ');

                firstname = substrings[0];
                lastname  = substrings[1];

                DataTable sprint_IDs = StoryTask.getProject_sprintIDs(proj);

                //get tasks and put their names in the corresponding listbox
                foreach (DataRow r in sprint_IDs.Rows)
                {
                    //get all task ids from the sprint ids
                    DataTable task_IDs = StoryTask.getProject_taskIDs(int.Parse(r["SprintID"].ToString()));

                    //retrieve and add tasks to their correct lists
                    foreach (DataRow row in task_IDs.Rows)
                    {
                        StoryTask.getTaskNameForUser(currentLB, completeLB, SQL.getUserID(firstname, lastname), int.Parse(row["Task_ID"].ToString()));
                    }
                }
                //SQL.getUserTask(currentLB, SQL.getUserID(firstname, lastname), proj);
            }
        }
예제 #2
0
        public taskTree(String username, String projectName)
        {
            InitializeComponent();

            //get all project related sprint ids
            DataTable sprint_IDs = StoryTask.getProject_sprintIDs(projectName);

            //get tasks and put their names in the corresponding listbox
            foreach (DataRow r in sprint_IDs.Rows)
            {
                //get all task ids from the sprint ids
                DataTable task_IDs = StoryTask.getProject_taskIDs(int.Parse(r["SprintID"].ToString()));

                //retrieve and add tasks to their correct lists
                foreach (DataRow row in task_IDs.Rows)
                {
                    StoryTask.getTaskName(currentTasks, completedTasks, int.Parse(row["Task_ID"].ToString()));
                }
            }

            projectNameToolStripMenuItem.Text = projectName;
            memberNameToolStripMenuItem.Text  = username;
            taskTreeToolStripMenuItem.Font    = new Font(taskTreeToolStripMenuItem.Font, FontStyle.Bold);


            // intially make developer panels invisible unitl a task is selected
            develop1.Visible       = false;
            develop2.Visible       = false;
            commentDetails.Visible = false;
            comments.Visible       = false;
            comments2.Visible      = false;
            userComments.Visible   = false;
            comment.Visible        = false;
            hideTaskInfo.Visible   = false;

            /***************************** this is for select a project drop down menu **********************************/

            //get all project ids associated with the user ids
            DataTable proj_ids = SQL.getUserProjectIDs(SQL.getOwnerUserID(memberNameToolStripMenuItem.Text));

            string proj_name;

            // get all project names associated with the project ids
            foreach (DataRow row in proj_ids.Rows)
            {
                //put project names in select project drop down menu
                proj_name = SQL.getProjectName(int.Parse(row["Proj_ID"].ToString()));
                selectProjectToolStripMenuItem.DropDownItems.Add(proj_name);
            }
            /*************************************************************************************************************/
        }
예제 #3
0
        public assignTask(string username, string projName)
        {
            InitializeComponent();
            proj     = projName;
            userName = username;
            //SQL.getTasks(taskCB, projName); //this doesnt work for sure
            // SQL.getUndoneTask(taskCB, username, projName);
            //SQL.getUserTask(currentLB, username, projName);
            SQL.getProjectMembers(memberLB, username, projName); // i think i made the sql for this right
            DataTable sprint_IDs = StoryTask.getProject_sprintIDs(proj);

            //get tasks and put their names in the corresponding listbox
            foreach (DataRow r in sprint_IDs.Rows)
            {
                //get all task ids from the sprint ids
                DataTable task_IDs = StoryTask.getProject_taskIDs(int.Parse(r["SprintID"].ToString()));

                //retrieve and add tasks to their correct lists
                foreach (DataRow row in task_IDs.Rows)
                {
                    StoryTask.getTaskNameForAssign(taskCB, completeLB, int.Parse(row["Task_ID"].ToString()));
                }
            }
        }