Package dao

Examples of dao.KaryawanDAO


                karyawan.setStatuskerja("true");
                karyawan.setNotifikasi("false");

                EntityManagerFactory emf = Persistence.createEntityManagerFactory("SisInfPengambilanCutiPU");
                EntityManager em = emf.createEntityManager();
                KaryawanDAO dao = new KaryawanDAOImpl(em);
                dao.update(karyawan);

                RequestDispatcher req = request.getRequestDispatcher("administrator/home.jsp");
                response.sendRedirect("administrator/home.jsp");
                req.include(request, response);
            }
View Full Code Here


            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");
            req.include(request, response);
        } catch (Exception ex) {
        } finally {
View Full Code Here

        try {
            EntityManagerFactory emf = Persistence.createEntityManagerFactory("SisInfPengambilanCutiPU");
            EntityManager em = emf.createEntityManager();

            Karyawan k = new Karyawan();
            KaryawanDAO kdao = new KaryawanDAOImpl(em);
            String usr = request.getParameter("usrname");

            kdao.updateNotifikasi(Long.parseLong(usr), "false");
            response.sendRedirect("home.jsp");

        } catch(Exception ex){
        }finally {
            out.close();
View Full Code Here

TOP

Related Classes of dao.KaryawanDAO

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.