diff --git a/JY.Inspection/HomeForm.cs b/JY.Inspection/HomeForm.cs index 52ad8dc..8e3e15e 100644 --- a/JY.Inspection/HomeForm.cs +++ b/JY.Inspection/HomeForm.cs @@ -1947,9 +1947,9 @@ namespace JY.Inspection Task.Run(() => { var resp = new MESDataCombin().PostProductArrivalStationData(req); - if (!resp.Success) + if (resp == null || !resp.Success) { - string errMsg = $"进站数据上传MES失败, 错误代码: {resp.Code}, 错误消息:{resp.Message}, 报错消息类型: {resp.Category}"; + string errMsg = $"进站数据上传MES失败, 错误代码: {resp?.Code}, 错误消息:{resp?.Message}, 报错消息类型: {resp?.Category}"; LogManagerControl.AddLog(errMsg, LogAddtype.MES, Logtype.Error); } }); @@ -1997,7 +1997,7 @@ namespace JY.Inspection { try { - FeedingDataService feedingService = IocConfig.Provider.GetService(); + FeedingDataService feedingService = (FeedingDataService)IocConfig.Provider.GetService(); List list = (List)obj; if (list != null) diff --git a/JY.Inspection/HomeForm.designer.cs b/JY.Inspection/HomeForm.designer.cs index f6b8a56..1ec56a5 100644 --- a/JY.Inspection/HomeForm.designer.cs +++ b/JY.Inspection/HomeForm.designer.cs @@ -2194,6 +2194,7 @@ namespace JY.Inspection this.button1.TabIndex = 51; this.button1.Text = "MEStest"; this.button1.UseVisualStyleBackColor = true; + this.button1.Visible = false; this.button1.Click += new System.EventHandler(this.button1_Click); // // contextMenuStrip1 diff --git a/JY.Inspection/HomeForm.resx b/JY.Inspection/HomeForm.resx index 010d2f5..547e077 100644 --- a/JY.Inspection/HomeForm.resx +++ b/JY.Inspection/HomeForm.resx @@ -331,7 +331,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAE - CgAAAk1TRnQBSQFMAgEBAwEAAZgBCAGYAQgBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CgAAAk1TRnQBSQFMAgEBAwEAAaABCAGgAQgBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA