Package dao

Examples of dao.HistoryCutiDAOImpl


            String id = request.getParameter("txtId");
            String cek = request.getParameter("txtCek");
            String idkaryawan = request.getParameter("txtIdKaryawan");
            EntityManagerFactory emf = Persistence.createEntityManagerFactory("SisInfPengambilanCutiPU");
            EntityManager em = emf.createEntityManager();
            HistoryCutiDAO daoPending = new HistoryCutiDAOImpl(em);
            if (cek.equalsIgnoreCase("true")) {

                KaryawanDAO kdao = new KaryawanDAOImpl(em);
                Karyawan k = new Karyawan();
                k = kdao.get(Long.parseLong(idkaryawan));

                if (Integer.parseInt(k.getSisacuti()) > 0) {
                    daoPending.approveCuti(Long.parseLong(id), "Accept");
                    kdao.updateSisaCuti(Long.parseLong(idkaryawan), Integer.parseInt(k.getSisacuti()) - 1 + "");
                } else {
                    out.print("Sisa Cuti Tidak Memenuhi");
                }
            } else if (cek.equalsIgnoreCase("false")) {
                daoPending.approveCuti(Long.parseLong(id), "Denied");
            }
            KaryawanDAO kDao = new KaryawanDAOImpl(em);
            kDao.updateNotifikasi(Long.parseLong(idkaryawan), "true");
            RequestDispatcher req = request.getRequestDispatcher("administrator/home.jsp");
            response.sendRedirect("administrator/home.jsp");
View Full Code Here

TOP

Related Classes of dao.HistoryCutiDAOImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.