private void btnSureList_Click(object sender, EventArgs e)
        {
            int    iResult    = 0;
            string sResultMsg = "";

            MyTax.OpenCard();

            iResult    = MyTax.RetCode;
            sResultMsg = MyTax.RetMsg;

            if (iResult == 1011)
            {
                iInvLimit      = MyTax.InvLimit;
                sTaxCode       = MyTax.TaxCode;
                sMachineNo     = MyTax.MachineNo;
                iIsInvEmpty    = MyTax.IsInvEmpty;
                iIsRepReached  = MyTax.IsRepReached;
                iIsLockReached = MyTax.IsLockReached;

                //查询库存发票
                MyTax.InfoKind = iInfoKind;
                MyTax.GetInfo();

                sInfoTypeCode = MyTax.InfoTypeCode;
                iInfoNumber   = MyTax.InfoNumber;
                iInvStock     = MyTax.InvStock;
                dTaxClock     = MyTax.TaxClock;


                lblNote.Text = "本单位税号:" + sTaxCode + "开票机号码:" + sMachineNo.ToString() + "发票库存:" + iInvStock.ToString();
                lblInfo.Text = "开票限额:" + iInvLimit.ToString() + (iIsInvEmpty == 0 ? ",金税卡无票可开" : ",金税卡有票可开") + (iIsRepReached == 0 ? ",未到抄税期" : ",已到抄税期") + (iIsLockReached == 0 ? ",未到锁死期" : ",已到锁死期");

                btnCloseCard.Enabled = true;
                btnSureList.Enabled  = false;
                txtBseqId.Enabled    = true;

                btnCancled.Enabled   = true;
                btnInvPrint.Enabled  = true;
                btnListPrint.Enabled = true;
                btnQuery.Enabled     = true;
                cbbInvType.Enabled   = false;
            }
            else
            {
                MessageBox.Show(sResultMsg);
            }
        }
Exemple #2
0
        public void OpenCard()
        {
            int    iResult = 0;
            string sRetMsg = "";

            MyTax.OpenCard();

            iResult = MyTax.RetCode;
            sRetMsg = MyTax.RetMsg;

            if (iResult == 1011)
            {
                _OpenTaxInfo.iInvLimit      = MyTax.InvLimit;
                _OpenTaxInfo.sTaxCode       = MyTax.TaxCode;
                _OpenTaxInfo.sMachineNo     = MyTax.MachineNo;
                _OpenTaxInfo.iIsInvEmpty    = MyTax.IsInvEmpty;
                _OpenTaxInfo.iIsRepReached  = MyTax.IsRepReached;
                _OpenTaxInfo.iIsLockReached = MyTax.IsLockReached;

                //查询库存发票

                MyTax.InfoKind = 0;
                MyTax.GetInfo();

                _StockTaxInfoPro.sInfoTypeCode = MyTax.InfoTypeCode;
                _StockTaxInfoPro.iInfoNumber   = MyTax.InfoNumber;
                _StockTaxInfoPro.iInvStock     = MyTax.InvStock;
                _StockTaxInfoPro.dTaxClock     = MyTax.TaxClock;

                MyTax.InfoKind = 2;
                MyTax.GetInfo();

                _StockTaxInfo.sInfoTypeCode = MyTax.InfoTypeCode;
                _StockTaxInfo.iInfoNumber   = MyTax.InfoNumber;
                _StockTaxInfo.iInvStock     = MyTax.InvStock;
                _StockTaxInfo.dTaxClock     = MyTax.TaxClock;
            }
            else
            {
                iResult = 1;
                sRetMsg = "金税卡打开失败!";
            }
        }