Package com.iisigroup.cap.auth.model

Examples of com.iisigroup.cap.auth.model.Department


   */
  public IResult save(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    String oid = request.get("oid");
    String brNo = request.get("code");
    Department branch = null;

    if (CapString.isEmpty(oid)) {
      branch = departmentService.findByBrno(brNo);
      if (branch != null) {
        result.set("exist", Boolean.TRUE);
        return result;
      }
    } else {
      branch = commonSrv.findById(Department.class, oid);
    }

    if (branch == null) {
      branch = new Department();
      branch.setOid(null);
    }
    CapBeanUtil.map2Bean(request, branch, Department.class);
    branch.setUpdater(CapSecurityContext.getUserId());
    branch.setUpdateTime(CapDate.getCurrentTimestamp());
    departmentService.save(branch);

    return result;
  }
View Full Code Here


   * @return {@link tw.com.iisi.cap.response.IResult}
   * @throws CapException
   */
  public IResult delete(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    Department code = commonSrv
        .findById(Department.class, request.get("oid"));
    if (code != null) {
      commonSrv.delete(code);
    }
    return result;
View Full Code Here

TOP

Related Classes of com.iisigroup.cap.auth.model.Department

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.