Example #1
0
        private void buttonSaveTask_Click(object sender, EventArgs e)
        {
            Person       selected = persons[this.UI_personDataGrid.SelectedCells[0].RowIndex];
            string       category = this.UI_TaskCategory.Text;
            TaskCategory cat      = new TaskCategory();

            if (category.StartsWith("0"))
            {
                cat = TaskCategory.REQ_ANALYSIS;
            }
            else if (category.StartsWith("1"))
            {
                cat = TaskCategory.DESIGN;
            }
            else if (category.StartsWith("2"))
            {
                cat = TaskCategory.CODING;
            }
            else if (category.StartsWith("3"))
            {
                cat = TaskCategory.TESTING;
            }
            else if (category.StartsWith("4"))
            {
                cat = TaskCategory.PM;
            }

            float hrs = (float)Convert.ToDouble(this.UI_InitialHours.Text);

            Task t = new ProjectManagementTool.Task(this.UI_TaskName.Text, this.UI_TaskDescription.Text, selected, cat, hrs);

            currentProject.requirements[index].tasks.Add(t);
            data.updateProject(currentProject);
            this.Close();
        }
Example #2
0
        private void UI_save_Click(object sender, EventArgs e)
        {
            currentProject.projectName        = this.UI_editableProjectName.Text;
            currentProject.projectDescription = this.UI_editableProjectDescription.Text;
            currentProject.projectOwner       = persons[this.UI_personDataGrid.CurrentCell.RowIndex];

            data.updateProject(currentProject);
            this.Close();
        }
Example #3
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            string description = this.UI_RiskDescription.Text;
            int    priority    = Int32.Parse(this.UI_RiskPriority.Text);
            int    likelyhood  = Int32.Parse(this.UI_RiskLikelyhood.Text);

            Risk r = new Risk(description, likelyhood, priority);

            currentProject.addRisk(r);
            data.updateProject(currentProject);

            this.Close();
        }
        private void buttonReqSave_Click(object sender, EventArgs e)
        {
            data = new DataManagement();
            //Parses the text from the Requirements Category text box into an enum
            string reqCatText = this.comboBoxReqType.Text;
            RequirementCategory reqCat;

            if (string.Compare(reqCatText, "Functional") == 0)
            {
                reqCat = (RequirementCategory)Enum.Parse(typeof(RequirementCategory), "FUNCTIONAL");
            }
            else
            {
                reqCat = (RequirementCategory)Enum.Parse(typeof(RequirementCategory), "NONFUNCTIONAL");
            }
            //Creates the requirement object
            Requirement reqOut = new ProjectManagementTool.Requirement(this.reqDescription.Text, Convert.ToInt32(this.comboBoxReqPriority.Text), reqCat);

            //Adds new requirement to the project and updates the save file
            currentProject.addRequirement(reqOut);
            data.updateProject(currentProject);
            this.Close();
        }
Example #5
0
 //This is an example of a successful edit in the Project.
 //It deletes the team member that is currently highlighted
 //Then updates the DATABASE using data.updateProject
 //Then refreshes the local team members DataGRidView using refreshTeamMembers();
 private void UI_deleteTeamMemberButton_Click(object sender, EventArgs e)
 {
     currentProject.removeTeamMember(currentProject.team[this.teamGridView.SelectedCells[0].RowIndex]);
     data.updateProject(currentProject);
     refreshTeamMembers();
 }
 /*
  * This is the most important method in this class.
  *      We call the "addTeamMember" method for the currentProject, which adds the team member.
  *      The "Person" is the highlighted one in the list of All persons (previous method)
  *      The index for the persons LIST, and the DataGRidView match exactly since that is what we use to populate the grid.
  *                            this widnow
  * So we get the index from this.UI_personDataGrid.SelectedCells[0].RowIndex which reads:
  *      this window, the data grid view holding persons, the first index in the array of selected cells, and the RowIndex property of that.
  *
  * After we get that index, we browse to that in "persons" list, and add that person to the currentProject.
  *
  * Then we have to update the currentProject (since we just changed it) in the database so all other classes are aware of it.
  */
 private void addMember_Click(object sender, EventArgs e)
 {
     currentProject.addTeamMember(persons[this.UI_personDataGrid.SelectedCells[0].RowIndex]);
     data.updateProject(currentProject);
     this.Close();
 }
 private void UI_AddHrsBtn_Click(object sender, EventArgs e)
 {
     currentProject.requirements[req].tasks[task].addHours((float)Convert.ToDouble(this.UI_TaskHours.Text));
     data.updateProject(currentProject);
     this.Close();
 }