From 52e05a5fb6e07afbb14960fc3cbb8a8971e19eb2 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 25 十一月 2020 20:08:56 +0800 Subject: [PATCH] 2020-11-25 1.TOKEN过期刷新处理 --- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs | 67 +++++++-------------------------- 1 files changed, 14 insertions(+), 53 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs index 8f6eb16..86d3e94 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs @@ -1,5 +1,6 @@ 锘縰sing System; using System.Collections.Generic; +using HDL_ON.DAL.Server; using HDL_ON.Entity; using Shared; @@ -34,7 +35,7 @@ }.Show(bodyView); return; } - DB_ResidenceData.residenceData.residecenInfo.Name = str; + //DB_ResidenceData.residenceData.residecenInfo.Name = str; var waitPage = new Loading(); waitPage.Start(Language.StringByID(StringId.PleaseWait)); @@ -42,13 +43,13 @@ { try { - var responsePack = new DAL.Server.HttpServerRequest().EditResidenceInfo(); + var responsePack = new HttpServerRequest().EditResidenceInfo(0, str); - if (responsePack.StateCode.ToUpper() == "SUCCESS") + if (responsePack.Code == StateCode.SUCCESS) { Application.RunOnMainThread(() => { - //MainPage.LoginUser.regionList.Find((obj) => obj.Name == btnResidenceName.Text.Trim()).Name = str; + // UserInfo.Current.regionList.Find((obj) => obj.Name == btnResidenceName.Text.Trim()).Name = str; btnResidenceName.Text = str; upateResidenceName(); }); @@ -57,27 +58,7 @@ } else { - var tipStr = "Server erorr"; - switch (responsePack.StateCode) - { - case "NoLogin": - tipStr = Language.StringByID(StringId.InvalidLoginCertificate); - break; - case "ParameterOrEmpty": - - break; - } - Application.RunOnMainThread(() => - { - //鎻愮ず鍘熷洜 - var tip = new Tip() - { - Text = tipStr, - CloseTime = 1, - Direction = AMPopTipDirection.None - }; - tip.Show(bodyView); - }); + IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code); } } @@ -105,49 +86,29 @@ /// </summary> void LoadEvent_EditResidencAddress() { -#if stage2 EventHandler<MouseEventArgs> eventHandler = (sender, e) => { Action<string> callBack = (str) => { - DB_ResidenceData.residenceData.residecenInfo.Address = str; - var responsePack = new DAL.Server.HttpServerRequest().EditResidenceInfo(); + + var responsePack = new DAL.Server.HttpServerRequest().EditResidenceInfo(1 , str); - if (responsePack.StateCode.ToUpper() == "SUCCESS") + if (responsePack.Code.ToUpper() == StateCode.SUCCESS) { btnResidenceAddress.Text = str; - OnAppConfig.Instance.SaveUserConfig(); + DB_ResidenceData.residenceData.residecenInfo.Address = str; + DB_ResidenceData.residenceData.SaveResidenceData(); + //OnAppConfig.Instance.SaveUserConfig(); } else { - var tipStr = "Server erorr"; - switch (responsePack.StateCode) - { - case "NoLogin": - tipStr = Language.StringByID(StringId.InvalidLoginCertificate); - break; - case "ParameterOrEmpty": - - break; - } - Application.RunOnMainThread(() => - { - //鎻愮ず鍘熷洜 - var tip = new Tip() - { - Text = tipStr, - CloseTime = 1, - Direction = AMPopTipDirection.None - }; - tip.Show(bodyView); - }); + IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code); } }; - new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceAddress, DB_ResidenceData.residenceData.residecenInfo.Name, callBack,StringId.HouseAddressCannotBeEmpty,0,new List<string>()); + new PublicAssmebly().LoadDialog_EditParater(StringId.ResidenceAddress, DB_ResidenceData.residenceData.residecenInfo.Name, callBack, StringId.HouseAddressCannotBeEmpty, 0, new List<string>()); }; btnResidenceAddress.MouseUpEventHandler = eventHandler; btnLocationAddressIcon.MouseUpEventHandler = eventHandler; -#endif } /// <summary> -- Gitblit v1.8.0