From 4c17caa61bc3b0a05a2b303bccdfedfbf3853f6d Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 24 十一月 2020 15:58:10 +0800
Subject: [PATCH] 2020-11-24 1.优化登录界面失败提示。
---
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs | 65 +++++++-------------------------
1 files changed, 14 insertions(+), 51 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs
index 99ac86f..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);
}
}
@@ -109,40 +90,22 @@
{
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;
--
Gitblit v1.8.0