コード例 #1
0
 //handles the save update button on the form
 private void btnSaveUpdates_Click_1(object sender, EventArgs e)
 {
     if (txtMemberType.Text == "Undergraduate Student")
     {
         dbFunctions.UpdateUndergraduateStudent(txtOwlMemberID.Text, txtOwlMemberName.Text, txtOwlMemberBirthDate.Text, txtStudentMajor.Text,
                                                txtStudentGPA.Text, txtUndergraduateStudentTuition.Text, txtUndergraduateStudentCredits.Text, txtUndergraduateStudentYear.Text);
         MessageBox.Show("Updates Saved", "Saved");
         FormController.clear(this);
     }
     else if (txtMemberType.Text == "Graduate Student")
     {
         dbFunctions.UpdateGraduateStudent(txtOwlMemberID.Text, txtOwlMemberName.Text, txtOwlMemberBirthDate.Text, txtStudentMajor.Text,
                                           txtStudentGPA.Text, txtGraduateStudentStipend.Text, txtGraduateStudentDegreeProgram.Text);
         MessageBox.Show("Updates Saved", "Saved");
         FormController.clear(this);
     }
     else if (txtMemberType.Text == "Faculty Member")
     {
         dbFunctions.UpdateFaculty(txtOwlMemberID.Text, txtOwlMemberName.Text, txtOwlMemberBirthDate.Text, txtFacultyDepartment.Text, txtFacultyRank.Text);
         MessageBox.Show("Updates Saved", "Saved");
         FormController.clear(this);
     }
     else if (txtMemberType.Text == "Faculty Chairperson")
     {
         dbFunctions.UpdateChairperson(txtOwlMemberID.Text, txtOwlMemberName.Text, txtOwlMemberBirthDate.Text, txtFacultyDepartment.Text,
                                       txtFacultyRank.Text, txtFacultyRank.Text);
         MessageBox.Show("Updates Saved", "Saved");
         FormController.clear(this);
     }
     else if (txtMemberType.Text != "Undergraduate Student" || txtMemberType.Text != "Graduate Student" || txtMemberType.Text != "Faculty Member" || txtMemberType.Text != "Faculty Chairperson")
     {
         MessageBox.Show("Please select a member type from the drop down box and then proceed", "Error");
     }
 }
コード例 #2
0
 //handles the enter ID button on form
 private void btnClickhereToEnterID_Click_1(object sender, EventArgs e)
 {
     MessageBox.Show("Please enter a 9 digit ID and select a member type");
     btnClickhereToEnterID.Enabled = false;
     FormController.clear(this);
     FormController.deactivateAddButtons(this);
     txtOwlMemberID.Enabled      = true;
     txtMemberType.Visible       = true;
     txtMemberType.Enabled       = true;
     lblSelectMemberType.Visible = true;
     btnEnterMember.Enabled      = false;
 }
コード例 #3
0
 //clear button on the form to clear the form data
 private void btnClear_Click_1(object sender, EventArgs e)
 {
     FormController.clear(this);
     btnSaveUpdates.Enabled = false;
 }