示例#1
0
        }  // end deactivateOwlMember


        // Disables Student textboxes and highlights the Student groupbox
        public static void deactivateStudent(frmOwlCommunity f)
        {
            deactivateUndergraduateStudent(f);   // Must deactivate UG Student too
            deactivateGraduateStudent(f);        // Must deactivate Grad Student too
            f.grpStudent.Enabled = false;
            f.grpStudent.BackColor = Color.Red;
        }  // end deactivateStudent
示例#2
0
 //saves base and sets class attributes to form values
 internal override void Save(frmOwlCommunity f)
 {
     base.Save(f);
     tuition = f.txtUndergraduateStudentTuition.Text;
     credits = f.txtUndergraduateStudentCredits.Text;
     year    = f.txtUndergraduateStudentYear.Text;
 } // end Save
示例#3
0
        }  // end activateGraduateStudent


        // Enables Chairperson textboxes and highlights the Chairperson groupbox
        public static void activateChairperson(frmOwlCommunity f)
        {
            activateFaculty(f);  // Faculty must be activated too
            f.grpChairperson.Enabled = true;
            f.grpChairperson.BackColor = Color.LimeGreen;
            f.btnEnterMember.Enabled = true;
        }  // end activateChairperson
示例#4
0
        }  // end activateChairperson


        // 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 deactivateOwlMember
示例#5
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
示例#6
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
示例#7
0
        } // end Save

        // Display data in object on form
        internal override void Display(frmOwlCommunity f)
        {
            base.Display(f);
            f.txtUndergraduateStudentTuition.Text = tuition.ToString();
            f.txtUndergraduateStudentCredits.Text = credits.ToString();
            f.txtUndergraduateStudentYear.Text    = year.ToString();
        }  // end Display
示例#8
0
        }  // end activateUndergraduateStudent


        // Enables Worker textboxes and highlights the Graduate Student groupbox
        public static void activateGraduateStudent(frmOwlCommunity f)
        {
            activateStudent(f);  // Student must be activated too
            f.grpGraduateStudent.Enabled = true;
            f.grpGraduateStudent.BackColor = Color.LimeGreen;
            f.btnEnterMember.Enabled = true;

        }  // end activateGraduateStudent
示例#9
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.btnEnterMember.Enabled = true;
        }  // end activateFaculty
示例#10
0
 } // end Clear
 public static void disableAll(frmOwlCommunity f)
 {
     f.txtOwlMemberName.Enabled = false;
     f.txtOwlMemberBirthDate.Enabled = false;
     f.txtOwlMemberID.Enabled = false;
     f.txtOwlMemberID.Focus();
     f.txtFacultyDepartment.Enabled = false;
     f.txtFacultyRank.Enabled = false;
     f.txtStudentMajor.Enabled = false;
     f.txtStudentGPA.Enabled = false;
     f.txtUndergraduateStudentTuition.Enabled = false;
     f.txtUndergraduateStudentYear.Enabled = false;
     f.txtUndergraduateStudentCredits.Enabled = false;
     f.txtGraduateStudentStipend.Enabled = false;
     f.txtGraduateStudentDegreeProgram.Enabled = false;
     f.txtChairpersonStipend.Enabled = false;
 }
示例#11
0
        // Resets form to initial state after form is loaded or
        //    an add Employee operation is performed

        public static void resetForm(frmOwlCommunity f)
        {
            //  Reset button components
            f.btnCreateFaculty.Enabled = true;
            f.btnCreateFaculty.Text = "Create Faculty";
            f.btnCreateChairperson.Enabled = true;
            f.btnCreateChairperson.Text = "Create Chairperson";
            f.btnCreateGraduateStudent.Enabled = true;
            f.btnCreateGraduateStudent.Text = "Create Graduate Student";
            f.btnCreateUndergraduateStudent.Enabled = true;
            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.txtOwlMemberName.Enabled = false;
            f.txtOwlMemberBirthDate.Enabled = false;
            f.txtFacultyDepartment.Enabled = false;
            f.txtFacultyRank.Enabled = false;
            f.txtStudentMajor.Enabled = false;
            f.txtStudentMajor.Enabled = false;
            f.txtUndergraduateStudentTuition.Enabled = false;
            f.txtUndergraduateStudentYear.Enabled = false;
            f.txtUndergraduateStudentCredits.Enabled = false;
            f.txtGraduateStudentDegreeProgram.Enabled = false;
            f.txtGraduateStudentStipend.Enabled = false;
            f.txtFacultyDepartment.Enabled = false;
            f.txtFacultyRank.Enabled = false;
        } // end resetForm
