Beispiel #1
0
        public void UsersList(Form _MdiForm)
        {
            UsersList companyList = new UsersList();

            companyList.MdiParent = _MdiForm;
            companyList.Show();
        }
 private void EditDelCoursesMnBtn_Click(object sender, EventArgs e)
 {
     UserGroupBox.Hide();
     AssignMsgLabel.Hide();
     AssignCourseBtn.Hide();
     CancelUsersBtn.Hide();
     CancelCoursesBtn.Hide();
     ClearBoxes();
     UsersList.Enabled        = true;
     CoursesList.Enabled      = true;
     CreateEditCourseBtn.Text = "Submit";
     UsersList.Show();
     CoursesList.Show();
     CourseGroupBox.Show();
     ChangeMsgLabel("Edit", "Courses");
     this.CourseGroupBox.Location = new Point(410, 12);
     this.UsersList.Location      = new Point(635, 12);
 }
        //On click on every menu button, objects that are not needed are being hidden, text boxes are being cleared
        //and the lists are being enabled. The regnumbo on edit must be disable so that the admin cannot create or
        //replace(by accident or not) a user from there

        private void CreateCourseMenuBtn_Click(object sender, EventArgs e)
        {
            UserGroupBox.Hide();
            CoursesList.Hide();
            AssignMsgLabel.Hide();
            AssignCourseBtn.Hide();
            CancelUsersBtn.Hide();
            CancelCoursesBtn.Hide();
            ClearBoxes();
            UsersList.Enabled        = true;
            CoursesList.Enabled      = true;
            CreateEditCourseBtn.Text = "Create";
            ChangeMsgLabel("Create", "Courses");
            UsersList.Show();
            CourseGroupBox.Show();
            this.CourseGroupBox.Location = new Point(550, 12);
            this.UsersList.Location      = new Point(150, 12);
        }
 private void EditDelUsersMnBtn_Click(object sender, EventArgs e)
 {
     CourseGroupBox.Hide();
     CoursesList.Hide();
     PassBox.Hide();
     PassLabel.Hide();
     AssignMsgLabel.Hide();
     AssignCourseBtn.Hide();
     HideAllErrors();
     CancelUsersBtn.Hide();
     CancelCoursesBtn.Hide();
     ClearBoxes();
     UsersList.Enabled   = true;
     CoursesList.Enabled = true;
     RegNumBox.Enabled   = false;
     UserGroupBox.Show();
     UsersList.Show();
     this.UserGroupBox.Location = new Point(550, 12);
     this.UsersList.Location    = new Point(150, 12);
     ChangeMsgLabel("Edit", "Users");
     CreateEditUserBtn.Text = "Submit";
 }
        private void AssignCoursesMenuBtn_Click(object sender, EventArgs e)
        {
            UsersList.Enabled   = true;
            CoursesList.Enabled = true;
            UserGroupBox.Hide();
            CourseGroupBox.Hide();
            AssignMsgLabel.Show();
            AssignCourseBtn.Show();
            AssignMsgLabel.Text = "";
            CoursesList.Show();
            UsersList.Show();
            ClearBoxes();

            //clear the array from previous entries
            assignments[0] = "";
            assignments[1] = "";
            //=====================

            CancelUsersBtn.Hide();
            CancelCoursesBtn.Hide();
            UsersList.Location       = new Point(635, 12);
            AssignMsgLabel.Location  = new Point(407, 50);
            AssignCourseBtn.Location = new Point(467, 100);
        }