资源简介

实现基本功能,如:查询影票,售票,增删改影片,添加新用户,账目统计,修改个人信息等基本功能,适合初学者。界面美观,操作方便。数据库是SQL Server

资源截图

代码片段和文件信息

package cn.com.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;

import javax.swing.JOptionPane;

import cn.com.dao.FactoryDao;
import cn.com.dao.TicketDao;
import cn.com.view.panel.AccountSummary;

public class AccountSummaryAction implements ActionListener{

TicketDao dao = FactoryDao.getTicketDao();
AccountSummary panel;

public AccountSummaryAction(AccountSummary panel) {
this.panel = panel;
}
    
@SuppressWarnings(“rawtypes“)
@Override
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand() == “查询“) {
if (“按影片名称汇总“.equals(panel.getComboBox())) {
Vector data1 = dao.findTicketByName(panel.getFilmName());
if(data1.size()<1){
JOptionPane.showMessageDialog(null “没有记录!“);
panel.setModel(data1);
}else{
panel.setModel(data1);

panel.setSumText(dao.getSum());
panel.setCountText(dao.getCount());
dao.setSum(0);
dao.setCount(0);
}
}
 else{
 String date1 =  (String) panel.box1.getSelectedItem();
 String date2 =  (String) panel.box2.getSelectedItem();
 if(date1.compareTo(date2)>0){
 JOptionPane.showMessageDialog(null “日期顺序选择不当,请重新选择日期!“);
 }else{
 Vector data2 = dao.findTicketByDate(date1date2);
 if(data2.size()<1){
 JOptionPane.showMessageDialog(null “没有记录!“);
panel.setModel(data2);
 }else{
panel.setModel(data2);
 
panel.setSumText(dao.getSum());
panel.setCountText(dao.getCount());
dao.setSum(0);
dao.setCount(0);
   }
        }
      }
   }

else if (e.getSource().equals(panel.comboBox)) {
if ((String) panel.comboBox.getSelectedItem() == “按日期汇总“) {
panel.createText().setVisible(false);
panel.createFirstBox().setVisible(true);
panel.createSecondBox().setVisible(true);
panel.showLabel().setVisible(true);
}else{
panel.createText().setVisible(true);
panel.createFirstBox().setVisible(false);
panel.createSecondBox().setVisible(false);
panel.showLabel().setVisible(false);
}

   }
}
}



 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-10-25 00:07  TicketingSystem\
     文件         585  2013-09-18 17:26  TicketingSystem\.classpath
     文件         391  2013-09-16 17:39  TicketingSystem\.project
     目录           0  2013-09-16 17:39  TicketingSystem\.settings\
     文件         598  2013-09-16 17:39  TicketingSystem\.settings\org.eclipse.jdt.core.prefs
     文件         134  2013-09-16 20:43  TicketingSystem\button.txt
     目录           0  2013-11-27 20:50  TicketingSystem\classes\
     目录           0  2013-11-27 20:50  TicketingSystem\classes\cn\
     目录           0  2013-11-27 20:50  TicketingSystem\classes\cn\com\
     目录           0  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\
     文件        2906  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\AccountSummaryAction.class
     目录           0  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\action\
     文件        2201  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\action\AddFilmAction.class
     文件        2790  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\action\ReturnTicketAction.class
     文件        3047  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\action\SellTicketAction.class
     文件        1327  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\buttonAction.class
     文件        4360  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\FilmManageAction.class
     文件        1238  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\LoginPanelAction.class
     文件        3365  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\SystemSettingAction.class
     文件        3892  2013-11-27 20:50  TicketingSystem\classes\cn\com\action\TicketManageAction.class
     目录           0  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\
     文件          98  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\DAO.class
     文件         673  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\FactoryDao.class
     文件         413  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\FilmDao.class
     目录           0  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\impl\
     文件        7062  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\impl\FilmDaoImpl.class
     文件        9035  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\impl\TicketDaoImpl.class
     文件        2671  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\impl\UserDaoImpl.class
     文件         648  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\TicketDao.class
     文件         253  2013-11-27 20:50  TicketingSystem\classes\cn\com\dao\UserDao.class
     目录           0  2013-11-27 20:50  TicketingSystem\classes\cn\com\util\
............此处省略120个文件信息

评论

共有 条评论