Package dao_impl

Examples of dao_impl.UserDAOImpl


    prepareData(model, request);
    String page = "login";
    if (request.getParameter("Login") != null) {
      String taikhoan = request.getParameter("taikhoan");
      String matkhau = request.getParameter("matkhau");
      UserDAO khDAO = new UserDAOImpl();
      User kh = khDAO.getUserInfo(taikhoan);
      if (kh != null && matkhau.equals(kh.getPassword())) {

        request.setAttribute("TaiKhoan", taikhoan,
            WebRequest.SCOPE_SESSION);
        request.setAttribute("HoTen", kh.getName(),
View Full Code Here


      String diachi = request.getParameter("diachi");
      String matkhau = request.getParameter("matkhau");
      String dienthoai = request.getParameter("dienthoai");
      String email = request.getParameter("email");
      String zipCode = request.getParameter("zipcode");
      UserDAO khDAO = new UserDAOImpl();
      User khTest = khDAO.getUserInfo(taikhoan);
      if (khTest != null) {
        model.addAttribute("info", "account is available!");
      } else {

        User kh = new User(taikhoan, hoten, diachi, email, dienthoai,
            matkhau, zipCode, null);
        boolean result = khDAO.addUser(kh);
        if (result == true) {
          request.setAttribute("TaiKhoan", taikhoan,
              WebRequest.SCOPE_SESSION);
          request.setAttribute("HoTen", kh.getName(),
              WebRequest.SCOPE_SESSION);
View Full Code Here

        if (request.getParameter("Checkout") != null) {
          String idKhachHang = (String) request.getAttribute(
              "TaiKhoan", WebRequest.SCOPE_SESSION);

          UserDAO khDAO = new UserDAOImpl();
          User kh = khDAO.getUserInfo(idKhachHang);

          if (hoten.equals("") || diachi.equals("")
              || dienthoai.equals("")) {
            model.addAttribute("notice",
                "Please enter all information");
View Full Code Here

TOP

Related Classes of dao_impl.UserDAOImpl

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.