基于JAVA的餐饮管理系统
}
}
}
catch(InvalidDataException ide) { }
throw new HotelException(\请求的数据不符合格式,请联系管理员\
public String getRecordName() { }
public void checkData() throws InvalidDataException { }
public void getData(ResultSet rs) throws SQLException { }
id = rs.getInt(\name = rs.getString(\typeID = rs.getInt(\workNum = rs.getString(\sex = rs.getInt(\memo = rs.getString(\password = rs.getString(\
birthday = new Date();
birthday.setTime(rs.getLong(\if (name == null) { }
throw new InvalidDataException(\关键字不对\return \
餐桌添加删除
function changeCategory() {
document.location = \
51
基于JAVA的餐饮管理系统
} <%
for (int i = 0; i < dishes.size(); i++) { %> <% %>
dish_show[<%=i%>][<%=j%>] = '<%=dish.name%>'; dish_value[<%=i%>][<%=j%>] = '<%=dish.id%>'; for (int j = 0; j < cat.items.size(); j++) {
System.out.println(cat.items.elementAt(j).getClass()); Dish dish = (Dish) cat.items.elementAt(j); dish_cat_show[<%=i%>] = '<%=cat.name%>'; dish_cat_value[<%=i%>] = '<%=cat.id%>'; dish_show[<%=i%>] = new Array(); dish_value[<%=i%>] = new Array();
DishCategory cat = (DishCategory) dishes.elementAt(i); var dish_cat_show = new Array(); var dish_cat_value = new Array(); var dish_show = new Array(); var dish_value = new Array();
<% } %>
function changeCategory(){
var n, i, m;
m = catList.selectedIndex; n = dishList.length; }
for(i = n - 1; i >= 0; i--)
dishList.options[i] = null;
52
基于JAVA的餐饮管理系统
if (m >= 0) {
for(i = 0; i < dish_show[m].length; i++){
NewOptionName = new Option(dish_show[m][i], dish_value[m][i]); dishList.options[i] = NewOptionName;
}
dishList.options[0].selected = true; }
function AddDish() {
var i, j, h, Code, Text; }
i = dishList.length;
j = bookForm.bookList.length; for (h = 0; h < i; h++) {
if (dishList.options[h].selected ) {
Code = dishList.options[h].value; Text = dishList.options[h].text; j = bookForm.bookList.length;
bookForm.bookList.options[j] = new Option(Text, Code); dishList.options[h].selected = false;
} } }
function DeleteDish() {
minselected = 0;
for (i = bookForm.bookList.length - 1; i >= 0; i--) {
if (bookForm.bookList.options[i].selected) {
if (minselected == 0 || i < minselected)
minselected = i;
bookForm.bookList.options[i] = null;
53
基于JAVA的餐饮管理系统
}
}
i = bookForm.bookList.length; if (i > 0) {
if (minselected >= i) minselected = i - 1;
bookForm.bookList.options[minselected].selected = true; }
function selectAll() {
for (i = bookForm.bookList.length - 1; i >= 0; i--) { } }
bookForm.bookList.options[i].selected = true; }
54