Example #1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            _lecturaArchivo = true;
            if (string.IsNullOrEmpty(pathLectura))
            {
                MessageBox.Show("Debe seleccionar el archivo a importar...", "Atención");
                return;
            }
            var productosLeídos = LeerArchivo(pathLectura);

            if (!_lecturaArchivo)
            {
                MessageBox.Show("Cargar el archivo.", "Error");
                return;
            }

            foreach (var item in productosLeídos)
            {
                EArticulosRepository.GuardarProductoLeidoPorTxt(item);
            }
        }