Good morning!
Sorry for the inconvenience, I tried to make a webservice that has an invoice name, go to a folder and take a pdf file and another xml compress and return the zip as an answer but I have not succeeded, try to do I will look for it in the following way and even then I could not, seriously apologize for the inconvenience.
Greetings.
namespace BuscadorFacturas
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
public class Service1 : IService1
{
public Buscador getArchivos(string nomFactura)
{
//instanciando el objeto
Buscador seeker = new Buscador();
//Obteniendo los archivos del directorio especificado
string startFolder = "C:/Users/Axiliar_Sistemas/Desktop/facturas";
//tomando captura de los archivos
DirectoryInfo dir = new DirectoryInfo(startFolder);
IEnumerable<FileInfo> fileList = dir.GetFiles("*.*", SearchOption.AllDirectories);
IEnumerable<FileInfo> fileQuery =
from file in fileList
where (file.Name).EndsWith(nomFactura)
orderby file.Name
select file;
foreach (FileInfo fi in fileQuery)
{
Console.WriteLine(fi.FullName);
}
return seeker;
}
}
}