Package com.iisigroup.cap.response

Examples of com.iisigroup.cap.response.AjaxFormResult


     *            IRequest
     * @return {@link tw.com.iisi.cap.response.IResult}
     * @throws CapException
     */
    public IResult saveRfList(IRequest request) {
        AjaxFormResult result = new AjaxFormResult();
        String code = request.get("code");
        JSONArray funcItem = JSONArray.fromObject(request.get("funcItem"));
        Role role = null;

        if (!CapString.isEmpty(code)) {
View Full Code Here


     *            IRequest
     * @return {@link tw.com.iisi.cap.response.IResult}
     * @throws CapException
     */
    public IResult delete(IRequest request) {
        AjaxFormResult result = new AjaxFormResult();
        String code = request.get("code");
        Role role = roleSetService.findRoleByCode(code);
        if (role != null) {
            commonSrv.delete(role);
        }
View Full Code Here

     *            IRequest
     * @return {@link tw.com.iisi.cap.response.IResult}
     * @throws CapException
     */
    public IResult deleteUrList(IRequest request) {
        AjaxFormResult result = new AjaxFormResult();
        String code = request.get("code");
        JSONArray users = JSONArray.fromObject(request.get("users"));

        if (CapString.isEmpty(code)) {
            throw new CapMessageException(
View Full Code Here

     *            IRequest
     * @return {@link tw.com.iisi.cap.response.IResult}
     * @throws CapException
     */
    public IResult deleteRfList(IRequest request) {
        AjaxFormResult result = new AjaxFormResult();
        String code = request.get("code");
        JSONArray funcItem = JSONArray.fromObject(request.get("funcItem"));

        if (CapString.isEmpty(code)) {
            throw new CapMessageException(
View Full Code Here

   *            IRequest
   * @return {@link tw.com.iisi.cap.response.IResult}
   * @throws CapException
   */
  public IResult save(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    String oid = request.get("oid");
    Remind remind = null;

    if (!CapString.isEmpty(oid)) {
      remind = commonSrv.findById(Remind.class, oid);
    }
    if (remind == null) {
      remind = new Remind();
      remind.setCrTime(CapDate.getCurrentTimestamp());
    }
    String startDate = request.get("startDate");
    String startTime = request.get("startTime");
    if (CapString.isEmpty(startTime)) {
      startTime = "00:00:00";
    } else {
      startTime = startTime + ":00";
    }
    request.put("startDate", startDate + " " + startTime);
    String endDate = request.get("endDate");
    String endTime = request.get("endTime");
    if (CapString.isEmpty(endTime)) {
      endTime = "00:00:00";
    } else {
      endTime = endTime + ":00";
    }
    request.put("endDate", endDate + " " + endTime);

    CapBeanUtil.map2Bean(request, remind, Remind.class);
    remind.setUpdater(CapSecurityContext.getUserId());
    remind.setUpdTime(CapDate.getCurrentTimestamp());
    remind.setLocale(SimpleContextHolder.get(CapWebUtil.localeKey)
        .toString());

    commonSrv.save(remind);

    result.putAll(new AjaxFormResult(remind.toJSONObject(
        CapEntityUtil.getColumnName(remind), null)));
    return result;
  }
View Full Code Here

   *            IRequest
   * @return {@link tw.com.iisi.cap.response.IResult}
   * @throws CapException
   */
  public IResult saveDetail(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    String pid = request.get("pid");
    Remind remind = null;

    if (!CapString.isEmpty(pid)) {
      remind = commonSrv.findById(Remind.class, pid);
View Full Code Here

   *            IRequest
   * @return {@link tw.com.iisi.cap.response.IResult}
   * @throws CapException
   */
  public IResult delete(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    String oid = request.get("oid");
    if (CapString.isEmpty(oid)) {
      throw new CapMessageException(
          CapAppContext.getMessage("EXCUE_ERROR"),
          RemindHandler.class);
View Full Code Here

   *            IRequest
   * @return {@link tw.com.iisi.cap.response.IResult}
   * @throws CapException
   */
  public IResult deleteDetail(IRequest request) {
    AjaxFormResult result = new AjaxFormResult();
    String[] oids = (String[]) request.getParamsAsStringArray("oids");
    List<Reminds> models = new ArrayList<Reminds>();

    if (oids == null) {
      throw new CapMessageException(
View Full Code Here

TOP

Related Classes of com.iisigroup.cap.response.AjaxFormResult

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.