团队的作业:学生信息管理系统
- 队员学号:
周菲(队长) 201810812007
孔繁燕 201810812001
Alpha敏捷冲刺:
1、 站立式会议照片:
2、每个人的工作:
周菲:
今天已完成:实现修改班级信息功能
遇到的问题:修改后的班级信息不能保存到文件里面
明天计划完成:班级窗体和学生信息窗体的交互
孔繁燕:
今天已完成:实现修改班级信息功能
遇到的问题:修改后的班级信息不能保存到文件里面
明天计划完成:班级窗体和学生信息窗体的交互
3、项目燃尽图
4、部分项目代码和截图:
public class GradeUpdateDialog extends JInternalFrame { private static final long serialVersionUID = 1L; private IReload reload = null; private Grade grade = null; private JTextField txtGradeName; private GradeService gradeService = new GradeService(); public GradeUpdateDialog() { init(); } private void init() { setClosable(true); setBounds(100, 100, 450, 300); setDefaultCloseOperation(DISPOSE_ON_CLOSE); getContentPane().setLayout(null); JLabel label = new JLabel("班级编号"); label.setBounds(62, 35, 111, 57); getContentPane().add(label); txtGradeName = new JTextField(); txtGradeName.setColumns(10); txtGradeName.setBounds(151, 130, 158, 21); txtGradeName.setText(grade.getGradeName()); getContentPane().add(txtGradeName); JLabel label_1 = new JLabel("班级名称"); label_1.setBounds(62, 112, 111, 57); getContentPane().add(label_1); JLabel lblGradeId = new JLabel(""); lblGradeId.setBounds(151, 50, 99, 21); lblGradeId.setText(Integer.toString(grade.getGradeId())); getContentPane().add(lblGradeId); JButton btnSave = new JButton("保存"); btnSave.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int id = Integer.parseInt(lblGradeId.getText()); String name = txtGradeName.getText(); Grade g = new Grade(id, name); /* GradeService gradeService = new GradeService(); */ boolean isSave = gradeService.update(g); if (isSave) { System.out.println("保存成功"); reload.reload(); GradeUpdateDialog.this.dispose(); } else { System.out.println("保存失败"); } } }); btnSave.setBounds(62, 206, 93, 23); getContentPane().add(btnSave); JButton btnCancel = new JButton("取消"); btnCancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { GradeUpdateDialog.this.dispose(); } }); btnCancel.setBounds(236, 206, 93, 23); getContentPane().add(btnCancel); } }