Examples of InternalAccount


Examples of edu.asu.securebanking.model.InternalAccount

  }

  @RequestMapping("/ExternalUserTransaction")
  public synchronized ModelAndView showExternalUserTransactionForm(Principal principal) {
    String name = principal.getName();
    InternalAccount currentuser = intBo.findUserByusername(name);

    if(currentuser.getDeptid() == 3){
      ModelAndView modelAndView = new ModelAndView("ExternalUserTransactionCreation");

      ExternalUserTransaction exttrans = new ExternalUserTransaction();
      exttrans.setStatus("Pending");
      modelAndView.addObject("exttrans", exttrans);
View Full Code Here

Examples of edu.asu.securebanking.model.InternalAccount

  }

  @RequestMapping(value = "/addExternalUserTransaction", method = RequestMethod.POST)
  public synchronized ModelAndView create(@ModelAttribute("exttrans") ExternalUserTransaction externalUserTransaction, BindingResult result, Principal principal) {
    String name = principal.getName();
    InternalAccount currentuser = intBo.findUserByusername(name);
    externalUserTransaction.setStatus("Approved");
    externalUserTransaction.setAccessGranted(1);

    if(currentuser.getDeptid() == 3){
      boolean res;
      String errors = "";

      if(externalUserTransaction.getAmountInvolved() < 1){
        errors = errors + "Please enter Amount greater than $1;";
View Full Code Here

Examples of edu.asu.securebanking.model.InternalAccount

  }

  @RequestMapping(value="/updateexternaltransaction")
  public synchronized ModelAndView displayExternalUpdatePage(@ModelAttribute("transactionbyid") ExternalUserTransaction transaction, Principal principal) {
    String name = principal.getName();
    InternalAccount currentuser = intBo.findUserByusername(name);

    if(currentuser.getDeptid() == 3){
      ModelAndView modelAndView = new ModelAndView("UpdateExternalTransaction");
      ExternalUserTransaction externalTransaction = externalTransactionBO.findTransactionById(transaction.getTransId());
      modelAndView.addObject("currentuser", currentuser);
      modelAndView.addObject("externalTransaction", externalTransaction);
View Full Code Here

Examples of edu.asu.securebanking.model.InternalAccount

  @RequestMapping(value="/updateExternalUserTransaction")
  public synchronized ModelAndView updateExternalTransaction(@ModelAttribute("externalTransaction") ExternalUserTransaction transaction,
      BindingResult result, Principal principal) {
    String name = principal.getName();
    InternalAccount currentuser = intBo.findUserByusername(name);

    if(currentuser.getDeptid() == 3){
      boolean res;
      String errors = "";


      /*res = StringValidator.inputvalidation(transaction.getTransDetail() , "genpattern");
View Full Code Here

Examples of edu.asu.securebanking.model.InternalAccount

  @RequestMapping(value="/displayexternaltransactions")

  public ModelAndView listOfAllExternalTransactions(Principal principal) {
    String name = principal.getName();
    InternalAccount currentuser = intBo.findUserByusername(name);

    if(currentuser.getDeptid() == 3){
      ModelAndView modelAndView = new ModelAndView("ListExternalTransactions");
      List<ExternalUserTransaction> transactions = externalTransactionBO.getAllExternalUsersTransactions();
      modelAndView.addObject("transactions", transactions);
      ExternalUserTransaction transactionbyid = new ExternalUserTransaction();
      modelAndView.addObject("transactionbyid", transactionbyid);
View Full Code Here

Examples of edu.asu.securebanking.model.InternalAccount

    modelAndView.addObject("criticaltrans", criticaltrans);
   
    InternalCriticalTransaction criticaltran = new InternalCriticalTransaction();
    modelAndView.addObject("criticaltran", criticaltran);
   
    InternalAccount user = new InternalAccount();
    modelAndView.addObject("user", user);
   
    String name = principal.getName();
    InternalAccount currentuser = intBo.findUserByusername(name);
    modelAndView.addObject("currentuser", currentuser);
   
    return modelAndView;
  }
View Full Code Here

Examples of edu.asu.securebanking.model.InternalAccount

 
  @RequestMapping(value="/finduser", method = RequestMethod.POST)
  public synchronized ModelAndView finduserbyid(@ModelAttribute("user") InternalAccount user,
      BindingResult result) throws InternalException {
    ModelAndView modelAndView = new ModelAndView("findInternalUser");
    InternalAccount userbyid = intBo.findUserByid(user.getEmployeeId());
    System.out.println(userbyid.getUsername());
    modelAndView.addObject("userbyid", userbyid);
    return modelAndView;
  }
View Full Code Here

Examples of edu.asu.securebanking.model.InternalAccount

  @RequestMapping(value="/deleteinternaluser")
  public synchronized ModelAndView deleteuserbyid(@ModelAttribute("user") InternalAccount user,
      BindingResult result, Principal principal) throws InternalException{
   
    String name = principal.getName();
    InternalAccount currentuser = intBo.findUserByusername(name);
   
    if(currentuser.getEmployeeId() == user.getEmployeeId()){
      String message = "A Manager cannot delete himself!";
      ModelAndView modelAndView = new ModelAndView("internalmgmtsuccessmsg");
      modelAndView.addObject("message", message);
      return modelAndView;
    } else{
     
   
    ModelAndView modelAndView = new ModelAndView("deleteInternalUser");
    InternalAccount userbyid = intBo.findUserByidanddeptid(user.getEmployeeId(), user.getDeptid());
    System.out.println(userbyid.getUsername());
    modelAndView.addObject("userbyid", userbyid);
    return modelAndView;
    }
  }
View Full Code Here

Examples of edu.asu.securebanking.model.InternalAccount

    String name = principal.getName();
    String ceo = "CEO";
    String pres = "PRESIDENT";
    String vpres = "VICE-PRESIDENT";
   
    InternalAccount user = intBo.findUserByusername(name);
    System.out.println("User name is: "+user.getFirstname());
    System.out.println("User Role is: "+user.getPosition());
   
    ModelAndView modelAndView = new ModelAndView("internalmgmtsuccessmsg");
    InternalCriticalTransaction internalCriticalTransaction = new InternalCriticalTransaction();
    internalCriticalTransaction.setRequest("Delete User");
    internalCriticalTransaction.setEmployeeId(userbyid.getEmployeeId());
    internalCriticalTransaction.setDeptid(userbyid.getDeptid());
    if(user.getPosition().equals(ceo)){
      System.out.println("User Role is matched: "+user.getPosition());
      internalCriticalTransaction.setCeoapp("yes");
      internalCriticalTransaction.setPresapp("no");
      internalCriticalTransaction.setVpresapp("no");
    }
    if(user.getPosition().equals(pres)){
      internalCriticalTransaction.setCeoapp("no");
      internalCriticalTransaction.setPresapp("yes");
      internalCriticalTransaction.setVpresapp("no");
    }
    if(user.getPosition().equals(vpres)){
      internalCriticalTransaction.setCeoapp("no");
      internalCriticalTransaction.setPresapp("no");
      internalCriticalTransaction.setVpresapp("yes");
    }
View Full Code Here

Examples of edu.asu.securebanking.model.InternalAccount

    String name = principal.getName();
    String ceo = "CEO";
    String pres = "PRESIDENT";
    String vpres = "VICE-PRESIDENT";
   
    InternalAccount user = intBo.findUserByusername(name);
    System.out.println("User name is: "+user.getFirstname());
    System.out.println("User Role is: "+user.getPosition());
    System.out.println("Emp Id is: "+criticaltran.getEmployeeId());
   
    InternalCriticalTransaction internalCriticalTransaction = new InternalCriticalTransaction();
   
    if(user.getPosition().equals(ceo)){
      System.out.println("User Role is matched: "+user.getPosition());
      internalCriticalTransaction = intCriticalTrans.updatebyempidfromceo(criticaltran.getEmployeeId(), "yes");
    }
    if(user.getPosition().equals(pres)){
      System.out.println("User Role is matched: "+user.getPosition());
      internalCriticalTransaction = intCriticalTrans.updatebyempidfrompresident(criticaltran.getEmployeeId(), "yes");
    }
    if(user.getPosition().equals(vpres)){
      System.out.println("User Role is matched: "+user.getPosition());
      internalCriticalTransaction = intCriticalTrans.updatebyempidfromvpresident(criticaltran.getEmployeeId(), "yes");
    }
   
    String yes = "yes";
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.