Java desktop project for finance managing of the self-storage unit.
view.getComboNumEdit().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
view.getGroupStorage().clearSelection();
if (view.getComboNumEdit().getSelectedIndex() == 0) {
view.getComboUserEdit().setSelectedIndex(0);
view.getTfStorageNum().setText("");
view.getTfStorageInfo().setText("");
} else {
try {
Storage storage = storageService.getByStorageNumber(
String.valueOf(view.getComboNumEdit().getSelectedItem()));
User user = userService.getByStorageNumber(
String.valueOf(view.getComboNumEdit().getSelectedItem()));
view.getTfStorageNum().setText(storage.getStorage_number());
view.getTfStorageInfo().setText(storage.getInfo());
if (user.getUser_id() != 1) {
view.getComboUserEdit().setSelectedItem(user.getName());
view.getTfUserName().setText(user.getName());
view.getTfUserInfo().setText(user.getInfo());
} else {
view.getComboUserEdit().setSelectedIndex(0);
}
} catch (Exception e) {
JOptionPane.showMessageDialog(view.getPanel(),
"database fault", "", JOptionPane.ERROR_MESSAGE);
}
}
}
});
Self-Storage Unit requires the following to run:
Self-Storage Unit is easiest to use with Eclipse IDE:
File -> Import -> Git -> Projects From Git > URI
All exceptions are converted into unchecked type to
keep code clean as possible.
To contribute to Self-Storage Unit, clone this repo locally and
commit your code on a separate branch.
Self-Storage Unit is licensed under the MIT license.