Esempio n. 1
0
        public HttpResponseMessage GetOrgUnits(int organizationId, bool?exportOrgUnits)
        {
            if (!AllowAccess(organizationId))
            {
                return(Forbidden());
            }
            const string filename = "OS2KITOS Organisationsenheder.xlsx";
            var          stream   = new MemoryStream();

            using (var file = File.OpenRead(_mapPath + filename))
                file.CopyTo(stream);

            _excelService.ExportOrganizationUnits(stream, organizationId);
            stream.Seek(0, SeekOrigin.Begin);
            return(GetResponseMessage(stream, filename));
        }