Ejemplo n.º 1
0
        public FileMessage5 DownloadFile5(FileInfo5 msg)
        {
            try
            {
                SecurityCheckThrow(msg.s1, msg.s2);
                RecordCallHistory("DownloadFile");

                ZipFileAccess da              = new ZipFileAccess();
                var           voucherFolder   = da.CreateDirectoryHerarchy(Strings.FILESERVERFOLDER, msg.CountryId, msg.RetailerId, msg.VoucherId);
                var           sessionFileName = voucherFolder.CombineFileName(msg.SessionId);

                FileMessage5 download = new FileMessage5(msg);

                if (sessionFileName.Exists)
                {
                    Stream fileStream = new FileStream(sessionFileName.FullName, FileMode.Open);
                    download.FileByteStream = fileStream;
                }
                return(download);
            }
            catch (Exception ex)
            {
                throw new FaultException <MyApplicationFault>(new MyApplicationFault(), ex.Message);
            }
        }
Ejemplo n.º 2
0
 public FileMessage5(FileInfo5 info)
 {
     SessionId  = info.SessionId;
     CountryId  = info.CountryId;
     RetailerId = info.RetailerId;
     CountryId  = info.CountryId;
     VoucherId  = info.VoucherId;
 }