Beispiel #1
0
        }  // end deactivateAddButtons

        //  Enables Employee textboxes and highlights the OwlMember groupbox
        public static void activateOwlMember(frmOwlCommunity f)
        {
            f.grpOwlMember.Enabled          = true;
            f.grpOwlMember.BackColor        = Color.LimeGreen;
            f.txtOwlMemberName.Enabled      = true;
            f.dtpOwlMemberBirthDate.Enabled = true;
        }  // end activatePerson
 public override void Save(frmOwlCommunity f)
 {
     base.Save(f);
     studentTuition = Convert.ToDecimal(f.txtUndergraduateStudentTuition.Text);
     studentYear    = f.cbUndergraduateStudentYear.Text;
     studentCredits = Convert.ToInt32(f.txtUndergraduateStudentCredits.Text);
 }
Beispiel #3
0
        }  // end activateWorker

        // Disables OwlMember textboxes and highlights the OwlMember groupbox
        public static void deactivateOwlMember(frmOwlCommunity f)
        {
            deactivateStudent(f);
            deactivateFaculty(f);
            f.grpOwlMember.Enabled   = false;
            f.grpOwlMember.BackColor = Color.Red;
        }  // end deactivatePerson
 public override void Display(frmOwlCommunity f)
 {
     base.Display(f);
     f.txtUndergraduateStudentTuition.Text = studentTuition.ToString();
     f.cbUndergraduateStudentYear.Text     = studentYear;
     f.txtUndergraduateStudentCredits.Text = studentCredits.ToString();
 }
Beispiel #5
0
        }   // End ValidateOwlMemberName

        public static bool ValidateStudent(frmOwlCommunity f)
        {
            if (f.txtStudentGPA.Text == "" || f.txtStudentGPA.Text == null)
            {
                MessageBox.Show("Student GPA has been left blank." + "\n" +
                                "Please enter the Student GPA.",
                                "Empty Student GPA");
                return(false);
            }
            else if (f.txtStudentMajor.Text == "" || f.txtStudentMajor.Text == null)
            {
                MessageBox.Show("Student Major has been left blank." + "\n" +
                                "Please enter the Student Major.",
                                "Empty Student Major");
                return(false);
            }
            else
            {
                try
                {
                    decimal gpa = Convert.ToDecimal(f.txtStudentGPA.Text);
                }
                catch (Exception e)
                {
                    MessageBox.Show("Student GPA's input can not be accepted");
                    return(false);
                }
            }
            return(true);
        }
Beispiel #6
0
        }  // end deactivatePerson

        // Disables Employee textboxes and highlights the Student groupbox
        public static void deactivateStudent(frmOwlCommunity f)
        {
            deactivateUndergraduateStudent(f); // Must deactivate Manager too
            deactivateGraduateStudent(f);      // Must deactivate Worker too
            f.grpStudent.Enabled   = false;
            f.grpStudent.BackColor = Color.Red;
        }  // end deactivateEmployee
Beispiel #7
0
        }  // end activateAddButtons

        // Enable/disable buttons when not in edit mode
        public static void deactivateAddButtons(frmOwlCommunity f)
        {
            f.btnCreateGraduateStudent.Enabled      = false;
            f.btnCreateChairperson.Enabled          = false;
            f.btnCreateUndergraduateStudent.Enabled = false;
            f.btnCreateFaculty.Enabled = false;
        }  // end deactivateAddButtons
Beispiel #8
0
        }  // end activateWorker

        // Enables Worker textboxes and highlights the Chairperson groupbox
        public static void activateChairperson(frmOwlCommunity f)
        {
            activateOwlMember(f);  // Employee must be activated too
            f.grpChairperson.Enabled        = true;
            f.grpChairperson.BackColor      = Color.LimeGreen;
            f.txtChairPersonStipend.Enabled = true;
        }  // end activateWorker
Beispiel #9
0
        } // end resetForm

        // Activates and deactivates necessary form buttons
        //    when in add mode
        public static void formAddMode(frmOwlCommunity f)
        {
            f.btnClear.Enabled  = true;
            f.btnDelete.Enabled = false;
            f.btnEdit.Enabled   = false;
            f.btnFind.Enabled   = false;
        }  // end formAddMode
Beispiel #10
0
        }  // end activateManager

        // Enables Worker textboxes and highlights the Graduate Student groupbox
        public static void activateGraduateStudent(frmOwlCommunity f)
        {
            activateStudent(f);  // Employee must be activated too
            f.grpGraduateStudent.Enabled             = true;
            f.grpGraduateStudent.BackColor           = Color.LimeGreen;
            f.txtGraduateStudentStipend.Enabled      = true;
            f.cbGraduateStudentDegreeProgram.Enabled = true;
        }  // end activateWorker
