From 6a4e41c3996f9f01ab0928e0397925242d3b63b4 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期三, 09 十二月 2020 15:34:18 +0800 Subject: [PATCH] 2020-12-0-1 --- HDL_ON/Entity/DB_ResidenceData.cs | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs index 5410f8b..d9e454b 100644 --- a/HDL_ON/Entity/DB_ResidenceData.cs +++ b/HDL_ON/Entity/DB_ResidenceData.cs @@ -30,6 +30,22 @@ else { var curRegion = UserInfo.Current.regionList.Find((obj) => obj.RegionID == CurReginID); + if (curRegion == null) + { + if (UserInfo.Current.regionList != null && UserInfo.Current.regionList.Count > 0) + { + CurReginID = UserInfo.Current.regionList[0].RegionID; + //鎭㈠澶囦唤 + HDLCommon.Current.RestoreHomeBackup(CurReginID); + + return UserInfo.Current.regionList[0]; + } + else + { + return new RegionInfoRes(); + } + } + //if (curRegion == null) //{ // CurReginID = UserInfo.Current.regionList[0].RegionID; @@ -271,7 +287,22 @@ public List<Room> Rooms = SpatialInfo.CurrentSpatial.RoomList; #region 鍔熻兘鏁版嵁 - public static FunctionList functionList = FunctionList.List; + static FunctionList _functionList; + public static FunctionList functionList + { + get + { + if (_functionList == null) + { + _functionList = FunctionList.List; + } + return _functionList; + } + set + { + _functionList = value; + } + } /// <summary> /// 鍒锋柊浣忓畢閲岄潰鐨勬悳绱㈣澶囩姸鎬� -- Gitblit v1.8.0