public HttpResponseMessage Post([FromBody] string ListPlate) { HttpResponseMessage massage = null; var response = new HttpResponseMessage(HttpStatusCode.NotModified) { ReasonPhrase = "" }; try { var filters = JsonConvert.DeserializeObject <Run>(ListPlate); MainLevel0 m0 = new MainLevel0(filters); // MainLevel0 m0 = new MainLevel0(new List<string> { "MBX003169", "MBX003171", "MBX003175", "MBX003187" }); var path = ConnectSqlLevel0.SelectTemplateToDataTable(m0.ListLevel0, filters.NumRun);/* m0.IdNumberingRuns"001"*/ massage = SaveLevel2Controller.download(path, (filters.BarcodeCantrige + ".csv"), "vnd.openxmlformats-officedocument.spreadsheetml.sheet"); // (m0.IdNumberingRuns+"(" + ListPlate[0] + ")" + " - Step1.csv") } catch (Exception e) { response.ReasonPhrase = e.Message; throw new HttpResponseException(response); } return(massage); }
public static HttpResponseMessage send(List <Level9> filters, string idRun) { HttpResponseMessage massage = null; try { var path = ""; path = Files.FileWriterLevel9FinalExcel(filters, "", 1); massage = SaveLevel2Controller.download(path, ("(" + idRun + ")" + " - final.xlsx"), "vnd.openxmlformats-officedocument.spreadsheetml.sheet"); } catch (Exception e) { throw e; } finally { } return(massage); }