📄 businessaction.java
字号:
package server.action;
import java.util.Vector;
import server.dao.*;
import server.entity.*;
import server.io.Userio;
import server.dao.Carddao;
//业务层
public class BusinessAction {
//***********************借 出***************************
//检查帐户有效性
public static boolean chk(User user)
{return new Userdao().chk(user);}
//加载曾登陆帐户名
public static Vector loadusername()
{return new Userio().loaduserlandname();}
//清空曾登陆帐户名
public static void cleanusername()
{new Userio().cleanuserlandname();}
//添加曾登陆帐户名
public static void addusername(String username)
{new Userio().adduserlandname(username);}
//检查客户帐户有效性
public static boolean chkcard(Card cardtemp)
{return new Carddao().chkcard(cardtemp);}
//检查客户帐户借出数量是否达到上限
public static boolean chkcdoutnum(Card cardtemp)
{return new Carddao().chkcdoutnum(cardtemp);}
//检查客户帐户是否还可以借阅
public static boolean chkcdrestnum(Card cardtemp)
{return new Carddao().chkcdrestnum(cardtemp);}
//检查碟片是否在铺
public static boolean chkcdexist(Cd cdtemp)
{return new Cddao().chkcdexist(cdtemp);}
//借出业务
public static int cdout(Card cardtemp,Cd cdtemp)
{return new Recorddao().cdout(cardtemp,cdtemp);}
//显示借出碟片时信息
public static Vector showcdoutinf(Cd cdtemp)
{return new Cddao().showcdoutinf(cdtemp);}
//***********************借 出***************************
//***********************归 还***************************
//检查碟片编号的有效性
public static boolean chkcdhas(Cd cdtemp)
{return new Cddao().chkcdhas(cdtemp);}
//归还业务
public static int cdin(Cd cdtemp)
{return new Recorddao().cdin(cdtemp);}
//显示归还碟片时信息
public static Vector showcdininf(Cd cdtemp,int isoverterm)
{return new Cddao().showcdininf(cdtemp,isoverterm);}
//***********************归 还***************************
//***********************数据查询***************************
//得到最大的cd编号
public static int getmaxcdid()
{return new Cddao().getmaxcdid();}
//得到最大的card编号
public static int getmaxcardid()
{return new Carddao().getmaxcardid();}
//得到最大的rec编号
public static int getmaxrecid()
{return new Recorddao().getmaxrecid();}
//***********************数据查询***************************
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -