public MainWindow() { InitializeComponent(); MainWindowInstance = this; if (GlobalInfo.ExistTax) { lblNsrInfo.Visibility = Visibility.Hidden; panelNsrInfo.Visibility = Visibility.Visible; tbNsrsbh.Text = GlobalInfo.NSRSBH; CryptTool.UserPin = GlobalInfo.JxPwd; CryptTool.getThisCert(); tbNsrmc.Text = CryptTool.Nsrmc;// "北京聚达创通科技有限公司"; GlobalInfo.NSRMC = CryptTool.Nsrmc; } else { GlobalInfo.NSRSBH = "0"; GlobalInfo.FJH = "0"; GlobalInfo.orgCode = "0"; lblNsrInfo.Visibility = Visibility.Visible; panelNsrInfo.Visibility = Visibility.Hidden; lblNsrInfo.Content = PRO_ReceiptsInvMgr.Resources.Message.NotConnTaxDisk; } }
private void DoSetUserName() { if (string.IsNullOrEmpty(pwd.Password)) { MessageBoxEx.Show(this, PRO_ReceiptsInvMgr.Resources.Message.PwdNotEmpty, PRO_ReceiptsInvMgr.Resources.Message.Tips, MessageBoxExButtons.OK, MessageBoxExIcon.Error); return; } CryptTool.ErrorMsg = string.Empty; CryptTool.UserPin = pwd.Password; CryptTool.getThisCert(); if (string.IsNullOrEmpty(CryptTool.ErrorMsg)) { txtNsrsbh.Text = CryptTool.Nsrsbh; txtNsrName.Text = CryptTool.Nsrmc; pwd.IsEnabled = false; } else { MessageBoxEx.Show(this, CryptTool.ErrorMsg, PRO_ReceiptsInvMgr.Resources.Message.Tips, MessageBoxExButtons.OK, MessageBoxExIcon.Error); } }
private void DoSetUserName() { // if (string.IsNullOrEmpty(tbTaxKey.Password)) // { // MessageBoxEx.Show(this, PRO_ReceiptsInvMgr.Resources.Message.PwdNotEmpty, PRO_ReceiptsInvMgr.Resources.Message.Tips, MessageBoxExButtons.OK, MessageBoxExIcon.Error); // return; // } CryptTool.ErrorMsg = string.Empty; CryptTool.UserPin = tbTaxKey.Password; CryptTool.getThisCert(); if (string.IsNullOrEmpty(CryptTool.ErrorMsg)) { tbRegNsrsbh.Text = CryptTool.Nsrsbh; tbRegNsrmc.Text = CryptTool.Nsrmc; tbTaxKey.IsEnabled = false; } else { MessageBoxEx.Show(this, CryptTool.ErrorMsg, PRO_ReceiptsInvMgr.Resources.Message.Tips, MessageBoxExButtons.OK, MessageBoxExIcon.Error); } }