From a19e58425e44c8a83c3d1b23de292659c38a6b1e Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期一, 05 六月 2023 14:09:20 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wjc --- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 110 insertions(+), 9 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs index 5cb1eb4..dc72414 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs @@ -1,4 +1,5 @@ 锘縰sing System; +using HDL_ON.DAL.Server; using HDL_ON.Entity; using HDL_ON.UI.CSS; using Shared; @@ -391,6 +392,83 @@ }; transferRow.AddChidren(btnTrasferSkinIcon); #endregion + + LoadEvent_SkipAdminMigrationConfirmPage(); + LoadEvent_SkipTransferConfirmPage(); + + + + var btnRollBack = new Button() + { + Y = Application.GetRealHeight(623), + Height = Application.GetRealHeight(50), + TextAlignment = TextAlignment.Center, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.AuxiliaryColor2, + TextID = StringId.RollBack, + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + bodyView.AddChidren(btnRollBack); + + if (MainPage.Increase) + { + btnRollBack.Y = Application.GetRealHeight(613); + btnRollBack.Height = Application.GetRealHeight(50); + bodyView.AddChidren(new Button() { Y = Application.GetRealHeight(663), Height = Application.GetRealHeight(20), BackgroundColor = CSS_Color.MainBackgroundColor }); + } + btnRollBack.MouseUpEventHandler += (sender, e) => + { + Action okAction = () => + { + var waitPage = new Loading(); + this.AddChidren(waitPage); + waitPage.Start(""); + new System.Threading.Thread(() => { + try + { + var pack = Common.ApiUtlis.Ins.HttpRequest.RollBack(); + Application.RunOnMainThread(() => + { + if (pack != null) + { + if (pack.Code == StateCode.SUCCESS) + { + new PublicAssmebly().TipMsg(StringId.Tip, StringId.SuccessfullyUnboundTheResidence, () => + { + Common.ApiUtlis.Ins.HttpRequest.GetHomePager(); + }); + } + else + { + IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + } + } + }); + } + catch (Exception ex) + { + MainPage.Log($"浣忓畢鍥炴粴寮傚父锛歿ex.Message}"); + } + finally + { + Application.RunOnMainThread(() => + { + try + { + waitPage.Hide(); + waitPage.RemoveFromParent(); + waitPage = null; + } + catch { } + }); + } + }) + { IsBackground = true }.Start(); + }; + new ConfirmDialog().ShowDialog(StringId.Tip, StringId.RollBackTipMsg, okAction); + }; + + } #region 璋冭瘯鏉冮檺 @@ -446,17 +524,38 @@ { DB_ResidenceData.Instance.CurrentRegion.debugPerm = !DB_ResidenceData.Instance.CurrentRegion.debugPerm; btnCommissioningAuthoritySwitchIcon.IsSelected = DB_ResidenceData.Instance.CurrentRegion.debugPerm; + var waitPage = new Loading(); + bodyView.AddChidren(waitPage); + waitPage.Start(""); new System.Threading.Thread(() => { - new DAL.Server.HttpServerRequest().ChangeResidenceDebugPerm(DB_ResidenceData.Instance.CurrentRegion.debugPerm); + try + { + var pack = new DAL.Server.HttpServerRequest().ChangeResidenceDebugPerm(DB_ResidenceData.Instance.CurrentRegion.debugPerm); + if (pack != null) + { + if (pack.Code == DAL.Server.StateCode.SUCCESS) + { + DB_ResidenceData.Instance.CurrentRegion.debugStatus = DB_ResidenceData.Instance.CurrentRegion.debugPerm ? "SECONDARY_DEBUGGIN" : "Delivered"; + Application.RunOnMainThread(() => + { + bodyView.RemoveAll(); + LoadPage(); + }); + } + } + }catch(Exception ex) + { + Application.RunOnMainThread(() => { + waitPage.Hide(); + }); + } }) { IsBackground = true }.Start(); }; #endregion - LoadEvent_SkipAdminMigrationConfirmPage(); - LoadEvent_SkipTransferConfirmPage(); } //璋冭瘯瀹屾垚 鎵嶈兘鍔犺浇浜岀淮鐮� else if (DB_ResidenceData.Instance.CurrentRegion.deliverStatus == "WAIT_DELIVERED") @@ -530,26 +629,28 @@ switch (DB_ResidenceData.Instance.CurrentRegion.deliverStatus) { case "To_Be_Debugged"://寰呰皟璇� - btnHouseStatusTipTitle.Text += Language.StringByID(StringId.To_Be_Debugged); + btnHouseStatusTipTitle.Text += " : "+ Language.StringByID(StringId.To_Be_Debugged); break; case "Debugging"://璋冭瘯涓� - btnHouseStatusTipTitle.Text += Language.StringByID(StringId.Debugging); + btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.Debugging); break; case "INITIAL_TATE"://鍒濆鎬� - btnHouseStatusTipTitle.Text += Language.StringByID(StringId.INITIAL_TATE); + btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.INITIAL_TATE); break; case "ACCEPTANCE"://楠屾敹 - btnHouseStatusTipTitle.Text += Language.StringByID(StringId.ACCEPTANCE); + btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.ACCEPTANCE); + break; case "To_Be_Accepted"://寰呴獙鏀� - btnHouseStatusTipTitle.Text += Language.StringByID(StringId.To_Be_Accepted); + btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.To_Be_Accepted); break; default: - btnHouseStatusTipTitle.Text += Language.StringByID(StringId.INITIAL_TATE); + btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.INITIAL_TATE); break; } + #endregion -- Gitblit v1.8.0