
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Controller;

import DataEntryBean.EnquiryBean;
import DataEntryBean.GLTransactionEnquiryBean;
import DataEntryBean.GlAccountEnquiryBean;
import DataEntryBean.TransactionEnquiryBean;
import LoginDb.DbHandler;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import oracle.jdbc.OracleTypes;
import org.apache.commons.beanutils.BeanUtils;

/**
 *
 * @author Tcs Helpdesk10
 */
public class EnquiryServlet extends HttpServlet {

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        HttpSession session = request.getSession(false);
        Connection connection = null;
        ResultSet rs = null;
        Statement statement = null;
        CallableStatement proc = null;
        int searchFound = 0;
        String message = "";
        String pacsId = (String) session.getAttribute("pacsId");
        String headPacsId = (String) session.getAttribute("headPacsId");

        String JSP_Name = request.getParameter("screenName");
       // String subpacs_id = request.getParameter("subpacs_id");


        //For Pagination

        int page = 1;
        int recordsPerPage = 10;
        String but_type = request.getParameter("but_type");
        if (request.getParameter("page") != null
                && !(request.getParameter("page").equals("")) && !(request.getParameter("page").equals("null"))) {
           // page = Integer.parseInt(request.getParameter("page"));
            if (null != but_type && !(but_type.equals(""))) {
                if (but_type.equals("N")) {
                    page = page + 1;
                } else {
                    page = page - 1;
                }
            }

        }

        int startRow = 0;
        int endRow = 0;
        startRow = (page - 1) * recordsPerPage + 1;
        endRow = page * recordsPerPage;
        int recordCount = 0;
        int totalRecordCount = 0;
        //totalRecordCount = Integer.parseInt(request.getParameter("totalRecordCount"));

        //End of pagination


