コード例 #1
0
        public override int Ejecutar()
        {
            IDAONota accion = FabricaDAO.CrearFabricaDeDAO(1).CrearDAONota();

            if (log.IsInfoEnabled)
            {
                log.Info("Clase: " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " nota: " + (nota as Clases.Nota).ToString());
            }

            return(accion.BuscarIdNota(nota));
        }
コード例 #2
0
        public override List <Entidad> Ejecutar()
        {
            IDAONota accion = FabricaDAO.CrearFabricaDeDAO(1).CrearDAONota();

            if (log.IsInfoEnabled)
            {
                log.Info("Clase: " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " libreta: " + (libreta as Clases.Libreta).ToString());
            }

            nota = accion.ListarNotasLibreta(libreta);
            return(nota);
        }
コード例 #3
0
        public override List <Entidad> Ejecutar()
        {
            IDAONota accion = FabricaDAO.CrearFabricaDeDAO(1).CrearDAONota();

            if (log.IsInfoEnabled)
            {
                log.Info("Clase: " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " usuario: " + (usuario as Clases.Usuario).ToString());
            }

            listaLibretas = accion.ListarLibretas(usuario);

            return(listaLibretas);
        }
コード例 #4
0
        public override Entidad Ejecutar()
        {
            IDAOUsuario accion = FabricaDAO.CrearFabricaDeDAO(2).CrearDAOUsuario();

            usuario = accion.ImportarConfiguracion(usuario);

            accion = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOUsuario();

            accion.ImportarConfiguracion(usuario);

            for (int i = 0; i < (usuario as Clases.Usuario).ListaLibretas.Count; i++)
            {
                IDAOLibreta accionLibreta = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOLibreta();
                accionLibreta.AgregarLibreta((usuario as Clases.Usuario).ListaLibretas[i], usuario);

                for (int j = 0; j < (usuario as Clases.Usuario).ListaLibretas[i].ListaNota.Count; j++)
                {
                    IDAONota accionNota = FabricaDAO.CrearFabricaDeDAO(1).CrearDAONota();
                    (usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j].Libreta.NombreLibreta = (usuario as Clases.Usuario).ListaLibretas[i].NombreLibreta;
                    accionNota.ImportarNota((usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j]);

                    for (int k = 0; k < (usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j].ListaAdjunto.Count; k++)
                    {
                        IDAOAdjunto accionVerificar = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOAdjunto();
                        Entidad     adjuntoExiste   = FabricaEntidad.CrearAdjunto();
                        adjuntoExiste = accionVerificar.VerificarAdjunto((usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j].ListaAdjunto[k]);

                        if ((adjuntoExiste as Clases.Adjunto).Idadjunto == 0)
                        {
                            IDAOAdjunto accionAdjunto = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOAdjunto();
                            accionAdjunto.AdjuntarBD((usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j].ListaAdjunto[k]);
                        }

                        accionNota = FabricaDAO.CrearFabricaDeDAO(1).CrearDAONota();
                        Entidad nota = accionNota.VerificarNota((usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j], (usuario as Clases.Usuario));

                        IDAOAdjunto accion2 = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOAdjunto();
                        adjuntoExiste = accion2.VerificarAdjunto((usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j].ListaAdjunto[k]);

                        if ((adjuntoExiste as Clases.Adjunto).Idadjunto != 0)
                        {
                            IDAOAdjunto accion3 = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOAdjunto();
                            accion3.AgregarAdjunto_Nota(nota, adjuntoExiste);
                        }
                    }
                }
            }

            return(usuario);
        }
コード例 #5
0
        public override Entidad Ejecutar()
        {
            IDAONota accion = FabricaDAO.CrearFabricaDeDAO(1).CrearDAONota();

            if (log.IsInfoEnabled)
            {
                log.Info("Clase: " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " usuario: " + (usuario as Clases.Usuario).ToString());
            }
            if (log.IsInfoEnabled)
            {
                log.Info("Clase: " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " nota: " + (nota as Clases.Nota).ToString());
            }

            nota = accion.VerificarNota(nota, usuario);

            return(nota);
        }
コード例 #6
0
        public override Entidad Ejecutar()
        {
            IDAOUsuario accion = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOUsuario();

            usuario = accion.ExportarConfiguracion(usuario);

            if (log.IsInfoEnabled)
            {
                log.Info("Clase: " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " usuario: " + (usuario as Clases.Usuario).ToString());
            }

            IDAOLibreta accionLibreta = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOLibreta();

            (usuario as Clases.Usuario).ListaLibretas = accionLibreta.ListarLibretas(usuario);

            IDAONota accionNota = FabricaDAO.CrearFabricaDeDAO(1).CrearDAONota();

            for (int i = 0; i < (usuario as Clases.Usuario).ListaLibretas.Count; i++)
            {
                (usuario as Clases.Usuario).ListaLibretas[i].ListaNota = accionNota.ListarNotasLibretaTypeNota((usuario as Clases.Usuario).ListaLibretas[i]);

                if (log.IsInfoEnabled)
                {
                    log.Info("Clase: " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " libreta: " + (usuario as Clases.Usuario).ListaLibretas[i].ToString());
                }

                IDAOEtiqueta accionEtiqueta = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOEtiqueta();
                IDAOAdjunto  accionAdjunto  = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOAdjunto();

                for (int j = 0; j < (usuario as Clases.Usuario).ListaLibretas[i].ListaNota.Count; j++)
                {
                    (usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j].ListaEtiqueta = accionEtiqueta.ListarEtiquetasDeNota((usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j]);
                    (usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j].ListaAdjunto  = accionAdjunto.ListarAjuntos((usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j], (usuario as Clases.Usuario));
                    if (log.IsInfoEnabled)
                    {
                        log.Info("Clase: " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " Nota: " + (usuario as Clases.Usuario).ListaLibretas[i].ListaNota[j].ToString());
                    }
                }
            }

            accion = FabricaDAO.CrearFabricaDeDAO(2).CrearDAOUsuario();
            accion.ExportarConfiguracion(usuario);

            return(usuario);
        }
コード例 #7
0
        public override bool Ejecutar()
        {
            try
            {
                IDAONota accion = FabricaDAO.CrearFabricaDeDAO(1).CrearDAONota();
                nota = accion.VerificarNota(nota, usuario);
                if ((nota as Clases.Nota).Idnota != 0)
                {
                    adjunto = FabricaEntidad.CrearAdjunto();
                    for (int i = 0; i < archivo.Count(); i++)
                    {
                        if (archivo[i] != "")
                        {
                            (adjunto as Clases.Adjunto).Urlarchivo = archivo[i];
                            (adjunto as Clases.Adjunto).Titulo     = nombre[i];
                            IDAOAdjunto accion2 = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOAdjunto();
                            adjunto = accion2.VerificarAdjunto(adjunto);

                            if ((adjunto as Clases.Adjunto).Idadjunto != 0)
                            {
                                IDAOAdjunto accion3 = FabricaDAO.CrearFabricaDeDAO(1).CrearDAOAdjunto();
                                resultado = accion3.AgregarAdjunto_Nota(nota, adjunto);
                            }
                            else
                            {
                                return(resultado);
                            }
                        }
                    }
                    return(resultado);
                }
                else
                {
                    return(resultado);
                }
            }
            catch
            {
                return(resultado);
            }
        }