Exemplo n.º 1
0
        private void ModifyTeamMnBtn_Click(object sender, EventArgs e)
        {
            YouAreHere(ModifyTeamMnBtn);

            SelectedCourseLabel.Hide();
            CoursesList.Hide();
            SelectCourseBtn.Hide();
            ProjectGroupBox.Hide();
            ProjectList.Hide();
            GradeList.Hide();
            GradeGroupBox.Hide();


            TeamList.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top);
            TeamGroupBox.Show();
            TeamList.Show();
            TeamGroupBox.Location = new Point(550, 12);
            TeamList.Location     = new Point(150, 12);



            RefreshList();
            ClearAllBoxes();
            EnableViewLists();
            ChangeBtnNames();
        }
Exemplo n.º 2
0
        private void ProjectsMnBtn_Click(object sender, EventArgs e)
        {
            YouAreHere(ProjectsMnBtn);

            CoursesList.Hide();
            SelectCourseBtn.Hide();
            SelectedCourseLabel.Hide();

            label11.Text = CoursesList.SelectedItems[0].Text;

            ProjectsList.Show();
            UploadGroupBox.Show();

            ProjectsList.Items.Clear();
            try
            {
                Team team         = Database.GetTeamOfStudent(user, SelectedCourse);
                var  listViewItem = new ListViewItem();

                foreach (KeyValuePair <Project, ProjectFile> pair in team.getProjectAssignmentsD())
                {
                    if (DateTime.Compare(pair.Key.getDueDate(), DateTime.Now) > 0)
                    {
                        listViewItem      = new ListViewItem();
                        listViewItem.Text = pair.Key.getProjectID();
                        listViewItem.SubItems.Add(pair.Key.getname());
                        if (pair.Value == null)
                        {
                            listViewItem.SubItems.Add("No");
                        }
                        else
                        {
                            listViewItem.SubItems.Add("Yes");
                        }
                        try
                        {
                            if (!(pair.Value.getGrade() < 0))
                            {
                                listViewItem.SubItems.Add(pair.Value.getGrade().ToString());
                            }
                            else
                            {
                                listViewItem.SubItems.Add("-");
                            }
                        }
                        catch (NullReferenceException ex)
                        {
                            listViewItem.SubItems.Add("-");
                        }
                        ProjectsList.Items.Add(listViewItem);
                    }
                }
            }
            catch (Exception msg)
            {
                MessageBox.Show("You have no team");
            }
        }
Exemplo n.º 3
0
        private void GradeProjectsMnBtn_Click(object sender, EventArgs e)
        {
            YouAreHere(GradeProjectsMnBtn);

            SelectedCourseLabel.Hide();
            CoursesList.Hide();
            SelectCourseBtn.Hide();
            ProjectList.Hide();
            ProjectGroupBox.Hide();
            TeamGroupBox.Hide();
            TeamList.Hide();

            GradeGroupBox.Show();
            GradeList.Show();
            GradeGroupBox.Location = new Point(450, 12);



            RefreshList();
            ClearAllBoxes();
            EnableViewLists();
            ChangeBtnNames();
        }