📄 votebiz.java
字号:
package com.vote.biz;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import javax.sql.DataSource;
import com.vote.dao.SelectDAO;
import com.vote.dao.VoteDAO;
import com.vote.dto.SelectDTO;
import com.vote.dto.VoteDTO;
public class VoteBIZ
{
public ArrayList queryVotes(DataSource ds) throws SQLException
{
Connection con = ds.getConnection();
VoteDAO voteDAO = new VoteDAO();
return voteDAO.AllVoteInfo(con);
}
public ArrayList UserVoteInfo(DataSource ds,String Vote_admin_username) throws SQLException
{
Connection con = ds.getConnection();
VoteDAO voteDAO = new VoteDAO();
return voteDAO.UserVoteInfo(con, Vote_admin_username);
}
public ArrayList OneVoteInfo(DataSource ds,int Vote_id) throws SQLException
{
Connection con = ds.getConnection();
VoteDAO voteDAO = new VoteDAO();
return voteDAO.OneVoteInfo(con, Vote_id);
}
public int CreaterVote(DataSource ds, VoteDTO voteDTO) throws SQLException
{
Connection con = ds.getConnection();
VoteDAO voteDAO = new VoteDAO();
return voteDAO.CreaterVote(con, voteDTO);
}
public int AddVoteItem(DataSource ds, SelectDTO selectDTO) throws SQLException
{
Connection con = ds.getConnection();
SelectDAO selectDAO = new SelectDAO();
return selectDAO.AddVoteItem(con, selectDTO);
}
public ArrayList ShowVoteItem(DataSource ds, int Vote_id) throws SQLException
{
Connection con = ds.getConnection();
SelectDAO selectDAO = new SelectDAO();
return selectDAO.ShowVoteItem(con, Vote_id);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -