Examples of NegocioLN


Examples of cl.loso.melon.server.model.NegocioLN

          session.put("IdNegocio", usuarioLN.getIdNegocio());
          session.put("perfil", usuarioLN.getPerfil());
          session.put("IdUsuario",usrId);

          UsuarioLN usuario=UsuarioLNBO.editarUsuarioLN(String.valueOf(usrId));
          NegocioLN negocio=NegocioLNBO.editarNegocioLN(String.valueOf(usuario.getIdNegocio()));

          String txtNegocio=negocio.getNombre();
          if(txtNegocio!=null){
            session.put("txtNegocio", txtNegocio);
          }else{
            session.put("txtNegocio", "sin negocio");
          }
View Full Code Here

Examples of cl.loso.melon.server.model.NegocioLN

    }
  }

  public static NegocioLN getNegocioLNbyId(Long id) {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    NegocioLN negocio, detached = null;
    try {
      negocio = pm.getObjectById(NegocioLN.class, id);
      detached = pm.detachCopy(negocio);
    } catch (Exception e) {
      log.error(e.getMessage());
View Full Code Here

Examples of cl.loso.melon.server.model.NegocioLN

  }

  public static void actualizar(NegocioLN negocioNew) {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    try {
      NegocioLN negocio = pm.getObjectById(NegocioLN.class, negocioNew
          .getId());
      negocio.setNombre(negocioNew.getNombre());

    } catch (Exception e) {
      log.error(e.getMessage());
    } finally {
      pm.close();
View Full Code Here

Examples of cl.loso.melon.server.model.NegocioLN

public class EquipoLNDAO {
  private static Log log = LogFactory.getLog(EquipoLNDAO.class);
 
  public static List<EquipoLN> obtener(NegocioLN negociolvs) {
      PersistenceManager pm = PMF.get().getPersistenceManager();
      NegocioLN negocio = null;
      List<EquipoLN> detached=null;

      try {
        negocio = pm.getObjectById(NegocioLN.class, negociolvs.getId());
        detached = (List<EquipoLN>)pm.detachCopyAll(negocio.getEquipos())
      } catch (Exception e) {
        log.error(e.getMessage());         
      } finally {
          pm.close();
      }
View Full Code Here

Examples of cl.loso.melon.server.model.NegocioLN

  public static void insertar(String idNegocio,String nombre, String fecha) {
      Transaction tx=null;
      PersistenceManager pm = PMF.get().getPersistenceManager();
      try {

        NegocioLN negocio=NegocioLNDAO.getNegocioLNbyId(Long.valueOf(idNegocio));
       
        EquipoLN sl=new EquipoLN();
         sl.setNegocio(negocio);
         sl.setNombre(nombre);
         sl.setFecha(fecha)
        
         List<EquipoLN> lst=new ArrayList<EquipoLN>();
         lst.add(sl);
        
         negocio.setEquipos(lst);
        tx = pm.currentTransaction();
          tx.begin();

        pm.makePersistent(negocio);
       
View Full Code Here

Examples of cl.loso.melon.server.model.NegocioLN

  public String guardarNegocio() {
    try {
      Date date = Calendar.getInstance().getTime();
      DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
      String today = formatter.format(date);
      NegocioLN negocioLVS = new NegocioLN(nombre,today);
      NegocioLNBO.guardarNegocioLN(negocioLVS);
    } catch (Exception e) {
      log.error(e);
    }
View Full Code Here

Examples of cl.loso.melon.server.model.NegocioLN

  public String actualizarNegocio() {
    try {
      Date date = Calendar.getInstance().getTime();
      DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
      String today = formatter.format(date);
      NegocioLNBO.actualizarNegocioLN(new NegocioLN(Long.valueOf(id),nombre,today));
    } catch (Exception e) {
      log.error(e);
    }

    return ActionSupport.SUCCESS;
View Full Code Here

Examples of cl.loso.melon.server.model.NegocioLN

     
      DateFormat formato1 = new SimpleDateFormat("dd/MM/yyyy HH:mm");
      Date fecha_novedad = (Date) formato1.parse(fecha);
      UsuarioLN usuario = UsuarioLNBO.editarUsuarioLN(idUsuario);
      TipoLN turno = TipoLNBO.editarTipoLN(idTurno);
      NegocioLN negocio = NegocioLNBO.editarNegocioLN(String
          .valueOf(usuario.getIdNegocio()));
      NovedadLN novedad = new NovedadLN(fecha_novedad, negocio.getId(),
          negocio.getNombre(), usuario, turno.getId(), turno
              .getDescripcion(), empleado,turno.getOrden());

      long tiempoInicio = System.currentTimeMillis();

      List<NovedadLN> novedades = new ArrayList<NovedadLN>();
      novedades.add(novedad);
      usuario.setNovedades(novedades);
      List<BitacoraLN> comentarios = new ArrayList<BitacoraLN>();

      Enumeration<Long> e = ht.keys();
      while (e.hasMoreElements()) {
        Long idEquipo = e.nextElement();
        EquipoLN equipo = EquipoLNBO.editarEquipoLN(String
            .valueOf(((UsuarioLN) UsuarioLNBO
                .editarUsuarioLN(idUsuario)).getIdNegocio()),
            String.valueOf(idEquipo));
        String comentario = ht.get(idEquipo);
        Text texto=new Text(comentario);
       
        comentarios.add(new BitacoraLN(fecha_novedad, texto,
            idEquipo, equipo.getNombre(), turno.getId(), turno
                .getDescripcion(), negocio.getId(), negocio
                .getNombre(),usuario.getNombres() + " " + usuario.getApepa() + " " + usuario.getApema()));
      }
      novedad.setComentarios(comentarios);
      NovedadLNDAO.insertar(usuario, novedad);
View Full Code Here

Examples of cl.loso.melon.server.model.NegocioLN

        Long idNegocio = (Long) usuario.getProperty("idNegocio");
        String email = (String) usuario.getProperty("email");
        String nombres =(String) usuario.getProperty("nombres");
        String apepa =(String) usuario.getProperty("apepa");
       
        NegocioLN negocio = NegocioLNBO.editarNegocioLN(String
            .valueOf(idNegocio.longValue()));
        String txtNegocio = negocio.getNombre();
        bitacoraList = BitacoraLNDAO.obtenerNovedadesParaCorreo(idNegocio);

        if (!bitacoraList.isEmpty()) {

          Document document = new Document();
View Full Code Here

Examples of cl.loso.melon.server.model.NegocioLN

      throw e;
    }
  }
  public static List<EquipoLN> obtenerEquipoLN(String idNegocio) throws Exception {
    try {
      NegocioLN negocio= NegocioLNBO.editarNegocioLN(idNegocio);
      return EquipoLNDAO.obtener(negocio);
    } catch (Exception e) {
      log.error(e.getMessage());
      throw e;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.