public void UploadRegularPackingList([FromUri] int preId, [FromUri] string vendor)
        {
            var fileSavePath = "";

            var filesGetter = new FilesGetter();

            fileSavePath = filesGetter.GetAndSaveSingleFileFromHttpRequest(@"D:\TempFiles\");

            if (fileSavePath == "")
            {
                throw new HttpResponseException(HttpStatusCode.BadRequest);
            }

            var excel = new ExcelExtracter(fileSavePath);

            excel.ExtractPOSummaryAndCartonDetail(preId, vendor);

            var killer = new ExcelKiller();

            killer.Dispose();
        }
Exemple #2
0
        public void SaveUploadedFileAndExtractExcel([FromUri] int id, [FromUri] string vendor)
        {
            var fileSavePath = "";

            //写入磁盘系统
            var filesGetter = new FilesGetter();

            fileSavePath = filesGetter.GetAndSaveSingleFileFromHttpRequest(@"D:\TempFiles\");

            if (fileSavePath == "")
            {
                throw new HttpResponseException(HttpStatusCode.BadRequest);
            }

            var excel = new ExcelExtracter(fileSavePath);

            excel.ExtractPOSummaryAndCartonDetail(id, vendor);

            //强行关闭进程
            var killer = new ExcelKiller();

            killer.Dispose();
        }