-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclsState.java
More file actions
125 lines (96 loc) · 2.26 KB
/
clsState.java
File metadata and controls
125 lines (96 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import javax.swing.*;
public class clsState
{
private int StateID;
private String StateName;
private int CountryID;
public void setStateID(int StateID)
{
this.StateID = StateID;
}
public int getStateID()
{
return(StateID);
}
public void setStateName(String StateName)
{
this.StateName = StateName;
}
public String getStateName()
{
return(StateName);
}
public void setCountryID(int CountryID)
{
this.CountryID = CountryID;
}
public int getCountryID()
{
return(CountryID);
}
public static void addNewState(clsState temp)
{
dlsState.addNewState(temp);
}
public static boolean isStateDulplicate(String mStateName)
{
return(dlsState.isStateDulplicate(mStateName));
}
public static void showState(clsState temp)
{
System.out.println("StateID : "+temp.getStateID());
System.out.println("State Name : "+temp.getStateName());
System.out.println("Country ID: "+temp.getCountryID());
}
public static String[] getAllStateNames()
{
return(dlsState.getAllStateNames());
}
public static String[] getAllStateNames(int mCountryID)
{
return(dlsState.getAllStateNames(mCountryID));
}
public static int getIDFromName(String mStateName)
{
return(dlsState.getIDFromName(mStateName));
}
public static clsState [] getAllStateInformation()
{
return(dlsState.getAllStateInformation());
}
public static void addStateRecords(JComboBox temp, int mCountryID)
{
temp.removeAllItems();
temp.addItem("--Select State--");
String StateNames[] = clsState.getAllStateNames(mCountryID);
for(String name : StateNames)
{
temp.addItem(name);
}
}
public static void addStateRecords(JComboBox temp)
{
temp.removeAllItems();
temp.addItem("--Select State--");
String StateNames[] = clsState.getAllStateNames();
for(String name : StateNames)
{
temp.addItem(name);
}
}
public static clsState getStateInformation(int mStateID)
{
return(dlsState.getStateInformation(mStateID));
}
public static void updateState(clsState temp)
{
dlsState.updateState(temp);
}
public static void deleteState(clsState temp)
{
dlsState.deleteState(temp);
}
public static void main(String args[])
{
}
}