From 93996822eca3fe2a3a7f310686fdc5553ec15d9a Mon Sep 17 00:00:00 2001 From: Frane Date: Wed, 29 Dec 2021 18:38:36 +0800 Subject: [PATCH] =?UTF-8?q?20211229=E4=B8=8E=E5=8D=9A=E6=99=9F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/BoSheng/BOSHENGMonitorService.cs | 17 ++++++++++++++--- SGGL/BLL/Common/Funs.cs | 22 +++++++++++++++++++--- SGGL/FineUIPro.Web/Login.aspx.cs | 2 +- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs b/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs index c157abac..196c9987 100644 --- a/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs +++ b/SGGL/BLL/BoSheng/BOSHENGMonitorService.cs @@ -43,7 +43,7 @@ namespace BLL /// /// Timer组件 /// 事件参数 - private static void AddData(object sender, ElapsedEventArgs e) + public static void AddData(object sender, ElapsedEventArgs e) { try { @@ -97,9 +97,20 @@ namespace BLL } else { - if (type == "1") + string OtherDepartId = obj["OtherDepartId"].ToString(); + var getPByCode= Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectCode == OtherDepartId); + if (getPByCode != null) { - projectId = AddProject(arr); + getPByCode.FromProjectId = fromprojectId; + Funs.DB.SubmitChanges(); + projectId = getPByCode.ProjectId; + } + else + { + if (type == "1") + { + projectId = AddProject(arr); + } } } diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index 4c799577..467b134f 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -559,7 +559,15 @@ namespace BLL { if (!String.IsNullOrEmpty(time)) { - return DateTime.Parse(time); + DateTime dateTime = DateTime.Parse(time); + if (dateTime.Year > 1753 && dateTime.Year < 9999) + { + return dateTime; + } + else + { + return null; + } } else { @@ -583,11 +591,19 @@ namespace BLL { if (!String.IsNullOrEmpty(time)) { - return DateTime.Parse(time); + DateTime dateTime = DateTime.Parse(time); + if (dateTime.Year > 1753 && dateTime.Year < 9999) + { + return dateTime; + } + else + { + return DateTime.Now; + } } else { - return System.DateTime.Now; + return DateTime.Now; } } catch (Exception ex) diff --git a/SGGL/FineUIPro.Web/Login.aspx.cs b/SGGL/FineUIPro.Web/Login.aspx.cs index a4ede7cc..b27a5d97 100644 --- a/SGGL/FineUIPro.Web/Login.aspx.cs +++ b/SGGL/FineUIPro.Web/Login.aspx.cs @@ -64,7 +64,7 @@ { if (!IsPostBack) { - BLL.CNCECHSSEWebService.getSupervise_SubUnitReport(); + // BOSHENGMonitorService.AddData(null,null); string userdata = Request.Params["basedata"]; if (!string.IsNullOrEmpty(userdata)) {