Ejemplo n.º 1
0
  /**
   * Handles input in the WaitingForPhoneNumber state.
   *
   * @param message The string message.
   * @param channel The channel from which the input was received.
   */
  private void handleWaitingForCustInfo(String message, NewOrderInChan channel) {

    // Only one channel to get input.
    switch ((NewOrderInChan) channel) {
      case ICMenuOption:
        // Do nothing
        break;

      case ICCustomerPhone:

        // Check if the string is a valid phone number.  If so, set
        // it as the new phone number.
        if (Customer.isValidPhoneNumber(message)) {

          _currentOrder.getCustomer().setPhoneNumber(message);
        }
        break;

      case ICCustomerName:

        // Set the new string as the name.
        _currentOrder.getCustomer().setName(message);
        break;

      case ICCustomerAddress:

        // Check that the address is valid.
        Address addr = Address.getAddressForAlias(message);
        if (null == addr) {

          // Do nothing.

        } else {

          _currentOrder.getCustomer().setStreetAddress(addr);

          // If we got a valid address, the customer should
          // be done being detailed.  Add this new customer
          // to the database and proceed to the order construction
          // state.
          Customer.getDb().add(_currentOrder.getCustomer());
          gotoDisplayingOrder();
        }
        break;

      case ICBack:

        // Check for a back button.
        if (message.equalsIgnoreCase(NewOrderView.BACK_KEY)) {

          // Go back to the customer phone number prompt.
          gotoWaitingForPhoneNumber();
        }
        break;

      default:
        handleInputError("The input was invalid. Please try again.");
        break;
    }
  }
  /**
   * Get a customer by id
   *
   * @param id customer id
   * @return a customer
   */
  public Customer getACustomer(int id) {
    String sql = "Select * From Customer where cid = ?";

    try {

      PreparedStatement statement = (PreparedStatement) connection.prepareStatement(sql);
      statement.setInt(1, id);
      ResultSet rs = statement.executeQuery();

      if (rs.next()) {
        Customer customer = new Customer();
        customer.setEmail(rs.getString("email"));
        customer.setFirstName(rs.getString("firstName"));
        customer.setLastName(rs.getString("lastName"));
        customer.setId(rs.getInt("cid"));

        if (statement != null) statement.close();

        return customer;
      } else {
        return null;
      }

    } catch (SQLException e) {
      e.printStackTrace();
      System.out.println("Error at get a customer");
      return null;
    }
  }
Ejemplo n.º 3
0
 public void ChangeData() {
   model.Customer c = customerdao.get(user.getCustomer().getCustomerid());
   c.setCustomerfirstname(firstname);
   c.setCustomerlastname(lastname);
   c.setCustomeraddress(address);
   c.setCustomerphone(phone);
   customerdao.update(c);
   user.setCustomer(c);
 }
Ejemplo n.º 4
0
  public ArrayList<Customer> getCustomers(String searchType, String searchBy) {
    ArrayList<Customer> customerList = new ArrayList<Customer>();
    String query = "select * from customer where &searchtype like '%&searchBy%'";
    Constants constants = new Constants();
    HashMap<String, String> map = constants.searchTypeToColumn;
    if (searchType.equals("All")) query = "select * from customer";
    else {
      query = query.replace("&searchtype", map.get(searchType));
      query = query.replace("&searchBy", searchBy);
    }
    try {
      ResultSet rs = statement.executeQuery(query);
      while (rs.next()) {
        Customer cust = new Customer();
        cust.setId(rs.getInt(1));
        cust.setFirst_name(rs.getString(2));
        cust.setLast_name(rs.getString(3));
        cust.setAddress(rs.getString(4));
        cust.setTel(rs.getString(5));
        cust.setMobile(rs.getString(6));
        cust.setDob(rs.getTimestamp(7));
        cust.setDoj(rs.getTimestamp(8));

        customerList.add(cust);
      }
    } catch (SQLException ex) {
      Logger.getLogger(CustomerDBHelper.class.getName()).log(Level.SEVERE, null, ex);
    }

    return customerList;
  }
