private static ManageStaffController launch() throws IOException { FXMLLoader fxmlLoader = new FXMLLoader(); fxmlLoader.setLocation(ManageStaffController.class.getResource("manageStaff.fxml")); Pane selfPane = fxmlLoader.load(); ManageStaffController controller = fxmlLoader.getController(); controller.informController = InformController.newInformController(selfPane); controller.selfPane = controller.informController.stackPane; return controller; }
public void fillStaffTable(String institutionID) { InstitutionVO vo = null; if (institutionID.charAt(3) == '0') { vo = manageblCenterService.searchCenter(institutionID); } else { // not in center vo = manageblHallService.searchHall(institution_Field.getText()); } if (vo == null) { // neither in center nor in hall informController.informWrong("请输入正确的机构编号"); return; } else { this.institutionID = vo.getInstitutionID(); initLabel(vo); List<StaffVO> staffVOs = manageblStaffService.getStaffByInstitution(vo.getInstitutionID()); this.staff_TableView.setItems(FXCollections.observableList(staffVOs)); } }
public void deleteStaff(ActionEvent actionEvent) { StaffVO staffVO = staff_TableView.getSelectionModel().getSelectedItem(); OperationMessage msg = manageblStaffService.dismissStaff(staffVO); informController.inform(msg, "删除成功"); }