2日目
This commit is contained in:
@@ -23,9 +23,7 @@ public class Main {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("システムを開始します");
|
System.out.println("システムを開始します");
|
||||||
Main main = new Main();
|
Main main = new Main();
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
main.start();
|
main.start();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -56,32 +54,28 @@ public class Main {
|
|||||||
start1();
|
start1();
|
||||||
}else {
|
}else {
|
||||||
start2();
|
start2();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "2": //登録
|
case "2": //登録
|
||||||
if(employeeMode) {
|
if(employeeMode) {
|
||||||
empInsert();
|
empInsert();
|
||||||
}else {
|
}else {
|
||||||
depInsert();
|
depInsert();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "3": //更新
|
case "3": //更新
|
||||||
if(employeeMode) {
|
if(employeeMode) {
|
||||||
empUpdate();
|
empUpdate();
|
||||||
}else {
|
}else {
|
||||||
depUpdate();
|
depUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "4": //削除
|
case "4": //削除
|
||||||
if(employeeMode) {
|
if(employeeMode) {
|
||||||
empDelete();
|
empDelete();
|
||||||
}else {
|
}else {
|
||||||
depDelete();
|
depDelete();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "9": //データ切り替え
|
case "9": //データ切り替え
|
||||||
employeeMode = !employeeMode;
|
employeeMode = !employeeMode;
|
||||||
@@ -387,37 +381,6 @@ public class Main {
|
|||||||
System.out.println("削除が完了しました");
|
System.out.println("削除が完了しました");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 入力値を判定し、返却する
|
|
||||||
*
|
|
||||||
* @param titleName 入力項目名
|
|
||||||
* @param flg 数値チェック可否フラグ
|
|
||||||
* @return チェック済み入力値
|
|
||||||
*/
|
|
||||||
/* public static String inputCheck(String titleName, boolean flg) {
|
|
||||||
String str = null;
|
|
||||||
while (true) {
|
|
||||||
System.out.println(titleName + "を入力してください");
|
|
||||||
str = sc.nextLine();
|
|
||||||
if (str.trim().length() == 0) {
|
|
||||||
System.out.println(titleName + "は入力必須です。");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (flg) {
|
|
||||||
if (str.trim().length() > 0) {
|
|
||||||
try {
|
|
||||||
Integer.parseInt(str);
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
System.out.println(titleName + "は数値入力です");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
public void DepSelectAll()throws FileNotFoundException{
|
public void DepSelectAll()throws FileNotFoundException{
|
||||||
DepartmentAccess da = new DepartmentAccess();
|
DepartmentAccess da = new DepartmentAccess();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user