-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclsVehicle.java
More file actions
155 lines (126 loc) · 3.37 KB
/
Copy pathclsVehicle.java
File metadata and controls
155 lines (126 loc) · 3.37 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
import javax.swing.*;
public class clsVehicle
{
private int VehicleID ;
private String VehicleName;
private int VehicleTypeID;
private String ChessisNo;
private int InwardYear;
public void setVehicleID(int VehicleID)
{
this.VehicleID = VehicleID;
}
public int getVehicleID()
{
return VehicleID;
}
public void setVehicleTypeID(int VehicleTypeID)
{
this.VehicleTypeID = VehicleTypeID;
}
public int getVehicleTypeID()
{
return VehicleTypeID;
}
public void setVehicleName(String VehicleName)
{
this.VehicleName = VehicleName;
}
public String getVehicleName()
{
return VehicleName;
}
public void setChessisNo(String ChessisNo)
{
this.ChessisNo = ChessisNo;
}
public String getChessisNo()
{
return ChessisNo;
}
public void setInwardYear(int InwardYear)
{
this.InwardYear = InwardYear;
}
public int getInwardYear()
{
return InwardYear;
}
public static int addNewVehicle(clsVehicle temp)
{
return(dlsVehicle.addNewVehicle(temp));
}
/* public static boolean isVehicleDulplicate(String mVehicleName)
{
//return(dlsVehicle.isVehicleDulplicate(mVehicleName));
}
*/
public static void updateVehicle(clsVehicle temp)
{
dlsVehicle.updateVehicle(temp);
}
public static void deleteVehicle(clsVehicle temp)
{
dlsVehicle.deleteVehicle(temp);
}
public static int getAllVehicleCount()
{
return(dlsVehicle.getAllVehicleCount());
}
public static String [] getAllVehicleNames()
{
return(dlsVehicle.getAllVehicleNames());
}
public static String [] addFreeVehicleRecords(int TodaysDay,int TodaysMonth,int TodaysYear)
{
return(dlsVehicle.addFreeVehicleRecords(TodaysDay, TodaysMonth, TodaysYear));
}
public static clsVehicle getVehicleInformation(int mVehicleID)
{
return(dlsVehicle.getVehicleInformation(mVehicleID));
}
public static clsVehicle [] getAllVehicleInformation()
{
return(dlsVehicle.getAllVehicleInformation());
}
public static void addVehicleRecords(JComboBox temp)
{
temp.removeAllItems();
temp.addItem("--Select Vehicle--");
String VehicleNames [] = clsVehicle.getAllVehicleNames();
for(String name : VehicleNames)
{
temp.addItem(name);
}
}
public static void addFreeVehicleRecords(JComboBox temp, int TodaysDay,int TodaysMonth,int TodaysYear)
{
temp.removeAllItems();
temp.addItem("--Select Vehicle--");
String VehicleNames [] = clsVehicle.addFreeVehicleRecords(TodaysDay, TodaysMonth, TodaysYear);
for(String name : VehicleNames)
{
temp.addItem(name);
}
}
public static int getIDFromName(String mVehicleName)
{
return dlsVehicle.getIDFromName(mVehicleName);
}
public static void showVehicle(clsVehicle temp)
{
System.out.println("Vehicle ID : "+temp.getVehicleID());
System.out.println("Vehicle Name : "+temp.getVehicleName());
System.out.println("Vehicle Type ID : "+temp.getVehicleTypeID());
System.out.println("Chessis No : "+temp.getChessisNo());
System.out.println("Inward Year : "+temp.getInwardYear());
}
public static void main(String args[])
{
String temp[] = clsVehicle.addFreeVehicleRecords(22,2,2025);
for(String name : temp )
{
System.out.println(name);
}
}
}