Ejemplo n.º 5
0
  private synchronized void saveInput() {
    if ((customer == null) && (operation == CRUDOperationEnum.NEW)) {
      final Customer newCustomer =
          new Customer(
              NumberController.readLastNumber(NumberEnum.CUSTOMER.getType(), 0).toString(),
              jTextFieldCusName.getText(),
              jTextFieldCusVat.getText(),
              jTextFieldCusPhone.getText(),
              jTextFieldCusMobile.getText(),
              jTextFieldCusFax.getText(),
              jTextFieldCusemail.getText(),
              jTextFieldCusWebsite.getText(),
              cusTypes.get(jComboBoxCusType.getSelectedItem().toString()),
              cusCats.get(jComboBoxCusCat.getSelectedItem().toString()),
              cusLangs.get(jComboBoxCusLang.getSelectedItem().toString()),
              cusCurs.get(jComboBoxCusCur.getSelectedItem().toString()),
              cusPays.get(jComboBoxCusPay.getSelectedItem().toString()),
              jTextFieldCusActivity.getText(),
              jTextFieldCusAccount.getText(),
              jTextFieldCusInfo.getText(),
              true);
      CustomerController.createCustomer(newCustomer);
      customer = new Customer(newCustomer);
      greenMessage(newCustomer.getCusName() + " werd Toegevoegd");
    }
    if (operation == CRUDOperationEnum.UPDATE) {
      final Customer newCustomer =
          new Customer(
              getCustomer().getIdCus(),
              jTextFieldCusName.getText(),
              jTextFieldCusVat.getText(),
              jTextFieldCusPhone.getText(),
              jTextFieldCusMobile.getText(),
              jTextFieldCusFax.getText(),
              jTextFieldCusemail.getText(),
              jTextFieldCusWebsite.getText(),
              cusTypes.get(jComboBoxCusType.getSelectedItem().toString()),
              cusCats.get(jComboBoxCusCat.getSelectedItem().toString()),
              cusLangs.get(jComboBoxCusLang.getSelectedItem().toString()),
              cusCurs.get(jComboBoxCusCur.getSelectedItem().toString()),
              cusPays.get(jComboBoxCusPay.getSelectedItem().toString()),
              jTextFieldCusActivity.getText(),
              jTextFieldCusAccount.getText(),
              jTextFieldCusInfo.getText(),
              true);

      if (!customer.equals(newCustomer)) {
        CustomerController.updateCustomer(newCustomer);
        customer = new Customer(newCustomer);
        greenMessage(newCustomer.getCusName() + " werd gewijzigd");
      }
    }
  }
Ejemplo n.º 6
0
  private void loadCustomers() {
    Customer a = new Customer("aaa", "900724-1111", "A-Gatan", "0702-AAA");
    reg.addCustomer(a);

    Order gg = new Order(a, "11111");
    a.addOrder(gg);
    reg.addOrder(gg);

    Customer b = new Customer("bbb", "900724-2222", "B-Gatan", "0702-BBB");
    reg.addCustomer(b);

    Customer c = new Customer("ccc", "900724-3333", "C-Gatan", "0702-CCC");
    reg.addCustomer(c);
  }
  /**
   * Rate a restaurant and give a feedback Rate uses SQL INSERT INTO
   *
   * @param stars number of stars
   * @param feedback user's feedback
   * @param customer a customer
   * @return true if rate works fine, false otherwise
   * @throws SQLException
   */
  public boolean rate(int stars, String feedback, Customer customer) throws SQLException {
    boolean success = false;
    PreparedStatement insertStatement = null;
    int customerID = getCID(customer.getEmail());
    String query =
        "INSERT INTO Rating (cid, stars, feedback) VALUES (?,?,?) "
            + "ON DUPLICATE KEY UPDATE stars=?, feedback=?";

    try {
      connection.setAutoCommit(false);
      insertStatement = (PreparedStatement) connection.prepareStatement(query);
      insertStatement.setInt(1, customerID);
      insertStatement.setInt(2, stars);
      insertStatement.setString(3, feedback);
      insertStatement.setInt(4, stars);
      insertStatement.setString(5, feedback);
      insertStatement.execute();

      connection.commit();
      success = true;

    } catch (SQLException e) {
      e.printStackTrace();
      success = false;
    } finally {
      if (insertStatement != null) {
        insertStatement.close();
      }

      connection.setAutoCommit(true);
      return success;
    }
  }
  /**
   * Reserve a table
   *
   * @param partySize number of people in a party
   * @param d reservation date
   * @param tID table id
   * @param c a customer
   * @return true if succeed, false otherwise
   */
  public boolean reserveTable(int partySize, Date d, int tID, Customer c) {
    PreparedStatement statement = null;
    int customerid = getCID(c.getEmail());
    String sql_reserve =
        "INSERT INTO Restaurant.Reservation (reservationDate,partySize,cID,tID) values(?, ?, ?,?)";

    try {
      connection.setAutoCommit(false);
      statement = (PreparedStatement) connection.prepareStatement(sql_reserve);
      statement.setDate(1, d);
      statement.setInt(2, partySize);
      statement.setInt(3, customerid);
      statement.setInt(4, tID);
      statement.executeUpdate();
      connection.commit();

      if (statement != null) {
        statement.close();
      }

      connection.setAutoCommit(true);

      return true;

    } catch (SQLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      System.out.println("Failed: " + e.getMessage());
      return false;
    }
  }
