JLChen
2020-11-13 017af840d60fd6a56da9711308bf8239cb7fc1e6
HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs
@@ -64,7 +64,7 @@
        {
            var result = false;
            ResponsePack responePack = new HttpServerRequest().GetResidenceMemberAccount();
            if (responePack.StateCode.ToUpper() == "SUCCESS")
            if (responePack.StateCode.ToUpper() == HttpUtil.SUCCESS_CODE)
            {
                var responeObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.ResponseData.ToString());
                foreach (var mInfo in responeObj)
@@ -75,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)
                    {
@@ -130,7 +137,7 @@
                    var tip = new Tip()
                    {
                        Text = tipStr,
                        CloseTime = 3,
                        CloseTime = 1,
                        Direction = AMPopTipDirection.None
                    };
                    tip.Show(bodyView);
@@ -150,7 +157,7 @@
        void LoadMethod_GetMemberSharedDataList(ResidenceMemberInfo info)
        {
            ResponsePack responePack = new HttpServerRequest().GetShareDataByMemberAccount(info.SubAccountDistributedMark);
            if (responePack.StateCode.ToUpper() == "SUCCESS")
            if (responePack.StateCode.ToUpper() == HttpUtil.SUCCESS_CODE)
            {
                var responeObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ShareData>>(responePack.ResponseData.ToString());
                info.CurResidenceShareDate = responeObj;
@@ -168,7 +175,7 @@
        bool LoadMethod_GetMemberSharedData(ShareData sd)
        {
            ResponsePack responePack = new HttpServerRequest().GetShareData(sd.DistributedMark,sd.HouseDistributedMark);
            if (responePack.StateCode.ToUpper() == "SUCCESS")
            if (responePack.StateCode.ToUpper() == HttpUtil.SUCCESS_CODE)
            {
                sd.ShareDataBytes =  Newtonsoft.Json.JsonConvert.DeserializeObject<ShareData>(responePack.ResponseData.ToString()).ShareDataBytes;
                return true;
@@ -189,7 +196,7 @@
                    {
                        new Tip()
                        {
                            CloseTime = 3,
                            CloseTime = 1,
                            Text = Language.StringByID(StringId.NicknameCannotBeEmpty),
                            Direction = AMPopTipDirection.None,
                        }.Show(bodyView);
@@ -203,7 +210,7 @@
                        try
                        {
                            var responsePack = new HttpServerRequest().EditSubAccountNickName(str,mInfo.SubAccountDistributedMark);
                            if (responsePack.StateCode.ToUpper() == "SUCCESS")
                            if (responsePack.StateCode.ToUpper() == HttpUtil.SUCCESS_CODE)
                            {
                                Application.RunOnMainThread(() =>
                                {
@@ -228,7 +235,7 @@
                                    var tip = new Tip()
                                    {
                                        Text = tipStr,
                                        CloseTime = 3,
                                        CloseTime = 1,
                                        Direction = AMPopTipDirection.None
                                    };
                                    tip.Show(bodyView);
@@ -253,7 +260,6 @@
            };
            btn1.MouseUpEventHandler = eventHandler;
            btn2.MouseUpEventHandler = eventHandler;
        }
        /// <summary>
@@ -268,7 +274,7 @@
                    try
                    {
                        var responsePack = new HttpServerRequest().ChangeCreateSceneState(DB_ResidenceData.residenceData.residecenInfo.RegionID, mInfo.SubAccountDistributedMark);
                        if (responsePack.StateCode.ToUpper() == "SUCCESS")
                        if (responsePack.StateCode.ToUpper() == HttpUtil.SUCCESS_CODE)
                        {
                            Application.RunOnMainThread(() =>
                            {
@@ -292,7 +298,7 @@
                                var tip = new Tip()
                                {
                                    Text = tipStr,
                                    CloseTime = 3,
                                    CloseTime = 1,
                                    Direction = AMPopTipDirection.None
                                };
                                tip.Show(bodyView);
@@ -317,6 +323,5 @@
            btn2.MouseUpEventHandler = eventHandler;
        }
    }
}