From 2b7346b4b128cd9cf728558df93ef7e7729dd62d Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 18 Jan 2021 09:24:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=85=A5=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.U8.App/FrmMain.cs | 10 +++++----- NX.ERP.U8/U8LoginContext.cs | 12 ++++++++++++ NX.ERP.WebAPi/Controllers/Base/HomeController.cs | 1 - NX.ERP.WebAPi/Filters/ExceptionFilter.cs | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/NX.ERP.U8.App/FrmMain.cs b/NX.ERP.U8.App/FrmMain.cs index 47af224..ceb175b 100644 --- a/NX.ERP.U8.App/FrmMain.cs +++ b/NX.ERP.U8.App/FrmMain.cs @@ -20,7 +20,7 @@ namespace U8AppMain InitializeComponent(); } - private NX.ERP.U8.U8LoginContext u8LoginContext = null; + private void PrintLog(ResultEnity.ufinterface info) { @@ -53,7 +53,7 @@ namespace U8AppMain try { - var response = HttpHelper.HttpPost(url, body); + var response = HttpHelper.HttpPost(U8LoginContext.Instance.EAIUrl, body); return XmlHelper.XmlDeserialize(response, Encoding.UTF8); // var strResult = $"单据:{result.requestroottag} 操作:{result.proc} \r\n"; //foreach (var item in result.Items) @@ -72,7 +72,7 @@ namespace U8AppMain } - private string url = ConfigurationManager.AppSettings.Get("url"); + //private string url = ConfigurationManager.AppSettings.Get("url"); // private string connStr = ConfigurationManager.AppSettings.Get("connStr"); private DataTable dataTable; @@ -259,7 +259,7 @@ namespace U8AppMain } foreach (var item in bomLookup.Values) { - var a = new Voucher.VoucherDAL(this.u8LoginContext.Constr4Net); + var a = new Voucher.VoucherDAL(U8LoginContext.Instance.Constr4Net); if (a.Add(item)) { this.richTextBox1.SelectionColor = Color.Green; @@ -412,7 +412,7 @@ namespace U8AppMain InvCode="902112", Position="", Quantity=1, - SourceDetailId=2921, + SourceDetailId=2921 } diff --git a/NX.ERP.U8/U8LoginContext.cs b/NX.ERP.U8/U8LoginContext.cs index 5ededc4..1468fec 100644 --- a/NX.ERP.U8/U8LoginContext.cs +++ b/NX.ERP.U8/U8LoginContext.cs @@ -126,6 +126,18 @@ namespace NX.ERP.U8 } public string Serial { get; set; } + + public string EAIUrl + { + get + { + return $"http://{this.ClsLogin.cServer}/U8EAI/import.asp"; + + } + + } + + /// /// ADO.NET 链接字符串 /// diff --git a/NX.ERP.WebAPi/Controllers/Base/HomeController.cs b/NX.ERP.WebAPi/Controllers/Base/HomeController.cs index 4f91382..7678bfc 100644 --- a/NX.ERP.WebAPi/Controllers/Base/HomeController.cs +++ b/NX.ERP.WebAPi/Controllers/Base/HomeController.cs @@ -11,7 +11,6 @@ namespace NX.ERP.WebAPi.Controllers public ActionResult Index() { ViewBag.Title = "Home Page"; - return View(); } } diff --git a/NX.ERP.WebAPi/Filters/ExceptionFilter.cs b/NX.ERP.WebAPi/Filters/ExceptionFilter.cs index a206679..6ce227d 100644 --- a/NX.ERP.WebAPi/Filters/ExceptionFilter.cs +++ b/NX.ERP.WebAPi/Filters/ExceptionFilter.cs @@ -9,7 +9,7 @@ using System.Web.Http.Filters; namespace NX.ERP.WebAPi.Filters { - public class ExceptionFilter : System.Web.Http.Filters.IExceptionFilter + public class ExceptionFilter : IExceptionFilter { public bool AllowMultiple => throw new NotImplementedException();