Package bo

Examples of bo.GeologBeneficiar


            Beneficiar beneficiar = new Beneficiar(nume, cnp, mentiuni, null);
            beneficiarDao.saveOrUpdate(beneficiar);
            Beneficiar bAux = beneficiarDao.getBeneficiarCnp(cnp);
            int idGeolog = getIdGeologLogat();
            IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
            geologBeneficiarDao.saveOrUpdate(new GeologBeneficiar(idGeolog, bAux.getIdBeneficiar()));
            setBeneficiarAdaugat(true);
            return new ForwardResolution("/WEB-INF/jsp/adaugaBeneficiar.jsp");
        } //daca cream un proiect
        else if (proiect == 1) {
            if (getBtnRadio() == null) {
                setRadioNeselectat(true);
                return new ForwardResolution("/WEB-INF/jsp/adaugaBeneficiar.jsp");
            } else if (getBtnRadio().equals("1")) {
                Beneficiar beneficiarSelectat = beneficiarDao.getBeneficiarByID(Integer.parseInt(getSelectBeneficiarFilter()));
                IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
                int idGeolog = getIdGeologLogat();
                geologBeneficiarDao.saveOrUpdate(new GeologBeneficiar(idGeolog, beneficiarSelectat.getIdBeneficiar()));
                getContext().getRequest().getSession(true).setAttribute("beneficiarProiect", beneficiarSelectat);
                return new ForwardResolution("/WEB-INF/jsp/proiect.jsp");
            } else if (getBtnRadio().equals("2")) {
                if ((getNume() == null) || (getCnp() == null)) {
                    setCampuriNecompletate(true);
                    return new ForwardResolution("/WEB-INF/jsp/adaugaBeneficiar.jsp");
                }
                if (cnp.length() != 13) {
                    setCnpIncorect(true);
                    return new ForwardResolution("/WEB-INF/jsp/adaugaBeneficiar.jsp");
                } else if (!isNumeric(cnp)) {
                    setCnpIncorect(true);
                    return new ForwardResolution("/WEB-INF/jsp/adaugaBeneficiar.jsp");
                }
                Beneficiar beneficiar = new Beneficiar(nume, cnp, mentiuni, null);
                beneficiarDao.saveOrUpdate(beneficiar);
                Beneficiar bAux = beneficiarDao.getBeneficiarCnp(cnp);
                int idGeolog = getIdGeologLogat();
                IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
                geologBeneficiarDao.saveOrUpdate(new GeologBeneficiar(idGeolog, bAux.getIdBeneficiar()));
                getContext().getRequest().getSession(true).setAttribute("beneficiarProiect", bAux);
                return new ForwardResolution("/WEB-INF/jsp/proiect.jsp");
            }

View Full Code Here


        }
    }

    public void delete(int idGeolog, int idBeneficiar) {
        List<GeologBeneficiar> list = null;
        GeologBeneficiar gb = null;
        try {
            session = (Session) HibernateUtil.getSessionFactory().getCurrentSession();
            org.hibernate.Transaction tx = session.beginTransaction();
            Query q = session.createQuery("from GeologBeneficiar as lang where lang.idGeolog='" + idGeolog + "'and lang.idBeneficiar='" + idBeneficiar + "' ");
            list = (List<GeologBeneficiar>) q.list();
View Full Code Here

        //adaugam beneficiarul si la subgeologul corespunzator
        IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
        Beneficiar beneficiar = (Beneficiar) getContext().getRequest().getSession().getAttribute("beneficiarProiect");
        int idBeneficiar = beneficiar.getIdBeneficiar();
        int idGeolog = Integer.parseInt(getGeologFilter());
        geologBeneficiarDao.saveOrUpdate(new GeologBeneficiar(idGeolog, idBeneficiar));

        //adaugam amplasamentul
        int idProiect = ((Proiect) getContext().getRequest().getSession().getAttribute("proiectInLucru")).getIdProiect();
        IOrasDao orasDao = new OrasDao();
        Oras oras = orasDao.getOrasByID(Integer.parseInt(getOrasFilter()));
View Full Code Here

TOP

Related Classes of bo.GeologBeneficiar

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.