Ejemplo n.º 1
0
        public static string GenerarArchivoImportacion()
        {
            RepoImportacion repoImpo   = new RepoImportacion();
            string          devolucion = repoImpo.GenerarArchivo();

            return(devolucion);
        }
Ejemplo n.º 2
0
        public static List <Importacion> ListarImportacionesStockCliente(Object id)
        {
            RepoImportacion    r             = new RepoImportacion();
            List <Importacion> importaciones = r.ImportacionesEnStockCliente(id);

            return(importaciones);
        }
Ejemplo n.º 3
0
        public static List <Importacion> ListarImportacionesStock()
        {
            RepoImportacion    r             = new RepoImportacion();
            List <Importacion> importaciones = r.ImportacionesEnStock();

            return(importaciones);
        }
Ejemplo n.º 4
0
        public static List <Importacion> ListarImportaciones()
        {
            RepoImportacion    r             = new RepoImportacion();
            List <Importacion> importaciones = r.TraerTodo();

            return(importaciones);
        }
Ejemplo n.º 5
0
        public static List <Importacion> TraerImportaciones()
        {
            List <Importacion> importaciones = new List <Importacion>();
            RepoImportacion    RepoImp       = new RepoImportacion();

            importaciones = RepoImp.TraerTodo();
            return(importaciones);
        }
Ejemplo n.º 6
0
        public static bool AltaImportacion(Importacion i)
        {
            bool            ret  = false;
            RepoImportacion repo = new RepoImportacion();

            if (i.ValidarPrecio())
            {
                ret = repo.Alta(i);
            }
            return(ret);
        }
Ejemplo n.º 7
0
        public static decimal CalcularGananciaPorCliente(Object id)
        {
            RepoCliente     repoCliente = new RepoCliente();
            RepoImportacion r           = new RepoImportacion();
            decimal         ganancia    = repoCliente.ObtenerPorcentajeGanancia();
            decimal         descuento   = repoCliente.ObtenerPorcentajeDescuento();
            int             antiguedad  = repoCliente.ObtenerAntiguedadMinima();

            decimal total = 0;

            foreach (Importacion i in r.ImportacionesEnStockCliente(id))
            {
                total += i.GananciaPrevista(ganancia, descuento, antiguedad);
            }
            return(total);
        }
Ejemplo n.º 8
0
        public static decimal CalcularGananciaPorImportacion(Importacion i)
        {
            RepoCliente     repoCliente = new RepoCliente();
            RepoImportacion r           = new RepoImportacion();
            decimal         ganancia    = repoCliente.ObtenerPorcentajeGanancia();
            decimal         descuento   = repoCliente.ObtenerPorcentajeDescuento();
            int             antiguedad  = repoCliente.ObtenerAntiguedadMinima();

            decimal total = 0;

            if (i != null)
            {
                total = i.GananciaPrevista(ganancia, descuento, antiguedad);
            }

            return(total);
        }