Skip to content

Java desktop project for finance managing of the self-storage unit.

License

Notifications You must be signed in to change notification settings

babroval/self-storage-unit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt text

Self-Storage Unit

Java desktop project for finance managing of the self-storage unit.

Build Status MIT licensed

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);
			}
		}
	}
});

Table of Contents

Requirements

Self-Storage Unit requires the following to run:

Usage

Self-Storage Unit is easiest to use with Eclipse IDE:
File -> Import -> Git -> Projects From Git > URI

Error handling

All exceptions are converted into unchecked type to keep code clean as possible.

Contributing

To contribute to Self-Storage Unit, clone this repo locally and
commit your code on a separate branch.

License

Self-Storage Unit is licensed under the MIT license.

About

Java desktop project for finance managing of the self-storage unit.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages