From 5ea6aa8ea047d4d7b6137fa86c03109aeb1b67ff Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 18 十二月 2020 18:03:18 +0800
Subject: [PATCH] Merge branch 'CJL' into NewFilePath

---
 HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPage.cs |   77 ++++++++++++++++++++------------------
 1 files changed, 40 insertions(+), 37 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPage.cs
index 172eb57..b47c385 100755
--- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPage.cs
@@ -31,44 +31,53 @@
 
         ResidenceMemberInfo memberInfo;
 
-        Room room;
-
-        Action<string> refreshFunctionCount;
+        /// <summary>
+        /// 褰撳墠鐨勬埧闂磖oomId
+        /// 濡傛灉涓虹┖锛屽垯浠h〃绠$悊鏃犲垎閰嶅尯鍩熺殑鍔熻兘鍒嗕韩
+        /// </summary>
+        string roomId;
+        /// <summary>
+        /// 鎴块棿鎵�鏈夊姛鑳藉垪琛�
+        /// </summary>
+        List<Function> roomFunctionList = new List<Function>();
 
         /// <summary>
-        /// 涔嬪墠鐨勫垎浜垪琛�
+        /// 鍒锋柊鍥炶皟Action
         /// </summary>
-        List<ShareData> funs;
+        Action refreshAction;
+        /// <summary>
+        /// 褰撳墠璐﹀彿鐨勬墍鏈夊垎浜垪琛�
+        /// </summary>
+        List<ShareData> curResidenceShareData;
         /// <summary>
         /// 灞炰簬褰撳墠鎴块棿鏈�缁堢殑璁惧鍒嗕韩鍒楄〃
         /// </summary>
-        List<ShareData> funs_New;
+        List<ShareData> funs_RoomAll;
+        //shareDataList = new List<ShareData>();
         /// <summary>
         /// 鍒犻櫎鐨勫垎浜垪琛�
         /// </summary>
         List<ShareData> funs_Del;
 
-        public MemberFunctionPermissionPage(ResidenceMemberInfo mInfo, Room r, Action<string> action)
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="mInfo"></param>
+        /// <param name="roomFunctionList"></param>
+        /// <param name="roomId"></param>
+        /// <param name="refreshAction"></param>
+        public MemberFunctionPermissionPage(ResidenceMemberInfo mInfo, List<Function> roomFunctionList, List<ShareData> funs_RoomAll, string roomId, Action refreshAction)
         {
             bodyView = this;
-            memberInfo = mInfo;
-            room = r;
-            funs = new List<ShareData>();
-            funs = memberInfo.CurResidenceShareDate;
-            funs_New = new List<ShareData>();
-            funs_Del = new List<ShareData>();
-
-            refreshFunctionCount = action;
-        }
-
-        public MemberFunctionPermissionPage(Room r,List<ShareData> sd)
-        {
-            bodyView = this;
-            room = r;
-            funs = new List<ShareData>();
-            funs_New = sd;
-            funs_Del = new List<ShareData>();
-            memberInfo = new ResidenceMemberInfo();
+            this.memberInfo = mInfo;
+            this.roomFunctionList = roomFunctionList;
+            this.roomId = roomId;
+            //this.curResidenceShareData = new List<ShareData>();
+            this.curResidenceShareData = memberInfo.CurResidenceShareData;
+            this.funs_RoomAll = new List<ShareData>();
+            this.funs_RoomAll.AddRange(funs_RoomAll);
+            this.funs_Del = new List<ShareData>();
+            this.refreshAction = refreshAction;
         }
 
         public void LoadPage(int tId)
@@ -132,7 +141,7 @@
                 BackgroundColor = CSS_Color.MainColor,
                 TextAlignment = TextAlignment.Center,
                 TextColor = CSS_Color.MainBackgroundColor,
-                TextID = titleId == StringId.PermissionToUse ? StringId.Confirm : StringId.Shared,
+                TextID = titleId == StringId.MemberPermissionManagement ? StringId.Confirm : StringId.Shared,
                 TextSize = CSS_FontSize.SubheadingFontSize,
                 IsBold = true,
                 Radius = (uint)Application.GetRealWidth(22),
@@ -141,23 +150,17 @@
             };
             bodyView.AddChidren(btnOption);
 
-            if(titleId == StringId.PermissionToUse)
-            {
-                LoadFunctionRow(funs);
-            }
-            else
-            {
-                LoadFunctionRow(funs_New);
-            }
+            LoadFunctionRow(funs_RoomAll);
+          
             LoadEventList();
         }
         /// <summary>
         /// 鍔犺浇鍔熻兘鍒楄〃
         /// </summary>
-        void LoadFunctionRow(List<ShareData>  shareDatas)
+        void LoadFunctionRow(List<ShareData> shareDatas)
         {
             contentView.RemoveAll();
-            foreach (var function in room.GetRoomFunctions(false))
+            foreach (var function in roomFunctionList)
             {
                 var roomView = new FrameLayout()
                 {
@@ -195,7 +198,7 @@
                 {
                     btnChoose.IsSelected = true;
                     //鍒锋柊灞炰簬褰撳墠鎴块棿鐨勫垎浜粺璁�
-                    funs_New.Add(shareData);
+                    //funs_New.Add(shareData);
                 }
                 else
                 {

--
Gitblit v1.8.0