⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inventorylogic.java~7~

📁 库存管理系统。 具有入库、出库、盘点、专库、统计等功能。
💻 JAVA~7~
字号:
package com.inv.logic;import com.inv.dao.HbmDAO;import com.inv.actionform.InventoryActionForm;import java.util.*;import com.inv.vo.Inventory;public class InventoryLogic {  private HbmDAO dao;   private InventoryActionForm form;   public InventoryLogic() {       dao = new HbmDAO();       dao.setAutoClose(false);   }   public void getInventorys()   {     String str = "from User";     List inventorys = dao.list(str);     form.setInventorys(inventorys); } public void addInventory() {    Inventory inventory = new Inventory();       inventory.setInvName("");       inventory.setInvUID(null);       form.getInventorys().add(inventory); } public void saveUser() {   List users = form.getUsers();   for (Iterator iter = users.iterator(); iter.hasNext(); ) {     User item = (User)iter.next();     if(item.getUserUID().equals(new Long(0)))     {       item.setUserUID(null);     }     try {       dao.store(item);     }     catch (DAOException ex) {       ex.printStackTrace();     }   } } public void deleteUser() {   Long uid = form.getDeleteUID();   try {     dao.remove(User.class, uid);   }   catch (DAOException ex) {     ex.printStackTrace();   } }   public void closeDAO()   {     dao.closeSession();   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -