Пример #1
0
  public String saveAboutDecription() {
    try {
      if (academyList.size() > 0) {
        academyTB = AcademyTB.class.cast(academyList.get(0));
        aboutTB.setAcademyTB(academyTB);
        upload_date = dateFormat.format(cal.getTime());
        aboutTB.setDate(upload_date);
        CommonController.saveOrUpdateObject(aboutTB);
      }

      aboutUsPostList = (List) CommonController.getAllObjects(AboutTB.class, qquery2);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return "success";
  }
Пример #2
0
  public String editAboutDescription() {
    try {
      aboutUsPostList =
          (List)
              CommonController.getAllObjects(
                  AboutTB.class, "aboutId='" + aboutTB.getAboutId() + "'");

      if (aboutUsPostList.size() > 0) {
        tempDesc = (AboutTB) aboutUsPostList.get(0);
        aboutTB.setDate(tempDesc.getDate());
        aboutTB.setUserProfileTB(tempDesc.getUserProfileTB());
      }

      System.out.println("About Description" + aboutTB.getAboutId());

      CommonController.saveOrUpdateObject(aboutTB);

    } catch (Exception e) {
      e.printStackTrace();
    }
    return "success";
  }