| | |
| | | |
| | | } |
| | | |
| | | void ShowDelHomeErrorInfo (string stateCodeStr) |
| | | { |
| | | string mes = ""; |
| | | if (stateCodeStr == "NoLogin") { |
| | | mes = ErrorCode.NoLogin; |
| | | } else if (stateCodeStr == "CurrentHomeExixtsGatewayBind") { |
| | | mes = ErrorCode.CurrentHomeExixtsGatewayBind; |
| | | } else if (stateCodeStr == ErrorCode.NetworkError) { |
| | | mes = ErrorCode.NetworkError; |
| | | } else { |
| | | //RequestServerFailed |
| | | //mes = ErrorCode.AddFailed; |
| | | mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr; |
| | | |
| | | } |
| | | if (!string.IsNullOrEmpty (mes)) { |
| | | Application.RunOnMainThread (() => { |
| | | new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 启动本地模式 |
| | |
| | | } |
| | | |
| | | |
| | | void ShowAddHomeErrorInfo (string stateCodeStr) { |
| | | string mes = ""; |
| | | if (stateCodeStr == "NoLogin") { |
| | | mes = ErrorCode.NoLogin; |
| | | } else if (stateCodeStr == "Exist") { |
| | | mes = ErrorCode.NameExist; |
| | | } else if (stateCodeStr == ErrorCode.NetworkError) { |
| | | mes = ErrorCode.NetworkError; |
| | | } else { |
| | | //RequestServerFailed |
| | | //mes = ErrorCode.AddFailed; |
| | | mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr; |
| | | |
| | | |
| | | } |
| | | if (!string.IsNullOrEmpty (mes)) { |
| | | Application.RunOnMainThread (() => { |
| | | new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 响应状态码: |
| | | //(1)Success 则 [调用此接口操作成功], ResponseData则为null |
| | | //(2)ParameterOrEmpty,则响应字段中 [ErrorInfo] 为错误信息, ResponseData则为null |
| | | //(3)NoLogin,则响应字段中 [ErrorInfo] 为错误信息为 [无效登录Token!] |
| | | //(5)NoRecord,,则响应字段中 [ErrorInfo] 为错误信息为 [未到相关记录, 请确认您提交参数是否正确] |
| | | //(6)Exist,则响应字段中 [ErrorInfo] 为错误信息为 [当前提交的的住宅:XXXX,名称已存在!] |
| | | //(7)NoPermission,则响应字段中 [ErrorInfo] 为错误信息为 [您并不具有此分享者此住宅的权限!] |
| | | //(8)InsufficientAuthority,则响应字段中 [ErrorInfo] 为错误信息为 [您并不具有此分享者此住宅的完全控制权限!] |
| | | //(9)HomeIdAndTokenNoConsistent,则响应字段中 [ErrorInfo] 为错误信息为 [您当前Token与你当前控制的HomeId不一致!] |
| | | //(10)NoPermission,则响应字段中 [ErrorInfo] 为错误信息为 [XXX] |
| | | /// </summary> |
| | | /// <param name="stateCodeStr"></param> |
| | | void ShowEditHomeErrorInfo (string stateCodeStr) |
| | | { |
| | | string mes = ""; |
| | | if (stateCodeStr == "NoLogin") { |
| | | mes = ErrorCode.NoLogin; |
| | | } else if (stateCodeStr == "Exist") { |
| | | mes = ErrorCode.NameExist; |
| | | } else if (stateCodeStr == "HomeIdAndTokenNoConsistent") { |
| | | mes = ErrorCode.HomeIdAndTokenNoConsistent; |
| | | } else if (stateCodeStr == ErrorCode.NetworkError) { |
| | | mes = ErrorCode.NetworkError; |
| | | } else { |
| | | //RequestServerFailed |
| | | //mes = ErrorCode.AddFailed; |
| | | mes = ErrorCode.OperationFailed + ErrorCode.Reason + stateCodeStr; |
| | | |
| | | } |
| | | if (!string.IsNullOrEmpty (mes)) { |
| | | Application.RunOnMainThread (() => { |
| | | new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |