资源简介
纯EXT 做的 图书管理系统
自带数据库 只需要导入
代码片段和文件信息
package com.lhq.prj.bms.action;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
// Download by http://www.codefans.net
import com.lhq.prj.bms.core.baseAction;
import com.lhq.prj.bms.core.MyUtils;
import com.lhq.prj.bms.core.Page;
import com.lhq.prj.bms.po.Book;
import com.lhq.prj.bms.service.IBookService;
/**
* BookAction.java Create on 2008-9-24 下午09:18:34
*
* 图书管理
*
* Copyright (c) 2008 by MTA.
*
* @author 廖瀚卿
* @version 1.0
*/
@SuppressWarnings(“serial“)
public class BookAction extends baseAction {
private IBookService bookService;
private Book book;
private boolean success;
private Page page;
private Integer bookId;
private File upload;// 上传的文件
private String uploadContentType;// 上传问文件类型
private String uploadFileName; // 上传文件名
private String allowedTypes;// 允许上传的文件类型列表
private String savePath;// 文件保存路径通过ioc注入
private float maxHeightSize;// 缩略图最大高度
private float maxWidthSize;//缩略图最大宽度
private String bookName;
private String author;
private String press;
private String price;
private String editionNo;
private String isbn;
private Integer categoryId;
private String categoryName;
private String wordCount;
private String pageCount;
private String bookSize;
private String paper;
private String pack;
private String imageUrl;
private String address;
private String editorRecommend;
private String description;
private String authorDesc;
private Integer state;
/**
* 添加图书
*
* @return
*/
public String saveBook() {
book = this.upload(book);
bookId = (Integer) bookService.saveBook(book);
if (bookId != null) {
this.jsonString = “{bookId:“ + bookId + “success:trueimageUrl:‘“ + book.getImageUrl() + “‘}“;
getRequest().setAttribute(“jsonString“ jsonString);
return SUCCESS;
}
this.jsonString = “{success:falsecontentTypeIsValid:“ + MyUtils.isValid(getUploadContentType() getAllowedTypes().split(““)) + “}“;
getRequest().setAttribute(“jsonString“ jsonString);
return INPUT;
}
/**
* 查找图书信息
*
* @return
*/
public String findAllBook() {
String strCondition = getRequest().getParameter(“conditions“);
List conditions = new ArrayList();
MyUtils.addToCollection(conditions MyUtils.split(strCondition “ “));
page = new Page();
page.setConditions(conditions);
int start = Integer.valueOf(getRequest().getParameter(“start“));
int limit = Integer.valueOf(getRequest().getParameter(“limit“));
page.setStart(++start);
page.setLimit(limit = limit == 0 ? 20 : limit);
page = bookService.findByPage(page);
return SUCCESS;
}
/**
* 删除图书
*
* @return
*/
public String deleteBook() {
String strBookId = getRequest().getParameter(“bookId“);
if (strBookId != null && !““.equals(strBookId)) {
success = bookService.deleteBook(getSession().getServ
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1721 2008-10-09 20:27 bmsh\bmsh\.classpath
文件 286 2008-10-09 20:27 bmsh\bmsh\.myme
文件 66 2008-09-07 21:47 bmsh\bmsh\.myumldata
文件 1410 2008-09-13 00:15 bmsh\bmsh\.project
文件 406 2008-09-13 00:15 bmsh\bmsh\.settings\.jsdtscope
文件 1040 2008-09-16 10:08 bmsh\bmsh\.settings\com.genuitec.eclipse.j2eedt.core.prefs
文件 86 2008-09-16 21:21 bmsh\bmsh\.settings\org.eclipse.core.resources.prefs
文件 162 2008-09-16 10:08 bmsh\bmsh\.settings\org.eclipse.jdt.ui.prefs
文件 49 2008-09-13 00:15 bmsh\bmsh\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2008-09-13 00:15 bmsh\bmsh\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 1111 2009-02-26 12:34 bmsh\bmsh\downcode.com.txt
文件 1886 2008-10-11 19:25 bmsh\bmsh\src\applicationContext-actions.xm
文件 2080 2008-09-16 10:15 bmsh\bmsh\src\applicationContext-common.xm
文件 1684 2008-10-11 19:44 bmsh\bmsh\src\applicationContext-daos.xm
文件 1821 2008-10-12 15:56 bmsh\bmsh\src\applicationContext-services.xm
文件 10279 2009-02-25 12:42 bmsh\bmsh\src\com\lhq\prj\bms\action\BookAction.java
文件 4131 2009-02-25 12:43 bmsh\bmsh\src\com\lhq\prj\bms\action\CategoryAction.java
文件 3256 2008-10-12 16:20 bmsh\bmsh\src\com\lhq\prj\bms\action\CompanyAction.java
文件 3793 2009-02-25 12:43 bmsh\bmsh\src\com\lhq\prj\bms\action\DeptAction.java
文件 2436 2008-10-12 16:20 bmsh\bmsh\src\com\lhq\prj\bms\action\DutyAction.java
文件 4987 2009-02-25 12:42 bmsh\bmsh\src\com\lhq\prj\bms\action\LoanLogAction.java
文件 2630 2009-02-25 12:42 bmsh\bmsh\src\com\lhq\prj\bms\action\SubjectAction.java
文件 4950 2009-02-25 12:43 bmsh\bmsh\src\com\lhq\prj\bms\action\UserAction.java
文件 1867 2009-02-25 12:46 bmsh\bmsh\src\com\lhq\prj\bms\core\ba
文件 8344 2008-10-12 16:20 bmsh\bmsh\src\com\lhq\prj\bms\core\MyUtils.java
文件 1363 2009-02-25 12:46 bmsh\bmsh\src\com\lhq\prj\bms\core\Page.java
文件 1123 2009-02-25 12:43 bmsh\bmsh\src\com\lhq\prj\bms\dao\IBookDao.java
文件 1270 2008-09-24 21:09 bmsh\bmsh\src\com\lhq\prj\bms\dao\ICategoryDao.java
文件 885 2009-02-25 12:44 bmsh\bmsh\src\com\lhq\prj\bms\dao\ICompanyDao.java
文件 1222 2008-09-19 01:44 bmsh\bmsh\src\com\lhq\prj\bms\dao\IDeptDao.java
............此处省略592个文件信息
评论
共有 条评论