        if ("accountEnquiry".equalsIgnoreCase(JSP_Name)) {

            EnquiryBean oEnquiryBean = new EnquiryBean();
            EnquiryBean oEnquiryBeanSearch = new EnquiryBean();
            ArrayList<EnquiryBean> alEnquiryBean = new ArrayList<EnquiryBean>();
            try {
              //  BeanUtils.populate(oEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call ENQUIRY.Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                   // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during processing.");
                }
                proc.setString(1, oEnquiryBean.getAccountNo());
                proc.setString(2, oEnquiryBean.getFromDate());
                proc.setString(3, oEnquiryBean.getToDate());
                proc.setString(4, oEnquiryBean.getProductName());
                proc.setString(5, oEnquiryBean.getFromAmount());
                proc.setString(6, oEnquiryBean.getToAmount());
                proc.setString(7, oEnquiryBean.getLinkedSbAccount());
                proc.setString(8, pacsId);
                proc.setInt(9, startRow);
                proc.setInt(10, endRow);
                proc.registerOutParameter(11, OracleTypes.CURSOR);
                proc.registerOutParameter(12, java.sql.Types.VARCHAR);
                proc.registerOutParameter(13, java.sql.Types.INTEGER);
                proc.setString(14, oEnquiryBean.getSubpacs_id());
                proc.setString(15, oEnquiryBean.getOldAccNo());
                proc.setString(16, oEnquiryBean.getOldCifNo());
                proc.setString(17, oEnquiryBean.getCifNumber());

                proc.executeUpdate();

               // rs = (ResultSet) proc.getObject(11);
                //recordCount = proc.getInt(13);

                while (rs.next()) {
                    searchFound = 1;
                    oEnquiryBean = new EnquiryBean();
                    oEnquiryBean.setAccountNo(rs.getString("KEY_1"));
                    oEnquiryBean.setAccountOpenDate(rs.getString("ACCT_OPEN_DT"));
                    oEnquiryBean.setAvailBalance(rs.getString("AVAIL_BAL"));
                    oEnquiryBean.setCustomerNo(rs.getString("CUSTOMER_NO"));
                    oEnquiryBean.setSanctionAmount(rs.getString("SANCTION_AMT"));
                    oEnquiryBean.setPrinOutstanding(rs.getString("PRIN_OUTST"));
                    oEnquiryBean.setInttOutstanding(rs.getString("INTT_OUTST"));
                    oEnquiryBean.setPenalIntt(rs.getString("PENAL_INTT_PAID"));
                    oEnquiryBean.setCustomerName(rs.getString("cust_name"));

                    //added later
                    oEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME"));
                    oEnquiryBean.setLimitExpiryDate(rs.getString("LIMIT_EXP_DATE"));
                    oEnquiryBean.setPrinPaid(rs.getString("PRIN_PAID"));
                    oEnquiryBean.setInttPaid(rs.getString("INTT_PAID"));
                    oEnquiryBean.setPenalInttOutstanding(rs.getString("PENAL_INTT_OUTST"));
                    oEnquiryBean.setLinkAccNo(rs.getString("LINK_ACCNO"));
                    oEnquiryBean.setPrinOverdue(rs.getString("PRIN_OVERDUE"));
                    oEnquiryBean.setOldAccNo(rs.getString("old_accno"));
                    oEnquiryBean.setInttrate(rs.getString("INTT_RATE"));
                    oEnquiryBean.setPenalIntRate(rs.getString("PENAL_INTT_RATE"));
                    oEnquiryBean.setNPAINTTPAID(rs.getString("NPA_INTT_PAID"));
                    oEnquiryBean.setNPAINTTOUTST(rs.getString("NPA_INTT_OUTST"));
                    oEnquiryBean.setTotaloutst(rs.getString("total_outst"));
                    oEnquiryBean.setintAccrued(rs.getString("total_intt_accrued"));
                    oEnquiryBean.setCurr_Status(rs.getString("CURR_STATUS"));
                    oEnquiryBean.setOldCifNo(rs.getString("old_cif"));
                    alEnquiryBean.add(oEnquiryBean);
                    request.setAttribute("displayFlag", "Y");

                }

                //For pagination

                int noOfRecords = alEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {
                   // connection = DbHandler.getDBConnection();
                   // String productName = request.getParameter("productName");
                    statement = connection.createStatement();
                    //ResultSet rs1 = statement.executeQuery("select prod_name from dep_product where id='" + productName + "'");
                    while (rs1.next()) {
                        oEnquiryBeanSearch.setProductName(rs1.getString(1));

                    }
                   // connection.close();
                } catch (Exception e) {
                    System.out.println("Error occurred during processing.");
                
                } 

                //oEnquiryBeanSearch.setProductId(request.getParameter("productName"));
                //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
                //oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
                //oEnquiryBeanSearch.setToDate(request.getParameter("toDate"));
                //oEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount"));
                //oEnquiryBeanSearch.setToAmount(request.getParameter("toAmount"));
                //oEnquiryBeanSearch.setLinkedSbAccount(request.getParameter("linkedSbAccount"));
                //oEnquiryBeanSearch.setOldAccNo(request.getParameter("oldAccNo"));
                //oEnquiryBeanSearch.setCifNumber(request.getParameter("cifNumber"));

            } catch (SQLException ex) {
               // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during connection close.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item";
                request.setAttribute("message", message);
            }
            request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch);
            request.setAttribute("alEnquiryBean", alEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/accountEnquiry.jsp").forward(request, response);

        } else if ("transactionEnquiry".equalsIgnoreCase(JSP_Name)) {

            TransactionEnquiryBean oTransactionEnquiryBeanSearch = new TransactionEnquiryBean();
            TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean();

            ArrayList<TransactionEnquiryBean> alTransactionEnquiryBean = new ArrayList<TransactionEnquiryBean>();
            try {
               // BeanUtils.populate(oTransactionEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call Enquiry.Transaction_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                  //  Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
                }
                proc.setString(1, oTransactionEnquiryBean.getAccountNo());
                proc.setString(2, oTransactionEnquiryBean.getFromDate());
                proc.setString(3, oTransactionEnquiryBean.getToDate());
                proc.setString(4, oTransactionEnquiryBean.getProductName());
                proc.setString(5, oTransactionEnquiryBean.getFromAmount());
                proc.setString(6, oTransactionEnquiryBean.getToAmount());
                proc.setString(7, oTransactionEnquiryBean.getLinkedSbAccount());
                proc.setString(8, pacsId);
                proc.setInt(9, startRow);
                proc.setInt(10, endRow);
                proc.registerOutParameter(11, OracleTypes.CURSOR);
                proc.registerOutParameter(12, java.sql.Types.VARCHAR);
                proc.registerOutParameter(13, java.sql.Types.INTEGER);
                proc.setString(14, oTransactionEnquiryBean.getSubpacs_id());

                proc.executeUpdate();

               // rs = (ResultSet) proc.getObject(11);
                //recordCount = proc.getInt(13);

                while (rs.next()) {
                    searchFound = 1;
                    oTransactionEnquiryBean = new TransactionEnquiryBean();
                    oTransactionEnquiryBean.setAccountNo(rs.getString("KEY_1"));
                    oTransactionEnquiryBean.setCbs_Ref_No(rs.getString("cbs_ref_no"));
                    oTransactionEnquiryBean.setTransactionDate(rs.getString("tran_date"));
                    oTransactionEnquiryBean.setJournalNumber(rs.getString("jrnl_no"));
                    oTransactionEnquiryBean.setTransactionType(rs.getString("txn_type"));
                    oTransactionEnquiryBean.setTransactionAmount(rs.getString("txn_amt"));
                    oTransactionEnquiryBean.setNarration(rs.getString("narration"));
                    //added later
                    oTransactionEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME"));
                    oTransactionEnquiryBean.setLimitExpiryDate(rs.getString("LIMIT_EXP_DATE"));
                    oTransactionEnquiryBean.setAvailableBalance(rs.getString("END_BAL"));
                    oTransactionEnquiryBean.setLinkAccNo(rs.getString("LINK_ACCNO"));
                    alTransactionEnquiryBean.add(oTransactionEnquiryBean);

                    request.setAttribute("displayFlag", "Y");

                }

                //For pagination

                int noOfRecords = alTransactionEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {
                    String productName;
                   // connection = DbHandler.getDBConnection();
                   // productName = request.getParameter("productName");
                    statement = connection.createStatement();
                   // ResultSet rs1 = statement.executeQuery("select prod_name from dep_product where id='" + productName + "'");
                    while (rs1.next()) {
                        oTransactionEnquiryBeanSearch.setProductName(rs1.getString(1));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error occurred during processing.");
                
                } finally { 
                    try {                   
                    if (statement != null)
                        statement.close();
                    } catch (Exception e) {               
                        System.out.println("Error Occurred during connection close.");
                    }

                }

                //oTransactionEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
                //oTransactionEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
                //oTransactionEnquiryBeanSearch.setToDate(request.getParameter("toDate"));
                //oTransactionEnquiryBeanSearch.setProductId(request.getParameter("productName"));
                //oTransactionEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount"));
               // oTransactionEnquiryBeanSearch.setToAmount(request.getParameter("toAmount"));
               // oTransactionEnquiryBeanSearch.setLinkedSbAccount(request.getParameter("linkedSbAccount"));

            } catch (SQLException ex) {
               // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during connection close.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item";
                request.setAttribute("message", message);
            }
            request.setAttribute("oTransactionEnquiryBeanSearchObj", oTransactionEnquiryBeanSearch);
            request.setAttribute("alTransactionEnquiryBean", alTransactionEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/transactionEnquiry.jsp").forward(request, response);

        } else if ("glTransactionEnquiry".equalsIgnoreCase(JSP_Name)) {

            GLTransactionEnquiryBean oGLTransactionEnquiryBeanSearch = new GLTransactionEnquiryBean();
            GLTransactionEnquiryBean oGLTransactionEnquiryBean = new GLTransactionEnquiryBean();

            ArrayList<GLTransactionEnquiryBean> alGlTransactionEnquiryBean = new ArrayList<GLTransactionEnquiryBean>();
            try {
             //   BeanUtils.populate(oGLTransactionEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call Enquiry.GL_Transaction_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                   // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
                }
                proc.setString(1, oGLTransactionEnquiryBean.getAccountNo());
                proc.setString(2, oGLTransactionEnquiryBean.getFromDate());
                proc.setString(3, oGLTransactionEnquiryBean.getToDate());
                proc.setString(4, oGLTransactionEnquiryBean.getProductName());
                proc.setString(5, oGLTransactionEnquiryBean.getFromAmount());
                proc.setString(6, oGLTransactionEnquiryBean.getToAmount());
                proc.setString(7, oGLTransactionEnquiryBean.getTranRefSearch());
                proc.setString(8, pacsId);
                proc.setString(9, oGLTransactionEnquiryBean.getSubpacs_id());
                proc.setInt(10, startRow);
                proc.setInt(11, endRow);

                proc.registerOutParameter(12, OracleTypes.CURSOR);
                proc.registerOutParameter(13, java.sql.Types.VARCHAR);
                proc.registerOutParameter(14, java.sql.Types.INTEGER);

                proc.executeUpdate();

                //rs = (ResultSet) proc.getObject(12);
               // recordCount = proc.getInt(14);

                while (rs.next()) {
                    searchFound = 1;
                    oGLTransactionEnquiryBean = new GLTransactionEnquiryBean();
                    oGLTransactionEnquiryBean.setAccountNo(rs.getString("KEY_1"));
                    oGLTransactionEnquiryBean.setCbs_Ref_No(rs.getString("cbs_ref_no"));
                    oGLTransactionEnquiryBean.setTransactionDate(rs.getString("tran_date"));
                    oGLTransactionEnquiryBean.setJournalNumber(rs.getString("jrnl_no"));
                    oGLTransactionEnquiryBean.setTransactionType(rs.getString("txn_type"));
                    oGLTransactionEnquiryBean.setTransactionAmount(rs.getString("txn_amt"));
                    oGLTransactionEnquiryBean.setGl_code(rs.getString("gl_name"));
                    oGLTransactionEnquiryBean.setGl_txn_narration(rs.getString("narration"));
                    oGLTransactionEnquiryBean.setEnd_bal(rs.getString("end_bal"));
                    oGLTransactionEnquiryBean.setDest_Account_no(rs.getString("dest_acc_no"));
                    oGLTransactionEnquiryBean.setAcc_Type(rs.getString("dest_type"));

                    alGlTransactionEnquiryBean.add(oGLTransactionEnquiryBean);

                    request.setAttribute("displayFlag", "Y");

                }

                //For pagination

                int noOfRecords = alGlTransactionEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {
                    String productName;
                   // connection = DbHandler.getDBConnection();
                   // productName = request.getParameter("productName");
                    statement = connection.createStatement();
                   // ResultSet rs1 = statement.executeQuery("select gl_name from gl_product where id='" + productName + "'");
                    while (rs1.next()) {
                        oGLTransactionEnquiryBeanSearch.setProductName(rs1.getString(1));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                } finally {
                    try {
                        if (statement != null)
                        statement.close();

                    } catch (Exception e) {               
                        System.out.println("Error Occurred during statement close.");
                    }

                }

                try {
                   // connection = DbHandler.getDBConnection();
                    statement = connection.createStatement();
                   // ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'");
                    while (rs2.next()) {
                        oGLTransactionEnquiryBeanSearch.setSubpacs_name(rs2.getString(2));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                } finally {
                    try {
                        if (statement != null)
                            statement.close();

                    } catch (Exception e) {               
                        System.out.println("Error Occurred during statement close.");
                        }

                    }

                //oGLTransactionEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
               // oGLTransactionEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
               // oGLTransactionEnquiryBeanSearch.setToDate(request.getParameter("toDate"));
               // oGLTransactionEnquiryBeanSearch.setProductId(request.getParameter("productName"));
               // oGLTransactionEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount"));
               // oGLTransactionEnquiryBeanSearch.setToAmount(request.getParameter("toAmount"));
               // oGLTransactionEnquiryBeanSearch.setTranRefSearch(request.getParameter("tranRefSearch"));
               // oGLTransactionEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id"));

            } catch (SQLException ex) {
               // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during connection close.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item";
                request.setAttribute("message", message);
            }
            request.setAttribute("oGlTransactionEnquiryBeanSearchObj", oGLTransactionEnquiryBeanSearch);
            request.setAttribute("alGlTransactionEnquiryBean", alGlTransactionEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/glTransactionEnquiry.jsp").forward(request, response);

        } else if ("glAccountEnquiry".equalsIgnoreCase(JSP_Name)) {
            
           // String productName = request.getParameter("productName");
            
            GlAccountEnquiryBean oGlAccountEnquiryBeanSearch = new GlAccountEnquiryBean();
            GlAccountEnquiryBean oGlAccountEnquiryBean = new GlAccountEnquiryBean();

            ArrayList<GlAccountEnquiryBean> alGlAccountEnquiryBean = new ArrayList<GlAccountEnquiryBean>();
            try {
              //  BeanUtils.populate(oGlAccountEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call Enquiry.Gl_Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                   // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during processing.");
                }
                proc.setString(1, oGlAccountEnquiryBean.getAccountNo());
                proc.setString(2, oGlAccountEnquiryBean.getFromDate());
                proc.setString(3, oGlAccountEnquiryBean.getToDate());
                proc.setString(4, oGlAccountEnquiryBean.getProductName());
                proc.setString(5, oGlAccountEnquiryBean.getFromAmount());
                proc.setString(6, oGlAccountEnquiryBean.getToAmount());
                proc.setString(7, pacsId);
                proc.setString(8, oGlAccountEnquiryBean.getSubpacs_id());
                proc.setInt(9, startRow);
                proc.setInt(10, endRow);

                proc.registerOutParameter(11, OracleTypes.CURSOR);
                proc.registerOutParameter(12, java.sql.Types.VARCHAR);
                proc.registerOutParameter(13, java.sql.Types.INTEGER);

                proc.executeUpdate();

               // rs = (ResultSet) proc.getObject(11);
               // recordCount = proc.getInt(13);


                while (rs.next()) {
                    searchFound = 1;
                    oGlAccountEnquiryBean = new GlAccountEnquiryBean();
                    oGlAccountEnquiryBean.setAccountNo(rs.getString("KEY_1"));
                    oGlAccountEnquiryBean.setLedgerName(rs.getString("LEDGER_NAME"));
                    oGlAccountEnquiryBean.setAccountOpenDate(rs.getString("ACCT_OPEN_DT"));
                    oGlAccountEnquiryBean.setCumulativeBalance(rs.getString("cum_curr_val"));
                    oGlAccountEnquiryBean.setStatus(rs.getString("status"));
                    oGlAccountEnquiryBean.setCglCode(rs.getString("gl_code"));
                    oGlAccountEnquiryBean.setCglName(rs.getString("gl_name"));

                    alGlAccountEnquiryBean.add(oGlAccountEnquiryBean);

                    request.setAttribute("displayFlag", "Y");

                }


                //For pagination

                int noOfRecords = alGlAccountEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {
                   // connection = DbHandler.getDBConnection();                    
                    statement = connection.createStatement();
                  // ResultSet rs1 = statement.executeQuery("select gl_name from gl_product where id='" + productName + "'");
                    while (rs1.next()) {
                        oGlAccountEnquiryBeanSearch.setCglName(rs1.getString(1));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                  } finally {
                        try {                    
                            if (statement != null)
                                statement.close();

                    } catch (Exception e) {               
                        System.out.println("Error Occurred during connection close.");
                    }

                 }

                try {
                   // connection = DbHandler.getDBConnection();
                    statement = connection.createStatement();
                  //  ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'");
                    while (rs2.next()) {
                        oGlAccountEnquiryBeanSearch.setSubpacs_name(rs2.getString(2));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error occurred during processing.");
                } finally {
                    try {                    
                        if (statement != null)
                            statement.close();

                    } catch (Exception e) {               
                        System.out.println("Error Occurred during connection close.");
                    }

                }

               // oGlAccountEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
               // oGlAccountEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
               // oGlAccountEnquiryBeanSearch.setToDate(request.getParameter("toDate"));
                oGlAccountEnquiryBean.setProductId(request.getParameter("productName"));
                //oGlAccountEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount"));
               // oGlAccountEnquiryBeanSearch.setToAmount(request.getParameter("toAmount"));
                //oGlAccountEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id"));
                //oGlAccountEnquiryBeanSearch.setProductName(request.getParameter("productName"));
                //oGlAccountEnquiryBeanSearch.setProdName(request.getParameter("prodName"));

            } catch (SQLException ex) {
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during connection close.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item";
                request.setAttribute("message", message);
            }
            
            request.setAttribute("oGlAccountEnquiryBeanSearchObj", oGlAccountEnquiryBeanSearch);
            request.setAttribute("alGlAccountEnquiryBean", alGlAccountEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/glAccountEnquiry.jsp").forward(request, response);

        } //For Deposit Module By SUBHAM
        else if ("DepositAccountEnquiry".equalsIgnoreCase(JSP_Name)) {

            EnquiryBean oEnquiryBean = new EnquiryBean();
            EnquiryBean oEnquiryBeanSearch = new EnquiryBean();
            ArrayList<EnquiryBean> alEnquiryBean = new ArrayList<EnquiryBean>();
            try {
                //BeanUtils.populate(oEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call Enquiry.Deposit_Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                   // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during processing.");
                }
                proc.setString(1, oEnquiryBean.getAccountNo());
                proc.setString(2, oEnquiryBean.getFromDate());
                proc.setString(3, oEnquiryBean.getToDate());
                proc.setString(4, oEnquiryBean.getProductName());
                proc.setString(5, oEnquiryBean.getFromAmount());
                proc.setString(6, oEnquiryBean.getToAmount());
                proc.setString(7, oEnquiryBean.getSrchByCIF());
                proc.setString(8, headPacsId);
                proc.setString(9, subpacs_id);
                proc.setString(10, oEnquiryBean.getOldAccNo());
                proc.setString(11, oEnquiryBean.getOldCifNo());
                proc.setInt(12, startRow);
                proc.setInt(13, endRow);
                proc.setString(14, oEnquiryBean.getModOfAcc());

                proc.registerOutParameter(15, OracleTypes.CURSOR);
                proc.registerOutParameter(16, java.sql.Types.VARCHAR);
                proc.registerOutParameter(17, java.sql.Types.INTEGER);
                //proc.setString(18, oEnquiryBean.getCustomerName());




                proc.executeUpdate();

                //rs = (ResultSet) proc.getObject(15);
               // recordCount = proc.getInt(17);

                while (rs.next()) {
                    searchFound = 1;
                    oEnquiryBean = new EnquiryBean();
                    oEnquiryBean.setAccountNo(rs.getString("KEY_1"));
                    oEnquiryBean.setAccountOpenDate(rs.getString("ACCT_OPEN_DT"));
                    oEnquiryBean.setAvailBalance(rs.getString("AVAIL_BAL"));
                    oEnquiryBean.setCustomerNo(rs.getString("CUSTOMER_NO"));
                    oEnquiryBean.setCustomerName(rs.getString("cust_name"));
                    oEnquiryBean.setHoldValue(rs.getString("hold_value"));
                    oEnquiryBean.setCurr_Status(rs.getString("curr_status"));
                    oEnquiryBean.setInttAvail(rs.getString("intt_available"));
                    oEnquiryBean.setInttrate(rs.getString("INTT_RATE"));
                    oEnquiryBean.setInttToDt(rs.getString("intt_eop_date"));
                    oEnquiryBean.setInttfroDt(rs.getString("intt_sop_date"));
                    oEnquiryBean.setTermValue(rs.getString("term_value"));
                    oEnquiryBean.setInttProjected(rs.getString("intt_projected"));
                    oEnquiryBean.setMaturityDt(rs.getString("mat_dt"));
                    oEnquiryBean.setTerm_from_date(rs.getString("term_from_date"));
                    oEnquiryBean.setTerm_to_date(rs.getString("term_to_date"));
                    oEnquiryBean.setMaturityValue(rs.getString("mat_value"));
                    oEnquiryBean.setIntt_capptalized(rs.getString("INTT_CAP_AMT"));
                    oEnquiryBean.setTermLen(rs.getString("term_length"));
                    oEnquiryBean.setIntRepayMethod(rs.getString("Int_Repay_Method"));
                    oEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME"));
                    oEnquiryBean.setInstllAmt(rs.getString("INSTALL_AMT"));
                    oEnquiryBean.setInstallPaidNo(rs.getString("NO_INST_PAID"));
                    oEnquiryBean.setInstllDueDate(rs.getString("NXT_DUE_DATE"));
                    oEnquiryBean.setOldAccNo(rs.getString("OldAcc"));
                    oEnquiryBean.setPacs_id(rs.getString("pacs_id"));
                    oEnquiryBean.setPenalCnt(rs.getString("pen_count"));
                    oEnquiryBean.setCif_no2(rs.getString("cif_no2"));
                    oEnquiryBean.setSec_cust_name(rs.getString("sec_cust_name"));
                    oEnquiryBean.setLinkAccNo(rs.getString("link_acc"));
                    oEnquiryBean.setModOfAcc(rs.getString("Mode_Of_Acc"));
                    oEnquiryBean.setNomineeName(rs.getString("nomineeName"));
                    //Added By bitan for Multiple CIFS in DEP accounts
                    oEnquiryBean.setJt_cifNumber1(rs.getString("cif_no2"));
                    oEnquiryBean.setJt_cifName1(rs.getString("sec_cust_name"));
                    oEnquiryBean.setJt_cifNumber2(rs.getString("cif_no3"));
                    oEnquiryBean.setJt_cifName2(rs.getString("cif_name3"));
                    oEnquiryBean.setJt_cifNumber3(rs.getString("cif_no4"));
                    oEnquiryBean.setJt_cifName3(rs.getString("cif_name4"));
                    oEnquiryBean.setJt_cifNumber4(rs.getString("cif_no5"));
                    oEnquiryBean.setJt_cifName4(rs.getString("cif_name5"));
                    oEnquiryBean.setJt_cifNumber5(rs.getString("cif_no6"));
                    oEnquiryBean.setJt_cifName5(rs.getString("cif_name6"));
                    oEnquiryBean.setJt_cifNumber6(rs.getString("cif_no7"));
                    oEnquiryBean.setJt_cifName6(rs.getString("cif_name7"));
                    oEnquiryBean.setJt_cifNumber7(rs.getString("cif_no8"));
                    oEnquiryBean.setJt_cifName7(rs.getString("cif_name8"));
                    oEnquiryBean.setJt_cifNumber8(rs.getString("cif_no9"));
                    oEnquiryBean.setJt_cifName8(rs.getString("cif_name9"));
                    oEnquiryBean.setJt_cifNumber9(rs.getString("cif_no10"));
                    oEnquiryBean.setJt_cifName9(rs.getString("cif_name10"));
                    oEnquiryBean.setJt_cifNumber10(rs.getString("cif_no11"));
                    oEnquiryBean.setJt_cifName10(rs.getString("cif_name11"));
                    //END Multiple CIF Changes

                    alEnquiryBean.add(oEnquiryBean);
                    request.setAttribute("displayFlag", "Y");

                }

                //For pagination

                int noOfRecords = alEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {
                   // connection = DbHandler.getDBConnection();
                   // String productName = request.getParameter("productName");
                    statement = connection.createStatement();
                   // ResultSet rs1 = statement.executeQuery("select prod_name from dep_product where id='" + productName + "'");
                    while (rs1.next()) {
                        oEnquiryBeanSearch.setProductName(rs1.getString(1));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                
                } finally {
                    try {                    
                    if (statement != null)
                    statement.close();

                    } catch (Exception e) {               
                        System.out.println("Error Occurred during connection close.");
                        }

                }

                try {
                   // connection = DbHandler.getDBConnection();
                    statement = connection.createStatement();
                   // ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'");
                    while (rs2.next()) {
                        oEnquiryBeanSearch.setSubpacs_name(rs2.getString(2));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                
                } finally {
                    try {                    
                        if (statement != null)
                            statement.close();

                    } catch (Exception e) {               
                            System.out.println("Error Occurred during connection close.");
                        }

                }

                //oEnquiryBeanSearch.setProductId(request.getParameter("productName"));
                //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
               // oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
                //oEnquiryBeanSearch.setToDate(request.getParameter("toDate"));
                //oEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount"));
                //oEnquiryBeanSearch.setToAmount(request.getParameter("toAmount"));
                //oEnquiryBeanSearch.setSrchByCIF(request.getParameter("srchByCIF"));
                //oEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id"));
                //oEnquiryBeanSearch.setOldAccNo(request.getParameter("oldAccNo"));
                //oEnquiryBeanSearch.setOldCifNo(request.getParameter("oldCifNo"));
                //oEnquiryBeanSearch.setModOfAcc(request.getParameter("modOfAcc"));


            } catch (SQLException ex) {
               // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during connection close.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item";
                request.setAttribute("message", message);
            }
            request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch);
            request.setAttribute("alEnquiryBean", alEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/Deposit/DepositAccountEnquiry.jsp").forward(request, response);

        } else if ("DepositTransactionEnquiry".equalsIgnoreCase(JSP_Name)) {

            TransactionEnquiryBean oTransactionEnquiryBeanSearch = new TransactionEnquiryBean();
            TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean();

            ArrayList<TransactionEnquiryBean> alTransactionEnquiryBean = new ArrayList<TransactionEnquiryBean>();
            try {
               // BeanUtils.populate(oTransactionEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call Enquiry.Deposit_Transaction_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                   // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during processing.");
                }
                proc.setString(1, oTransactionEnquiryBean.getAccountNo());
                proc.setString(2, oTransactionEnquiryBean.getFromDate());
                proc.setString(3, oTransactionEnquiryBean.getToDate());
                proc.setString(4, oTransactionEnquiryBean.getProductName());
                proc.setString(5, oTransactionEnquiryBean.getFromAmount());
                proc.setString(6, oTransactionEnquiryBean.getToAmount());
                proc.setString(7, oTransactionEnquiryBean.getTranRefSearch());
                proc.setString(8, pacsId);
                proc.setInt(9, startRow);
                proc.setInt(10, endRow);

                proc.registerOutParameter(11, OracleTypes.CURSOR);
                proc.registerOutParameter(12, java.sql.Types.VARCHAR);
                proc.registerOutParameter(13, java.sql.Types.INTEGER);
                proc.setString(14, oTransactionEnquiryBean.getSubpacs_id());


                proc.executeUpdate();

                //rs = (ResultSet) proc.getObject(11);
               // recordCount = proc.getInt(13);


                while (rs.next()) {
                    searchFound = 1;
                    oTransactionEnquiryBean = new TransactionEnquiryBean();
                    oTransactionEnquiryBean.setAccountNo(rs.getString("KEY_1"));
                    oTransactionEnquiryBean.setCbs_Ref_No(rs.getString("CBS_REF_NO"));
                    oTransactionEnquiryBean.setTransactionDate(rs.getString("tran_date"));

                    oTransactionEnquiryBean.setTransactionType(rs.getString("txn_type"));
                    oTransactionEnquiryBean.setTransactionAmount(rs.getString("txn_amt"));

                    //added later
                    oTransactionEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME"));

                    oTransactionEnquiryBean.setAvailableBalance(rs.getString("END_BAL"));

                    oTransactionEnquiryBean.setNarration(rs.getString("NARRATION"));
                    oTransactionEnquiryBean.setInttCatDesc(rs.getString("INTT_CAT_DESC"));
                    oTransactionEnquiryBean.setAuthID(rs.getString("checker_id"));
                    oTransactionEnquiryBean.setMakerID(rs.getString("maker_id"));
                    alTransactionEnquiryBean.add(oTransactionEnquiryBean);

                    request.setAttribute("displayFlag", "Y");

                }

                //For pagination

                int noOfRecords = alTransactionEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {
                    String productName;
                   // connection = DbHandler.getDBConnection();
                   // productName = request.getParameter("productName");
                    statement = connection.createStatement();
                    //ResultSet rs1 = statement.executeQuery("select prod_name,id from dep_product where id='" + productName + "'");
                    while (rs1.next()) {
                        oTransactionEnquiryBeanSearch.setProductName(rs1.getString(1));
                        oTransactionEnquiryBeanSearch.setProductId(rs1.getString(2));
                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                } finally {
                try {                    
                    if (statement != null)
                    statement.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }

                try {
                   // connection = DbHandler.getDBConnection();
                    statement = connection.createStatement();
                    //ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'");
                    while (rs2.next()) {
                        oTransactionEnquiryBeanSearch.setSubpacs_name(rs2.getString(2));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                } finally {
                try {                    
                    if (statement != null)
                    statement.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }

              //  oTransactionEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
              //  oTransactionEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
              //  oTransactionEnquiryBeanSearch.setToDate(request.getParameter("toDate"));

              //  oTransactionEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount"));
               // oTransactionEnquiryBeanSearch.setToAmount(request.getParameter("toAmount"));
               // oTransactionEnquiryBeanSearch.setTranRefSearch(request.getParameter("tranRefSearch"));
              //  oTransactionEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id"));


            } catch (SQLException ex) {
               // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during processing.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item";
                request.setAttribute("message", message);
            }
            request.setAttribute("oTransactionEnquiryBeanSearchObj", oTransactionEnquiryBeanSearch);
            request.setAttribute("alTransactionEnquiryBean", alTransactionEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/Deposit/DepositTransactionEnquiry.jsp").forward(request, response);

        } else if ("LoanInquiry".equalsIgnoreCase(JSP_Name)) {

            EnquiryBean oEnquiryBean = new EnquiryBean();
            EnquiryBean oEnquiryBeanSearch = new EnquiryBean();
            ArrayList<EnquiryBean> alEnquiryBean = new ArrayList<EnquiryBean>();
            try {
              //  BeanUtils.populate(oEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call Enquiry.Loan_Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                   // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during processing.");
                }
                proc.setString(1, oEnquiryBean.getAccountNo());
                proc.setString(2, oEnquiryBean.getFromDate());
                proc.setString(3, oEnquiryBean.getToDate());
                proc.setString(4, oEnquiryBean.getCifNumber());
                proc.setString(5, headPacsId);
                proc.setString(6, oEnquiryBean.getOldAccNo());
                proc.setString(7, oEnquiryBean.getOldCifNo());
                proc.setString(8, oEnquiryBean.getProductName());
                proc.setInt(9, startRow);
                proc.setInt(10, endRow);
                proc.registerOutParameter(11, OracleTypes.CURSOR);
                proc.registerOutParameter(12, java.sql.Types.VARCHAR);
                proc.registerOutParameter(13, java.sql.Types.INTEGER);
                proc.setString(14, oEnquiryBean.getSubpacs_id());


                proc.executeUpdate();

               // rs = (ResultSet) proc.getObject(11);
               // recordCount = proc.getInt(13);

                while (rs.next()) {
                    searchFound = 1;
                    oEnquiryBean = new EnquiryBean();
                    oEnquiryBean.setAccountNo(rs.getString("KEY_1"));
                    oEnquiryBean.setCustomerNo(rs.getString("CUST_NO"));
                    oEnquiryBean.setCustomerName(rs.getString("CUST_NAME"));
                    oEnquiryBean.setProduct_name(rs.getString("PROD_NAME"));
                    oEnquiryBean.setPenalIntt(rs.getString("penal_intt_rate"));
                    oEnquiryBean.setInttrate(rs.getString("intt_rate"));
                    oEnquiryBean.setIntt_cat_desc(rs.getString("Int_cat_desc"));

                    oEnquiryBean.setSanctionAmount(rs.getString("SANC_AMT"));
                    oEnquiryBean.setSancDt(rs.getString("SANC_DT"));
                    oEnquiryBean.setAmntDsbrd(rs.getString("AMT_DISBURSED"));
                    oEnquiryBean.setEmi(rs.getString("EMI"));

                    oEnquiryBean.setInttOutstanding(rs.getString("IN_OTD"));
                    oEnquiryBean.setTotal_intt_outst(rs.getString("TOTAL_INTT_OUTST"));
                    oEnquiryBean.setTotal_intt_accr(rs.getString("TOTAL_INTT_ACCR"));
                    oEnquiryBean.setTotal_intt_paid(rs.getString("TOTAL_INTT_PAID"));
                    oEnquiryBean.setPrinOutstanding(rs.getString("PRIN_OTD"));
                    oEnquiryBean.setInttPaid(rs.getString("INT_PD"));
                    oEnquiryBean.setPrinPaid(rs.getString("PRIN_PD"));
                    oEnquiryBean.setNext_due_date(rs.getString("DUE_DT"));
                    oEnquiryBean.setLast_repay_date(rs.getString("Last_Repay_Date"));
                    oEnquiryBean.setOldAccNo(rs.getString("oldAcc"));
                    oEnquiryBean.setPacs_id(rs.getString("pacs_id"));
                    oEnquiryBean.setCurr_Status(rs.getString("CURR_STATUS"));


                    alEnquiryBean.add(oEnquiryBean);
                    request.setAttribute("displayFlag", "Y");

                }

                //For pagination

                int noOfRecords = alEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {

                   // connection = DbHandler.getDBConnection();
                   // String productName = request.getParameter("productName");
                    statement = connection.createStatement();
                    //ResultSet rs1 = statement.executeQuery("select prod_name from loan_product where id='" + productName + "'");
                    while (rs1.next()) {
                        oEnquiryBeanSearch.setProductName(rs1.getString(1));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                } finally {
                try {                    
                    if (statement != null)
                    statement.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }

                try {
                   // connection = DbHandler.getDBConnection();
                    statement = connection.createStatement();
                   // ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'");
                    while (rs2.next()) {
                        oEnquiryBeanSearch.setSubpacs_name(rs2.getString(2));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                } finally {
                try {                    
                    if (statement != null)
                    statement.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }

                //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
               // oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
               // oEnquiryBeanSearch.setToDate(request.getParameter("toDate"));
               // oEnquiryBeanSearch.setCifNumber(request.getParameter("cifNumber"));
               // oEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id"));
               // oEnquiryBeanSearch.setOldAccNo(request.getParameter("oldAccNo"));
               // oEnquiryBeanSearch.setOldCifNo(request.getParameter("oldCifNo"));
               // oEnquiryBeanSearch.setProductId(request.getParameter("productName"));


            } catch (SQLException ex) {
               // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during connection close.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item. Please enter correct details.";
                request.setAttribute("message", message);
            }
            request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch);
            request.setAttribute("alEnquiryBean", alEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/Loan/LoanInquiry.jsp").forward(request, response);

        } else if ("LoanTransactionEnquiry".equalsIgnoreCase(JSP_Name)) {

            TransactionEnquiryBean oTransactionEnquiryBeanSearch = new TransactionEnquiryBean();
            TransactionEnquiryBean oTransactionEnquiryBean = new TransactionEnquiryBean();

            ArrayList<TransactionEnquiryBean> alTransactionEnquiryBean = new ArrayList<TransactionEnquiryBean>();
            try {
              //  BeanUtils.populate(oTransactionEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call Enquiry.Loan_Transaction_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                   // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
                    System.out.println("Error Occurred during processing.");
                }
                proc.setString(1, oTransactionEnquiryBean.getAccountNo());
                proc.setString(2, oTransactionEnquiryBean.getFromDate());
                proc.setString(3, oTransactionEnquiryBean.getToDate());
                proc.setString(4, oTransactionEnquiryBean.getProductName());
                proc.setString(5, oTransactionEnquiryBean.getFromAmount());
                proc.setString(6, oTransactionEnquiryBean.getToAmount());
                proc.setString(7, oTransactionEnquiryBean.getTranRefSearch());
                proc.setString(8, pacsId);
                proc.setInt(9, startRow);
                proc.setInt(10, endRow);

                proc.registerOutParameter(11, OracleTypes.CURSOR);
                proc.registerOutParameter(12, java.sql.Types.VARCHAR);
                proc.registerOutParameter(13, java.sql.Types.INTEGER);
                proc.setString(14, oTransactionEnquiryBean.getSubpacs_id());



                proc.executeUpdate();

                //rs = (ResultSet) proc.getObject(11);
                //recordCount = proc.getInt(13);


                while (rs.next()) {
                    searchFound = 1;
                    oTransactionEnquiryBean = new TransactionEnquiryBean();
                    oTransactionEnquiryBean.setAccountNo(rs.getString("KEY_1"));
                    oTransactionEnquiryBean.setCbs_Ref_No(rs.getString("txn_ref_no"));
                    oTransactionEnquiryBean.setTransactionDate(rs.getString("tran_date"));

                    oTransactionEnquiryBean.setTransactionType(rs.getString("txn_type"));
                    oTransactionEnquiryBean.setTransactionAmount(rs.getString("txn_amt"));

                    //added later
                    oTransactionEnquiryBean.setProductNameDisplay(rs.getString("PROD_NAME"));

                    oTransactionEnquiryBean.setAvailableBalance(rs.getString("END_BAL"));

                    oTransactionEnquiryBean.setNarration(rs.getString("NARRATION"));
                    oTransactionEnquiryBean.setInttCatDesc(rs.getString("INTT_CAT_DESC"));

                    alTransactionEnquiryBean.add(oTransactionEnquiryBean);

                    request.setAttribute("displayFlag", "Y");

                }

                //For pagination

                int noOfRecords = alTransactionEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {
                    String productName;
                   // connection = DbHandler.getDBConnection();
                   // productName = request.getParameter("productName");
                    statement = connection.createStatement();
                   // ResultSet rs1 = statement.executeQuery("select prod_name,id from loan_product where id='" + productName + "'");
                    while (rs1.next()) {
                        oTransactionEnquiryBeanSearch.setProductName(rs1.getString(1));
                        oTransactionEnquiryBeanSearch.setProductId(rs1.getString(2));
                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error occurred during connection close.");
                }

                //oTransactionEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
               // oTransactionEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
               // oTransactionEnquiryBeanSearch.setToDate(request.getParameter("toDate"));

                //oTransactionEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount"));
                //oTransactionEnquiryBeanSearch.setToAmount(request.getParameter("toAmount"));
                //oTransactionEnquiryBeanSearch.setTranRefSearch(request.getParameter("tranRefSearch"));


            } catch (SQLException ex) {
               // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during connection close.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item";
                request.setAttribute("message", message);
            }
            request.setAttribute("oTransactionEnquiryBeanSearchObj", oTransactionEnquiryBeanSearch);
            request.setAttribute("alTransactionEnquiryBean", alTransactionEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/Loan/LoanTransactionEnquiry.jsp").forward(request, response);

        } else if ("shareaccountenquiry".equalsIgnoreCase(JSP_Name)) {

            EnquiryBean oEnquiryBean = new EnquiryBean();
            EnquiryBean oEnquiryBeanSearch = new EnquiryBean();
            ArrayList<EnquiryBean> alEnquiryBean = new ArrayList<EnquiryBean>();
            try {
               // BeanUtils.populate(oEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call Enquiry.Share_Account_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                   // Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during processing.");
                }
                proc.setString(1, oEnquiryBean.getAccountNo());
                proc.setString(2, oEnquiryBean.getFromDate());
                proc.setString(3, oEnquiryBean.getToDate());
                proc.setString(4, oEnquiryBean.getProductName());
                proc.setString(5, oEnquiryBean.getSrchByCIF());
                proc.setString(6, pacsId);
                proc.setString(7, subpacs_id);
                proc.setInt(8, startRow);
                proc.setInt(9, endRow);

                proc.registerOutParameter(10, OracleTypes.CURSOR);
                proc.registerOutParameter(11, java.sql.Types.VARCHAR);
                proc.registerOutParameter(12, java.sql.Types.INTEGER);



                proc.executeUpdate();

                //rs = (ResultSet) proc.getObject(10);
                //recordCount = proc.getInt(12);

                while (rs.next()) {
                    searchFound = 1;
                    oEnquiryBean = new EnquiryBean();
                    oEnquiryBean.setAccountNo(rs.getString("KEY_1"));


                    oEnquiryBean.setCustomerNo(rs.getString("CUSTOMER_NO"));
                    oEnquiryBean.setCustomerName(rs.getString("cust_name"));
                    oEnquiryBean.setAccountOpenDate(rs.getString("ACCT_OPEN_DT"));
                    oEnquiryBean.setMemberno(rs.getString("membership_no"));
                    oEnquiryBean.setShareclass(rs.getString("prod_desc"));
                    oEnquiryBean.setSharevalue(rs.getString("share_value"));
                    oEnquiryBean.setShareno(rs.getString("number_of_share"));
                    oEnquiryBean.setShareamt(rs.getString("share_amount_paid"));
                    oEnquiryBean.setSharedue(rs.getString("share_amount_due"));



                    alEnquiryBean.add(oEnquiryBean);
                    request.setAttribute("displayFlag", "Y");

                }

                //For pagination

                int noOfRecords = alEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {
                   // connection = DbHandler.getDBConnection();
                    //String productName = request.getParameter("productName");
                    statement = connection.createStatement();
                   // ResultSet rs1 = statement.executeQuery("select prod_name from dep_product where id='" + productName + "'");
                    while (rs1.next()) {
                        oEnquiryBeanSearch.setProductName(rs1.getString(1));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                } finally {
                try {                    
                    if (statement != null)
                    statement.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }

                try {
                   // connection = DbHandler.getDBConnection();
                    statement = connection.createStatement();
                   // ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'");
                    while (rs2.next()) {
                        oEnquiryBeanSearch.setSubpacs_name(rs2.getString(2));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                } finally {
                try {                    
                    if (statement != null)
                    statement.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }

               // oEnquiryBeanSearch.setProductId(request.getParameter("productName"));
                //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
                //oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
               // oEnquiryBeanSearch.setToDate(request.getParameter("toDate"));
               // oEnquiryBeanSearch.setSrchByCIF(request.getParameter("srchByCIF"));
               // oEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id"));


            } catch (SQLException ex) {
               // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during processing.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item";
                request.setAttribute("message", message);
            }
            request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch);
            request.setAttribute("alEnquiryBean", alEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/Share_Module/shareaccountenquiry.jsp").forward(request, response);

        }
        else if ("DepositMiscellaneousEnquiry".equalsIgnoreCase(JSP_Name)) {

            EnquiryBean oEnquiryBean = new EnquiryBean();
            EnquiryBean oEnquiryBeanSearch = new EnquiryBean();
            ArrayList<EnquiryBean> alEnquiryBean = new ArrayList<EnquiryBean>();
            try {
             //   BeanUtils.populate(oEnquiryBean, request.getParameterMap());
            } catch (IllegalAccessException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } catch (InvocationTargetException ex) {
               // Logger.getLogger(EnquiryServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            }
            try {
                connection = DbHandler.getDBConnection();
                try {
                    proc = connection.prepareCall("{ call Enquiry.Deposit_Miscellaneous_Enquiry(?,?,?,?,?,?,?,?,?,?,?,?,?) }");
                } catch (SQLException ex) {
                  //  Logger.getLogger(GlProductOperationServlet.class.getName()).log(Level.SEVERE, null, ex);
                }
                proc.setString(1, oEnquiryBean.getAccountNo());
                proc.setString(2, oEnquiryBean.getFromDate());
                proc.setString(3, oEnquiryBean.getToDate());
                proc.setString(4, oEnquiryBean.getProductName());
                proc.setString(5, oEnquiryBean.getFromAmount());
                proc.setString(6, oEnquiryBean.getToAmount());
                proc.setString(7, pacsId);
                proc.setInt(8, startRow);
                proc.setInt(9, endRow);

                proc.registerOutParameter(10, OracleTypes.CURSOR);
                proc.registerOutParameter(11, java.sql.Types.VARCHAR);
                proc.registerOutParameter(12, java.sql.Types.INTEGER);
                proc.setString(13, oEnquiryBean.getSubpacs_id());



                proc.executeUpdate();

                //rs = (ResultSet) proc.getObject(10);
               // recordCount = proc.getInt(12);

                while (rs.next()) {
                    searchFound = 1;
                    oEnquiryBean = new EnquiryBean();
                    oEnquiryBean.setAccountNo(rs.getString("ACCOUNT_NO"));
                    oEnquiryBean.setCustomerNo(rs.getString("CIF_NO"));
                    oEnquiryBean.setCustomerName(rs.getString("CUSTOMER_NAME"));
                    oEnquiryBean.setAction(rs.getString("ACTION_CODE"));
                    oEnquiryBean.setOp_Amt(rs.getString("OPERATION_VALUE"));
                    oEnquiryBean.setAction_Dt(rs.getString("ACTION_DATE"));
                    oEnquiryBean.setAction_Cmnt(rs.getString("ACTION_COMMENT"));
                    oEnquiryBean.setAction_teller(rs.getString("TELLER_ID"));
                    oEnquiryBean.setAction_STAT(rs.getString("STATUS"));
                    oEnquiryBean.setTeller_name(rs.getString("LOGIN_NAME"));
                    oEnquiryBean.setLoanAcc(rs.getString("LOANACC"));


                    alEnquiryBean.add(oEnquiryBean);
                    request.setAttribute("displayFlag", "Y");

                }

                //For pagination

                int noOfRecords = alEnquiryBean.size();
                int noOfPages = (int) Math.ceil(noOfRecords * 1.0 / recordsPerPage);

                request.setAttribute("noOfPages", noOfPages);
                request.setAttribute("currentPage", page);
                request.setAttribute("totalRecordCount", totalRecordCount);
                request.setAttribute("recordCount", recordCount);
                request.setAttribute("noOfRecords", noOfRecords);

                //End Of Pagination

                try {
                   // connection = DbHandler.getDBConnection();
                    statement = connection.createStatement();
                    //ResultSet rs2 = statement.executeQuery("select m.pacs_id, m.pacs_name from pacs_master m where m.pacs_id ='" + subpacs_id + "'");
                    while (rs2.next()) {
                        oEnquiryBeanSearch.setSubpacs_name(rs2.getString(2));

                    }
                  // connection.close();
                } catch (Exception e) {
                    System.out.println("Error Occurred during processing.");
                } finally {
                try {                    
                    if (statement != null)
                    statement.close();

                    } catch (Exception e) {               
                        System.out.println("Error Occurred during connection close.");
                    }

                }


                //oEnquiryBeanSearch.setAccountNo(request.getParameter("accountNo"));
                //oEnquiryBeanSearch.setProductName(request.getParameter("productName"));
                //oEnquiryBeanSearch.setFromDate(request.getParameter("fromDate"));
               // oEnquiryBeanSearch.setToDate(request.getParameter("toDate"));
                //oEnquiryBeanSearch.setFromAmount(request.getParameter("fromAmount"));
                //oEnquiryBeanSearch.setToAmount(request.getParameter("toAmount"));
                //oEnquiryBeanSearch.setSubpacs_id(request.getParameter("subpacs_id"));


            } catch (SQLException ex) {
               // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
               System.out.println("Error Occurred during processing.");
            } finally {
                try {
                    proc.close();
                } catch (SQLException e) {
                    System.out.println("Error Occurred during proc close.");
                }
                try {
                    connection.close();
                } catch (SQLException ex) {
                   // Logger.getLogger(UploadServlet.class.getName()).log(Level.SEVERE, null, ex);
                   System.out.println("Error Occurred during connection close.");
                }
            }
            if (searchFound == 0) {
                message = "No data exists for selected item";
                request.setAttribute("message", message);
            }
            request.setAttribute("oEnquiryBeanSearchObj", oEnquiryBeanSearch);
            request.setAttribute("alEnquiryBean", alEnquiryBean);
            request.setAttribute("message", message);

            request.getRequestDispatcher("/Deposit/DepositMiscellaneousEnquiry.jsp").forward(request, response);

        }

    }
}
