From eb51679c618d5027070fbd6f3c0519f0f17e7d7d Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 23 十一月 2020 10:07:53 +0800 Subject: [PATCH] Merge branch 'CJL' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into CJL --- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs | 65 ++++++-------------------------- 1 files changed, 13 insertions(+), 52 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..0bf95fc 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,9 +43,9 @@ { try { - var responsePack = new DAL.Server.HttpServerRequest().EditResidenceInfo(); + var responsePack = new HttpServerRequest().EditResidenceInfo(0, str); - if (responsePack.StateCode.ToUpper() == "SUCCESS") + if (responsePack.Code.ToUpper() == StateCode.SUCCESS) { Application.RunOnMainThread(() => { @@ -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