Beispiel #11
0
        }  // end activatePerson

        //  Enables Employee textboxes and highlights the Student groupbox
        public static void activateStudent(frmOwlCommunity f)
        {
            activateOwlMember(f);
            f.grpStudent.Enabled      = true;
            f.grpStudent.BackColor    = Color.LimeGreen;
            f.txtStudentMajor.Enabled = true;
            f.txtStudentGPA.Enabled   = true;
        }  // end ActivateStudent
Beispiel #12
0
        }  // end activateFaculty

        // Enables Manager textboxes and highlights the Undergraduate groupbox
        public static void activateUndergraduateStudent(frmOwlCommunity f)
        {
            activateStudent(f);   // Employee must be activated too
            f.grpUndergraduateStudent.Enabled        = true;
            f.grpUndergraduateStudent.BackColor      = Color.LimeGreen;
            f.txtUndergraduateStudentTuition.Enabled = true;
            f.cbUndergraduateStudentYear.Enabled     = true;
            f.txtUndergraduateStudentCredits.Enabled = true;
        }  // end activateManager
Beispiel #13
0
        }  // end ActivateStudent

        // Enables Faculty textboxes and highlights the Faculty groupbox
        public static void activateFaculty(frmOwlCommunity f)
        {
            activateOwlMember(f);
            f.grpFaculty.Enabled           = true;
            f.grpFaculty.BackColor         = Color.LimeGreen;
            f.grpStudent.BackColor         = Color.Red;
            f.txtFacultyDepartment.Enabled = true;
            f.cbFacultyRank.Enabled        = true;
        }  // end activateFaculty
Beispiel #14
0
 public static bool ValidateOwlMember(frmOwlCommunity f)
 {
     if (ValidateOwlMemberID(f.txtOwlMemberID.Text) && ValidateOwlMemberName(f.txtOwlMemberName.Text))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #15
0
 public static bool ValidateUndergraduateStudent(frmOwlCommunity f)
 {
     if (ValidateUndergraduateStudentTution(f.txtUndergraduateStudentTuition.Text) && ValidateUndergraduateStudentCredits(f.txtUndergraduateStudentCredits.Text))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #16
0
        }  // end Parameterized Constructor

        public static void resetForm(frmOwlCommunity f)
        {
            //  Reset label or button components
            //f.lblOR.Visible = true;
            f.btnClear.Enabled                      = true;
            f.btnDelete.Enabled                     = false;
            f.btnEdit.Enabled                       = false;
            f.btnFind.Enabled                       = false;
            f.btnSaveEditUpdate.Enabled             = false;
            f.btnEnterID.Enabled                    = true;
            f.btnCreateFaculty.Enabled              = false;
            f.btnCreateFaculty.Text                 = "Create Faculty";
            f.btnCreateChairperson.Enabled          = false;
            f.btnCreateChairperson.Text             = "Create Chairperson";
            f.btnCreateGraduateStudent.Enabled      = false;
            f.btnCreateGraduateStudent.Text         = "Create Graduate Student";
            f.btnCreateUndergraduateStudent.Enabled = false;
            f.btnCreateUndergraduateStudent.Text    = "Create Undergraduate";

            // Reset group components
            f.grpOwlMember.Enabled              = true;
            f.grpOwlMember.BackColor            = Color.Gainsboro;
            f.grpStudent.Enabled                = false;
            f.grpStudent.BackColor              = Color.Gainsboro;
            f.grpFaculty.Enabled                = false;
            f.grpFaculty.BackColor              = Color.Gainsboro;
            f.grpUndergraduateStudent.Enabled   = false;
            f.grpUndergraduateStudent.BackColor = Color.Gainsboro;
            f.grpGraduateStudent.Enabled        = false;
            f.grpGraduateStudent.BackColor      = Color.Gainsboro;
            f.grpChairperson.BackColor          = Color.Gainsboro;
            f.grpChairperson.Enabled            = false;

            // Reset Text boxes
            f.txtOwlMemberID.Enabled = false;
            // f.txtOwlMemberID.Focus();
            f.txtOwlMemberName.Enabled               = false;
            f.dtpOwlMemberBirthDate.Enabled          = false;
            f.txtFacultyDepartment.Enabled           = false;
            f.cbFacultyRank.Enabled                  = false;
            f.txtStudentMajor.Enabled                = false;
            f.txtStudentMajor.Enabled                = false;
            f.txtUndergraduateStudentTuition.Enabled = false;
            f.cbUndergraduateStudentYear.Enabled     = false;
            f.txtUndergraduateStudentCredits.Enabled = false;
            f.cbGraduateStudentDegreeProgram.Enabled = false;
            f.txtGraduateStudentStipend.Enabled      = false;
            f.txtFacultyDepartment.Enabled           = false;
            f.cbFacultyRank.Enabled                  = false;
            f.txtChairPersonStipend.Enabled          = false;
        } // end resetForm
        }  // end deativateChairperson

        // Clear all textboxes on the form
        public static void clear(frmOwlCommunity f)
        {
            f.txtOwlMemberName.Text      = "";
            f.dtpOwlMemberBirthDate.Text = "";
            f.txtOwlMemberID.Text        = "";
            f.txtOwlMemberID.Focus();
            f.txtFacultyDepartment.Text           = "";
            f.cbFacultyRank.Text                  = "";
            f.txtStudentMajor.Text                = "";
            f.txtStudentGPA.Text                  = "";
            f.txtUndergraduateStudentTuition.Text = "";
            f.cbUndergraduateStudentYear.Text     = "";
            f.txtUndergraduateStudentCredits.Text = "";
            f.txtGraduateStudentStipend.Text      = "";
            f.cbGraduateStudentDegreeProgram.Text = "";
            f.txtChairPersonStipend.Text          = "";
            resetForm(f);
        } // end Clear
Beispiel #18
0
 public override void Save(frmOwlCommunity f)
 {
     base.Save(f);
     chairStipend = Convert.ToDecimal(f.txtChairPersonStipend.Text);
 }
Beispiel #19
0
 public override void Display(frmOwlCommunity f)
 {
     base.Display(f);
     f.txtChairPersonStipend.Text = chairStipend.ToString();
 }
 public override void Save(frmOwlCommunity f)
 {
     base.Save(f);
     facultyDepartment = f.txtFacultyDepartment.Text;
     facultyRank       = f.cbFacultyRank.Text;
 }
 public override void Display(frmOwlCommunity f)
 {
     base.Display(f);
     f.txtFacultyDepartment.Text = facultyDepartment;
     f.cbFacultyRank.Text        = facultyRank;
 }
Beispiel #22
0
        }  // end deactivateClient

        // Disables Undergraduate Student textboxes and highlights the Manager groupbox
        public static void deactivateUndergraduateStudent(frmOwlCommunity f)
        {
            f.grpUndergraduateStudent.Enabled   = false;
            f.grpUndergraduateStudent.BackColor = Color.Red;
        }  // end deactivateManager
Beispiel #23
0
        }  // end deactivateEmployee

        // Disables Client textboxes and highlights the Client groupbox
        public static void deactivateFaculty(frmOwlCommunity f)
        {
            f.grpFaculty.Enabled   = false;
            f.grpFaculty.BackColor = Color.Red;
        }  // end deactivateClient
 public override void Display(frmOwlCommunity f)
 {
     base.Display(f);
     f.txtGraduateStudentStipend.Text      = studentStipend.ToString();
     f.cbGraduateStudentDegreeProgram.Text = studentDegreeProgram;
 }
Beispiel #25
0
        }  // end deactivateManager

        // Disables Graduate Student textboxes and highlights the Worker groupbox
        public static void deactivateGraduateStudent(frmOwlCommunity f)
        {
            f.grpGraduateStudent.Enabled   = false;
            f.grpGraduateStudent.BackColor = Color.Red;
        }  // end deativateWorker
 public override void Save(frmOwlCommunity f)
 {
     base.Save(f);
     studentStipend       = Convert.ToDecimal(f.txtGraduateStudentStipend.Text);
     studentDegreeProgram = f.cbGraduateStudentDegreeProgram.Text;
 }
 public override void Display(frmOwlCommunity f)
 {
     base.Display(f);
     f.txtStudentGPA.Text   = Convert.ToString(hiddenStudentGPA);
     f.txtStudentMajor.Text = hiddenStudentMajor;
 }
 public override void Save(frmOwlCommunity f)
 {
     base.Save(f);
     hiddenStudentGPA   = Convert.ToDecimal(f.txtStudentGPA.Text);
     hiddenStudentMajor = f.txtStudentMajor.Text;
 }
Beispiel #29
0
        }  // end deativateWorker

        // Disables Graduate Student textboxes and highlights the Worker groupbox
        public static void deactivateChairperson(frmOwlCommunity f)
        {
            f.grpChairperson.Enabled   = false;
            f.grpChairperson.BackColor = Color.Red;
        }  // end deativateChairperson
Beispiel #30
0
        // Parametrized Constructor

        public FormController(frmOwlCommunity parentForm)
        {
            f = parentForm;
        }  // end Parameterized Constructor