Examples of UserUI


Examples of org.sab.invsys.web.model.user.UserUI

import org.springframework.data.domain.Pageable;

public class UserMapper {

  public UserUI toUIBean(User user) {
    UserUI uiBean = null;

    if (user != null) {
      uiBean = new UserUI();
      uiBean.setFirstName(user.getFirstName());
      uiBean.setId(user.getId());
      uiBean.setLastName(user.getLastName());
      uiBean.setPassword(user.getPassword());
      uiBean.setUsername(user.getUsername());
      uiBean.setAccountType(user.getAccountType());
      uiBean.setBillingAddress(user.getBillingAddress());
      uiBean.setCreateadBy(user.getCreateadBy());
      uiBean.setCreatedDate(user.getCreatedDate());
      uiBean.setDescription(user.getDescription());
      uiBean.setEmail(user.getEmail());
      uiBean.setLastLoggedIn(user.getLastLoggedIn());
      uiBean.setMobilePhone(user.getMobilePhone());
      uiBean.setModifiedBy(user.getModifiedBy());
      uiBean.setModifiedDate(user.getModifiedDate());
      uiBean.setNotes(user.getNotes());
      uiBean.setOfficePhone(user.getOfficePhone());

      if (user.getBalance() != null) {
        uiBean.setBalance(user.getBalance().getAmount());
      }
    }

    return uiBean;
  }
View Full Code Here

Examples of org.sab.invsys.web.model.user.UserUI

  }

  @RequestMapping(value = "/customer/view/{userName}")
  public String getCustomerView(@PathVariable String userName, Model model)
      throws Exception {
    UserUI user = service.findByUsername(userName);

    model.addAttribute("userBean", user);
    model.addAttribute("operationName", "update");

    return "parties/customer";
View Full Code Here

Examples of org.sab.invsys.web.model.user.UserUI

    return "parties/customer";
  }
  @RequestMapping(value = "/vendor/view/{userName}")
  public String getVendorView(@PathVariable String userName, Model model)
      throws Exception {
    UserUI user = service.findByUsername(userName);

    model.addAttribute("userBean", user);
    model.addAttribute("operationName", "update");

    return "parties/vendor";
View Full Code Here

Examples of org.sab.invsys.web.model.user.UserUI

    return "parties/vendor";
  }
  @RequestMapping(value = "/staff/view/{userName}")
  public String getStaffView(@PathVariable String userName, Model model)
      throws Exception {
    UserUI user = service.findByUsername(userName);

    model.addAttribute("userBean", user);
    model.addAttribute("operationName", "update");

    return "parties/staff";
View Full Code Here

Examples of org.sab.invsys.web.model.user.UserUI

  @RequestMapping(value = "/update")
  public @ResponseBody
  Map<String, ? extends Object> update(UserUI data) throws Exception {
    try {
      UserUI user = service.update(data);

      if (user != null) {
        return extJS.mapOK(user, "Account Updated Succesfully");
      } else {
        return extJS.mapError("Error trying to update contact.");
View Full Code Here

Examples of org.sab.invsys.web.model.user.UserUI

    }
  }

  @RequestMapping(value = "/customer/add", method = RequestMethod.GET)
  public String addCustomer(Model model) throws Exception {
    UserUI user = new UserUI();
    user.setAccountType("Customer");
    model.addAttribute("userBean", user);
    model.addAttribute("operationName", "add");

    return "parties/customer";
  }
View Full Code Here

Examples of org.sab.invsys.web.model.user.UserUI

    return "parties/customer";
  }
  @RequestMapping(value = "/vendor/add", method = RequestMethod.GET)
  public String addVendor(Model model) throws Exception {
    UserUI user = new UserUI();
    user.setAccountType("Vendor");
    model.addAttribute("userBean", user);
    model.addAttribute("operationName", "add");

    return "parties/vendor";
  }
View Full Code Here

Examples of org.sab.invsys.web.model.user.UserUI

    return "parties/vendor";
  }
  @RequestMapping(value = "/staff/add", method = RequestMethod.GET)
  public String addStaff(Model model) throws Exception {
    UserUI user = new UserUI();
    user.setAccountType("Staff");
    model.addAttribute("userBean", user);
    model.addAttribute("operationName", "add");

    return "parties/staff";
  }
View Full Code Here

Examples of org.sab.invsys.web.model.user.UserUI

      if(service.findByUsername(data.getUsername()) != null)
      {
        return extJS.mapError("Account Name already exists");
      }
     
      UserUI savedUser = service.create(data);
      if (savedUser != null) {
        return extJS.mapOK(savedUser, "Account Created Succesfully");
      } else {
        return extJS.mapError("Error trying to create account.");
      }
View Full Code Here

Examples of org.sab.invsys.web.model.user.UserUI

      List<UserUI> deletedUsers = new ArrayList<UserUI>();

      for (String userName : name.substring(1, name.length() - 1)
          .replaceAll("\"", "").split(",")) {
        UserUI user = service.findByUsername(userName);

        if (user != null) {
          service.delete(user);
          deletedUsers.add(user);
        }
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.