Package com.mossle.workcal.domain

Examples of com.mossle.workcal.domain.WorkcalRule


    @RequestMapping("workcal-rule-input")
    public String input(@RequestParam(value = "id", required = false) Long id,
            Model model) {
        if (id != null) {
            WorkcalRule workcalRule = workcalRuleManager.get(id);
            model.addAttribute("model", workcalRule);
        }

        model.addAttribute("workcalTypes", workcalTypeManager.getAll());
View Full Code Here


    @RequestMapping("workcal-rule-save")
    public String save(@ModelAttribute WorkcalRule workcalRule,
            @RequestParam("workcalTypeId") Long workcalTypeId,
            RedirectAttributes redirectAttributes) {
        Long id = workcalRule.getId();
        WorkcalRule dest = null;

        if (id != null) {
            dest = workcalRuleManager.get(id);
            beanMapper.copy(workcalRule, dest);
        } else {
            dest = workcalRule;
        }

        dest.setWorkcalType(workcalTypeManager.get(workcalTypeId));
        workcalRuleManager.save(dest);
        messageHelper.addFlashMessage(redirectAttributes, "core.success.save",
                "保存成功");

        return "redirect:/workcal/workcal-rule-list.do";
View Full Code Here

        if (id != null) {
            hql = "from WorkcalRule where name=? and id<>?";
            params = new Object[] { name, id };
        }

        WorkcalRule workcalRule = workcalRuleManager.findUnique(hql, params);

        boolean result = (workcalRule == null);

        return result;
    }
View Full Code Here

TOP

Related Classes of com.mossle.workcal.domain.WorkcalRule

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.