-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclsAllocation.java
More file actions
173 lines (149 loc) · 3.93 KB
/
clsAllocation.java
File metadata and controls
173 lines (149 loc) · 3.93 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
import javax.swing.*;
public class clsAllocation
{
private int AllocationID ;
private String AllocationDate ;
private int RootID;
private int DriverID;
private int ConductorID;
private int VehicleID;
private int AllocationDayNo;
private int AllocationMonthNo;
private int AllocationYearNo;
public void setAllocationID(int mAllocationID)
{
this.AllocationID = mAllocationID;
}
public int getAllocationID()
{
return AllocationID;
}
public void setAllocationDate(String mAllocationDate)
{
this.AllocationDate = mAllocationDate;
}
public String getAllocationDate()
{
return AllocationDate;
}
public void setRootID(int mRootID)
{
this.RootID = mRootID;
}
public int getRootID()
{
return RootID;
}
public void setDriverID(int mDriverID)
{
this.DriverID = mDriverID;
}
public int getDriverID()
{
return DriverID;
}
public void setConductorID(int mConductorID)
{
this.ConductorID = mConductorID;
}
public int getConductorID()
{
return ConductorID;
}
public void setVehicleID(int mVehicleID)
{
this.VehicleID = mVehicleID;
}
public int getVehicleID()
{
return VehicleID;
}
public void setAllocationDayNo(int mAllocationDayNo)
{
this.AllocationDayNo = mAllocationDayNo;
}
public int getAllocationDayNo()
{
return AllocationDayNo;
}
public void setAllocationMonthNo(int mAllocationMonthNo)
{
this.AllocationMonthNo = mAllocationMonthNo;
}
public int getAllocationMonthNo()
{
return AllocationMonthNo;
}
public void setAllocationYearNo(int mAllocationYearNo)
{
this.AllocationYearNo = mAllocationYearNo;
}
public int getAllocationYearNo()
{
return AllocationYearNo;
}
public static boolean isRootBusy(clsAllocation temp)
{
return(dlsAllocation.isRootBusy(temp));
}
public static void addNewAllocation(clsAllocation temp)
{
dlsAllocation.addNewAllocation(temp);
}
public static void updateAllocation(clsAllocation temp)
{
dlsAllocation.updateAllocation(temp);
}
public static void deleteAllocation(clsAllocation temp)
{
dlsAllocation.deleteAllocation(temp);
}
public static int getAllAllocationCount()
{
return(dlsAllocation.getAllAllocationCount());
}
public static String[] getAllAllocationNames()
{
return(dlsAllocation.getAllAllocationNames());
}
public static clsAllocation getAllocationInformation(int mAllocation)
{
return(dlsAllocation.getAllocationInformation(mAllocation));
}
public static clsAllocation[] getAllAllocationInformation()
{
return(dlsAllocation.getAllAllocationInformation());
}
public static void addAllocationRecords(JComboBox temp)
{
temp.removeAllItems();
temp.addItem("--Select Allocation--");
String AllocationNames [] = clsAllocation.getAllAllocationNames();
for(String name : AllocationNames)
{
temp.addItem(name);
}
}
public static int getIDFromName(String mAllocationName)
{
return dlsAllocation.getIDFromName(mAllocationName);
}
public static void showAllocation(clsAllocation temp)
{
System.out.println("Allocation ID : "+temp.getAllocationID());
System.out.println("Root ID : "+temp.getRootID());
System.out.println("Driver ID : "+temp.getDriverID());
System.out.println("Conductor ID : "+temp.getConductorID());
System.out.println("Allocation Day : "+temp.getAllocationDayNo());
System.out.println("Allocation Month : "+temp.getAllocationMonthNo());
System.out.println("Allocation Year : "+temp.getAllocationYearNo());
}
public static void main(String args[])
{
clsAllocation[] emp= clsAllocation.getAllAllocationInformation();
for(clsAllocation emps : emp)
{
clsAllocation.showAllocation(emps);
}
}
}