Ejemplo n.º 9
0
  public static void main(String[] args) {
    Customer cust = new Customer();
    cust.setFirst_name("ankit");

    cust.setLast_name("kaushal");
    cust.setAddress("dwarka");
    cust.setDob(new Timestamp(new Date().getTime()));
    cust.setDoj(new Timestamp(new Date().getTime()));
    cust.setTel("25085435");
    cust.setMobile("9818536576");
    cust.setMembership("yearly");
    CustomerDBHelper dbh = new CustomerDBHelper();
    dbh.saveCustomer(cust);
  }
Ejemplo n.º 10
0
  public void saveCustomer(Customer customer) {
    String query = "";

    query =
        "insert into customer(first_name,last_name,address,tel_no,mobile_no,date_of_birth,date_of_joining) "
            + "values('&firstname','&lastname','&address','&tel_no','&mobile_no','&dob','&doj');";

    query = query.replace("&firstname", customer.getFirst_name());
    query = query.replace("&lastname", customer.getLast_name());
    query = query.replace("&address", customer.getAddress());
    query = query.replace("&tel_no", customer.getTel());
    query = query.replace("&mobile_no", customer.getMobile());
    query = query.replace("&dob", customer.getDob() + "");
    query = query.replace("&doj", customer.getDoj() + "");

    try {
      statement.execute(query);
    } catch (SQLException ex) {
      Logger.getLogger(CustomerDBHelper.class.getName()).log(Level.SEVERE, null, ex);
    }
  }
 protected void doGet(HttpServletRequest request, HttpServletResponse response)
     throws ServletException, IOException {
   HttpSession session = request.getSession(true);
   Customer customer = (Customer) session.getAttribute("customerInfo");
   List<Flower> wishlist = CustomerDAO.getWishlist(customer.getId());
   if (wishlist == null || wishlist.size() == 0) {
     response.sendRedirect("showWishlist");
   } else {
     String action = request.getParameter("action");
     if (action != null && action.equalsIgnoreCase("clear")) {
       for (Flower i : wishlist) {
         CustomerDAO.xoaWishlist(customer.getId(), i.getId());
       }
     } else {
       int id = Integer.parseInt(request.getParameter("id"));
       CustomerDAO.xoaWishlist(customer.getId(), id);
       wishlist = CustomerDAO.getWishlist(customer.getId());
     }
     wishlist = CustomerDAO.getWishlist(customer.getId());
     session.setAttribute("myWishlist", wishlist);
   }
   response.sendRedirect("showWishlist");
 }
Ejemplo n.º 12
0
  /**
   * Handles input in the WaitingForPhoneNumber state.
   *
   * @param message The string message.
   * @param channel The channel from which the input was received.
   */
  private void handleWaitingForPhoneNumber(String message, NewOrderInChan channel) {

    // Only one channel to get input.
    switch ((NewOrderInChan) channel) {
      case ICMenuOption:
        // Do nothing
        break;

      case ICCustomerPhone:

        // Check the phone number input for validity.
        if (Customer.isValidPhoneNumber(message)) {

          // Check for the customer in the database.
          Customer foundCust = null;
          for (Customer cust : Customer.getDb().list()) {
            if (cust.getPhoneNumber().equals(message)) {
              foundCust = cust;
              break;
            }
          }

          // Search for the customer in the database.
          if (foundCust != null) {

            // Set this as the current customer for the order
            // and proceed to the displaying order state.
            _currentOrder.setCustomer(foundCust);
            gotoDisplayingOrder();

          } else {

            // If the customer is not in the database, go to the add
            // customer state.
            _currentOrder.getCustomer().setPhoneNumber(message);
            gotoWaitingForCustInfo();
          }

        } else {

          // Report an error.
          handleInputError(
              "<html>Phone numbers must be numeric and 10 characters in length.</html>");
        }
        break;

      case ICBack:

        // Check for a back button.
        if (message.equalsIgnoreCase(NewOrderView.BACK_KEY)) {

          // Set active to false.  In the GUI version, pop the current
          // view.
          this.active = false;

          if (PizzaDeliverySystem.RUN_WITH_GUI) {
            PDSViewManager.popView();
          }
        }
        break;

      default:
        handleInputError("The input was invalid. Please try again.");
        break;
    }
  }
