diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.cshtml index e301eccc8..84a52248d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.cshtml @@ -25,7 +25,7 @@
-
+
 查阅  指定接收人  删除 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/SelectForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/SelectForm.js index 6a8274788..a09dad593 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/SelectForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/SelectForm.js @@ -232,7 +232,9 @@ var bootstrap = function ($, learun) { postitem.text += ","; } if (userlistselected[i] != 'null') { - postitem.text += userlistselectedobj[userlistselected[i]].F_RealName; + if (userlistselectedobj[userlistselected[i]]) { + postitem.text += userlistselectedobj[userlistselected[i]].F_RealName; + } } } callBack(postitem, dfopid); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Common/Timeout.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Common/Timeout.cs new file mode 100644 index 000000000..bbcda7fcb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Common/Timeout.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Learun.Util.Common +{ + public delegate bool DoHandler(); + + public class Timeout + { + private ManualResetEvent mTimeoutObject; + //标记变量 + private bool mBoTimeout; + + public DoHandler Do; + + public Timeout() + { + // 初始状态为 停止 + this.mTimeoutObject = new ManualResetEvent(true); + } + /// + /// 指定超时时间 异步执行某个方法 + /// + ///执行 是否超时 + public bool DoWithTimeout(TimeSpan timeSpan) + { + if (this.Do == null) + { + return false; + } + this.mTimeoutObject.Reset(); + this.mBoTimeout = true; //标记 + this.Do.BeginInvoke(DoAsyncCallBack, null); + // 等待 信号Set + if (!this.mTimeoutObject.WaitOne(timeSpan, false)) + { + this.mBoTimeout = true; + } + return this.mBoTimeout; + } + /// + /// 异步委托 回调函数 + /// + /// + private void DoAsyncCallBack(IAsyncResult result) + { + try + { + //this.Do.EndInvoke(result); + //// 指示方法的执行未超时 + //this.mBoTimeout = false; + + + this.mBoTimeout = this.Do.EndInvoke(result); + } + catch (Exception ex) + { + this.mBoTimeout = true; + } + finally + { + this.mTimeoutObject.Set(); + } + } + } + +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Learun.Util.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Learun.Util.csproj index d5d72d7fd..46817a3c1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Learun.Util.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Learun.Util.csproj @@ -88,6 +88,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.WebLicense/LicenseChecker.cs b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.WebLicense/LicenseChecker.cs index 962473ae6..b1be01c7b 100644 --- a/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.WebLicense/LicenseChecker.cs +++ b/Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.WebLicense/LicenseChecker.cs @@ -6,10 +6,12 @@ using System.Net; using System.Text; using System.Threading.Tasks; using Learun.Util; +using Learun.Util.Common; using Newtonsoft.Json; namespace Quanjiang.DigitalScholl.WebLicense { + public class LicenseStatus { public bool Result { get; set; } @@ -42,7 +44,6 @@ namespace Quanjiang.DigitalScholl.WebLicense } } - public static LicenseStatus CheckLicense() { StreamReader sr = null; @@ -53,8 +54,14 @@ namespace Quanjiang.DigitalScholl.WebLicense - var maResult = GetMAManagementInfo(); - if (!maResult) + Timeout timeout = new Timeout(); + timeout.Do = GetMAManagementInfo; + bool bo = timeout.DoWithTimeout(new TimeSpan(0, 0, 0, 2)); + + + + //var maResult = GetMAManagementInfo(); + if (!bo) { ls.Message = "未授权"; return ls;