Exemple #1
0
        private void completedTasks_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                //get task
                StoryTask.getTaskInfo(completedTasks.SelectedItem.ToString(), develop1, develop2, develop1Name, develop1Email, develop1Position,
                                      develop2Name, develop2Email, develop2Position);

                //remove the selection of the item in the other box if one was selected
                if (currentTasks.SelectedItem != null)
                {
                    currentTasks.SetSelected(currentTasks.Items.IndexOf(currentTasks.SelectedItem), false);
                }

                comments.Visible     = true;
                userComments.Visible = true;
                comment.Visible      = true;
                hideTaskInfo.Visible = true;
            }
            catch (NullReferenceException error)
            {
                develop1.Visible = false;
                develop2.Visible = false;
                return;
            }
        }
Exemple #2
0
        private void completedTasks_SelectedIndexChanged(object sender, EventArgs e)
        {
            int    id, uid;
            string name;

            if (completedTasks.SelectedItem != null)
            {
                userComments.Items.Clear();

                //get task
                StoryTask.getTaskInfo(completedTasks.SelectedItem.ToString(), develop1, develop2, develop1Name, develop1Email, develop1Position,
                                      develop2Name, develop2Email, develop2Position);

                //remove the selection of the item in the other box if one was selected
                if (currentTasks.SelectedItem != null)
                {
                    currentTasks.SetSelected(currentTasks.Items.IndexOf(currentTasks.SelectedItem), false);
                }

                DataTable commentIDs = StoryTask.getCommentID(StoryTask.getTaskID(completedTasks.SelectedItem.ToString()));

                foreach (DataRow row in commentIDs.Rows)
                {
                    id   = int.Parse(row["CommentID"].ToString());
                    uid  = StoryTask.getCommenter(id);
                    name = SQL.getFullName(uid);
                    userComments.Items.Add(name);
                }

                comments.Visible     = true;
                userComments.Visible = true;
                comment.Visible      = true;
                hideTaskInfo.Visible = true;
            }
        }