Package org.sis.ancmessaging.domain

Examples of org.sis.ancmessaging.domain.HealthExtensionWorker


      List<Gott> gotts = healthPost.getGotts();
      model.addAttribute("gotts", gotts);
      model.addAttribute("healthWorkerDTO", healthWorkerDTO);
      return "/admin/healthpost/entries?pid=" + healthWorkerDTO.getPostId();
    } else {
      HealthExtensionWorker healthWorker = healthWorkerDTO.generateHealthWorker();
      healthWorker.setPhoneNumber("+251" + healthWorker.getPhoneNumber());
      HealthPost healthPost = healthPostService.findById(healthWorkerDTO.getPostId());
      healthPostService.addHwToHp(healthWorker, healthPost);
      return "redirect:/admin/healthpost/entries?pid=" + healthWorkerDTO.getPostId();
    }
   
View Full Code Here


 
  @RequestMapping(value = "createajax", method = RequestMethod.POST)
  public void createGott(@RequestParam("postId") int postId, @RequestParam("fullName") String fullName,
      @RequestParam("phoneNumber") String phoneNumber, @RequestParam("sex") char sex) {
   
    HealthExtensionWorker healthWorker = new HealthExtensionWorker();
    healthWorker.setFullName(fullName);
    healthWorker.setPhoneNumber("+251" + phoneNumber);
    healthWorker.setSex(sex);
   
    HealthPost healthPost = healthPostService.findById(postId);
   
    healthPostService.addHwToHp(healthWorker, healthPost);
  }
View Full Code Here

  public void setSex(char sex) {
    this.sex = sex;
  }
 
  public HealthExtensionWorker generateHealthWorker() {
    HealthExtensionWorker healthWorker = new HealthExtensionWorker();
    healthWorker.setFullName(fullName);
    healthWorker.setPhoneNumber(phoneNumber);
    healthWorker.setSex(sex);
    healthWorker.setWorkerId(workerId);
    return healthWorker;
  }
View Full Code Here

  @RequestMapping(value = "edithealthworker", method = RequestMethod.POST)
  public @ResponseBody CustomGenericResponse editHealthWorker(
    @RequestParam("workerId") int workerId, @RequestParam("fullName") String fullName, @RequestParam("sex") char sex,
    @RequestParam("phoneNumber") String phoneNumber) {
   
    HealthExtensionWorker healthWorker = healthPostService.findHwById(workerId);
    healthWorker.setFullName(fullName);
    healthWorker.setPhoneNumber(phoneNumber);
    healthWorker.setSex(sex);
    boolean result = healthPostService.persistHealthWorker(healthWorker);
    CustomGenericResponse response = new CustomGenericResponse();
   
    if (result) {
      response.setMessage("Action Successful");
View Full Code Here

TOP

Related Classes of org.sis.ancmessaging.domain.HealthExtensionWorker

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.