private void editB_Click(object sender, EventArgs e) { switch (editB.Text) { case "Edit": editB.Text = "Save"; EmployeeEnable(); break; case "Save": if (_firstName != firstNameTB.Text || _middleName != middleNameTB.Text || _lastName != lastNameTB.Text || _dob != dobDTP.Value || _gender != genderTB.Text || _maritalStatus != maritalStatusTB.Text || _nationality != nationalityTB.Text || _currentAddress != currentAddressTB.Text || _permanentAddress != permanentAddressTB.Text || // _globe != int.Parse(globeTB.Text.Trim()) || // _smart != int.Parse(smartTB.Text.Trim()) || _email != emailTB.Text || _tin != tinTB.Text || _sss != sssTB.Text || _pagibig != pagibigTB.Text || _philHealth != philhealthTB.Text || _position != positionTB.Text || _position != detailsPositionTB.Text || _department != departmentTB.Text || _department != detailsDepartmentTB.Text || _branch != detailsBranchTB.Text || _head != headTB.Text || _startDate != startDateDTP.Value || _graduate != graduateTB.Text || _college != collegeTB.Text || _seniorHigh != seniorHighTB.Text || _juniorHigh != juniorHighTB.Text || _elementary != elementaryTB.Text) { _basicInfo = new BasicInfo(_basicInfo.EmployeeID, firstNameTB.Text, middleNameTB.Text, lastNameTB.Text, dobDTP.Value, genderTB.Text, maritalStatusTB.Text, nationalityTB.Text, currentAddressTB.Text, permanentAddressTB.Text, byte.Parse(picturePB.Image.ToString())); /* _contactInfo = new ContactInfo(_contactInfo.EmployeeID, * // int.Parse(globeTB.Text.Trim()), * // int.Parse(smartTB.Text.Trim()), * emailTB.Text);*/ _governmentID = new GovernmentID(_governmentID.EmployeeID, tinTB.Text, sssTB.Text, pagibigTB.Text, philhealthTB.Text); _cPosition = new CPosition(_cPosition.EmployeeID, positionTB.Text, departmentTB.Text, branchCB.Text, headTB.Text, startDateDTP.Value); _education = new Education(_education.EmployeeID, graduateTB.Text, collegeTB.Text, seniorHighTB.Text, juniorHighTB.Text, elementaryTB.Text); _basicInfo.UpdateBasicInfo(_basicInfo); _contactInfo.UpdateContactInfo(_contactInfo); _governmentID.UpdateGovernmentID(_governmentID); _cPosition.UpdateCPosition(_cPosition); _education.UpdateEducation(_education); } editB.Text = "Edit"; EmployeeDisable(); break; } LoadBasicInfo(_employeeID); LoadContactInfo(_employeeID); LoadGovernmentID(_employeeID); LoadCPosition(_employeeID); LoadEducation(_employeeID); }