async void LoadSubAccounts() { try { var subAccounts = await _manager.GetSubAccounts(_user.Id); foreach (var item in subAccounts) { item.Password = TripleDES.Decrypt3DES(item.Password); item.PayPassword = TripleDES.Decrypt3DES(item.PayPassword); } dgvSubAccountList.DataSource = subAccounts; } catch (Exception ex) { MessageBox.Show(this, "获取用户小号信息失败!错误:" + ex.Message, "用户小号管理", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
void BindSubAccount() { stbTaoBaoAccount.SkinTxt.Text = _subAccount.TaoBaoAccount; stbTaoBaoPassword.SkinTxt.Text = TripleDES.Decrypt3DES(_subAccount.Password); stbTaoBaoPayPassword.SkinTxt.Text = TripleDES.Decrypt3DES(_subAccount.PayPassword); stbHomePage.SkinTxt.Text = _subAccount.HomePage; scbTaoBaoLevel.SelectedIndex = (_subAccount.Level ?? 1) - 1; scbConsumptionLevel.SelectedIndex = (_subAccount.ConsumptionLevel ?? 1) - 1; scbProvince.Text = _subAccount.Province; scbCity.Text = _subAccount.City; scbDistrict.Text = _subAccount.District; stbAge.SkinTxt.Text = _subAccount.Age.HasValue ? _subAccount.Age.Value.ToString() : string.Empty; if (_subAccount.Sex.HasValue) { scbSex.SelectedIndex = _subAccount.Sex.Value ? 0 : 1; } if (_subAccount.UpperLimitAmount.HasValue) { stbUpperLimitAmount.SkinTxt.Text = _subAccount.UpperLimitAmount.Value.ToString(); } if (_subAccount.UpperLimitNumber.HasValue) { stbUpperLimitNumber.SkinTxt.Text = _subAccount.UpperLimitNumber.Value.ToString(); } if (_subAccount.Commission.HasValue) { stbCommission.SkinTxt.Text = _subAccount.Commission.Value.ToString(); } stbShippingAddress.SkinTxt.Text = _subAccount.ShippingAddress; scbRealName.Checked = _subAccount.IsRealName; scbBindingMobile.Checked = _subAccount.IsBindingMobile; scbEnabled.Checked = _subAccount.IsEnabled; }
public ViewConfirmReceipt(IViewFactory viewFactory) { _viewFactory = viewFactory; InitializeComponent(); SetToMax(); timerInputKey.Tick += (sender, e) => { if (!webBrowser.Focused) { return; } string pwd = TripleDES.Decrypt3DES(ConfirmReceiptInfo.PayPassWord); foreach (char ch in pwd.ToUpper().ToCharArray()) { Keys keyCode = (Keys)ch; KeyBoardHook.Key(keyCode); } timerInputKey.Stop(); stbUrl.Visible = true; }; sbtnGoto.Click += (sender, e) => { webBrowser.Navigate(stbUrl.SkinTxt.Text); }; sbtnBrowserSet.Click += (sender, e) => { var view = _viewFactory.GetView <ViewBrowserSet>(); view.ShowDialog(this); webBrowser.Refresh(); }; sbtnInpuPassword.Click += (sender, e) => { string url = webBrowser.Url.ToString().ToLower(); if (url.IndexOf("trade") <= 0) { MessageBoxEx.Show(this, "\r\n 请求的地址错误! \r\n", "输入支付密码"); return; } if (url.IndexOf(ConfirmReceiptInfo.OrderNum) <= 0) { MessageBoxEx.Show(this, "\r\n 请求的订单号错误! \r\n", "输入支付密码"); return; } if (url.IndexOf("https://trade.taobao.com/trade/confirm_goods.htm") != 0 && url.IndexOf("https://trade.1688.com/order/trade_flow.htm") != 0 && url.IndexOf("https://trade.tmall.com/order/confirmgoods.htm") != 0) { MessageBoxEx.Show(this, "\r\n 请求的地址错误! \r\n", "输入支付密码"); return; } base.TopMost = true; stbUrl.Visible = false; timerInputKey.Start(); }; webBrowser.NewWindow3 += (sender, e) => { e.Cancel = true; webBrowser.Navigate(e.Url); }; }