示例#12
0
 //Freshman(0 to 29 credits)
 //Sophomore(30 to 59 credits)
 //Junior(60 to 89 credits)
 //Senior(90 or more credits)
 //validates undergraduate student credit amounts
 public static Boolean UndergraduateStudentCredits(string credits, frmOwlCommunity f)
 {
     try
     {
         string year = Convert.ToString(f.txtUndergraduateStudentYear.Text);
         int    cred = Int32.Parse(credits);
         int    Num;
         bool   isValid = int.TryParse(credits, out Num);
         if (isValid)
         {
             if (year == "Freshman" && (cred >= 0 && cred <= 29))
             {
                 return(true);
             }
             else if (year == "Sophomore" && (cred >= 30 && cred <= 59))
             {
                 return(true);
             }
             else if (year == "Junior" && (cred >= 60 && cred <= 89))
             {
                 return(true);
             }
             else if (year == "Senior" && (cred >= 90))
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
示例#13
0
 }   // end deativateChairperson
 // Clear all textboxes on the form
 public static void clear(frmOwlCommunity f)
 {
     f.txtOwlMemberName.Text = "";
     f.txtOwlMemberBirthDate.Text = "";
     f.txtOwlMemberID.Text = "";
     f.txtOwlMemberID.Focus();
     f.txtFacultyDepartment.Text = "";
     f.txtFacultyRank.Text = "";
     f.txtStudentMajor.Text = "";
     f.txtStudentGPA.Text = "";
     f.txtUndergraduateStudentTuition.Text = "";
     f.txtUndergraduateStudentYear.Text = "";
     f.txtUndergraduateStudentCredits.Text = "";
     f.txtGraduateStudentStipend.Text = "";
     f.txtGraduateStudentDegreeProgram.Text = "";
     f.txtChairpersonStipend.Text = "";
     f.txtMemberType.Text = "";
     f.txtMemberType.Enabled = false;
     resetForm(f);
     f.btnClickhereToEnterID.Enabled = true;
 } // end Clear
        }  // end Property

        //method used for saving base and setting chairperson stipend to the form entry value
        internal override void Save(frmOwlCommunity f)
        {
            base.Save(f);
            chairpersonStipend = f.txtChairpersonStipend.Text;
        } // end Save
示例#15
0
        }  // end deactivateAddButtons


        // Enables OwlMember textboxes and highlights the OwlMember groupbox
        public static void activateOwlMember(frmOwlCommunity f)
        {
            f.grpOwlMember.Enabled = true;
            f.grpOwlMember.BackColor = Color.LimeGreen;

        }  // end activateOwlMember
示例#16
0
 //saves base attributes and sets class attributes to form values
 internal override void Save(frmOwlCommunity f)
 {
     base.Save(f);
     stipend       = f.txtGraduateStudentStipend.Text;
     degreeProgram = f.txtGraduateStudentDegreeProgram.Text;
 } // end Save
示例#17
0
        } // end Save

        // Display data in object on form
        internal override void Display(frmOwlCommunity f)
        {
            base.Display(f);
            f.txtGraduateStudentStipend.Text       = stipend.ToString();
            f.txtGraduateStudentDegreeProgram.Text = degreeProgram;
        }  // end Display
示例#18
0
        }  // end activateOwlMember


        //  Enables Student textboxes and highlights the Student groupbox
        public static void activateStudent(frmOwlCommunity f)
        {
            activateOwlMember(f);
            f.grpStudent.Enabled = true;
            f.grpStudent.BackColor = Color.LimeGreen;
        }  // end ActivateStudent
示例#19
0
        }     // end Property

        // Save data from form to object
        internal override void Save(frmOwlCommunity f)
        {
            base.Save(f);
            hiddenStudentMajor = f.txtStudentMajor.Text;
            hiddenStudentGPA   = f.txtStudentGPA.Text;
        } // end Save
示例#20
0
 }  // end deativateGraduateStudent
 // Disables Chairperson textboxes and highlights the Chairperson groupbox
 public static void deactivateChairperson(frmOwlCommunity f)
 {
     f.grpFaculty.Enabled = false;
     f.grpChairperson.BackColor = Color.Red;
 }   // end deativateChairperson
示例#21
0
        } // end Save

        // Display data in object on form
        internal override void Display(frmOwlCommunity f)
        {
            base.Display(f);
            f.txtFacultyDepartment.Text = department;
            f.txtFacultyRank.Text       = rank;
        }  // end Display
示例#22
0
        } // end Save

        // Display data in object on form
        internal override void Display(frmOwlCommunity f)
        {
            base.Display(f);
            f.txtStudentMajor.Text = hiddenStudentMajor;
            f.txtStudentGPA.Text   = hiddenStudentGPA.ToString();
        }  // end Display
示例#23
0
 }     // end Property
 //method used to save the base values and setting the class values to that of form entries
 internal override void Save(frmOwlCommunity f)
 {
     base.Save(f);
     department = f.txtFacultyDepartment.Text;
     rank       = f.txtFacultyRank.Text;
 } // end Save
        } // end Save

        // Display data in object on form
        internal override void Display(frmOwlCommunity f)
        {
            base.Display(f);
            f.txtChairpersonStipend.Text = chairpersonStipend.ToString();
        }  // end Display
示例#25
0
 }  // end deactivateUndergraduateStudent
 // Disables Graduate Student textboxes and highlights the Grad Student groupbox
 public static void deactivateGraduateStudent(frmOwlCommunity f)
 {
     f.grpGraduateStudent.Enabled = false;
     f.grpGraduateStudent.BackColor = Color.Red;
 }  // end deativateGraduateStudent