businessaction.java~109~

来自「我做的第一个java MIS项目」· JAVA~109~ 代码 · 共 76 行

JAVA~109~
76
字号
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();}

      public static int getmaxcardid()
      {return new Carddao().getmaxcardid();}

//***********************数据查询***************************


}

⌨️ 快捷键说明

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