protected override object[] doService(object[] param) { object[] objArray = new object[] { false }; if (param.Length == 1) { FPLX fplx = Invoice.ParseFPLX(param[0].ToString()); InvoiceType type = (InvoiceType)2; TaxCard card = TaxCardFactory.CreateTaxCard(); if (((int)fplx != 0x29) && ((int)fplx != 2)) { return(objArray); } if ((int)fplx == 0x29) { type = (InvoiceType)0x29; } card.GetCurrentInvCode(type); if (card.RetCode != 0) { MessageManager.ShowMsgBox(card.ErrCode); objArray[0] = false; return(objArray); } if (new JSFPJSelect(fplx).ShowDialog() == DialogResult.OK) { objArray[0] = true; } } return(objArray); }
public string[] GetCurrent(FPLX fplx) { string str = ""; try { TaxCard card = TaxCardFactory.CreateTaxCard(); int num = int.Parse(Enum.Format(typeof(FPLX), fplx, "d")); InvCodeNum currentInvCode = card.GetCurrentInvCode(fplx); if ((currentInvCode.InvTypeCode == null) || (currentInvCode.InvNum == null)) { str = card.get_ErrCode(); if (str.StartsWith("TCD_768") || str.StartsWith("TCD_769")) { FormMain.CallUpload(); } return(null); } if (currentInvCode.InvTypeCode.Equals("0000000000")) { str = "INP-242104"; return(null); } str = "000000"; return(new string[] { currentInvCode.InvTypeCode, currentInvCode.InvNum }); } catch (Exception exception) { this.log.Error("读取当前发票代码号码时异常:" + exception.ToString()); str = "9999"; return(null); } }