Package edu.asu.securebanking.model

Examples of edu.asu.securebanking.model.InternalUserTransaction


    String name = principal.getName();
    InternalAccount currentuser = intBo.findUserByusername(name);

    if(currentuser.getDeptid() == 5){
      ModelAndView modelAndView = new ModelAndView("CompanyManagementFindMeeting");
      InternalUserTransaction transactionbyid = transactionBO.findTransactionByIdAndDeptId(transaction.getTransId(),5);//5:Company Management
      System.out.println("transaction.getEmployeeId()"+ transactionbyid.getEmployeeId() + "transaction.getDescription()" + transactionbyid.getDescription()+"transaction.getTransId()" + transactionbyid.getTransId()+" transaction.getStatus()" +transactionbyid.getStatus());
      modelAndView.addObject("transactionbyid", transactionbyid);
      return modelAndView;

    } else{
      ModelAndView modelAndView = new ModelAndView("accessdenied");
View Full Code Here


    @Override
    public void delete(int id) {
      // TODO Auto-generated method stub
        Session session = sessionFactory.getCurrentSession();
        InternalUserTransaction transaction = (InternalUserTransaction) session.get(InternalUserTransaction.class, id);
      if (transaction != null)
        session.delete(transaction);
       logger.info("Internal User Transaction  Deleted -- Employee Id" + transaction.getEmployeeId()+" -- TransactionId --" + transaction.getTransId());
    }
View Full Code Here

      System.out.println("size of list is: "+query.list().size());
      if (query.list().size() == 0)
        throw new InternalException("Transaction ID does not exist in the database!");
      List<InternalUserTransaction> list = query.list();
     
      InternalUserTransaction queryResult = list.get(0);
     
       logger.info("Internal User Transaction  Searched -- Employee Id" + queryResult.getEmployeeId()+" -- TransactionId --" + queryResult.getTransId());
     
            return queryResult;
     
           
    }
View Full Code Here

          .list();
     
      if (list.size() == 0)
        throw new InternalException("Transaction ID does not exist in the database!");
     
      InternalUserTransaction queryResult = list.get(0);
     
      System.out.println("transaction.getEmployeeId()"+ list.get(0).getEmployeeId() + "transaction.getDescription()" + list.get(0).getDescription()+"transaction.getTransId()" + list.get(0).getTransId()+" transaction.getStatus()" +list.get(0).getStatus());

       logger.info("Internal User Transaction  Searched -- Dept Id " + deptid +" -- TransactionId --" + id);
     
View Full Code Here

      System.out.println("size of list is: "+query.list().size());
      if (query.list().size() == 0)
        throw new InternalException("Transaction ID does not exist in the database!");
      List<InternalUserTransaction> list = query.list();
     
      InternalUserTransaction queryResult = list.get(0);
     
       logger.info("Internal User Transaction  Searched -- Employee Id" + queryResult.getEmployeeId()+" -- TransactionId --" + queryResult.getTransId());
     
            return queryResult;
    }
View Full Code Here

    if(currentuser.getDeptid() == 2){
      ModelAndView modelAndView = new ModelAndView("ITUserTransaction");
      modelAndView.addObject("currentuser", currentuser);

      InternalUserTransaction transaction = new InternalUserTransaction();
      modelAndView.addObject("transaction", transaction);

      return modelAndView;
    }else{
      ModelAndView modelAndView = new ModelAndView("accessdenied");
View Full Code Here

    if(currentuser.getDeptid() == 2){
      ModelAndView modelAndView = new ModelAndView("ITInternalUserTransactionCreation");
      modelAndView.addObject("currentuser", currentuser);

      InternalUserTransaction transaction = new InternalUserTransaction();
      modelAndView.addObject("transaction", transaction);
      return modelAndView;
    }else{
      ModelAndView modelAndView = new ModelAndView("accessdenied");
View Full Code Here

    if(errors != "")
    {
      ModelAndView modelAndView = new ModelAndView("ITInternalUserTransactionCreation");
      modelAndView.addObject("currentuser", currentuser);

      InternalUserTransaction trans = new InternalUserTransaction();
      modelAndView.addObject("transaction", trans);

      modelAndView.addObject("errors", errors);

      return modelAndView;

    } else{

      transaction.setStatus("approved");
      transaction.setDeptId(2);//2:IT dept

      String res = transactionBO.save(transaction);

      if(res.matches("fail")){
        errors = errors + "Employee ID does'nt exist!";
        ModelAndView modelAndView = new ModelAndView("ITInternalUserTransactionCreation");
        modelAndView.addObject("currentuser", currentuser);

        InternalUserTransaction trans = new InternalUserTransaction();
        modelAndView.addObject("transaction", trans);

        modelAndView.addObject("errors", errors);

        return modelAndView;
View Full Code Here

  @RequestMapping(value="/findInternalTransaction", method = RequestMethod.POST)
  public synchronized ModelAndView findtransactionbyid(@ModelAttribute("transaction") InternalUserTransaction transaction,
      BindingResult result) throws InternalException {
    ModelAndView modelAndView = new ModelAndView("ITfindInternalTransaction");
    InternalUserTransaction transactionbyid = transactionBO.findTransactionByIdAndDeptId(transaction.getTransId(),2);//2:IT dept
    System.out.println("transaction.getEmployeeId()"+ transactionbyid.getEmployeeId() + "transaction.getDescription()" + transactionbyid.getDescription()+"transaction.getTransId()" + transactionbyid.getTransId()+" transaction.getStatus()" +transactionbyid.getStatus());
    modelAndView.addObject("transactionbyid", transactionbyid);
    return modelAndView;
  }
View Full Code Here

    String name = principal.getName();
    InternalAccount currentuser = intBo.findUserByusername(name);

    if(currentuser.getDeptid() == 2){
      InternalUserTransaction internalTransaction = transactionBO.findTransactionById(trans.getTransId());
      ModelAndView modelAndView = new ModelAndView("ITupdateInternalTransaction");

      modelAndView.addObject("internalTransaction", internalTransaction);
      modelAndView.addObject("currentuser", currentuser);
View Full Code Here

TOP

Related Classes of edu.asu.securebanking.model.InternalUserTransaction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.