| | |
| | | using System; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | |
| | | 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); |
| | | |
| | | 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) |
| | | { |
| | | 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); |
| | | }; |
| | | |
| | | 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 |
| | | |
| | | |