?? aadmincategoryadd.java
字號:
/*
* This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/).
*/
package ch07.action;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import ch07.*;
import ch07.object.unit.*;
import ch07.logic.*;
import ch07.global.*;
import ch07.database.*;
/**
* 針對管理系統分類追加頁面的Servlet
* @author ShenYK
* @version 1.0
*/
public class AAdminCategoryAdd
{
//到首頁
public void doRegister( Hashtable inputData,
Hashtable outputData,
HttpSession mySession )
throws Exception
{
//首先獲得要修改的問題詳細信息
String sCategoryName = (String)inputData.get("categoryName");
String sQuestionNumber = (String)inputData.get("questionNumber");
String sTestTime = (String)inputData.get("testTime");
//生成一個Category對象以調用
Category categoryObj = new Category();
categoryObj.setCategoryName( sCategoryName );
categoryObj.setQuestionNumber( (new Integer(sQuestionNumber)).intValue() );
categoryObj.setTestTime( (new Integer(sTestTime)).intValue() );
//調用對應的logic類
LCategory lCategory = (LCategory)GlobalObjectProvider.getLogicService(CommonConst.LOGIC_KEY_CATEGORY);
//刪除對應的記錄
lCategory.addCategory( categoryObj );
//然后重新檢索
Vector vCategorys = lCategory.getAllCategory();
outputData.put( "pageId", CommonConst.VIEWID_ADMIN_CATEGORY_LIST);
//往值域中設置當前題目及位置信息
outputData.put( "categorys", vCategorys );
return;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -