From 673a93f4ed742a10a879a67b616e6646b03ef0fb Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 15 九月 2020 17:14:27 +0800
Subject: [PATCH] 202009151
---
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs | 74 ++++++++++++++----------------------
1 files changed, 29 insertions(+), 45 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs
index d5861b6..5e9e8e3 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs
@@ -17,7 +17,6 @@
}
-
/// <summary>
/// 鍔犺浇鑾峰彇浣忓畢瀛愯处鍙蜂俊鎭嚎绋�
/// </summary>
@@ -52,24 +51,6 @@
waitPage = null;
}
});
-
-#if DEBUG
- residenceMemberInfos.Add(new ResidenceMemberInfo()
- {
- Account = "娴嬭瘯鏁版嵁-璐﹀彿",
- UserName = "娴嬭瘯鏁版嵁-鐢ㄦ埛鍚�",
- Nickname = "娴嬭瘯鏁版嵁-鏄电О",
- SubAccountDistributedMark = Guid.NewGuid().ToString(),
- DistributedMark = Guid.NewGuid().ToString(),
- AccountType = 0,
- IsAllowRemoteCtrl = false,
- });
- Application.RunOnMainThread(() =>
- {
- LoadMemberRow();
- });
-#endif
-
}
})
{ IsBackground = true };
@@ -94,13 +75,20 @@
try
{
var headImageString = dataStr.GetValue("HeadImage").ToString();
- var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(headImageString);
- var headImageBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<byte[]>(jsonString);
- var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", mInfo.DistributedMark + ".png");
- fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
- fs.Write(headImageBytes, 0, headImageBytes.Length);
- fs.Flush();
- mInfo.headImagePagePath = filePath;
+ if (!string.IsNullOrEmpty(headImageString))
+ {
+ var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(headImageString);
+ var headImageBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<byte[]>(jsonString);
+ var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", mInfo.DistributedMark + ".png");
+ fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
+ fs.Write(headImageBytes, 0, headImageBytes.Length);
+ fs.Flush();
+ mInfo.headImagePagePath = filePath;
+ }
+ if(string.IsNullOrEmpty(mInfo.Nickname))
+ {
+ mInfo.Nickname = mInfo.UserName;
+ }
}
catch (Exception ex)
{
@@ -112,7 +100,7 @@
{
fs.Close();
}
- //-----------
+ //-----------鑾峰彇浣忓畢涓嬪瓙璐﹀彿鐨勫叡浜暟鎹垪琛�
LoadMethod_GetMemberSharedDataList(mInfo);
}
residenceMemberInfos.Add(mInfo);
@@ -149,7 +137,7 @@
var tip = new Tip()
{
Text = tipStr,
- CloseTime = 3,
+ CloseTime = 1,
Direction = AMPopTipDirection.None
};
tip.Show(bodyView);
@@ -157,7 +145,7 @@
}
Application.RunOnMainThread(() =>
{
- waitPage.Hide();
+ waitPage?.Hide();
});
return result;
}
@@ -172,29 +160,27 @@
if (responePack.StateCode.ToUpper() == "SUCCESS")
{
var responeObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ShareData>>(responePack.ResponseData.ToString());
- info.sharedDatas = responeObj;
- var sd = responeObj.Find((obj) => obj.HouseDistributedMark == DB_ResidenceData.residenceData.residecenInfo.RegionID );
- if (sd != null)
+ info.CurResidenceShareDate = responeObj;
+ foreach (var sd in info.CurResidenceShareDate)
{
- LoadMethod_GetMemberSharedData(sd,info);
- }
- else
- {
- LoadMethod_GetMemberSharedData(new ShareData(),info);
+ LoadMethod_GetMemberSharedData(sd);
}
}
}
+
/// <summary>
/// 鑾峰彇浣忓畢涓嬪瓙璐﹀彿鐨勫叡浜暟鎹�
/// </summary>
/// <param name="info"></param>
- void LoadMethod_GetMemberSharedData(ShareData sd, ResidenceMemberInfo info)
+ bool LoadMethod_GetMemberSharedData(ShareData sd)
{
ResponsePack responePack = new HttpServerRequest().GetShareData(sd.DistributedMark,sd.HouseDistributedMark);
if (responePack.StateCode.ToUpper() == "SUCCESS")
{
- info.CurShareData = Newtonsoft.Json.JsonConvert.DeserializeObject<ShareData>(responePack.ResponseData.ToString());
+ sd.ShareDataBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<ShareData>(responePack.ResponseData.ToString()).ShareDataBytes;
+ return true;
}
+ return false;
}
/// <summary>
@@ -210,7 +196,7 @@
{
new Tip()
{
- CloseTime = 3,
+ CloseTime = 1,
Text = Language.StringByID(StringId.NicknameCannotBeEmpty),
Direction = AMPopTipDirection.None,
}.Show(bodyView);
@@ -249,7 +235,7 @@
var tip = new Tip()
{
Text = tipStr,
- CloseTime = 3,
+ CloseTime = 1,
Direction = AMPopTipDirection.None
};
tip.Show(bodyView);
@@ -270,11 +256,10 @@
})
{ IsBackground = true }.Start();
};
- new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceName, DB_ResidenceData.residenceData.residecenInfo.Name, callBack, StringId.HouseNameCannotBeEmpty, 0, new List<string>());
+ new PublicAssmebly().LoadDialog_EditParater(StringId.ModifyMemberNickname, mInfo.Nickname, callBack, StringId.HouseNameCannotBeEmpty, 0, new List<string>());
};
btn1.MouseUpEventHandler = eventHandler;
btn2.MouseUpEventHandler = eventHandler;
-
}
/// <summary>
@@ -313,7 +298,7 @@
var tip = new Tip()
{
Text = tipStr,
- CloseTime = 3,
+ CloseTime = 1,
Direction = AMPopTipDirection.None
};
tip.Show(bodyView);
@@ -338,6 +323,5 @@
btn2.MouseUpEventHandler = eventHandler;
}
-
}
}
\ No newline at end of file
--
Gitblit v1.8.0