Ejemplo n.º 13
0
  public void _jspService(HttpServletRequest request, HttpServletResponse response)
      throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
      response.setContentType("text/html;charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;
      _jspx_resourceInjector =
          (org.glassfish.jsp.api.ResourceInjector)
              application.getAttribute("com.sun.appserv.jsp.resource.injector");

      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      String captcha = (String) session.getAttribute("passprotect");
      System.out.println("captcha" + captcha);

      out.write('\n');
      if (captcha == null) {
        out.write('\n');
        if (true) {
          _jspx_page_context.forward("esacombank.jsp");
          return;
        }
        out.write('\n');
      }
      out.write('\n');
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      Customer cus = (Customer) session.getAttribute("sessionlogin");
      if (cus == null) {
        response.sendRedirect("loginbank.jsp");
        return;
      }
      out.write("\n");
      out.write("<html>\n");
      out.write("    <head>\n");
      out.write(
          "        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("\n");
      out.write(
          "        <link rel=\"shortcut icon\" href=\"https://www.e-sacombank.com.vn/sacomweb/sacomicon.ico\">\n");
      out.write(
          "        <link href=\"loginbank_img/Style.css\" rel=\"stylesheet\" type=\"text/css\">\n");
      out.write(
          "        <script type=\"text/javascript\" src=\"verticalmenu/stmenu.js\"></script>\n");
      out.write("    </head>\n");
      out.write("    <body topmargin=\"0\" leftmargin=\"0\">\n");
      out.write("    <center>\n");
      out.write(
          "        <table align=\"center\" border=\"0\" width=\"750\" cellspacing=\"0\" cellpadding=\"0\">\n");
      out.write("            <tbody>\n");
      out.write("                <tr>\n");
      out.write(
          "                    <td width=\"10\" height=\"22\"><img border=\"0\" src=\"./loginbank_img/pagecorner_01.gif\" width=\"10\" height=\"22\"></td>\n");
      out.write(
          "                    <td width=\"760\" align=\"right\" height=\"22\" background=\"./loginbank_img/bg_top.gif\"><map name=\"FPMap0\">\t\n");
      out.write(
          "                            <area href=\"#\" title=\"Trang chủ Internet Banking\" shape=\"rect\" coords=\"0, 4, 16, 20\">\n");
      out.write(
          "                            <area title=\"Quy định chung\" coords=\"25, 4, 45, 19\" shape=\"rect\" href=\"#\">\n");
      out.write(
          "                            <area title=\"Điều khoản sử dụng\" coords=\"53, 5, 70, 18\" shape=\"rect\" href=\"#\">\n");
      out.write(
          "                            <area title=\"Hỏi đáp\" coords=\"78, 4, 96, 21\" shape=\"rect\" href=\"#\">\n");
      out.write(
          "                            <area title=\"Sơ đồ Site\" coords=\"105, 4, 123, 21\" shape=\"rect\" href=\"#\">\n");
      out.write(
          "                            <area title=\"Góp ý\" coords=\"133, 4, 149, 21\" shape=\"rect\" href=\"#\">\n");
      out.write("                        </map>\n");
      out.write(
          "                        <img border=\"0\" src=\"./loginbank_img/nav.gif\" width=\"150\" height=\"22\" usemap=\"#FPMap0\"></td>\n");
      out.write(
          "                    <td background=\"./loginbank_img/bg_top.gif\" valign=\"middle\" align=\"center\" width=\"30\">\n");
      out.write(
          "                        <img border=\"0\" src=\"./loginbank_img/en_flag.gif\" height=\"15\" width=\"20\"> </td>\n");
      out.write(
          "                    <td width=\"10\" height=\"22\"><img border=\"0\" src=\"./loginbank_img/pagecorner_02.gif\" width=\"10\" height=\"22\"></td>\n");
      out.write("                </tr>\n");
      out.write("                <tr>\n");
      out.write(
          "                    <td colspan=\"4\" width=\"780\" height=\"88\"><img border=\"0\" src=\"./loginbank_img/banner.gif\" width=\"780\" height=\"88\"></td>\n");
      out.write("                </tr>\n");
      out.write("                <tr>\n");
      out.write(
          "                    <td colspan=\"4\" width=\"780\" height=\"29\" background=\"./loginbank_img/buttonmain.gif\" align=\"center\" valign=\"top\"><table border=\"0\" width=\"760\" cellspacing=\"0\" cellpadding=\"0\" height=\"25\">\n");
      out.write("                            <tbody>\n");
      out.write("                                <tr>\n");
      out.write(
          "                                    <td align=\"center\" width=\"160\"><font color=\"#FFFF00\"><b>TRANG CHỦ</b></font> </td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"5\" class=\"line\">|</td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"220\"><a href=\"term.htm\" class=\"mainmenu\">ĐIỀU KHOẢN SỬ DỤNG</a> </td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"5\" class=\"line\">|</td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"180\"><a class=\"mainmenu\" href=\"#\">HƯỚNG DẪN SỬ DỤNG</a> </td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"5\" class=\"line\">|</td>\n");
      out.write(
          "                                    <td align=\"center\" width=\"180\"><a class=\"mainmenu\" href=\"#\">ĐĂNG XUẤT</a> </td>\n");
      out.write("                                </tr>\n");
      out.write("                            </tbody>\n");
      out.write("                        </table></td>\n");
      out.write("                </tr>\n");
      out.write("            </tbody>\n");
      out.write("        </table>\n");
      out.write(
          "        <table border=\"1\" width=\"780\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#E8F4FD\">\n");
      out.write("\n");
      out.write("            <tr>\n");
      out.write("                <td bgcolor=\"#E8F4FD\" valign=\"middle\" class=\"style1\">\n");
      out.write("                    CHUYỂN KHOẢN\n");
      out.write("                </td>\n");
      out.write("\n");
      out.write("            </tr>\n");
      out.write("            <tr>\n");
      out.write("                <td>\n");
      out.write("                    <form action=\"ConfirmTransfer\" method=\"POST\">\n");
      out.write("                        <table  border=\"0\" width=\"100%\">\n");
      out.write("                            <tr>\n");
      out.write(
          "                                <td colspan=\"2\" scope=\"col\" class=\"style1\">\n");
      out.write("                                    ");
      String accountError = (String) request.getAttribute("notexist");
      String amountError = (String) request.getAttribute("notnumber");
      String contentError = (String) request.getAttribute("content");

      if (accountError != null) {
        out.print("<span class='style2'>" + accountError + "</span><br>");
      }
      if (amountError != null) {
        out.print("<span class='style2'>" + amountError + "</span><br>");
      }
      if (contentError != null) {
        out.print("<span class='style2'>" + contentError + "</span><br>");
      }

      out.write("\n");
      out.write("\n");
      out.write("                                    Cá nhân/đơn vị chuyển tiền</td>    \n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td width=\"150px\">Tài khoản số</td>\n");
      out.write("                                <td>");
      out.print(cus.getAccountid());
      out.write("</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Họ tên</td>\n");
      out.write("                                <td>");
      out.print(cus.getName());
      out.write("</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Số dư</td>\n");
      out.write("                                <td class=\"style2\">");
      out.print(cus.getBalance());
      out.write(" VND</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write(
          "                                <td colspan=\"2\" class=\"style1\">Cá nhân/đơn vị thụ hưởng</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Số tài khoản</td>\n");
      out.write("                                <td>\n");
      out.write(
          "                                    <input type=\"text\" name=\"toaccount\" id=\"toaccount\" size=\"40\"><span class=\"style2\">(*)</span></td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Số tiền bằng số</td>\n");
      out.write(
          "                                <td><input type=\"text\" name=\"amount\" id=\"amount\" size=\"40\"> VND <span class=\"style2\">(*)</span></td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>Nội dung thanh toán</td>\n");
      out.write(
          "                                <td><textarea name=\"content\" id=\"content\" cols=\"45\" rows=\"4\"></textarea><span class=\"style2\">(*)</span></td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td>&nbsp;</td>\n");
      out.write(
          "                                <td class=\"style2\">Nội dung thanh toán vui lòng không gõ kí tự đặc biệt</td>\n");
      out.write("                            </tr>\n");
      out.write("                            <tr>\n");
      out.write("                                <td colspan=\"2\" align=\"center\">\n");
      out.write(
          "                                    <input type=\"submit\" name=\"confirm\" id=\"confirm\" value=\"Xác nhận\">\n");
      out.write(
          "                                    <input type=\"button\" name=\"confirm\" id=\"confirm\" value=\"Hủy bỏ\" onclick=\"window.location='transaction.jsp'\">\n");
      out.write("                                </td>\n");
      out.write("                            </tr>\n");
      out.write("\n");
      out.write("                        </table>\n");
      out.write("                    </form>\n");
      out.write("\n");
      out.write("        </table>\n");
      out.write("    </td>\n");
      out.write("</tr>\n");
      out.write("\n");
      out.write("</tbody>\n");
      out.write("</table>\n");
      out.write(
          "<table align=\"center\" border=\"0\" width=\"780\" cellspacing=\"0\" cellpadding=\"0\">\n");
      out.write("    <tbody>\n");
      out.write("        <tr>\n");
      out.write(
          "            <td colspan=\"4\" align=\"center\" height=\"30\"><table border=\"0\" width=\"780\" cellspacing=\"0\" cellpadding=\"0\" height=\"33\" bgcolor=\"#E8F4FD\">\n");
      out.write("                    <tbody>\n");
      out.write("                        <tr height=\"28\">\n");
      out.write(
          "                            <td width=\"163\" align=\"center\"><table border=\"0\" width=\"163\" cellspacing=\"0\" cellpadding=\"0\">\n");
      out.write("                                </table></td>\n");
      out.write(
          "                            <td width=\"550\" align=\"center\"><a href=\"#\" class=\"footer\">Trang chủ</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/rulesFirstAction.stb\" class=\"footer\">Quy định chung</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/termsOfUsageAction.stb\" class=\"footer\">Điều khoản sử dụng</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/faqAction.stb\" class=\"footer\">Hỏi đáp</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/sitemapAction.stb\" class=\"footer\">Sơ đồ Site</a>&nbsp; | <a href=\"https://www.e-sacombank.com.vn/sacomweb/commentAction.stb\" class=\"footer\">Góp ý</a> </td>\n");
      out.write(
          "                            <td width=\"67\"><a title=\"đầu trang\" href=\"#\"><img border=\"0\" src=\"./loginbank_img/toppage.gif\" width=\"62\" height=\"20\"></a> </td>\n");
      out.write("                        </tr>\n");
      out.write("                    </tbody>\n");
      out.write("                </table></td>\n");
      out.write("        </tr>\n");
      out.write("        <tr>\n");
      out.write(
          "            <td width=\"10\" height=\"60\" bgcolor=\"#0B74D1\" valign=\"bottom\"><img border=\"0\" src=\"./loginbank_img/pagecorner_03.gif\" width=\"10\" height=\"22\"></td>\n");
      out.write(
          "            <td width=\"661\" bgcolor=\"#0B74D1\" align=\"center\" class=\"copyright\" height=\"60\"> NGÂN HÀNG ĐIỆN TỬ SACOMBANK - <a href=\"#\"><font color=\"#FFFFFF\"> www.e-sacombank.com.vn</font></a><br>\n");
      out.write(
          "                HỘI SỞ 266-268 Nam Kỳ Khởi Nghĩa, P.8, Q.3, Tp.HCM&nbsp; -&nbsp; ĐT:  (08) 39.321.606&nbsp; -&nbsp; Fax: (08) 39.320.419<br>\n");
      out.write(
          "                <a href=\"https://www.e-sacombank.com.vn/sacomweb/cert.stb\"><font color=\"#FFFFFF\">Bản quyền © 2007</font></a> <a href=\"index.jsp\" target=\"_blank\"><font color=\"#FFFFFF\">SACOMBANK</font></a></td>\n");
      out.write(
          "            <td width=\"99\" bgcolor=\"#0B74D1\" align=\"center\" class=\"copyright\" height=\"60\"><a href=\"https://seal.verisign.com/splash?form_file=fdf/splash.fdf&dn=WWW.E-SACOMBANK.COM.VN&lang=en\" target=\"_blank\"><img border=\"0\" src=\"./loginbank_img/signseal.gif\" width=\"98\" height=\"54\"></a></td>\n");
      out.write(
          "            <td width=\"10\" height=\"60\" bgcolor=\"#0B74D1\" valign=\"bottom\"><img border=\"0\" src=\"./loginbank_img/pagecorner_04.gif\" width=\"10\" height=\"22\"></td>\n");
      out.write("        </tr>\n");
      out.write("    </tbody>\n");
      out.write("</table>\n");
      out.write("</center>\n");
      out.write("</body>\n");
      out.write("</html>\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)) {
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0) out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
Ejemplo n.º 14
0
  private String[] getContactFilter() {

    final String id = customer.getIdCus();
    final String[] filter = {id, "true"};
    return filter;
  }
Ejemplo n.º 15
0
  private String[] getAddressFilter() {

    final String id = customer.getIdCus();
    final String[] filter = {id, "", "true"};
    return filter;
  }
Ejemplo n.º 16
0
  private void initializeFields() {
    jTextFieldCusWebsite.setText(customer.getCusWebsite());
    jTextFieldCusemail.setText(customer.getCusEMail());
    jTextFieldCusFax.setText(customer.getCusFax());
    jTextFieldCusMobile.setText(customer.getCusMobile());
    jTextFieldCusPhone.setText(customer.getCusPhone());
    jTextFieldCusVat.setText(customer.getCusVat());
    jTextFieldCusName.setText(customer.getCusName());
    jTextFieldCusActivity.setText(customer.getCusActivity());
    jTextFieldCusAccount.setText(customer.getCusAccount());
    jTextFieldCusInfo.setText(customer.getCusInfo());

    jComboBoxCusType.setSelectedItem(getSelectedItem(cusTypes, customer.getCusType()));
    jComboBoxCusCat.setSelectedItem(getSelectedItem(cusCats, customer.getCusClass()));
    jComboBoxCusLang.setSelectedItem(getSelectedItem(cusLangs, customer.getCusLang()));
    jComboBoxCusCur.setSelectedItem(getSelectedItem(cusCurs, customer.getCusCur()));
    jComboBoxCusPay.setSelectedItem(getSelectedItem(cusPays, customer.getCusPay()));
  }