Package daoI

Examples of daoI.IGeologBeneficiarDao


    }

    public List<Beneficiar> getBeneficiari() {
        List<Beneficiar> beneficiari = new ArrayList<Beneficiar>();
        int idGeolog = getIdGeologLogat();
        IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
        List<Integer> idBeneficiari = geologBeneficiarDao.getGeologBeneficiariByGeologId(idGeolog);
        IBeneficiarDao beneficiarDao = new BeneficiarDao();
        Iterator it = idBeneficiari.iterator();
        while (it.hasNext()) {
            Integer idBeneficiar = (Integer) it.next();
            Beneficiar beneficiar = beneficiarDao.getBeneficiarByID(idBeneficiar);
View Full Code Here


            }
            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 List<Beneficiar> getBeneficiari() {
        List<Beneficiar> beneficiari = new ArrayList<Beneficiar>();
        int idGeolog = getIdGeologLogat();
        IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
        List<Integer> idBeneficiari = geologBeneficiarDao.getGeologBeneficiariByGeologId(idGeolog);
        IBeneficiarDao beneficiarDao = new BeneficiarDao();
        Iterator it = idBeneficiari.iterator();
        while (it.hasNext()) {
            Integer idBeneficiar = (Integer) it.next();
            Beneficiar beneficiar = beneficiarDao.getBeneficiarByID(idBeneficiar);
View Full Code Here

    }

    public List<Beneficiar> getBeneficiari() {
        List<Beneficiar> beneficiari = new ArrayList<Beneficiar>();
        int idGeolog = getIdGeologLogat();
        IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
        List<Integer> idBeneficiari = geologBeneficiarDao.getGeologBeneficiariByGeologId(idGeolog);
        IBeneficiarDao beneficiarDao = new BeneficiarDao();
        Iterator it = idBeneficiari.iterator();
        while (it.hasNext()) {
            Integer idBeneficiar = (Integer) it.next();
            Beneficiar beneficiar = beneficiarDao.getBeneficiarByID(idBeneficiar);
View Full Code Here

        return new ForwardResolution("/WEB-INF/jsp/repartizareAmplasamente.jsp");
    }

    public Resolution adauga() {
        //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

               int idAmplasament = Integer.parseInt(getButonRadio());
            int idBeneficiar = ((Beneficiar) getContext().getRequest().getSession().getAttribute("beneficiarProiect")).getIdBeneficiar();
            IAmplasamentDao amplasamentDao = new AmplasamentDao();
            Amplasament amplasament=amplasamentDao.getAmplasamentByID(idAmplasament);
            amplasamentDao.delete(idAmplasament);
            IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
            int idGeolog = amplasament.getIdGeolog();
            geologBeneficiarDao.delete(idGeolog, idBeneficiar);

            IGeologDao geologDao = new GeologDao();
            Geolog geolog = geologDao.getGeologByID(idGeolog);

            RepartizareProiect repartizareProiect = (RepartizareProiect) getContext().getRequest().getSession().getAttribute("repartizareAmplasamente");
View Full Code Here

    }
public Resolution stergeProiect(){
     int idProiect = ((Proiect) getContext().getRequest().getSession().getAttribute("proiectInLucru")).getIdProiect();
     IProiectDao proiectDao=new ProiectDao();
     IAmplasamentDao amplasamentDao=new AmplasamentDao();
     IGeologBeneficiarDao geologBeneficiarDao=new GeologBeneficiarDao();
     int idGeologSef=proiectDao.getProiectByID(idProiect).getIdGeolog();
     int idBeneficiar=proiectDao.getProiectByID(idProiect).getIdBeneficiar();
     List<Amplasament> amplasamente=amplasamentDao.getAmplasamenteByProiectId(idProiect);
     Iterator it=amplasamente.iterator();
     while(it.hasNext()){
         Amplasament amplasament=(Amplasament)it.next();
         geologBeneficiarDao.delete(amplasament.getIdGeolog(), idBeneficiar);
         amplasamentDao.delete(amplasament.getIdAmplasament());
     }
     geologBeneficiarDao.delete(idGeologSef, idBeneficiar);
     proiectDao.delete(idProiect);
     return new ForwardResolution("/WEB-INF/jsp/geologLogat.jsp");
}
View Full Code Here

        List<Beneficiar> beneficiari = new ArrayList<Beneficiar>();
        IBeneficiarDao beneficiarDao = new BeneficiarDao();
        String vizilibilitate = getContext().getRequest().getSession().getAttribute("vizualizareForaj").toString();
        if (vizilibilitate.equals("proiectePrivate")) {
            int idGeolog = getIdGeologLogat();
            IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
            List<Integer> idBeneficiari = geologBeneficiarDao.getGeologBeneficiariByGeologId(idGeolog);
            Iterator it = idBeneficiari.iterator();
            while (it.hasNext()) {
                Integer idBeneficiar = (Integer) it.next();
                Beneficiar beneficiar = beneficiarDao.getBeneficiarByID(idBeneficiar);
                beneficiari.add(beneficiar);
View Full Code Here

        List<Beneficiar> beneficiari = new ArrayList<Beneficiar>();
        Geolog geolog;
        Beneficiar beneficiar;
        List<Integer> idbeneficiari = new ArrayList<Integer>();
        IBeneficiarDao beneficiarDao = new BeneficiarDao();
        IGeologBeneficiarDao geologBeneficiarDao = new GeologBeneficiarDao();
        IGeologDao geologDao = new GeologDao();
        List<Geolog> geologi = geologDao.geologiPublici();
        if (geologi != null) {
            Iterator it = geologi.iterator();
            while (it.hasNext()) {
                geolog = (Geolog) it.next();
                idbeneficiari = geologBeneficiarDao.getGeologBeneficiariByGeologId(geolog.getIdGeolog());
                if (idbeneficiari != null) {
                    for (int i = 0; i < idbeneficiari.size(); i++) {
                        beneficiar = beneficiarDao.getBeneficiarByID(idbeneficiari.get(i));
                        beneficiari.add(beneficiar);
                    }
View Full Code Here

TOP

Related Classes of daoI.IGeologBeneficiarDao

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.