123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- using System;
- using System.Windows;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.IO;
- using System.Text.RegularExpressions;
- using Platform.Controls.ControlsHelper;
- using Platform.Library;
- using TellerSystem.Communication;
- using TellerSystem.Library.Ext.Function;
- using Platform.Common.RunningParameters;
- using TellerSystem.ServiceProxy.Ext.ServiceEntitys;
- using TellerSystem.Devices.Interface;
- using TellerSystem.Library.Ext.Variables;
- using TellerSystem.Controls.Ext.PrintsHelper;
- using TellerSystem.Library.Ext.TradeExtension;
- using TellerSystem.PrintTemplate.Extension;
- using System.Windows.Controls;
- using System.Printing;
- using Platform.Print;
- using TellerSystem.ServiceProxy.Ext.ServiceHelper;
- using System.Collections.Generic;
- using System.Drawing;
- using System.ComponentModel;
- using TellerSystem.ServiceProxy.Ext;
- using TellerSystem.Controls.Ext.ControlsHelper;
- using System.Diagnostics;
- using System.Text;
- using TellerSystem.ServiceProxy.Ext.WebAPI.Auth.Entity;
- using System.Net;
- using System.Net.Cache;
- using Newtonsoft.Json;
- using Newtonsoft.Json.Linq;
- using TellerSystem.Contract.Function;
-
- /******************************平台Dll*****************************/
-
- namespace TellerSystem.Controls.Ext.Controls
- {
- /// <summary>
- /// PhoneElement.xaml 的交互逻辑
- /// </summary>
- public partial class MobilePhoneCheckViewer
- {
- #region Ctor
-
- public MobilePhoneCheckViewer(string idno, string name, string phone)
- {
- _idCard = idno;
- _name = name;
- _phone = phone;
- InitializeComponent();
- Result = false;
- }
- private string _idCard;
- private string _name;
- private string _phone;
-
- private void TradePage_Loaded(object sender, RoutedEventArgs e)
- {
- /* 初始化界面逻辑,页面加载后执行*/
- zikrxm.Text = _name;
- zikrsjh.Text = _phone;
- zikrsfzh.Text = _idCard;
- isBr.SetItems(new Dictionary<string, string> { { "是", "1" }, { "否", "0" } });
- xxinfo.Height = 90;
- Window.GetWindow(this).Closing += (s1, e1) =>
- {
- e1.Cancel = !Result && this.TradeAPIs.ShowQuestionMessageBox("当前手机号码三要素查验未完成,确认继续业务?") != MessageBoxResult.Yes;
- };
- }
- #endregion
-
- private void btnBack_Click(object sender, RoutedEventArgs e)
- {
- this.Close();
- }
-
- private void btnCheck_Click(object sender, RoutedEventArgs e)
- {
- AICapacity.Resp resp = null;
- AICapacity.ExtData ext = new AICapacity.ExtData(this.CreateSerialNumber(), new Dictionary<string, string>
- {
- {"idno",_idCard},
- {"name",_name},
- {"phone",_phone},
- {"self","是"},
- });
- if (isBr.GetSelectedKey() == "否")
- {
- _name = hzxm.Text;
- _idCard = hzsfzh.Text;
- ext.ExtInfo["self"] = "否";
- ext.ExtInfo["other"] = bz.Text;
- ext.ExtInfo["oname"] = _name;
- ext.ExtInfo["oidno"] = _idCard;
- }
- this.OwnerContainer.ModalInvoke(new Action(() =>
- {
- resp = AICapacity.GetInstence().AIRequest2Universal("PhoneVerification"
- , new Dictionary<string, object>
- {
- {"IdCard",_idCard},
- {"Name",_name},
- {"Phone",_phone},
- }, ext);
- }), "正在手机号三要素核验中...");
- if (resp == null)
- {
- this.TradeAPIs.ShowErrorMessageBox("调用失败,请检查网络并重试!");
- return;
- }
- if (resp.HasError)
- {
- hdjg.Text = resp.ErrorMsg;
- yys.Text = string.Empty;
- }
- else
- {
- var dict = resp.Value("data.result.responseJson", new Dictionary<string, string> { });
- Result = dict["Result"] == "0";
- hdjg.Text = dict["Description"];
- yys.Text = dict["Isp"];
- }
- }
-
- public bool Result { get; private set; }
-
- private void isBr_LostFocus(object sender, RoutedEventArgs e)
- {
- if (isBr.GetSelectedValue() == "0")
- {
- bz.Visibility = tbbz.Visibility = tbhzxm.Visibility = hzxm.Visibility = tbhzsfzh.Visibility = hzsfzh.Visibility = Visibility.Visible;
- xxinfo.Height = 150;
- }
- else
- {
- bz.Visibility = tbbz.Visibility = tbhzxm.Visibility = hzxm.Visibility = tbhzsfzh.Visibility = hzsfzh.Visibility = Visibility.Collapsed;
- xxinfo.Height = 90;
- }
- }
- }
- }
-
-
-
-
|