Exemplo n.º 1
0
        private void lsDone_DoubleClick(object sender, EventArgs e)
        {
            if (lsDone.SelectedItems.Count < 1)
            {
                return;
            }
            ListViewItem act_item = lsDone.SelectedItems[0];
            CheRequest   req      = (CheRequest)act_item.Tag;

            if (req != null)
            {
                if (MessageBox.Show("重新打印已打印记录", "重新打印", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
                {
                    return;
                }
                int res;
                if ((res = NewShuiKongInterface.SendRecipt(req)) != 0)
                {
                    MessageBox.Show(String.Format("税控脚本执行错误,错误码:{0:d} {1:s}", res, NewShuiKongInterface.getLastError()));
                    lbskStatus.Text = "最近操作:" + NewShuiKongInterface.getLastError();
                }
                else
                {
                    lbskStatus.Text = "最近操作:成功";
                }
            }
        }
Exemplo n.º 2
0
        public fmReqList(String[] args)
        {
            log = new fmLog();
            this.AddOwnedForm(log);
            InitializeComponent();
            if (args.Length >= 2)
            {
                mClientId = args[0];
                mWebClient.UploadStringCompleted += new UploadStringCompletedEventHandler(RecUploadDone);
                mWebClient.Encoding = System.Text.Encoding.UTF8;
                base_url            = args[1] + "uploadrec?client_id=" + mClientId;
            }
            if (NewShuiKongInterface.init() != 0)
            {
                MessageBox.Show("税控脚本初始化失败 " + NewShuiKongInterface.getLastError());
            }

            /*ShuiKongFactory.init();
             * if (ShuiKongFactory.DetectShuiKong() == true) {
             *  this.lbskStatus.Text = "税控状态:连接中";
             * }*/
        }
Exemplo n.º 3
0
        private void lsReqs_DoubleClick(object sender, EventArgs e)
        {//note other functions call it directly, don't use sender or e
            if (lsReqs.SelectedItems.Count < 1)
            {
                return;
            }
            ListViewItem act_item = lsReqs.SelectedItems[0];
            CheRequest   req      = (CheRequest)act_item.Tag;

            if (req != null)
            {
                int res;
                if ((res = NewShuiKongInterface.SendRecipt(req)) != 0)
                {
                    MessageBox.Show(String.Format("税控脚本执行错误,错误码:{0:d} {1:s}", res, NewShuiKongInterface.getLastError()));
                    lbskStatus.Text = "最近操作:" + NewShuiKongInterface.getLastError();
                }
                else
                {
                    CheDaoFactory.Handle_Internal_Package(CheDaoInterface.print_confirm, Encoding.UTF8.GetBytes(req.Order_Number));
                    lbskStatus.Text = "最近操作:成功";
                }
            }
        }